In Is it possible to suppress warnings in SWISH? - #3 by JasonMorris I asked for a way to avoid problems with scasp_predicate … does not exist" errors, and @jan hooked me up with the
:- set_prolog_flag(scasp_unknown, fail).
But I have code that is still throwing that error, when it calls
scasp/2 against a predicate that hasn’t been defined anywhere in the code. I’ve tried making it dynamic, to no avail, which makes sense, because my system is compiling code to a file, and then consulting it. Nothing is being asserted.
What I think is the same problem can be seen by opening an empty s(CASP) program in SWISH and running the query
scasp_predicate `'04c200ae-e39a-4b04-a78f-0f90a0e09694:a'/1' does not exist
I want to be able to specify that for certain predicates, their non-existence should make them fail instead of throwing an error when used as the first parameter to
scasp/2. How can I do that?
Thanks in advance.