Meta interpreter 2

Description

A meta-interpreter for building a proof tree

Source: The Art of Prolog

Download

Program source code: meta_interpreter_2.pl

Listing

/*  
   solve(Goal,Tree) :-		       
	Tree is a proof tree for Goal given the program 
	defined by clause/2.
*/
    solve(true,true) :- !.
    solve((A,B),(ProofA,ProofB)) :- !,
       solve(A,ProofA), solve(B,ProofB).
    solve(A,(A:-builtin)) :- builtin(A), !, A.
    solve(A,(A:-Proof)) :-
       clause(A,B), solve(B,Proof).
 
% Program 17.8	A meta-interpreter for building a proof tree

Comments

pl/prolog/pllib/meta_interpreter_2.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0