You can find the adaptation of the prolog-shell idea for SICStus in:
~ftp/pub/software/prolog_shell0.3.tar.gz
The code is a little old (i.e., it may need some massaging for newer
version of SICStus -- we have not tried it for a while). You can also
use the shell that comes with the CIAO Prolog system.
--
-----------------------------------------------------------------------------
herme(a)fi.upm.es | Manuel Hermenegildo
herme(a)cs.utexas.edu | Facultad de Informatica
+34-91-336-7435 (Work) | Universidad Politecnica de Madrid
+34-91-352-4819 or 336-7412 (FAX) | 28660-Boadilla del Monte, MADRID
http://www.clip.dia.fi.upm.es/~herme | SPAIN
-----------------------------------------------------------------------------