From 0bb8a8dd88e7ba782af77be699d2c9df84e81241 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 13 Mar 2017 16:34:38 +0100 Subject: Prolog: add bugs file for the last_elem problem --- prolog/problems/lists/last_elem_2/bugs.json | 199 ++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 prolog/problems/lists/last_elem_2/bugs.json diff --git a/prolog/problems/lists/last_elem_2/bugs.json b/prolog/problems/lists/last_elem_2/bugs.json new file mode 100644 index 0000000..a025b87 --- /dev/null +++ b/prolog/problems/lists/last_elem_2/bugs.json @@ -0,0 +1,199 @@ +{ + "patterns": [ + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (compound (functor \"last_elem\") (args (args variable))))", + "(clause (head (compound (functor \"last_elem\") (args (list (h variable))))))", + "(clause (head (compound (functor \"last_elem\") (args (list (h variable)) (args variable)))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))) (compound (functor \"last_elem\") (args variable)))", + "(clause (head (compound (functor \"last_elem\") (args (list (t \"[]\"))))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t \"[]\")) (args variable)))))", + "(clause (head (compound (functor \"last_elem\") (args (list (h variable) (t \"[]\"))))))", + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (binop variable \"=\"))", + "(clause (head (compound (functor \"last_elem\") (args variable))) (binop variable \"=\"))", + "(clause (binop variable \"=\"))", + "(clause (head (compound (functor \"last_elem\") (args (list (h variable))))) (binop \"=\" variable))", + "(clause (binop \"=\" (list (h variable))))", + "(clause (binop \"=\" (list (t variable))) (compound (functor \"last_elem\") (args variable)))", + "(clause (binop \"=\" \"[]\"))", + "(clause (binop variable \"=\" \"[]\"))", + "(clause (binop \"=\" (list (h variable))) (binop \"=\" variable))", + "(clause (binop \"=\" (list (t variable))))", + "(clause (compound (functor \"conc\") (args variable)))", + "(clause (head (compound (functor \"last_elem\") (args variable))) (compound (functor \"conc\") (args (args (args variable)))))", + "(clause (head (compound (functor \"last_elem\") (args (args variable)))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t variable)) (args variable)))))", + "(clause (binop \"=\" variable))", + "(clause (binop \"=\" (list (t variable))) (binop variable \"=\"))", + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (compound (functor \"conc\") (args (args (list (h variable))))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))) (binop variable \"=\"))", + "(clause (head (compound (functor \"last_elem\") (args variable (args variable)))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t (list (h variable))))))) (compound (functor \"last_elem\") (args variable)))", + "(clause (head (compound (functor \"last_elem\") (args (args \"[]\")))))", + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (binop \"=\" variable))", + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))))", + "(clause (compound (functor \"last_elem\") (args (args variable))) (binop \"=\" variable))" + ], + "rules": [ + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (compound (functor \"last_elem\") (args (args variable))))", + "(clause (head (compound (functor \"last_elem\") (args (list (h variable)) (args variable)))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))) (compound (functor \"last_elem\") (args variable)))" + ], + "distribution": [ + 3, + 52 + ], + "quality": 0.9064402532935717 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))) (compound (functor \"last_elem\") (args variable)))", + "(clause (head (compound (functor \"last_elem\") (args (list (h variable)) (args variable)))))" + ], + "distribution": [ + 4, + 53 + ], + "quality": 0.8946018524838915 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (compound (functor \"last_elem\") (args (args variable))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))) (compound (functor \"last_elem\") (args variable)))", + "(clause (head (compound (functor \"last_elem\") (args (list (t \"[]\"))))))" + ], + "distribution": [ + 1, + 27 + ], + "quality": 0.8856043173012532 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))) (compound (functor \"last_elem\") (args variable)))", + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (binop variable \"=\"))" + ], + "distribution": [ + 0, + 13 + ], + "quality": 0.8584147876119224 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (compound (functor \"last_elem\") (args (args variable))))", + "(clause (head (compound (functor \"last_elem\") (args (list (h variable)) (args variable)))))" + ], + "distribution": [ + 10, + 56 + ], + "quality": 0.813983278477941 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (compound (functor \"conc\") (args (args (list (h variable))))))" + ], + "distribution": [ + 0, + 8 + ], + "quality": 0.7998201565858898 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (args variable)))) (compound (functor \"last_elem\") (args (args variable))))", + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))) (compound (functor \"last_elem\") (args variable)))" + ], + "distribution": [ + 13, + 63 + ], + "quality": 0.799525339838894 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (args variable)))))" + ], + "distribution": [ + 8, + 0 + ], + "quality": 0.776367204675078 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (list (t variable)) (args variable)))))" + ], + "distribution": [ + 7, + 0 + ], + "quality": 0.7513001990577347 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (list (t (list (h variable))))))) (compound (functor \"last_elem\") (args variable)))" + ], + "distribution": [ + 7, + 0 + ], + "quality": 0.7513001990577347 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args variable (args variable)))))" + ], + "distribution": [ + 7, + 0 + ], + "quality": 0.7513001990577347 + }, + { + "class": true, + "condition": [ + "(clause (compound (functor \"last_elem\") (args (args variable))) (binop \"=\" variable))" + ], + "distribution": [ + 0, + 5 + ], + "quality": 0.7023416376709439 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (list (t variable))))))" + ], + "distribution": [ + 5, + 0 + ], + "quality": 0.6645557351402199 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"last_elem\") (args (args \"[]\")))))" + ], + "distribution": [ + 5, + 0 + ], + "quality": 0.6645557351402199 + } + ] +} \ No newline at end of file -- cgit v1.2.1