Suppose I have db facts filled in at least:
fact1(A) :- !, A=ok. fact2(B) :- !, B=ok.
How can I list all the facts in this db? Ideally, I would have a predicate that I could use:
?- all_rules( Head :- Tail). Head=fact1(_G100), Tail=(!, _G100=ok) ; Head=fact2(_G101), Tail=(!, _G101=ok) ....followed by all other predicates in other modules loaded...
I found current_predicate / 1 , but I cannot figure out what this actually does ...
Davedeldelstein
source share