From 2c3e688c3f779f0abfaad887f13ab2b70c9f814a Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Wed, 30 Jun 2021 01:58:24 +0000 Subject: Add backtracking to the evaluator. This means we have to keep track of choicepoints which is implemented the easy but wasteful way for now. I have also added a number which is used to differentiate variables from different application of the clauses. --- main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 106e6ff..76d8e04 100644 --- a/main.c +++ b/main.c @@ -30,10 +30,7 @@ main(int argc, char *argv[]) if(fd < 0) exits("open"); Term *prog = parse(fd); - Term *clause; - for(clause = prog; clause != nil; clause = clause->next) - print("%S.\n", prettyprint(clause)); - + Term *goal; for(goal = initgoals; goal != nil; goal = goal->next) evalquery(prog, goal); -- cgit v1.2.3