Is it possible to partially match rule in prolog ?
a( b ) :- k(c),k( d ).a( e ) :- k(g),k( d ).
So knowing that k(d):-true. is it somehow possible to obtain b & e ?
I finally did what i wanted to and it goes like this (swi_prolog) where rule is the name of rules to check
true_check([_,H,B]):-
call(H)->true;B=..L,true_check(L).
true_check([B]) :-
call(B)->true;false.
possible(Rule):-
current_predicate(rule,Head),
clause(Head,B),
B=..I,
true_check(I),
Head=..[_,Rule].
a(b)given thatk(d)is true, butk(c)is false, you can't with the rules you're showing. You might be able to create a meta-interpreter of the rules to determine that, however. - lurkera( )rules and all their right side elements , and check if one is true ? - molok