The output of the following program (two modules to reproduce the bug) is:
foo: []
foo: bar
RuleScope(IndexedSet(135323256),Hashtable(135356688))
labels: [()]
foo ->
a_0
[Program(“./a”)]

The first line would be ‘ foo: [“bar”]’.

module a
imports libstrategolib b

strategies

testbagof =
rules(R:+ “foo” -> “bar”)
; where( “foo”
; debug(!" foo: “)
; “foo”
; debug(!” foo: "))

a = output-wrap(testbagof; dr-print-rule-set(|“R”))

module b
strategies

unused-strat =
where(!“something” => m)
; rules(R:+ m -> “boom”)

Submitted on 10 March 2005 at 14:16

On 17 April 2005 at 22:46 Jira commented:

STR-269, martin:
That’s interesting … It appears that two bagof-R rules are generated and that the incorrect rules succeeds. I’m assinging this to Eelco, since he can fix this much faster than I can.


On 24 July 2005 at 22:49 Jira commented:

STR-269, visser:
This is not a bug, but an instance of overlapping dynamic rules. The problem is resolved by forbidding such overlaps by means of a test during dynamic rule lifting. See issue STR-358.

Log in to post comments