I had written a rule like:

foo: a -> b
    with !Id(<buzz> a) <+ ?Id(b) <+ "whatever"

If buzz fails, we pass through to the other clauses. If buzz succeeds, however, the rule fails anyway. This is because that branch of the logic doesn’t assign any value to ‘b’.

In an ideal world, it would have reported an error like “‘b’ undefined”.

It took me quite a while to figure out that I’d forgotten to put “b := …” in there.

Submitted by Dobes Vandermeer on 14 November 2012 at 23:31

On 8 January 2013 at 13:51 Eelco Visser tagged stratego

On 8 January 2013 at 13:51 Eelco Visser tagged editor

On 8 January 2013 at 13:52 Eelco Visser commented:

The compiler does (did?) an analysis that would detect possible unboundednes.

Log in to post comments