Inject.hs revision 9ecf13b5fd914bc7272f1fc17348d7f4a8c77061
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerModule : $Header$
e071fb22ea9923a2a4ff41184d80ca46b55ee932Till MossakowskiDescription : Replace Sorted_term(s) with explicit injection functions.
881f43de18aeae879886be203cd32e90051799c0Till MossakowskiCopyright : (c) Christian Maeder, Uni Bremen 2005
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu ProdescuLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
2eeec5240b424984e3ee26296da1eeab6c6d739eChristian MaederMaintainer : Christian.Maeder@dfki.de
881f43de18aeae879886be203cd32e90051799c0Till MossakowskiStability : provisional
881f43de18aeae879886be203cd32e90051799c0Till MossakowskiPortability : portable
e071fb22ea9923a2a4ff41184d80ca46b55ee932Till MossakowskiReplace Sorted_term(s) with explicit injection functions. Don't do this after
881f43de18aeae879886be203cd32e90051799c0Till Mossakowski simplification since crucial sort information may be missing
881f43de18aeae879886be203cd32e90051799c0Till MossakowskimakeInjOrProj :: (OP_TYPE -> Id) -> OpKind -> Range -> TERM f -> SORT
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von SchroedermakeInjOrProj mkName fk pos argument to =
881f43de18aeae879886be203cd32e90051799c0Till Mossakowski let from = sortOfTerm argument
881f43de18aeae879886be203cd32e90051799c0Till Mossakowski t = Op_type fk [from] to pos
881f43de18aeae879886be203cd32e90051799c0Till Mossakowski in if to == from then argument else
2bbf88585fe313af8585da0288880310cc1b027dChristian Maeder Application (Qual_op_name (mkName t) t pos) [argument] pos
2bbf88585fe313af8585da0288880310cc1b027dChristian MaederinjectUnique :: Range -> TERM f -> SORT -> TERM f
da955132262baab309a50fdffe228c9efe68251dCui JianinjectUnique = makeInjOrProj uniqueInjName Total
2bbf88585fe313af8585da0288880310cc1b027dChristian MaederuniqueInjName :: OP_TYPE -> Id
881f43de18aeae879886be203cd32e90051799c0Till MossakowskiuniqueInjName t = case t of
881f43de18aeae879886be203cd32e90051799c0Till Mossakowski Op_type _ [from] to _ -> mkUniqueInjName from to
-- 'CASL.AS_Basic_CASL.recover_Sort_gen_ax' and inserts these operations into
_ -> error "CASL.Inject.insertInjOps: Wrong constructor."