Constructive Negation Based on the Completed Database

1. The following program shows that constructive negation can finitely fails whereas the " delay technique " produces infinite computation p(a). % File delay.pnt in programs.zip p(f(X)):-p(X). r(X):-! s(X). s(g(X)). Both questions : !r(X),p(X). and p(X),!r(X). produce an immediate fail in the BCN prototype. However, the " the delay technique " checks if each answer for p(X) is a finite failure of r(X) (which, indeed, is the case), producing an infinite number of checks. 2. The following program is a typical example of recursion through negation: even(0). % File even.pnt in programs.zip even(s(X)):-! even(X). Both questions !even(Z). and !even(Z),even(s(Z))., conducted by the BCN prototype, produce the answers: • Z = s(0); • Z = s(s(s(0))); • Z = s(s(s(s(s(0))))); • … and so on However, the question !even(Z),!even(s(Z)). produces infinite computation (without answers). This is the expected behaviour if we consider the declarative semantics given by the three-valued logical consequences of program completion. 3. A similar behaviour is shown by the following definite program: less(0,s(Y)). %File less.pnt in programs. whereas the question !less(X,s(X)) produces (as expected) infinite computation (without answers).