I am calling a SWI Prolog engine from a C++ dll and I would like to be able to access all asserted/dynamic predicates (similar to what listing normally does).
In GNU Prolog I would call the dynamic/1 predicate with a Variable and Prolog would unify it with all dynamic predicate indicators. In the next step I would call these predicates with variables and get a complete list.
Unfortunately I can't do that in SWI Prolog (ERROR: Arguments are not sufficiently instantiated). Is there another way?