Module("collection/set/indexed",[Signature([Constructors([OpDecl("IndexedSet",FunType([ConstType(SortNoArgs("ImplDep"))],ConstType(SortNoArgs("IndexedSet"))))])]),Strategies([SDefNoArgs("new-iset",CallT(SVar("new-iset"),[],[NoAnnoList(Int("117")),NoAnnoList(Int("75"))])),SDefT("new-iset",[],[DefaultVarDec("initial_size"),DefaultVarDec("max_load")],Seq(Prim("\"SSL_indexedSet_create\"",[Var("initial_size"),Var("max_load")]),Build(NoAnnoList(Op("IndexedSet",[RootApp(Id)]))))),SDefNoArgs("iset-destroy",Seq(Match(NoAnnoList(Op("IndexedSet",[Var("set")]))),Seq(Prim("\"SSL_indexedSet_destroy\"",[Var("set")]),Build(NoAnnoList(Op("IndexedSet",[RootApp(Id)])))))),SDefNoArgs("iset-clear",Seq(Match(NoAnnoList(Op("IndexedSet",[Var("set")]))),Seq(Prim("\"SSL_indexedSet_reset\"",[Var("set")]),Build(NoAnnoList(Op("IndexedSet",[RootApp(Id)]))))))]),Strategies([SDefT("iset-add",[DefaultVarDec("on_old")],[DefaultVarDec("elem")],Seq(Match(NoAnnoList(Op("IndexedSet",[Var("set")]))),PrimT("\"SSL_indexedSet_put\"",[CallNoArgs(SVar("on_old"))],[Var("set"),Var("elem")]))),SDefT("iset-add",[],[DefaultVarDec("elem")],Seq(Match(Var("set")),Seq(CallT(SVar("iset-add"),[Id],[Var("elem")]),Build(Var("set"))))),SDefT("iset-addlist",[],[DefaultVarDec("lst")],Seq(Match(Var("set")),Seq(BA(Call(SVar("map"),[Scope(["elem"],Seq(Match(Var("elem")),BA(CallT(SVar("iset-add"),[],[Var("elem")]),Var("set"))))]),Var("lst")),Build(Var("set"))))),SDefT("iset-contains",[],[DefaultVarDec("elem")],Where(CallT(SVar("iset-get-index"),[],[Var("elem")]))),SDefT("iset-remove",[],[DefaultVarDec("elem")],Seq(Match(NoAnnoList(Op("IndexedSet",[Var("set")]))),Seq(Prim("\"SSL_indexedSet_remove\"",[Var("set"),Var("elem")]),Build(NoAnnoList(Op("IndexedSet",[RootApp(Id)])))))),SDefNoArgs("iset-elements",Seq(Match(NoAnnoList(Op("IndexedSet",[Var("set")]))),Prim("\"SSL_indexedSet_elements\"",[Var("set")]))),SDefT("iset-union",[],[DefaultVarDec("set2")],Seq(Match(Var("set1")),Where(BA(Seq(CallNoArgs(SVar("iset-elements")),Call(SVar("map"),[Scope(["elem"],Seq(Match(Var("elem")),BA(CallT(SVar("iset-add"),[],[Var("elem")]),Var("set1"))))])),Var("set2"))))),SDefT("iset-isect",[],[DefaultVarDec("set2")],Seq(Match(Var("set1")),Where(Seq(CallNoArgs(SVar("iset-elements")),Call(SVar("map"),[Scope(["elem"],Seq(Match(Var("elem")),LChoice(BA(CallT(SVar("iset-contains"),[],[Var("elem")]),Var("set2")),BA(CallT(SVar("iset-remove"),[],[Var("elem")]),Var("set1")))))]))))),SDefT("iset-subset",[],[DefaultVarDec("set2")],Seq(Match(Var("set1")),Where(BA(Seq(CallNoArgs(SVar("iset-elements")),Call(SVar("map"),[Scope(["elem"],Seq(Match(Var("elem")),BA(CallT(SVar("iset-contains"),[],[Var("elem")]),Var("set1"))))])),Var("set2"))))),SDefT("iset-eq",[],[DefaultVarDec("set2")],Seq(Match(Var("set1")),Seq(Where(CallT(SVar("iset-subset"),[],[Var("set2")])),Where(BA(CallT(SVar("iset-subset"),[],[Var("set1")]),Var("set2")))))),SDef("iset-fixpoint",[DefaultVarDec("s")],Seq(Match(As(Var("set"),NoAnnoList(Op("IndexedSet",[Wld])))),Call(SVar("repeat"),[Where(Seq(CallNoArgs(SVar("iset-elements")),Call(SVar("list-some"),[Seq(CallNoArgs(SVar("s")),Call(SVar("list-some"),[Scope(["new"],Seq(Match(Var("new")),BA(CallT(SVar("iset-add"),[Fail],[Var("new")]),Var("set"))))]))])))])))]),Strategies([SDefT("iset-get-index",[],[DefaultVarDec("elem")],Seq(Match(NoAnnoList(Op("IndexedSet",[Var("set")]))),Prim("\"SSL_indexedSet_getIndex\"",[Var("set"),Var("elem")]))),SDefT("iset-get-elem",[],[DefaultVarDec("index")],Seq(Match(NoAnnoList(Op("IndexedSet",[Var("set")]))),Prim("\"SSL_indexedSet_getElem\"",[Var("set"),Var("index")])))])])
