Skip to content

Commit 3ed19e5

Browse files
committed
add abstract domain support
1 parent c38c83a commit 3ed19e5

File tree

6 files changed

+738
-516
lines changed

6 files changed

+738
-516
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
module CTLLibrary
2+
3+
import StandardLibrary
4+
5+
export *
6+
7+
signature:
8+
/*-----------CTL formulas------------*/
9+
static eg: Boolean -> Boolean //exists globally
10+
static ex: Boolean -> Boolean //exists next state
11+
static ef: Boolean -> Boolean //exists finally
12+
static ag: Boolean -> Boolean //forall globally
13+
static ax: Boolean -> Boolean //forall next state
14+
static af: Boolean -> Boolean //forall finally
15+
static eu: Prod(Boolean, Boolean) -> Boolean //exists until
16+
static au: Prod(Boolean, Boolean) -> Boolean //forall until
17+
18+
/*-----------Patterns------------*/
19+
static ew: Prod(Boolean, Boolean) -> Boolean //exists weak until -- E[p U q] | EGp.
20+
static aw: Prod(Boolean, Boolean) -> Boolean //forall weak until -- !E[!q U !(p | q)].
21+
22+
23+
//http://patterns.projects.cis.ksu.edu/documentation/patterns/ctl.shtml
24+
//Absence (P is false)
25+
//Globally - AG(!P)
26+
static absenceG: Boolean -> Boolean
27+
//(*) Before R - A[(!P | AG(!R)) W R]
28+
static absenceBefore: Prod(Boolean, Boolean) -> Boolean // absenceBefore(P, R)
29+
//After Q - AG(Q -> AG(!P))
30+
static absenceAfter: Prod(Boolean, Boolean) -> Boolean // absenceAfter(P, Q)
31+
//(*) Between Q and R - AG(Q & !R -> A[(!P | AG(!R)) W R])
32+
static absenceBetween: Prod(Boolean, Boolean, Boolean) -> Boolean // absenceBetween(P, Q, R)
33+
//(*) After Q until R - AG(Q & !R -> A[!P W R])
34+
static absenceAfterUntil: Prod(Boolean, Boolean, Boolean) -> Boolean // absenceAfterUntil(P, Q, R)
35+
36+
//Precedence (S precedes P)
37+
//(*) Globally
38+
//A[!P W S]
39+
static ap: Prod(Boolean, Boolean) -> Boolean // ap(P, S)
40+
//(*) Before R
41+
//A[(!P | AG(!R)) W (S | R)]
42+
static pb: Prod(Boolean, Boolean, Boolean) -> Boolean // pb(P, S, R)
43+
//(*) After Q
44+
//A[!Q W (Q & A[!P W S])]
45+
//(*) Between Q and R
46+
//AG(Q & !R -> A[(!P | AG(!R)) W (S | R)])
47+
//(*) After Q until R
48+
//AG(Q & !R -> A[!P W (S | R)])
49+
50+
//Response (S responds to P)
51+
//Globally
52+
//AG(P -> AF(S))
53+
//(*) Before R
54+
//A[((P -> A[!R U (S & !R)]) | AG(!R)) W R]
55+
//(*) After Q
56+
//A[!Q W (Q & AG(P -> AF(S))]
57+
//(*) Between Q and R
58+
//AG(Q & !R -> A[((P -> A[!R U (S & !R)]) | AG(!R)) W R])
59+
//(*) After Q until R
60+
//AG(Q & !R -> A[(P -> A[!R U (S & !R)]) W R])
61+
62+
/*-----------My CTL formulas------------*/
63+
static exN: Prod(Boolean, Natural) -> Boolean //exists after N states
64+
static axN: Prod(Boolean, Natural) -> Boolean //forall paths, after N states
65+
definitions:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module LTLLibrary
2+
3+
export *
4+
5+
signature:
6+
/*-----------LTL formulas------------*/
7+
//Future
8+
static x: Boolean -> Boolean //next state
9+
static g: Boolean -> Boolean //globally
10+
static f: Boolean -> Boolean //finally
11+
static u: Prod(Boolean, Boolean) -> Boolean //until
12+
static v: Prod(Boolean, Boolean) -> Boolean //releases
13+
//Past
14+
static y: Boolean -> Boolean //previous state
15+
static z: Boolean -> Boolean //not previous state not
16+
static h: Boolean -> Boolean //historically
17+
static o: Boolean -> Boolean //once
18+
static s: Prod(Boolean, Boolean) -> Boolean //since
19+
static t: Prod(Boolean, Boolean) -> Boolean //triggered
20+
21+
definitions:

0 commit comments

Comments
 (0)