STR-269: Strange bug with dynamic rules
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 bstrategies
testbagof =
rules(R:+ “foo” -> “bar”)
; where( “foo”
; debug(!" foo: “)
; “foo”
; debug(!” foo: "))a = output-wrap(testbagof; dr-print-rule-set(|“R”))
module b
strategiesunused-strat =
Submitted on 10 March 2005 at 14:16
where(!“something” => m)
; rules(R:+ m -> “boom”)
Issue Log
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.
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