Module("term/common",[Imports([Import("strategy/traversal/simple"),Import("collection/list/common"),Import("collection/list/set")]),Strategies([SDefNoArgs("mkterm",Seq(Match(NoAnnoList(Tuple([Var("c"),Var("ts")]))),Prim("\"SSL_mkterm\"",[Var("c"),Var("ts")]))),SDefNoArgs("explode-term",Seq(Match(Var("t")),Prim("\"SSL_explode_term\"",[Var("t")]))),SDefNoArgs("get-constructor",Seq(Match(Var("t")),Prim("\"SSL_get_constructor\"",[Var("t")]))),SDefNoArgs("get-arguments",Seq(Match(Var("t")),Prim("\"SSL_get_arguments\"",[Var("t")]))),SDefNoArgs("get-appl-arguments",Call(SVar("get-appl-arguments"),[Id])),SDef("get-appl-arguments",[DefaultVarDec("s")],Seq(Match(Var("t")),PrimT("\"SSL_get_appl_arguments_map\"",[CallNoArgs(SVar("s"))],[Var("t")]))),SDefNoArgs("address-lt",Seq(Match(NoAnnoList(Tuple([Var("t1"),Var("t2")]))),Prim("\"SSL_address_lt\"",[Var("t1"),Var("t2")]))),SDefT("term-address-lt",[],[DefaultVarDec("t2")],Seq(Match(Var("t1")),Prim("\"SSL_address_lt\"",[Var("t1"),Var("t2")]))),SDefNoArgs("address",Seq(Match(Var("t")),Prim("\"SSL_address\"",[Var("t")]))),SDefNoArgs("checksum",Seq(Match(Var("t")),Prim("\"SSL_checksum\"",[Var("t")])))]),Strategies([RDef("crush",[DefaultVarDec("nul"),DefaultVarDec("sum")],RuleNoCond(NoAnnoList(Explode(Wld,Var("xs"))),App(Call(SVar("foldr"),[CallNoArgs(SVar("nul")),CallNoArgs(SVar("sum"))]),Var("xs")))),RDef("crush",[DefaultVarDec("nul"),DefaultVarDec("sum"),DefaultVarDec("s")],RuleNoCond(NoAnnoList(Explode(Wld,Var("xs"))),App(Call(SVar("foldr"),[CallNoArgs(SVar("nul")),CallNoArgs(SVar("sum")),CallNoArgs(SVar("s"))]),Var("xs"))))]),Strategies([SDefNoArgs("node-size",Call(SVar("crush"),[Build(NoAnnoList(Int("0"))),CallNoArgs(SVar("add")),Build(NoAnnoList(Int("1")))])),SDefNoArgs("term-size",Call(SVar("crush"),[Build(NoAnnoList(Int("1"))),CallNoArgs(SVar("add")),CallNoArgs(SVar("term-size"))]))]),Strategies([SDef("at-depth",[DefaultVarDec("depth"),DefaultVarDec("s")],Seq(Build(NoAnnoList(Tuple([App(CallNoArgs(SVar("depth")),NoAnnoList(Tuple([]))),RootApp(Id)]))),Call(SVar("topdown"),[Scope(["d"],LChoice(Match(NoAnnoList(Tuple([NoAnnoList(Int("0")),RootApp(CallNoArgs(SVar("s")))]))),Seq(Match(NoAnnoList(Tuple([Var("d"),RootApp(Id)]))),All(Build(NoAnnoList(Tuple([App(CallNoArgs(SVar("dec")),Var("d")),RootApp(Id)])))))))])))]),Strategies([SDef("om-occurrences",[DefaultVarDec("s")],CondChoice(CallNoArgs(SVar("s")),Build(NoAnnoList(Int("1"))),Call(SVar("crush"),[Build(NoAnnoList(Int("0"))),CallNoArgs(SVar("add")),Call(SVar("om-occurrences"),[CallNoArgs(SVar("s"))])]))),SDef("occurrences",[DefaultVarDec("s")],BA(CallNoArgs(SVar("add")),NoAnnoList(Tuple([RootApp(CondChoice(CallNoArgs(SVar("s")),Build(NoAnnoList(Int("1"))),Build(NoAnnoList(Int("0"))))),RootApp(Call(SVar("crush"),[Build(NoAnnoList(Int("0"))),CallNoArgs(SVar("add")),Call(SVar("occurrences"),[CallNoArgs(SVar("s"))])]))]))))])])
