Vanilla meta-interpreter in prolog is structured in this way.

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

This is the implementation of the left-most goal selection.
For the right-most we need to apply solve(B) first and then solve(A).

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

Prolog is able to prove something, but also we can compute the profundity of the path.
It is important because we can find the optimal path to reach the solution.

solve(true, 0) :- !.
solve( (A,B), S ) :- !, solve(A,SA), solve(B,SB), S is SA + SB.
solve(A,S) :- clause(A,B), solve(B,SB), S is SB.

If we wanted to define meta-interpreter solve(Goal,CF) that is true if Goal can be proved with certainty CF.

Starting from a set of rules:

rule(x, (y,z), 10).
rule(y, true, 100).
rule(z, true, 50).

solve(true, 100) :- !.
solve( (A,B), CF ) :- !, solve(A,CFA), solve(B, CFB), min(CFA,CFB,CF).
solve(A,CF) :- rule(A, B, CFR), solve(B,CFB), CF is ((CFR*CFB)/100).

min(A,B,B) :- A>=B, !.
min(A,B,A).