Cross Reference: /hets/Comorphisms/THFP_P2THFP.hs
THFP_P2THFP.hs revision ad1df93673cf323534cdfe18981ad5daae4c90c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
6896N/A{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
6896N/A{- |
6896N/AModule : $Header$
6896N/ADescription : Comorphism from THFP_P to THFP
6896N/ACopyright : (c) J. von Schroeder, DFKI Bremen 2012
6896N/ALicense : GPLv2 or higher, see LICENSE.txt
6896N/A
6896N/AMaintainer : J. von Schroeder <jonathan.von_schroeder@dfki.de>
6896N/AStability : provisional
6896N/APortability : non-portable (imports Logic.Logic)
817N/A
817N/AThe comorphism from THFP to THF0.
817N/A-}
817N/A
817N/Amodule Comorphisms.THFP_P2THFP where
817N/A
821N/Aimport Logic.Logic as Logic
817N/Aimport Logic.Comorphism
817N/A
817N/Aimport Common.ProofTree
817N/Aimport Common.Result
817N/Aimport Common.AS_Annotation (Named)
817N/A
817N/Aimport THF.Logic_THF
817N/Aimport THF.Cons
817N/Aimport THF.Sign
817N/Aimport qualified THF.Sublogic as SL
817N/Aimport THF.As
817N/Aimport THF.Utils
817N/Aimport THF.Poly
817N/A
817N/Adata THFP_P2THFP = THFP_P2THFP deriving Show
817N/A
817N/Ainstance Language THFP_P2THFP
817N/A
817N/Ainstance Comorphism THFP_P2THFP
THF SL.THFSl
BasicSpecTHF THFFormula () ()
SignTHF MorphismTHF SymbolTHF () ProofTree
THF SL.THFSl
BasicSpecTHF THFFormula () ()
SignTHF MorphismTHF SymbolTHF () ProofTree where
sourceLogic THFP_P2THFP = THF
sourceSublogic THFP_P2THFP = SL.tHFP_P
targetLogic THFP_P2THFP = THF
mapSublogic THFP_P2THFP sl = Just $ sl { SL.ext_Poly = False }
map_theory THFP_P2THFP = trans_theory
has_model_expansion THFP_P2THFP = True
trans_theory :: (SignTHF,[Named THFFormula])
-> Result (SignTHF,[Named THFFormula])
trans_theory (sig, sentences1) = do
(cs,sentences) <- infer (consts sig) sentences1
let sig1 = sig {consts = cs}
return (recreateSymbols sig1,sentences)