Meta interpreter 3

Description

A meta-interpreter for reasoning with uncertainty

Source: The Art of Prolog

Download

Program source code: meta_interpreter_3.pl

Listing

/*
  solve(Goal,Certainty) :-
     Certainty is our confidence that Goal is true. 
*/
     solve(true,1) :- !.
     solve((A,B),C) :- !,
	solve(A,C1), solve(B,C2), minimum(C1,C2,C).
     solve(A,1) :- builtin(A), !, A.
     solve(A,C) :-
	clause_cf(A,B,C1), solve(B,C2), C is C1 * C2.
 
   minimum(X,Y,X) :- X =< Y, !.
   minimum(X,Y,Y) :- X > Y, !.
 
%  Program 17.9   A meta-interpreter for reasoning with uncertainty

Comments

pl/prolog/pllib/meta_interpreter_3.txt · ostatnio zmienione: 2019/06/27 15:50 (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