According to my last post in the URL:
https://swi-prolog.discourse.group/t/operands-and-equation-questions/3007
It is possible to use the equation for example:
my_and(bool1(a, b), bool2(c, d)).
when ever I want?
In my program It loaded from other file as a predicate:
some_predicate :- my_and(bool1(a, b), bool2(c, d)).
When I want to run it, I just do some_predicate.
I want to analyze it at first and extract all Atoms into a list such as [a, b, c, d]
.
Also for every new fact that inserted to DB, I would like to check if this equation is satisfied.
My first thought was to assign it into a variable (A) and call to a predicate which was implemented by me extract_atoms(A, List).
, and then for every new fact just to do call(A)
.
It seems a bit problematic since the assignment is not possible.
Thank you in advance,
Westly