From 746fa1fb9d1430747b499d667f2cfe1fc77d3718 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 18 Apr 2017 11:15:11 +0200 Subject: Prolog: add bugs files for license plate problems --- .../problems/license_plates/getdigits_2/bugs.json | 273 +++++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 prolog/problems/license_plates/getdigits_2/bugs.json (limited to 'prolog/problems/license_plates/getdigits_2') diff --git a/prolog/problems/license_plates/getdigits_2/bugs.json b/prolog/problems/license_plates/getdigits_2/bugs.json new file mode 100644 index 0000000..87b66d8 --- /dev/null +++ b/prolog/problems/license_plates/getdigits_2/bugs.json @@ -0,0 +1,273 @@ +{ + "patterns": [ + "(clause (head (compound (functor \"getdigits\") (args (list (t variable))))) (compound (functor \"getdigits\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args \"[]\"))))", + "(clause (head (compound (functor \"getdigits\") (args (args \"[]\")))))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (binop variable \"=\"))", + "(clause (head (compound (functor \"getdigits\") (args \"[]\" (args \"[]\")))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"number\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (binop \"=\" (list (h variable))))", + "(clause (binop variable \"=\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable)) (args (list (h variable)))))))", + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop \"=\" (list (t variable))))", + "(clause (compound (functor \"number\") (args variable)) (binop \"=\" (list (h variable))))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (t variable)))))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop \"=\" variable))", + "(clause (binop \"=\" (list (t variable))))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (h variable)))))) (compound (functor \"number\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"integer\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))))", + "(clause (compound (functor \"number\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (compound (functor \"conc\") (args (args (args variable)))))", + "(clause (compound (functor \"getdigits\") (args variable)))", + "(clause (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (unop \\+ (compound (functor \"number\") (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (h variable)))))) (compound (functor \"integer\") (args variable)))", + "(clause (binop \"=\" (list (h variable))))", + "(clause (compound (functor \"integer\") (args variable)) (binop \"=\" (list (h variable))))", + "(clause (head (compound (functor \"getdigits\") (args variable))) (binop variable \"=\"))", + "(clause (compound (functor \"getdigits\") (args (args variable))) (compound (functor \"conc\") (args (args variable))))", + "(clause (binop \"=\" (list (t variable))) (compound (functor \"getdigits\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"not\") (args (compound (functor \"number\") (args variable)))))", + "(clause (head (compound (functor \"getdigits\") (args \"[]\" (args variable)))))", + "(clause (binop \"=\" (list (h variable))) (compound (functor \"number\") (args variable)))", + "(clause (compound (functor \"conc\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (binop variable \"is\"))", + "(clause (binop \"=<\" \"9\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"conc\") (args (list (h variable)))))", + "(clause (binop variable \"=<\" \"9\"))", + "(clause (compound (functor \"conc\") (args (args (args variable)))))", + "(clause (binop \"=\" \"[]\"))", + "(clause (binop variable \"=\" \"[]\"))", + "(clause (compound (functor \"number\") (args variable)) (compound (functor \"conc\") (args (list (h variable)))))", + "(clause (compound (functor \"integer\") (args variable)) (binop variable \"=<\"))", + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop variable \"=\"))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (binop \"=\" (list (t variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (unop \\+ (compound (functor \"integer\") (args variable))))", + "(clause (compound (functor \"number\") (args variable)) (binop \"=\" variable))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"atom\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args (list (t variable))))))", + "(clause (compound (functor \"number\") (args variable)) (compound (functor \"conc\") (args variable)))", + "(clause (binop \"=\" (list (t variable))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (binop \"=\" variable))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (binop \"is\" (list (h variable))))", + "(clause (binop \"=\" (list (h variable))) (binop \"=\" variable))", + "(clause (binop variable \">\" \"0\"))", + "(clause (compound (functor \"is_numeric\") (args variable)) (binop \"is\" (list (h variable))))", + "(clause (binop \">\" \"0\"))", + "(clause (head (compound (functor \"is_numeric\") (args variable))) (binop variable \">\"))", + "(clause (binop variable \"=\" (list (t variable))))", + "(clause (binop variable \">\") (binop variable \"=<\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"is_numeric\") (args variable)))", + "(clause (binop \"=\" (list (h variable))) (binop \"=\" (list (h variable))))", + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop \"=\" (list (t (list (h variable))))))", + "(clause (binop \"is\" (list (t variable))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"is_numeric\") (args variable))) (binop variable \"=<\"))", + "(clause (binop variable \">=\" \"0\"))", + "(clause (binop \"is\" (list (t variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"conc\") (args variable)))", + "(clause (binop \">=\" \"0\"))", + "(clause (compound (functor \"integer\") (args variable)) (binop variable \">\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"not\") (args (compound (functor \"integer\") (args variable)))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"not\") (args (compound (functor \"is_numeric\") (args variable)))))", + "(clause (binop variable \">=\") (binop variable \"=<\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable)) (args \"[]\")))))", + "(clause (head (compound (functor \"is_numeric\") (args variable))) (compound (functor \"integer\") (args variable)))", + "(clause (compound (functor \"integer\") (args variable)) (binop variable \">=\"))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (binop \"=\" variable))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (h variable)))))) (binop variable \"=\"))", + "(clause (head (compound (functor \"getdigits_aux\") (args (list (t variable))))) (compound (functor \"getdigits_aux\") (args variable)))", + "(clause (binop \"=\" (list (t (list (h variable))))))", + "(clause (compound (functor \"conc\") (args (args (args variable)))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args variable))))", + "(clause (binop variable \"is\"))", + "(clause (head (compound (functor \"getdigits_aux\") (args (args (args variable))))) (compound (functor \"getdigits_aux\") (args (args (args variable)))))", + "(clause (binop variable \"=\") (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (binop (list (h variable)) \"=\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"append\") (args (list (h variable)))))", + "(clause (compound (functor \"number\") (args variable)) (binop (list (h variable)) \"=\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (binop variable \">=\"))", + "(clause (binop \"=\" (list (t variable))) (binop variable \"=\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (binop \"=\" variable))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (t (list (h variable)))))))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (h variable)))))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"conc\") (args (args (list (h variable))))))", + "(clause (compound (functor \"integer\") (args variable)) (compound (functor \"append\") (args (list (h variable)))))", + "(clause (binop (list (h variable)) \"=\"))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (h variable)))))) (binop variable \">=\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"notnumber\") (args variable)))", + "(clause (binop (list (t variable)) \"=\"))", + "(clause (compound (functor \"integer\") (args variable)))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (binop variable \"=<\"))", + "(clause (binop variable \"=\") (binop variable \"=\"))", + "(clause (binop \"is\" variable) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (compound (functor \"write\") (args variable)) (binop \"=\" (list (t variable))))", + "(clause (compound (functor \"number\") (args variable)) (compound (functor \"conc\") (args (args (list (h variable))))))", + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop \"=\" (list (h variable))))", + "(clause (head (compound (functor \"is_numeric\") (args variable))))", + "(clause (compound (functor \"write\") (args variable)) (binop \"=\" variable))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"getdigits\") (args (args (list (h variable))))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable)) (args variable)))))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (h variable)))))) (binop variable \"=<\"))", + "(clause (head (compound (functor \"getdigits\") (args (list (t variable))))) (compound (functor \"conc\") (args (list (h variable)))))", + "(clause (compound (functor \"append\") (args (args \"[]\" (args variable)))))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (compound (functor \"number\") (args variable)))", + "(clause (compound (functor \"append\") (args (args \"[]\"))))", + "(clause (compound (functor \"append\") (args (list (h variable)) (args \"[]\"))))" + ], + "rules": [ + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"getdigits\") (args (args variable)))))" + ], + "distribution": [ + 51, + 0 + ], + "quality": 0.9652176227596819 + }, + { + "class": false, + "condition": [ + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop variable \"=\"))" + ], + "distribution": [ + 17, + 0 + ], + "quality": 0.8768657719891855 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (binop \"=\" (list (t variable))))" + ], + "distribution": [ + 17, + 0 + ], + "quality": 0.8768657719891855 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"atom\") (args variable)))" + ], + "distribution": [ + 15, + 0 + ], + "quality": 0.8578818947205746 + }, + { + "class": false, + "condition": [ + "(clause (compound (functor \"number\") (args variable)) (compound (functor \"conc\") (args variable)))" + ], + "distribution": [ + 15, + 0 + ], + "quality": 0.8578818947205746 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"getdigits\") (args (list (t variable))))))" + ], + "distribution": [ + 15, + 0 + ], + "quality": 0.8578818947205746 + }, + { + "class": false, + "condition": [ + "(clause (binop \"=\" (list (h variable))) (binop \"=\" variable))" + ], + "distribution": [ + 13, + 0 + ], + "quality": 0.8311172238007712 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"conc\") (args variable)))" + ], + "distribution": [ + 12, + 0 + ], + "quality": 0.8168185911047623 + }, + { + "class": false, + "condition": [ + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop \"=\" (list (t (list (h variable))))))" + ], + "distribution": [ + 12, + 0 + ], + "quality": 0.8168185911047623 + }, + { + "class": true, + "condition": [ + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop \"=\" variable))", + "(clause (compound (functor \"number\") (args variable)) (binop \"=\" (list (h variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (unop \\+ (compound (functor \"number\") (args variable))))" + ], + "distribution": [ + 1, + 17 + ], + "quality": 0.7418815711079951 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"getdigits\") (args \"[]\"))))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (args (list (t variable)))))) (compound (functor \"getdigits\") (args (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (unop \\+ (compound (functor \"number\") (args variable))))" + ], + "distribution": [ + 0, + 14 + ], + "quality": 0.7354228144913182 + }, + { + "class": true, + "condition": [ + "(clause (compound (functor \"getdigits\") (args (args variable))) (binop \"=\" variable))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (unop \\+ (compound (functor \"number\") (args variable))))", + "(clause (head (compound (functor \"getdigits\") (args (args variable)))) (binop variable \"=\"))" + ], + "distribution": [ + 2, + 18 + ], + "quality": 0.7047381496232106 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"getdigits\") (args \"[]\"))))", + "(clause (head (compound (functor \"getdigits\") (args (list (h variable))))) (compound (functor \"not\") (args (compound (functor \"integer\") (args variable)))))" + ], + "distribution": [ + 0, + 5 + ], + "quality": 0.4050731634154367 + } + ] +} \ No newline at end of file -- cgit v1.2.1