Lexpedite / blawx

A user-friendly web-based tool for Rules as Code.
MIT License
105 stars 9 forks source link

Running Blawx code directly in s(CASP) for SWI-Prolog #321

Closed DavidPratten closed 2 years ago

DavidPratten commented 2 years ago

Hi Jason,

I'm excited to discover this project. I'd like to explore the Blawx dialect of s(CASP) for SWI-Prolog without using about the Blocky interface. Could you point me to the instructions to add required Blawx specific extensions/ components?

If there is a better place to post queries like this, please let me know.

Thanks

David

Gauntlet173 commented 2 years ago

I'm sorry, but no such documentation exists, yet.

I can say briefly that the only ways that Blawx expands on raw s(CASP) on the code side is with a number of predicates designed to encode the ontology structure, which is used for the /onto endpoint and in the interview reasoner; a small library based on LPDAT for defeasibility, which powers the holds, according to, overrules blocks; and a date and duration math library.

It also does code generation and post-processing of output in the interview endpoint, but all of that happens in Python, and the code generated is raw s(CASP).

You can see how a Blawx user's inputs are converted into s(CASP) using these extensions by looking at the Code tab in the right panel of the code editor. The libraries used are available in the source code.

Let me know if that helps. I'd love to learn more about what you are doing. Feel free to write me at jason@lexpedite.ca.