The predicates that start my program are
(runExperiment is declared in main.cl as
predicate
runExperiment: ().
)
Code: Select all
class predicates
startExperiment : ().
checkIfExperimentOver : (flag Over [out]) determ.
advanceCounter : () nondeterm.
clauses
runExperiment() :-
startExperiment().
startExperiment() :-
assert(turnCounter(0)),
assert(objectiveStatus(b2, no, "anonymous")),
!,
checkIfExperimentOver(Over),
if Over = no then
executeTurn(),
startExperiment()
else
stdio::write("\nExperiment Concluded.\n\n")
end if.
checkIfExperimentOver(Over) :-
stdio::write("Checking to see if Experiment is Over.\n"),
!,
turnCounter(Counter),
if Counter > 100 then
% or Obj = yes then
Over = yes
else
Over = no
end if,
!.
checkIfExperimentOver(yes).
What do I need to change in order to ensure that runExperiment() is a procedure? Or am I wrong, and the predicate called by the menu item does not need to be a procedure?