I’m using: SWI-Prolog version 8.0.3 and have also tried running the code in SWISH.
I want the code to: I want to call table/1 during runtime. The tabling documentation says this is possible.
But what I’m getting is: From version 8.0.3, the error I’m getting is
ERROR: Wrong context: (table)/1 can only be used in a directive
I’m assuming from this that in 8.0.3 table/1 can only be used as a directive.
In SWISH,
No permission to call sandboxed `assert(_1336)'
Reachable from:
** assert_and_table(A)**
My code looks like this:
assert_and_table(P) :-
assert(P),
table(P).
I’m not very familiar with SWISH, and I just tried running the code to a SWISH notebook to see if calling table/1 during runtime was only possible in later versions. From the error it seems the problem is just that I don’t know how to use SWISH. Any suggestions appreciated.