ECLiPSe can be downloaded free of charge from the project site: http://eclipseclp.org.
Here is an example of the start of the session:
$eclipsep
ECLiPSe Constraint Logic Programming System [kernel] ...
Version 6.0 #162 (i386_linux), Mon Sep 20 06:09 2010 [eclipse 1]:
ECLiPSe files have the extension ecl or pl.
A tp1.ecl file is loaded into the environment by
[eclipse 1]: [tp1].
Be careful not to start the file name with an uppercase letter because Prolog would then interpret it as the name of a variable.
To execute a goal, simply enter a query followed by a period. A first response is produced. You can then either press the key ";" to get the answer or the Enter key to stop searching for answer(s).
Example :
[eclipse 2]: dessert(D).
D = pear_sorbet
Yes (0.00s cpu, solution 1, maybe more) ? ;
D = strawberries_chantilly
Yes (0.00s cpu, solution 2, maybe more)?
[eclipse 3]:
The query h. displays the history of the current ECLiPSe session. Example :
[Eclipse 4]: h.
1 [tp1].
2 desserts(D).
3 desserts (melon_en_surprise).
To replay a goal from the history, simply type the number of this goal in the history followed by a period:
[Eclipse 4]: 3. dessert(melon_en_surprise).
Yes (0.00s cpu)
Another even more convenient way to manage the history is to start ECLiPSe from the start under the control of rlwrap (read-line wrapper), then use the arrow keys:
$ rlwrap eclipsep
ECLiPSe Constraint Logic Programming System [kernel] ...
[eclipse 1]:
To quit ECLiPSe, you can use the halt predicate or the shortcut Ctrl + D .
[eclipse]: trace.
Debugger switched on - creep mode
[eclipse]: true.
(1) 1 CALL true %> ?
... gives the list of possible tracing commands (see below)
%> o
current output mode is "QPm", toggle char: D
new output mode is "DQPm".
%> creep
(1) 1 EXIT true %> creep
Yes (0.00s cpu)
[eclipse 21]: notrace.
Debugger switched off
Trace line
(1) 1 CALL solve(X, Y, Z, [a,b,c]) %>
(invoc. nb) depth port goal prompt
Ports
[eclipse 16]: resoudre(X, Y, Z, [AffZ, AffZselonX, AffX, Aff1Y, Aff2Y]).
(1) 1 CALL resoudre(X, Y, Z, [AffZ, AffZselonX, AffX, ...]) %> creep
(2) 2 CALL var(X, Y, Z, AffZ, AffZselonX, AffX, Aff1Y, Aff2Y) %> skip
(2) 2 EXIT var(X{[femme, homme]}, ...) %> skip
(5) 2 CALL poser_pb(X{[femme, homme]}, Y{[femme, homme]}, ...) %> skip
(5) 2 EXIT poser_pb(X{[femme, homme]}, Y{[femme, homme]}, ...) %> nodebug? [y] % accept the default value proposed by the tracer (Here [y] for yes) by simply typing "CR"
[eclipse 17]: resoudre(X, Y, Z, [AffZ, AffZselonX, AffX, Aff1Y, Aff2Y]).
(1) 1 CALL resoudre(X, Y, Z, [AffZ, AffZselonX, AffX, ...]) %> i jump to invoc: [1]? 5
(5) 2 CALL poser_pb(X{[femme, homme]}, Y{[femme, homme]}, Z{[femme, homme]}, AffZ{[0, 1]}, AffZselonX{[0, 1]}, AffX{[0, 1]}, Aff1Y{[0, 1]}, Aff2Y{[0, 1]}) %>
...
Example
[eclipse 2]: t_tab12. % a predicate of yours
instantiation fault in subscript(_197, [1], _200) in module eclipse
Abort
[eclipse 3]: trace.
Debugger switched on - creep mode
[eclipse 4]: t_tab12.
(1) 1 CALL t_tab12 %> zap to port: [~ call] leave % here you do not want the default value, you want the "leave" port
instantiation fault in subscript(_544, [1], _547) in module eclipse
(8) 4 LEAVE subscript(..., ..., ..., ...) %> G print all ancestors? [y]
Abort
[eclipse 4]: t_tab12.
(1) 1 CALL t_tab12 %> i jump to invoc: [1]? 6 % the goal that you want to debug
...