This section describes the options available when the system prompts you after printing out a debugging message. Most of them you know from the standard Prolog debugger. All the options are one letter mnemonics, some of which can be optionally followed by a decimal integer. They are read from the standard input stream up to the end of the line (Return, <RET>). Blanks will be ignored.
The only option that you really have to remember is `h'. This provides help in the form of the following list of available options.
CHR debugging options: <cr> creep c creep l leap s skip s <i> skip (ancestor i) g ancestors & constraints & <i> constraints (details) n nodebug = debugging + spy this - nospy this . show rule < reset printdepth < <n> set printdepth a abort b break ? help h help
exit
port or the fail
port). This
includes ports with spypoints set; they will be masked out
during the skip. The command can be used with a numeric argument
to skip the execution up to and including the ancestor indicated
by the argument. Example:
... 4 - exit prime(8)#<c6> ? g Ancestors: 1 1 apply eratosthenes:rule(2) @ primes(10)#<c1> 2 1 apply eratosthenes:rule(2) @ primes(9)#<c3> 3 1 apply eratosthenes:rule(2) @ primes(8)#<c5> 4 - call prime(8)#<c6> 4 - exit prime(8)#<c6> ? s 2 2 - exit primes(9)#<c3> ? <RET>
call
entries in the stack. The subsequent application of a rule replaces the
call entry in the stack with an apply
entry. Later the constraint
shows again as redo
or fail
entry. Example:
0 - call primes(10)#<c1> ? <RET> 1 1 try eratosthenes:rule(2) @ primes(10)#<c1> ? g Ancestors: 1 - call primes(10)#<c1> 1 1 try eratosthenes:rule(2) @ primes(10)#<c1> ? <RET> 1 1 apply eratosthenes:rule(2) @ primes(10)#<c1> ? <RET> 1 - call prime(10)#<c2> ? <RET> 2 - insert prime(10)#<c2> 2 - exit prime(10)#<c2> ? g Ancestors: 1 1 apply eratosthenes:rule(2) @ primes(10)#<c1> 2 - call prime(10)#<c2>
chr_debugging/0
8 1 apply era:absorb(8) @ prime(4)#<c14> \ prime(8)#<c6> ? . absorb(8) @ prime(4)#<c14> \ prime(8)#<c6> <=> 8 mod 4=:=0 | true.
abort/0
.
break/0
, thus
putting you at a recursive top-level. When you end the break (entering
^D) you will be re-prompted at the port at which you
broke. The CHR debugger is temporarily switched off as you call the
break and will be switched on again when you finish the break and go
back to the old execution. Any changes to the CHR leashing or to
spypoints during the break will remain in effect.