From 92c49ac708e04e545da6e7aafe91cac8f223f475 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 27 Feb 2017 18:35:01 +0100 Subject: Prolog: add bugs files for the first six groups --- prolog/problems/lists_advanced/len_2/bugs.json | 371 +++++++++++++++++++++++++ 1 file changed, 371 insertions(+) create mode 100644 prolog/problems/lists_advanced/len_2/bugs.json (limited to 'prolog/problems/lists_advanced/len_2/bugs.json') diff --git a/prolog/problems/lists_advanced/len_2/bugs.json b/prolog/problems/lists_advanced/len_2/bugs.json new file mode 100644 index 0000000..3a537ff --- /dev/null +++ b/prolog/problems/lists_advanced/len_2/bugs.json @@ -0,0 +1,371 @@ +{ + "patterns": [ + "(clause (head (compound (functor \"len\") (args (list (h variable))))))", + "(clause (head (compound (functor \"len\") (args \"[]\"))))", + "(clause (head (compound (functor \"len\") (args (list (t variable))))) (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))", + "(clause (binop \"is\" (binop \"+\" \"1\")))", + "(clause (binop variable \"is\" (binop \"+\" \"1\")))", + "(clause (binop \"is\" (binop variable \"+\" \"1\")))", + "(clause (head (compound (functor \"len\") (args (args \"0\")))))", + "(clause (head (compound (functor \"len\") (args \"[]\" (args \"0\")))))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))", + "(clause (head (compound (functor \"len\") (args \"[]\" (args variable)))))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop \"is\" (binop variable \"+\")))", + "(clause (head (compound (functor \"len\") (args variable))) (binop variable \"=\"))", + "(clause (binop variable \"is\") (compound (functor \"len\") (args (args variable))))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"=\"))", + "(clause (head (compound (functor \"len\") (args (args variable)))))", + "(clause (head (compound (functor \"len\") (args (args \"1\")))))", + "(clause (binop \"=\" (list (h variable))))", + "(clause (head (compound (functor \"len\") (args (list (h variable)) (args \"1\")))))", + "(clause (binop \"=\" (list (t variable))) (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (compound (functor \"len\") (args (args variable))))", + "(clause (binop \"is\" (binop \"1\" \"+\")))", + "(clause (binop variable \"is\" (binop \"1\" \"+\")))", + "(clause (binop \"is\" \"0\"))", + "(clause (binop variable \"is\" \"0\"))", + "(clause (binop \"=\" \"0\"))", + "(clause (binop variable \"=\" \"0\"))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop \"+\" variable)))", + "(clause (binop \"is\" (binop \"1\" \"+\" variable)))", + "(clause (binop \"is\" (binop variable \"+\")) (compound (functor \"len\") (args (args variable))))", + "(clause (compound (functor \"len\") (args (args variable))))", + "(clause (binop variable \"is\" (binop variable \"+\")))", + "(clause (binop variable \"is\"))", + "(clause (binop \"=\" \"[]\"))", + "(clause (head (compound (functor \"len\") (args (args (binop \"+\" \"1\"))))))", + "(clause (head (compound (functor \"len\") (args (list (h variable)) (args (binop \"+\" \"1\"))))))", + "(clause (binop variable \"=\" \"[]\"))", + "(clause (head (compound (functor \"len\") (args (list (t variable)) (args (binop \"+\" \"1\"))))))", + "(clause (binop \"=\" (binop variable \"+\" \"1\")))", + "(clause (binop variable \"=\" (binop \"+\" \"1\")))", + "(clause (binop \"=\" (binop \"+\" \"1\")))", + "(clause (compound (functor \"len\") (args (args variable))) (binop variable \"is\"))", + "(clause (binop variable \"=\"))", + "(clause (head (compound (functor \"len\") (args (args (binop variable \"+\" \"1\"))))))", + "(clause (binop variable \"is\" \"1\"))", + "(clause (head (compound (functor \"len\") (args (args (binop variable \"+\"))))) (compound (functor \"len\") (args (args variable))))", + "(clause (binop \"is\" \"1\"))", + "(clause (head (compound (functor \"len\") (args (list (h variable) (t \"[]\"))))))", + "(clause (binop \"is\" (binop variable \"+\")))", + "(clause (head (compound (functor \"len\") (args variable))) (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args (list (t \"[]\"))))))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"=\" (binop variable \"+\")))", + "(clause (head (compound (functor \"len\") (args (args variable (args variable))))))", + "(clause (head (compound (functor \"len\") (args \"[]\" (args (args variable))))))", + "(clause (compound (functor \"len\") (args (args (args (binop variable \"+\" \"1\"))))))", + "(clause (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args variable))))", + "(clause (compound (functor \"len\") (args (args variable (args (binop \"+\" \"1\"))))))", + "(clause (compound (functor \"len\") (args (args (args (binop \"+\" \"1\"))))))", + "(clause (compound (functor \"len\") (args variable (args (args (binop \"+\" \"1\"))))))", + "(clause (head (compound (functor \"len\") (args (args (args variable))))) (compound (functor \"len\") (args (args (args (binop variable \"+\"))))))", + "(clause (head (compound (functor \"len\") (args \"[]\" (args \"1\")))))", + "(clause (head (binop variable \"is\")))", + "(clause (binop \"is\" (binop variable \"-\" \"1\")))", + "(clause (binop \"is\" (binop \"-\" \"1\")))", + "(clause (binop variable \"is\" (binop \"-\" \"1\")))", + "(clause (head (compound (functor \"len\") (args (list (t \"[]\")) (args variable)))))" + ], + "rules": [ + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop \"is\" (binop variable \"+\")))" + ], + "distribution": [ + 68, + 0 + ], + "quality": 0.9727078428864591 + }, + { + "class": false, + "condition": [ + "(clause (binop variable \"is\") (compound (functor \"len\") (args (args variable))))" + ], + "distribution": [ + 49, + 0 + ], + "quality": 0.9614398238300143 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"len\") (args (args variable)))))" + ], + "distribution": [ + 44, + 0 + ], + "quality": 0.956836113223887 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args (list (t variable))))) (compound (functor \"len\") (args variable)))", + "(clause (binop \"is\" (binop \"+\" \"1\")))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))", + "(clause (head (compound (functor \"len\") (args (args \"0\")))))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))" + ], + "distribution": [ + 6, + 167 + ], + "quality": 0.9503656316623829 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args \"[]\"))))", + "(clause (head (compound (functor \"len\") (args (list (t variable))))) (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))" + ], + "distribution": [ + 10, + 179 + ], + "quality": 0.9339224337811853 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args (args \"0\")))))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))" + ], + "distribution": [ + 10, + 172 + ], + "quality": 0.9319373101392443 + }, + { + "class": false, + "condition": [ + "(clause (binop \"is\" (binop variable \"+\")) (compound (functor \"len\") (args (args variable))))" + ], + "distribution": [ + 24, + 0 + ], + "quality": 0.9209156299301058 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args \"[]\"))))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))" + ], + "distribution": [ + 15, + 186 + ], + "quality": 0.9137691073602562 + }, + { + "class": false, + "condition": [ + "(clause (compound (functor \"len\") (args (args variable))))" + ], + "distribution": [ + 22, + 0 + ], + "quality": 0.9134783484069616 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args (list (t variable))))) (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))" + ], + "distribution": [ + 20, + 181 + ], + "quality": 0.8882648872521293 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"len\") (args (args (binop \"+\" \"1\"))))))" + ], + "distribution": [ + 16, + 0 + ], + "quality": 0.880196072529589 + }, + { + "class": false, + "condition": [ + "(clause (binop \"=\" (binop variable \"+\" \"1\")))" + ], + "distribution": [ + 15, + 0 + ], + "quality": 0.8723981081411187 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))", + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))" + ], + "distribution": [ + 27, + 192 + ], + "quality": 0.866747278996158 + }, + { + "class": false, + "condition": [ + "(clause (compound (functor \"len\") (args (args variable))) (binop variable \"is\"))" + ], + "distribution": [ + 14, + 0 + ], + "quality": 0.8635813115896738 + }, + { + "class": true, + "condition": [ + "(clause (compound (functor \"len\") (args (args variable))) (binop \"is\" (binop variable \"+\")))" + ], + "distribution": [ + 35, + 193 + ], + "quality": 0.8378438890688092 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args (list (t variable))))) (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))", + "(clause (head (compound (functor \"len\") (args (args \"0\")))))" + ], + "distribution": [ + 34, + 182 + ], + "quality": 0.8304984753873256 + }, + { + "class": false, + "condition": [ + "(clause (binop \"is\" (binop variable \"+\")))" + ], + "distribution": [ + 10, + 0 + ], + "quality": 0.8090841003084915 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))", + "(clause (head (compound (functor \"len\") (args (args \"0\")))))" + ], + "distribution": [ + 42, + 190 + ], + "quality": 0.8090037407616595 + }, + { + "class": false, + "condition": [ + "(clause (binop variable \"is\"))", + "(clause (head (compound (functor \"len\") (args \"[]\"))))" + ], + "distribution": [ + 12, + 0 + ], + "quality": 0.8044129053953029 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args \"[]\"))))", + "(clause (head (compound (functor \"len\") (args (list (t variable))))) (compound (functor \"len\") (args variable)))", + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"is\"))" + ], + "distribution": [ + 56, + 197 + ], + "quality": 0.7688780423248074 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"len\") (args (args variable)))) (binop variable \"=\"))", + "(clause (head (compound (functor \"len\") (args (args \"0\")))))" + ], + "distribution": [ + 9, + 0 + ], + "quality": 0.7315031617727911 + }, + { + "class": true, + "condition": [ + "(clause (head (compound (functor \"len\") (args \"[]\"))))", + "(clause (head (compound (functor \"len\") (args (list (t variable))))) (compound (functor \"len\") (args variable)))", + "(clause (binop variable \"is\" (binop \"+\" \"1\")))" + ], + "distribution": [ + 73, + 180 + ], + "quality": 0.6988970183782519 + }, + { + "class": false, + "condition": [ + "(clause (compound (functor \"len\") (args variable)))" + ], + "distribution": [ + 6, + 0 + ], + "quality": 0.6895831407852365 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"len\") (args variable))))" + ], + "distribution": [ + 6, + 0 + ], + "quality": 0.6895831407852365 + }, + { + "class": false, + "condition": [ + "(clause (head (compound (functor \"len\") (args \"[]\" (args \"1\")))))" + ], + "distribution": [ + 5, + 0 + ], + "quality": 0.6429023884024729 + } + ] +} \ No newline at end of file -- cgit v1.2.1