?- consult('crypto_i.pro'). true. ?- parser. |: Use one and two and three and four and five to make zero. problem(numbers(1,2,3,4,5),goal(0)) |: Use nine nine eight seven six to make one. Not a sentence ... |: Use nine nine eight seven and six to make one. problem(numbers(9,9,8,7,6),goal(1)) |: Write five in terms of the odd numbers. problem(numbers(1,3,5,7,9),goal(5)) |: Write zero in terms of the first five positive numbers. problem(numbers(1,2,3,4,5),goal(0)) |: Can you make whatever from whatever? Not a sentence ... |: Use whateer to make whatever. Not a sentence ... |: Use whatever to make whatever. problem(numbers(6,1,8,7,5),goal(7)) |: Can you make nine fro numbers zero through four? Not a sentence ... |: Can you make nine from numbers zero through four? problem(numbers(0,1,2,3,4),goal(9)) |: Can you make five with numbers one through five? problem(numbers(1,2,3,4,5),goal(5)) |: Use five zeros to make one. problem(numbers(0,0,0,0,0),goal(1)) |: Use four fours and one one to make seven. problem(numbers(4,4,4,4,1),goal(7)) |: Use four four and one ones to make seven. Not a sentence ... |: Use one one and four fours to make seven. problem(numbers(1,4,4,4,4),goal(7)) |: Cah you make zero from two fives and three fours? Not a sentence ... |: Can you make zero from two fives and three fours? problem(numbers(5,5,4,4,4),goal(0)) |: Can you make nine from two twos and one one and three threes? Not a sentence ... |: Can you make nine from two twos and one one and two threes? problem(numbers(2,2,1,3,3),goal(9)) |: Can you make nine from two twos and one one and two threes? problem(numbers(2,2,1,3,3),goal(9)) |: Can you make eight from one nine and two eights and two sevens? problem(numbers(9,8,8,7,7),goal(8)) |: Can you make zero from two ones and two twos and one nine? problem(numbers(1,1,2,2,9),goal(0)) |: ^C ^C WARNING: By typing Control-C twice, you have forced an asynchronous WARNING: interrupt. Your only SAFE operations are: c(ontinue), p(id), WARNING: s(stack) and e(xit). Notably a(abort) often works, but WARNING: leaves the system in an UNSTABLE state Action (h for help) ? abort % Execution Aborted ?- interpreter. |: Use whatever to make whatever. Solution: ( ( 0 * ( 6 + 6 ) ) + ( 8 - 1 ) ) |: Use one and two and three and four and five to make zero. Solution: ( ( 4 + 5 ) - ( ( 1 + 2 ) * 3 ) ) |: Use five zeros to make one. No solution to this problem. |: Write five in terms of the odd numbers. Solution: ( 9 - ( ( 1 * 3 ) / ( 5 + 7 ) ) ) |: Write five in terms of the even numbers. Not a sentence ... |: Use whatever to make whatever. Solution: ( ( 8 - 4 ) - ( 0 + ( 6 + 3 ) ) ) |: Use whatever to make whatever. Solution: ( ( 9 - 5 ) - ( 3 + ( 2 + 8 ) ) ) |: Can you make zero from three through seven? Not a sentence ... |: Can you make zero from numbers three through seven? Solution: ( ( 5 + 6 ) * ( ( 3 + 4 ) - 7 ) ) |: Can you make zero with five nines? Solution: ( 9 * ( ( 9 + 9 ) - ( 9 + 9 ) ) ) |: Can you make four with four fours and one one? Solution: ( ( 4 + 4 ) / ( ( 4 / 4 ) + 1 ) ) |: Can you make seven with two sixes and three eights? Solution: ( ( 8 / 8 ) - ( 8 + ( 6 - 6 ) ) ) |: Can you make seven with three eights and two sixes? Solution: ( ( 8 - ( 8 + 8 ) ) - ( 6 / 6 ) ) |: ^C ^C WARNING: By typing Control-C twice, you have forced an asynchronous WARNING: interrupt. Your only SAFE operations are: c(ontinue), p(id), WARNING: s(stack) and e(xit). Notably a(abort) often works, but WARNING: leaves the system in an UNSTABLE state Action (h for help) ? abort % Execution Aborted ?- halt. %---------------------------------------------------------------------------------------------- ?- parser. |: Use one and two and three and four and five to make zero. Char: 85 FirstWord: use NextChar: 32 S: [use,one,and,two,and,three,and,four,and,five,to,make,zero,.] Problem: problem(numbers(1,2,3,4,5),goal(0)) ?- interpreter. |: Use one and two and three and four and five to make zero. Problem: problem(numbers(1,2,3,4,5),goal(0)) S: [use,one,and,two,and,three,and,four,and,five,to,make,zero,.] Solution: ( ( 4 + 5 ) - ( ( 1 + 2 ) * 3 ) )