Because:
Right click in your source text on the predicate name
all and select
Go to/
Go to Declaration. That takes you to the declaration of the
list::all/2 predicate:
Code: Select all
predicates
all : (Elem* List, predicate_dt{Elem} Test) determ.
The predicate is declared to have
predicate mode determ. That means it can either have none or one solution. In other words, it will either fail or succeed without a backtrack point to it.
By right clicking on
run you can in same way go to the declaration of the
main::run/0 predicate:
Continuing that trick you go to the declaration of predicate domain
core::runable:
Finally go to the declaration of
core::predicate:
The declaration of domain
core::predicate states no predicate mode. Omitting of a predicate mode means that the default mode applies which is
procedure. Mode
procedure means that the predicate has exactly one solution. In other words, the predicate always succeeds without a backtrack point to it.
The compiler now complains about a contradiction: Your implementation of predicate
main::run/0 can (according to declarations) fail because of the call to
list::all/2, but
main::run/0 is declared to succeed always. More precisely, the implementation you supplied for
main::run/0 is of mode
determ, while the declaration of
main::run/0 requires an implementation of the stronger mode
procedure.