11module Cardano.ReCon.LTL.Lang.Formula (
22 PropName
3- , PropVarIdentifier
3+ , VariableIdentifier
44 , IntValue
55 , TextValue
66 , IntTerm (.. )
@@ -22,7 +22,7 @@ module Cardano.ReCon.LTL.Lang.Formula (
2222import Prelude hiding (and )
2323
2424import Cardano.ReCon.Common.BinRel (BinRel (.. ))
25- import Cardano.ReCon.Common.Types (IntValue )
25+ import Cardano.ReCon.Common.Types (IntValue , VariableIdentifier )
2626import Cardano.ReCon.Integer.Polynomial.Term (IntTerm (.. ))
2727
2828import Data.Map.Strict (Map )
@@ -33,15 +33,11 @@ import Data.Word (Word64)
3333-- | A property name (e.g. "thread", "node", etc.).
3434type PropName = Text
3535
36- -- | Default name: x.
37- -- | Identifier denoting an event property variable.
38- type PropVarIdentifier = Text
39-
4036-- | Text event property value.
4137type TextValue = Text
4238
4339-- | Text term: a constant string or a variable ranging over strings.
44- data TextTerm = TextConst Text | TextVar PropVarIdentifier deriving (Show , Eq , Ord )
40+ data TextTerm = TextConst TextValue | TextVar VariableIdentifier deriving (Show , Eq , Ord )
4541
4642-- | Default name: c.
4743-- | A constraint inside an `Atom`, matching an event property against a term.
@@ -110,25 +106,25 @@ data Formula event ty =
110106
111107 ----------- Event property ----------
112108 -- | ∀x : Int. φ — x ranges over all integers
113- | PropIntForall PropVarIdentifier (Formula event ty )
109+ | PropIntForall VariableIdentifier (Formula event ty )
114110 -- | ∀x : Text. φ — x ranges over all strings
115- | PropTextForall PropVarIdentifier (Formula event ty )
111+ | PropTextForall VariableIdentifier (Formula event ty )
116112 -- | ∀x ∈ v̄. φ — x ranges over the given integers
117- | PropIntForallN PropVarIdentifier (Set IntValue ) (Formula event ty )
113+ | PropIntForallN VariableIdentifier (Set IntValue ) (Formula event ty )
118114 -- | ∀x ∈ v̄. φ — x ranges over the given strings
119- | PropTextForallN PropVarIdentifier (Set Text ) (Formula event ty )
115+ | PropTextForallN VariableIdentifier (Set TextValue ) (Formula event ty )
120116 -- | ∃x : Int. φ — x ranges over all integers
121- | PropIntExists PropVarIdentifier (Formula event ty )
117+ | PropIntExists VariableIdentifier (Formula event ty )
122118 -- | ∃x : Text. φ — x ranges over all strings
123- | PropTextExists PropVarIdentifier (Formula event ty )
119+ | PropTextExists VariableIdentifier (Formula event ty )
124120 -- | ∃x ∈ v̄. φ — x ranges over the given integers
125- | PropIntExistsN PropVarIdentifier (Set IntValue ) (Formula event ty )
121+ | PropIntExistsN VariableIdentifier (Set IntValue ) (Formula event ty )
126122 -- | ∃x ∈ v̄. φ — x ranges over the given strings
127- | PropTextExistsN PropVarIdentifier (Set Text ) (Formula event ty )
123+ | PropTextExistsN VariableIdentifier (Set TextValue ) (Formula event ty )
128124 -- | t rel t (integer)
129125 | PropIntBinRel BinRel (Relevance event ty ) IntTerm IntTerm
130126 -- | t = v (text)
131- | PropTextEq (Relevance event ty ) TextTerm Text
127+ | PropTextEq (Relevance event ty ) TextTerm TextValue
132128 -------------------------------------
133129 deriving (Show , Eq , Ord )
134130
@@ -230,9 +226,9 @@ class Event a ty | a -> ty where
230226 ofTy :: a -> ty -> Bool
231227 -- | Integer properties of the event pertinent to the given type.
232228 -- intProps e t assumes that ofTy e t = True
233- intProps :: a -> ty -> Map PropVarIdentifier IntValue
229+ intProps :: a -> ty -> Map VariableIdentifier IntValue
234230 -- | Text properties of the event pertinent to the given type.
235231 -- textProps e t assumes that ofTy e t = True
236- textProps :: a -> ty -> Map PropVarIdentifier Text
232+ textProps :: a -> ty -> Map VariableIdentifier TextValue
237233 -- | Timestamp of the event in μs (Used for debug & monitoring only).
238234 beg :: a -> Word64
0 commit comments