7 Ask-the-user |
To to make an atom askable, you can issue the command:
cilog:askable atom.Whenever a ground instance of the atom is attempted to be proved, the user is asked if it is true. The system may ask:
Is g true?The user can reply with one of:
Example.
The following gives the example of the electrical example with
askables (see [1], page 214):
cilog: load 'cilog_code/ch6/elect_askable.pl'.
CILOG theory cilog_code/ch6/elect_askable.pl loaded.
cilog: ask lit(L).
Is up(s2) true? [yes,no,unknown,why,help]: yes.
Is up(s1) true? [yes,no,unknown,why,help]: no.
Is down(s2) true? [yes,no,unknown,why,help]: no.
Is up(s3) true? [yes,no,unknown,why,help]: yes.
Answer: lit(l2).
[ok,more,how,help]: ok.
7 Ask-the-user |