Design a way to translate user input in a UI into Prolog code (DSL ?)

Hello,

I’m new to this forum and to SWI-Prolog in general

I’m still in the design process and would like to know if there is a way to transform user input in a UI (in the form of a JSON object) into a Prolog program.

The point is to verify compliance with whatever the user defined regarding the system components and the properties that must hold. I don’t want the users to define properties in Prolog directly, because they may be non-technical people; so I’m trying to find some way to make it easier for them (to define properties they want to verify) and also easier for me (to interpret their properties in some format and translate them into Prolog code).

I prefer to use some well-established and tested way if it exists.

I do have a JSON-schema validation lying around. That code verifies the output of the Prolog JSON parser (json_read_dict/2) against a schema file. The code isn’t particularly beautiful and the coverage of JSON-schema, probably incomplete. I’m happy to share it as-is or turn it into a proper maintained library if someone is willing to pay for it.