Executing prolog queries from shell

Antonios Antoniadis <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>

Hello everyone.

I started building the left hemisphere of my robot's brain with gprolog and I'm stuck on probably a very basic thing as I haven't touched prolog since uni. I want to execute/pass/pipe/whatever queries/code into prolog from the GNU/Linux shell and save/use the results. Like friends(bob,alice) to see if they are friends or whatever. I can run any shell command via python or the shell itself of course but what/how should I run (sysntax) to e.g. have gprolog use a specific file with my stored rules or whatever (complied I guess) and pass the query like an argument or input? Actually, is this possible at all?

I hope I didn't confuse you!


Thank you,

Antonios A.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.