Simple boolean expression testing
问题 | ?- [user]. compiling user for byte code... formula_0(P, Q):- (P; Q), \+ P. user compiled, 2 lines read - 768 bytes written, 37208 ms yes | ?- formula_0(P, Q). uncaught exception: error(instantiation_error,formula_0/2) All I basically want to do is to ask is the set of expressions {P or Q, ~P} satisfiable? But the error message is not helping here... PS. The answer should be "yes", this formula is satisfied when P = false and Q = true. 回答1: The reason you get an instantiation error is that