Added support for the time statements in the usage checker
This commit is contained in:
parent
a891e34d24
commit
cb964c620f
|
@ -81,6 +81,8 @@ getVarProc (A.Assign _ vars expList)
|
|||
(foldUnionVars (map processVarW vars))
|
||||
--All variables read on the RHS:
|
||||
(getVarExpList expList)
|
||||
getVarProc (A.GetTime _ v) = processVarW v
|
||||
getVarProc (A.Wait _ _ e) = getVarExp e
|
||||
--TODO output input etc (all other processes that directly write to/read from variables)
|
||||
getVarProc _ = emptyVars
|
||||
|
||||
|
|
|
@ -76,6 +76,12 @@ testGetVarProc = TestList (map doTest tests)
|
|||
--Test assignments and expressions:
|
||||
,(200,[tvB],[tvA],[tvA],[],a_eq_not_b)
|
||||
,(201,[tvC,tvD],[tvA],[tvA],[],a_eq_c_plus_d)
|
||||
|
||||
-- Test time statements:
|
||||
,(300,[],[tvB],[tvB],[],A.GetTime emptyMeta vB)
|
||||
,(301,[tvA],[],[],[],A.Wait emptyMeta A.WaitFor $ A.ExprVariable emptyMeta vA)
|
||||
|
||||
|
||||
|
||||
]
|
||||
doTest :: (Int,[Var],[Var],[Var],[Var],A.Process) -> Test
|
||||
|
|
Loading…
Reference in New Issue
Block a user