-
Notifications
You must be signed in to change notification settings - Fork 3
/
profileSig0.hs
53 lines (47 loc) · 1.82 KB
/
profileSig0.hs
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
import CPi.Lib
import Tests
import CPi.ODE
import CPi.Matlab
import CPi.Semantics
import CPi.Logic
import CPi.Signals
import System.Environment (getArgs)
-- Time points
--tps = (100,(0,25))
propPhi = (ValGT (Conc (Def "P" [])) (R 0.05))
propPsi = (ValLE (Conc (Def "S" ["s"])) (R 0.01))
propChi = (ValGT (Conc (Def "E" ["e"])) (R 0.01))
propOmega = (ValGT (Conc (Def "E" ["e"])) (R 0.4))
main = do env <- tEnv "models/testGT.cpi"
res <- getArgs
let tps = (read(res!!0),(0,25))
let pi = tProc env "Pi"
let trace = solve env solveODEoctave tps pi
let r1 = {-# SCC "propPhi-Signal" #-} modelCheckSig
env solveODE (Just trace) pi tps propPhi
r2 = {-# SCC "propPhi-Trace" #-} modelCheck
env solveODE (Just trace) pi tps propPhi
print $ pretty propPhi
print r1
print r2
let r1 = {-# SCC "propPsi-Signal" #-} modelCheckSig
env solveODE (Just trace) pi tps propPsi
r2 = {-# SCC "propPsi-Trace" #-} modelCheck
env solveODE (Just trace) pi tps propPsi
print $ pretty propPsi
print r1
print r2
let r1 = {-# SCC "propChi-Signal" #-} modelCheckSig
env solveODE (Just trace) pi tps propChi
r2 = {-# SCC "propChi-Trace" #-} modelCheck
env solveODE (Just trace) pi tps propChi
print $ pretty propChi
print r1
print r2
let r1 = {-# SCC "propOmega-Signal" #-} modelCheckSig
env solveODE (Just trace) pi tps propOmega
r2 = {-# SCC "propOmega-Trace" #-} modelCheck
env solveODE (Just trace) pi tps propOmega
print $ pretty propOmega
print r1
print r2