Did you know ... | Search Documentation: |
Pack xlibrary -- prolog/abstract_slicer.pl |
Implements the next abstract domain: find possible matches of output arguments of the given predicate.
Example:
consider the next predicate:
popt('option'(A), []) :- member(A, [1,2,3]). popt('option 1', Answer) :- append(_,_,Answer). popt('option 2', Answer) :- member(Answer, [1,2,3]). popt('option 3', []) :- member(_Answer, [1,2,3]).
If we just execute the predicate with Answer uninstatiated, we will get infinite solutions, but:
?- abstract_slice(popt(A,X),[+,?],[]). A = option(1) ; A = option(2) ; A = option(3) ; A = 'option 1' ; A = 'option 2' ; A = 'option 3'.
Will 'abstract' the execution of popt/2 to get all the matches of A, slicing out X
The following predicates are exported, but not or incorrectly documented.