Is it possible to suppress warnings in SWISH?

I’m having an absolute blast playing with s(CASP) notebooks in SWISH. This is an extremely helpful tool for me to provide a user-friendly introduction to the power of using knowledge representation and reasoning for automating statutory reasoning around laws and regulations.

I know that there are some niggly bits in the way that s(CASP) has been implemented that causes some Singleton warnings. I’m also seeing a lot of warnings about non-contiguous definitions for different predicates. I see that there is a way to turn those warnings off on a per-predicate level, but there’s a lot of predicates. Is there some way to configure SWISH not to show warnings?

I wouldn’t bother, except that my encodings are sufficiently complicated that SWISH is generating more than a hundred warnings, and very politely displaying each one with nice javascript transitions, which means that it ends up taking about 2 minutes before we can see the answer that it takes about 0.1 seconds to calculate! :slight_smile:

It would make for a much more convincing demonstration if we didn’t need to wait those 2 minutes for an answer.

A surface-level concern, I know, but effective communication is key.

Thanks in advance.

1 Like

See SWISH -- SWI-Prolog for SHaring. I guess it is a good idea to add these directives to the template. Possibly commented. After all these conventions also make sense for s(CASP).

Enjoy --- Jan

edit Updated public SWISH with latest version and updated templates.

That has completely solved the problem for singleton and discontiguous, thank you. Is there an equivalent option for “scasp_predicate … does not exist”?

Added a flag for that. Try

:- set_prolog_flag(scasp_unknown, fail).
1 Like

Just fantastic, thank you. The file I have been working on is at SWISH – r34v2.swinb (, if you are interested.