Meta-interpreter for Prolog

From: Sara Bernardini <sarabern_at_tiscalinet.it>
Date: Thu 27 Sep 2001 09:21:24 PM GMT
Message-ID: <006d01c1479a$5d16de40$e1780b3e@pmeridia>
Hello,
I am using ECLiPSe to construct a simple meta-interpreter for Prolog but I meet a problem when I try to write a clause to manage the cut.
My simple interpreter is something like that:

solve(true):-!.
solve((A,B)):-!,solve(A),solve(B).
solve(not A):-!,not solve(A).
solve(A):-clause(A,B),solve(B).

I would like adding a clause like   solve(!):-......  , but neither 

solve(!):-!. 

nor 

solve(!):-!(reduce(A)).
reduce(A):-clause(A,B),solve(B). 

work.

Might you please give me any suggestion.
 
Thanks you very much for your help.
 
                                                                                                                    Yours sincerely
                                                                                                                                                Sara 
Received on Thu Sep 27 22:23:32 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:10 PM GMT GMT