Removed Wait, GetTime and AlternativeWait (the old Rain time items) from the AST
This commit is contained in:
parent
8fe152bf98
commit
ceafd77c1e
|
@ -89,10 +89,6 @@ testGetVarProc = TestList (map doTest tests)
|
|||
,(200,[tvB],[tvA],[],a_eq_not_b)
|
||||
,(201,[tvC,tvD],[tvA],[],a_eq_c_plus_d)
|
||||
|
||||
-- Test time statements:
|
||||
,(300,[],[tvB],[],A.GetTime emptyMeta vB)
|
||||
,(301,[tvA],[],[],A.Wait emptyMeta A.WaitFor $ A.ExprVariable emptyMeta vA)
|
||||
|
||||
-- Test simple outputs:
|
||||
,(400,[tvA],[],[tvC],A.Output emptyMeta vC [A.OutExpression emptyMeta $ A.ExprVariable emptyMeta vA])
|
||||
,(401,[tvA,tvB],[],[tvC],A.Output emptyMeta vC $ map ((A.OutExpression emptyMeta) . (A.ExprVariable emptyMeta)) [vA,vB])
|
||||
|
|
|
@ -126,8 +126,6 @@ getVarProc (A.Assign _ vars expList)
|
|||
(mapUnionVars processVarW vars)
|
||||
--All variables read on the RHS:
|
||||
(getVarExpList expList)
|
||||
getVarProc (A.GetTime _ v) = processVarW v
|
||||
getVarProc (A.Wait _ _ e) = getVarExp e
|
||||
getVarProc (A.Output _ chanVar outItems) = (processVarUsed chanVar) `unionVars` (mapUnionVars getVarOutputItem outItems)
|
||||
where
|
||||
getVarOutputItem :: A.OutputItem -> Vars
|
||||
|
|
11
data/AST.hs
11
data/AST.hs
|
@ -357,13 +357,6 @@ data Replicator =
|
|||
data Choice = Choice Meta Expression Process
|
||||
deriving (Show, Eq, Typeable, Data)
|
||||
|
||||
-- | A mode of waiting -- either for a specified duration, or until a specified
|
||||
-- time.
|
||||
data WaitMode =
|
||||
WaitFor
|
||||
| WaitUntil
|
||||
deriving (Show, Eq, Ord, Typeable, Data)
|
||||
|
||||
-- | A guard in an @ALT@.
|
||||
data Alternative =
|
||||
-- | A plain guard.
|
||||
|
@ -377,8 +370,6 @@ data Alternative =
|
|||
-- | A @SKIP@ guard (one that is always ready).
|
||||
-- The 'Expression' is the pre-condition.
|
||||
| AlternativeSkip Meta Expression Process
|
||||
-- | A @wait for@\/@until@ guard.
|
||||
| AlternativeWait Meta WaitMode Expression Process
|
||||
deriving (Show, Eq, Typeable, Data)
|
||||
|
||||
-- | An option in a @CASE@ process.
|
||||
|
@ -557,8 +548,6 @@ data Process =
|
|||
| Input Meta Variable InputMode
|
||||
| Output Meta Variable [OutputItem]
|
||||
| OutputCase Meta Variable Name [OutputItem]
|
||||
| GetTime Meta Variable
|
||||
| Wait Meta WaitMode Expression
|
||||
-- | Clears the given mobile variable; if the variable is currently NULL,
|
||||
-- destroy the contents and make it NULL. If it is already NULL, do nothing.
|
||||
| ClearMobile Meta Variable
|
||||
|
|
|
@ -536,7 +536,6 @@ buildOnlyAlternative route alt
|
|||
(A.Alternative m _ _ p) -> (m,p, route44 route A.Alternative)
|
||||
(A.AlternativeCond m _ _ _ p) -> (m,p, route55 route A.AlternativeCond)
|
||||
(A.AlternativeSkip m _ p) -> (m,p, route33 route A.AlternativeSkip)
|
||||
(A.AlternativeWait m _ _ p) -> (m,p, route44 route A.AlternativeWait)
|
||||
guardNode <- addNode' m labelAlternative alt (AlterAlternative route)
|
||||
(bodyNodeStart, bodyNodeEnd) <- buildProcess p r
|
||||
addEdge ESeq guardNode bodyNodeStart
|
||||
|
|
|
@ -688,8 +688,6 @@ genProcess n = nextIdT >>* makeMeta' >>= \m -> (flip oneofLS) n
|
|||
,(1,comb1 (A.If emptyMeta) . genStructured genChoice')
|
||||
,(2,comb2 (A.Case emptyMeta) genExpression . genStructured genOption' . sub1)
|
||||
,(2,const $ genElem3 A.Assign m (comb0 [variable "x"]) genExpressionList)
|
||||
,(1,const $ genElem2 A.GetTime m (comb0 $ variable "x"))
|
||||
,(1,const $ genElem3 A.Wait m (comb0 A.WaitFor) genExpression)
|
||||
,(2,comb1 (A.Alt emptyMeta True) . genStructured genAlternative' . sub1)
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user