Spis treści

Meta interpreter 6

Description

The basic Prolog meta-interpreter.

Source: PROLOG programming for artificial intelligence, 3rd Edition, Harlow, 2001, ISBN 0-201-40375-7.

Download

Program source code: meta_interpreter_6.pl

Listing

% Figure 23.1  The basic Prolog meta-interpreter.
 
 
% The basic Prolog meta-interpreter
 
prove( true).
 
prove( ( Goal1, Goal2))  :-
  prove( Goal1),
  prove( Goal2).
 
prove( Goal)  :-
  clause( Goal, Body),
  prove( Body).

Comments