[m-rev.] for review: conditional breakpoints

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Feb 1 14:26:41 AEDT 2005


On 01-Feb-2005, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
> 
> On 31 Jan 2005, at 18:40, Zoltan Somogyi wrote:
> 
> >>Are cases like "f(1 , 2)" handled (where there is a space before
> >>and after the comma)?
> >
> >The command line parser deletes all spaces except those inside quotes.
> 
> Is the following code in MR_create_cargs necessary then?
> 
> +        while (more[i] != '\0' && MR_isspace(more[i])) {
> +            i++;
> +        }

No.

Here is the output of the extended test case.

Zoltan.

       1:      1  1 CALL pred cond.main/2-0 (det) cond.m:17
mdb> echo on
Command echo enabled.
mdb> context none
Contexts will not be printed.
mdb> break p
Registering debuggable procedures... done.
There is one debuggable module, with 10 procedures.
 0: + stop  interface pred cond.p/2-0 (det)
mdb> condition X = yes(_)
 0: + stop  interface pred cond.p/2-0 (det)
            X = yes(_)
mdb> continue
       6:      4  3 CALL pred cond.p/2-0 (det)
mdb> print
p(yes(2), _)
mdb> delete *
 0: E stop  interface pred cond.p/2-0 (det)
            X = yes(_)
mdb> finish 1
[no, yes(3), yes(4)]
      12:      2  2 EXIT pred cond.test_maybe/2-0 (det)
mdb> break p
 0: + stop  interface pred cond.p/2-0 (det)
mdb> condition X = yes(3)
 0: + stop  interface pred cond.p/2-0 (det)
            X = yes(3)
mdb> continue
      20:      9  3 CALL pred cond.p/2-0 (det)
mdb> print
p(yes(3), _)
mdb> delete *
 0: E stop  interface pred cond.p/2-0 (det)
            X = yes(3)
mdb> finish 1
[no, yes(3), yes(4)]
      23:      6  2 EXIT pred cond.test_maybe/2-0 (det)
mdb> break p
 0: + stop  interface pred cond.p/2-0 (det)
mdb> condition -v Y = yes( 3)
 0: + stop  interface pred cond.p/2-0 (det)
            -v -p Y = yes(3)
mdb> continue
      30:     12  3 EXIT pred cond.p/2-0 (det)
mdb> print
p(yes(2), yes(3))
mdb> delete *
 0: E stop  interface pred cond.p/2-0 (det)
            -v -p Y = yes(3)
mdb> finish 1
[no, yes(3), yes(4)]
      34:     10  2 EXIT pred cond.test_maybe/2-0 (det)
mdb> break p
 0: + stop  interface pred cond.p/2-0 (det)
mdb> condition -v Y^1 != 3
 0: + stop  interface pred cond.p/2-0 (det)
            -v -p Y ^1 != 3
mdb> continue
      44:     17  3 EXIT pred cond.p/2-0 (det)
mdb> print
p(yes(3), yes(4))
mdb> delete *
 0: E stop  interface pred cond.p/2-0 (det)
            -v -p Y ^1 != 3
mdb> finish 1
[no, yes(3), yes(4)]
      45:     14  2 EXIT pred cond.test_maybe/2-0 (det)
mdb> break q
 0: + stop  interface pred cond.q/2-0 (det)
mdb> condition -v Y != "abc "
 0: + stop  interface pred cond.q/2-0 (det)
            -v -p Y != "abc "
mdb> continue
      50:     19  3 EXIT pred cond.q/2-0 (det)
mdb> print
q("abc", "xabcx")
mdb> continue
xabcx
      56:     20  3 EXIT pred cond.q/2-0 (det)
mdb> print
q("def", "ydefy")
mdb> delete *
 0: E stop  interface pred cond.q/2-0 (det)
            -v -p Y != "abc "
mdb> finish 1
ydefy
else
      63:     18  2 EXIT pred cond.test_string/2-0 (det)
mdb> break q
 0: + stop  interface pred cond.q/2-0 (det)
mdb> continue
      65:     23  3 CALL pred cond.q/2-0 (det)
mdb> condition -v Z != "abc "
 0: + stop  interface pred cond.q/2-0 (det)
            -v -p Z != "abc "
mdb> finish 1
xabcx
ydefy
else
      81:     22  2 EXIT pred cond.test_string/2-0 (det)
