AgentBase for SICStus Prolog
sicstus -l logicserver
The logicserver will display the telnet port. An example:
2. start a telnet session to the host and port (the port from step 1).
On UNIX: telnet host port. In the above example it would look like:
The source code for this example: logicserver.pl.
Copyright © 2001
SICS AB, All Rights Reserved.Query Eval via Telnet
This is a simple example of a logicserver that allow users to enter
prolog queries via telnet.
Instructions
1. Change directory to examples/logicserver/ and start the example with
Please telnet to 53958
>telnet localhost 53958
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to SICStus logicserver (single lines only)
| ?- X = 5, Y = 134, Z is X * Y.
X = 5
Y = 134
Z = 670
yes
| ?-
Note that this will open up your computer for others. Anyone
that knows about this logic monitor can enter prolog terms that will
be called - for example 'halt.' or