Expand the logic programming interpreter to include or and not relations. This will allow rules to contain more complex relationships between its premises. Expand the logic programming language to...

Expand the logic programming interpreter to include or and not relations. This will allow rules to contain more complex relationships between its premises. Expand the logic programming language to include arithmetic comparisons, =, <,>. Hint: as in Exercise 1, modify solve to detect these comparisons before calling infer. If an expression is a comparison, replace any variables with their values and evaluate it. If it returns nil, solve should return the empty stream; if it returns non-nil, solve should return a stream containing the initial substitution set. Assume that the expressions do not contain unbound variables.

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here