29
29
-- AGREEMENT.
30
30
--
31
31
32
- -- | Transform a FRET TL specification into a Copilot specification.
32
+ -- | Transform an SMV TL specification into a Copilot specification.
33
33
--
34
34
-- Normally, this module would be implemented as a conversion between ASTs,
35
35
-- but we want to add comments to the generated code, which are not
@@ -40,7 +40,7 @@ import Language.SMV.AbsSMV (AdditiveOp (..), BoolConst (..), BoolSpec (..),
40
40
Ident (.. ), MultOp (.. ), NumExpr (.. ), Number (.. ),
41
41
Op1Name (.. ), OpOne (.. ), OpTwo (.. ), OrdOp (.. ))
42
42
43
- -- | Return the Copilot representation of a FRET BoolSpec.
43
+ -- | Return the Copilot representation of an SMV BoolSpec.
44
44
--
45
45
-- This function returns the temporal property only. The string does not
46
46
-- contain any top-level names, any imports, or auxiliary definitions that may
@@ -96,7 +96,7 @@ boolSpec2Copilot b = case b of
96
96
++ " " ++ boolSpec2Copilot spec2
97
97
++ " )"
98
98
99
- -- | Return the Copilot representation of a FRET boolean constant.
99
+ -- | Return the Copilot representation of an SMV boolean constant.
100
100
const2Copilot :: BoolConst -> String
101
101
const2Copilot BoolConstTrue = " true"
102
102
const2Copilot BoolConstFalse = " false"
@@ -119,17 +119,17 @@ numExpr2Copilot (NumMult x op y) = "("
119
119
++ numExpr2Copilot y
120
120
++ " )"
121
121
122
- -- | Return the Copilot representation of a FRET additive operator.
122
+ -- | Return the Copilot representation of an SMV additive operator.
123
123
additiveOp2Copilot :: AdditiveOp -> String
124
124
additiveOp2Copilot OpPlus = " +"
125
125
additiveOp2Copilot OpMinus = " -"
126
126
127
- -- | Return the Copilot representation of a FRET multiplicative operator.
127
+ -- | Return the Copilot representation of an SMV multiplicative operator.
128
128
multOp2Copilot :: MultOp -> String
129
129
multOp2Copilot OpTimes = " *"
130
130
multOp2Copilot OpDiv = " /"
131
131
132
- -- | Return the Copilot representation of a FRET comparison operator.
132
+ -- | Return the Copilot representation of an SMV comparison operator.
133
133
ordOp2Copilot :: OrdOp -> String
134
134
ordOp2Copilot OrdOpLT = " <"
135
135
ordOp2Copilot OrdOpLE = " <="
@@ -138,13 +138,13 @@ ordOp2Copilot OrdOpNE = "/="
138
138
ordOp2Copilot OrdOpGT = " >"
139
139
ordOp2Copilot OrdOpGE = " >="
140
140
141
- -- | Return the Copilot representation of a unary logical FRET operator.
141
+ -- | Return the Copilot representation of a unary logical SMV operator.
142
142
opOne2Copilot :: OpOne -> String
143
143
opOne2Copilot (Op1Alone x) = opOneAlone2Copilot x
144
144
opOne2Copilot (Op1MTL x op v) = opOneMTL2Copilot x op v
145
145
opOne2Copilot (Op1MTLRange op mn mx) = opOneMTLRange2Copilot op mn mx
146
146
147
- -- | Return the Copilot representation of a unary logical non-MTL FRET
147
+ -- | Return the Copilot representation of a unary logical non-MTL SMV
148
148
-- operator.
149
149
opOneAlone2Copilot :: Op1Name -> String
150
150
opOneAlone2Copilot Op1Pre = " pre"
@@ -156,15 +156,15 @@ opOneAlone2Copilot Op1Z = "notPreviousNot"
156
156
opOneAlone2Copilot Op1Hist = " PTLTL.alwaysBeen"
157
157
opOneAlone2Copilot Op1O = " PTLTL.eventuallyPrev"
158
158
159
- -- | Return the Copilot representation of a unary logical MTL FRET operator.
159
+ -- | Return the Copilot representation of a unary logical MTL SMV operator.
160
160
opOneMTL2Copilot :: Op1Name -> OrdOp -> Number -> String
161
161
opOneMTL2Copilot operator _comparison number =
162
162
opOneMTL2Copilot' operator ++ " " ++ show (0 :: Int )
163
163
++ " " ++ number2Copilot number
164
164
++ " " ++ " clock" ++ " "
165
165
++ show (1 :: Int )
166
166
167
- -- | Return the Copilot representation of a unary logical MTL FRET operator
167
+ -- | Return the Copilot representation of a unary logical MTL SMV operator
168
168
-- that uses an explicit range.
169
169
opOneMTLRange2Copilot :: Op1Name -> Number -> Number -> String
170
170
opOneMTLRange2Copilot operator mn mx =
@@ -173,7 +173,7 @@ opOneMTLRange2Copilot operator mn mx =
173
173
++ " " ++ " clock" ++ " "
174
174
++ show (1 :: Int )
175
175
176
- -- | Return the Copilot representation of a unary logical possibly MTL FRET
176
+ -- | Return the Copilot representation of a unary logical possibly MTL SMV
177
177
-- operator.
178
178
opOneMTL2Copilot' :: Op1Name -> String
179
179
opOneMTL2Copilot' Op1Pre = " pre"
@@ -185,19 +185,19 @@ opOneMTL2Copilot' Op1Z = "notPreviousNot"
185
185
opOneMTL2Copilot' Op1Hist = " MTL.alwaysBeen"
186
186
opOneMTL2Copilot' Op1O = " MTL.eventuallyPrev"
187
187
188
- -- | Return the Copilot representation of a FRET number.
188
+ -- | Return the Copilot representation of an SMV number.
189
189
number2Copilot :: Number -> String
190
190
number2Copilot (NumberInt n) = show n
191
191
192
- -- | Return the Copilot representation of a binary logical non-MTL FRET
192
+ -- | Return the Copilot representation of a binary logical non-MTL SMV
193
193
-- operator.
194
194
opTwo2Copilot :: OpTwo -> String
195
195
opTwo2Copilot Op2S = " `since`"
196
196
opTwo2Copilot Op2T = " `triggers`"
197
197
opTwo2Copilot Op2V = " `releases`"
198
198
opTwo2Copilot Op2U = " `until`"
199
199
200
- -- | Return the Copilot representation of a FRET identifier.
200
+ -- | Return the Copilot representation of an SMV identifier.
201
201
ident2Copilot :: Ident -> String
202
202
ident2Copilot (Ident i) = i
203
203
0 commit comments