AgentBase AgentBase for SICStus Prolog
Swedish Institute of Computer Science
http://www.sics.se/isl/agentbase/


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

sicstus -l logicserver

The logicserver will display the telnet port. An example:

Please telnet to 53958

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:

>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 'system:system('format C:')'

The source code for this example: logicserver.pl.


Copyright © 2001 SICS AB, All Rights Reserved.