I have the server/client communication working as at the bottom of this page https://www.swi-prolog.org/pldoc/man?section=stream-pools
This gets data from the client as “codes” and formats it to print it out as a string:
format(Out, ‘Please to meet you: ~s~n’, [Command])
But I want to parse it into Prolog, so that either it gets a fact(s) from the client, and adds it to the set of known facts, or it gets a query from the client, and returns a result.
So (first) I need to know how to parse and evaluate in a fact or query, rather than just ending up with a string or codes. Any help is appreciated!