Information technology - Programming languages - Prolog - Part 1:
General Core
Post WDCor.3 defect reports



This documents collects defect reports that were noted after WDCor.3.
2: * Body to term conversion incorrect. Description of clause/2 inconsistent
Source: SO

Nature of defect: The declarative and procedural descriptions of clause/2 in 8.8.1.1 are inconsistent. The error is in the procedural description that does not take into account the sharing of variables between the head and body of a rule.
Similarly, 7.6.4 body to term conversion is incorrect.

Example:

:- dynamic(a/1).
:- dynamic(c/0).

a(X) :- b(X).

c :- a(X), b(X).

?- clause(a(A), b(B)), A == B.
?- clause(c, ( a(A), b(B) )), A == B.
The declarative description demands correctly that both queries should succeed. However, the current procedural description demands that A and B are independent copies of the same variable, thus A == B fails.

Solution: Reword 7.6.4 and 8.8.1.1.

1: * missing bar in token rule
Source: SO

Nature of defect: the non-terminal token (* 6.4 *) could include bar for reasons of consistency.

Solution: Add bar to token (* 6.4 *). However, this leads to ambiguity, since ht sep (* 6.4 *) describes the very same text as bar (* 6.4 *) So further clarification would be required.


Validated HTML