mdb> delete *
 0: E stop  interface pred cond.q/2-0 (det)
            -v -p Z != "abc "
mdb> break r
 0: + stop  interface pred cond.r/2-0 (det)
mdb> condition Y^1^2 = 1
 0: + stop  interface pred cond.r/2-0 (det)
            Y ^1^2 = 1
mdb> continue
mdb: couldn't evaluate break point condition
Y ^1^2 = 1: there is no such variable.
      83:     27  3 CALL pred cond.r/2-0 (det)
mdb> condition -p Y^1^2 = 1
 0: + stop  interface pred cond.r/2-0 (det)
            -p Y ^1^2 = 1
mdb> continue
mdb: couldn't evaluate break point condition
Y ^1^2 = 1: there is no such variable.
      86:     28  4 CALL pred cond.r/2-0 (det)
mdb> delete *
 0: E stop  interface pred cond.r/2-0 (det)
            -p Y ^1^2 = 1
mdb> finish 1
      90:     27  3 EXIT pred cond.r/2-0 (det)
mdb> break r
 0: + stop  interface pred cond.r/2-0 (det)
mdb> condition -v Y^1^2 = 1
 0: + stop  interface pred cond.r/2-0 (det)
            -v -p Y ^1^2 = 1
mdb> continue
node(empty, 1, empty)
     104:     30  3 EXIT pred cond.r/2-0 (det)
mdb> print
r(2, node(node(empty, 1, empty), 2, node(empty, 1, empty)))
mdb> delete *
 0: E stop  interface pred cond.r/2-0 (det)
            -v -p Y ^1^2 = 1
mdb> finish 1
node(node(empty, 1, empty), 2, node(empty, 1, empty))
     107:     26  2 EXIT pred cond.test_tree/2-0 (det)
mdb> break r
 0: + stop  interface pred cond.r/2-0 (det)
mdb> condition -v Y^2 = 1
 0: + stop  interface pred cond.r/2-0 (det)
            -v -p Y ^2 = 1
mdb> continue
     116:     35  3 EXIT pred cond.r/2-0 (det)
mdb> print
r(1, node(empty, 1, empty))
mdb> delete *
 0: E stop  interface pred cond.r/2-0 (det)
            -v -p Y ^2 = 1
mdb> finish 1
node(empty, 1, empty)
node(node(empty, 1, empty), 2, node(empty, 1, empty))
     133:     34  2 EXIT pred cond.test_tree/2-0 (det)
mdb> break r
 0: + stop  interface pred cond.r/2-0 (det)
mdb> condition X^4 = 1
 0: + stop  interface pred cond.r/2-0 (det)
            X ^4 = 1
mdb> continue
mdb: couldn't evaluate break point condition
X ^4 = 1: the path 4 does not exist.
     135:     43  3 CALL pred cond.r/2-0 (det)
mdb> print
r(1, _)
mdb> delete *
 0: E stop  interface pred cond.r/2-0 (det)
            X ^4 = 1
mdb> finish 1
node(empty, 1, empty)
node(node(empty, 1, empty), 2, node(empty, 1, empty))
     159:     42  2 EXIT pred cond.test_tree/2-0 (det)
mdb> break r
 0: + stop  interface pred cond.r/2-0 (det)
mdb> condition -v Y^1 = node(empty, 1, empty)
 0: + stop  interface pred cond.r/2-0 (det)
            -v -p Y ^1 = node(empty, 1, empty)
mdb> continue
node(empty, 1, empty)
     182:     54  3 EXIT pred cond.r/2-0 (det)
mdb> print
r(2, node(node(empty, 1, empty), 2, node(empty, 1, empty)))
mdb> delete *
 0: E stop  interface pred cond.r/2-0 (det)
            -v -p Y ^1 = node(empty, 1, empty)
mdb> finish 1
node(node(empty, 1, empty), 2, node(empty, 1, empty))
     185:     50  2 EXIT pred cond.test_tree/2-0 (det)
mdb> break main
 0: + stop  interface pred cond.main/2-0 (det)
mdb> continue
node(empty, 1, empty)
node(node(empty, 1, empty), 2, node(empty, 1, empty))
     212:      1  1 EXIT pred cond.main/2-0 (det)
mdb> quit -y
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list