The editor I used in class (called PCE Emacs) comes with your SWI Prolog download. However, the default install is configured to use your normal text editor (usually Notepad). In order to make PCE Emacs the default editor from SWI Prolog, do the following
:- set_prolog_flag(editor, pce_emacs).
Warning: (c:/program files/prolog/problem1.pro:5): Clauses of likes/2 are not together in the source-file % problem1 compiled 0.00 sec, 0 bytesWhat does this mean?
Generally, Prolog programs are easier to read when all of the clauses with the same head are grouped together. Note, this is not required, which is why it is only a warning and not an error. To make the message go away, simply make sure all rules with the same functor in the head (i.e., left hand side) and all facts with the same functor are on consectutive lines.
The rule in the book is overly restrictive. In fact, you are allowed to use variables in your precondition that do not appear in the action's parameter list. However, it is true that all variables in the effect must appear in the parameter list.
Yes, it should read "Add a causal link to achieve the precondition of ActionD ...".