——————————————
module foo
imports dynamic-rules-refactored
strategies

main =
{| Foo :
{| Foo :
dr-get-rule-set(|“Foo”)
|}
|}
——————————————


martin@logistico:~> strc -i foo.str –dr new -O 2
compiling foo.str
not a strategy-expression: DynRuleScope([DynRuleScopeId(“Foo”)],Scope([“r_94”],Seq(Seq(Where(Seq(Build(Str(“Foo”)),Match(Var(“r_94”)))),Id),CallT(SVar(“dr-get-rule-set”),[],[Var(“r_94”)]))))
front-end succeeded: user 3.15 system 0.21
Not a strategy-expression: DynRuleScope([DynRuleScopeId(“Foo”)],Scope([“u_2”,“v_2”],Seq(Match(Var(“v_2”)),Seq(Build(Str(“Foo”)),Seq(Match(Var(“u_2”)),Seq(Build(Var(“v_2”)),CallT(SVar(“dr_get_rule_set_0_1”),[],[Var(“u_2”)])))))))
optimization succeeded: user 0.05 system 0.03
not a strategy-expression: DynRuleScope([DynRuleScopeId(“Foo”)],Scope([“u_2”,“v_2”],Seq(Match(Var(“v_2”)),Seq(Build(Str(“Foo”)),Seq(Match(Var(“u_2”)),Seq(Build(Var(“v_2”)),CallT(SVar(“dr_get_rule_set_0_1”),[],[Var(“u_2”)])))))))
No pp entry found for: (2,[“DynRuleScope”])
** ERROR: cannot rewrite to box: DynRuleScope([DynRuleScopeId(“Foo”)],Compound([Declaration2(TypeSpec([],TypeId(“ATerm”),[]),[DeclInit(IdDecl([],Id(“u_2”),None),AssignInit(Id(“NULL”))),DeclInit(IdDecl([],Id(“v_2”),None),AssignInit(Id(“NULL”)))])],[IfElse(LAnd(NotEqual(Id(“v_2”),Id(“NULL”)),NotEqual(Id(“v_2”),Id(“t”))),Stat(FunCall(Id(“_fail”),[Id(“t”)])),Stat(Assign(Id(“v_2”),AssignEq,Id(“t”)))),Stat(Assign(Id(“t”),AssignEq,Id(“term_p_0”))),IfElse(LAnd(NotEqual(Id(“u_2”),Id(“NULL”)),NotEqual(Id(“u_2”),Id(“t”))),Stat(FunCall(Id(“_fail”),[Id(“t”)])),Stat(Assign(Id(“u_2”),AssignEq,Id(“t”)))),Stat(Assign(Id(“t”),AssignEq,FunCall(Id(“not_null”),[Id(“v_2”)]))),Stat(Assign(Id(“t”),AssignEq,FunCall(Id(“dr_get_rule_set_0_1”),[FunCall(Id(“not_null”),[Id(“u_2”)]),Id(“t”)])))]))
/pkg/strategoxt/2004-06-11-10-18/bin/ast2abox: rewriting failed
compilation failed (3.65 secs)
——————————————

Compilation is ok if I just add an dummy strategy:
——————————————
module foo
imports dynamic-rules-refactored
strategies

main =
{| Foo : id;
{| Foo :
dr-get-rule-set(|“Foo”)
|}
|}

Submitted on 11 June 2004 at 13:31

On 13 June 2004 at 13:30 Jira commented:

STR-114, adam:
This is not dr-new specific. Dynrulescopes were translated using a
topdown(try(DefDynRuleScope))

It should have been (and now is) a
topdown(repeat(DefDynRuleScope))

Log in to post comments