This repository has been archived by the owner on May 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
running.ltl
144 lines (123 loc) · 4.23 KB
/
running.ltl
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#######################################
# version : 1.0
# date : 01122004
# author : HT de Beer
##
##
# Defining attributes:
##
set ate.WorkflowModelElement;
set ate.Originator;
date ate.dob := "yyyy-MM-dd"; # dates have the format 'year-month-day'.
number ate.distance;
string ate.question;
string ate.answer;
string pi.name;
number pi.case;
##
# Renamings
##
rename ate.WorkflowModelElement as task;
rename ate.Originator as person;
rename ate.dob as bdate;
rename ate.distance as distance;
rename ate.question as question;
rename ate.answer as answer;
rename pi.name as name;
rename pi.case as case;
##
# Formulae
##
formula eventually_task_A_is_done_by_person_P( A : task, P: person ):=
{
<h2>Does eventually P task A?</h2>
<p>Is there a audit trail entry in a process instance in which person P
does task A?</p>
<p>
<ul>
<li><b>A</b> is a task, of attribute <i>ate.WorkflowModelElement</i>.
For this argument fill in the task you want to check for.</li>
<li><b>P</b> is a person, of attribute <i>ate.Originator</i>. Fill in
the person you want to know if he or she perform task A.</li>
</ul>
</p>
}
<>( ( task == A /\ person == P ) );
formula does_John_drive() :=
{ Does John drive in a process instance? }
eventually_task_A_is_done_by_person_P( "driving", "John" );
subformula has_Answer() := {
If the task is asking, then there is a answer not equal to the empty string.
This formula results in true for all task other than asking and for tose
task equal to asking with a non empty answer.
}
( task == "asking" -> answer != "");
subformula distance_between( lbound: distance, ubound: distance ) := {
The distance of the current audit trail entry lies between the lower bound
and the upper bound. }
( distance >= lbound /\ distance <= ubound );
subformula reasonable_distance() := {
If the task is cycling, the distance must be between 0 and 65, if the task
is driving is must be between 0 and 300, if the task is flying, the distance
must be between 150 and 1340. }
( ( task == "cycling" -> distance_between( 0, 65 ) ) /\
( ( task == "driving" -> distance_between( 0, 300 ) ) /\
( task == "flying" -> distance_between( 150, 1340 ) )
)
);
subformula permitted_to_drive() := {
A person is permitted to drive if he or she is born before 2004-6-01. }
bdate < "2004-06-01";
subformula a_important_case() := {
Case is important if the word 'important' is used in the name. }
name ~= ".*important.*";
subformula P_does_A-A_not_B( P: person, A: task, B: task ) := {
Compute if person P does task A, which is not equal to B.}
<>( ( task == A /\ ( task != B /\ person == P ) ) );
formula exists_person_doing_two_different_tasks() := {
Is there a person doing two different tasks?}
exists[ p: person |
exists[ t: task |
exists[ u: task |
( P_does_A-A_not_B( p, t, u) /\
P_does_A-A_not_B( p, u, t))
]
]
];
subformula moving( P: person ) := {
Compute if person P is moving. }
<>( ( person == P /\
( task == "driving" \/
( task == "cycling" \/
task == "flying"
)
)
) );
subformula asking( P: person ) := {
Compute if person P is asking. }
<>( ( person == P /\ task == "asking" ) );
formula moving_or_asking() := {
All persons are either moving or asking around.}
forall[ p: person |
(
( moving( p ) /\ !( asking( p ) ) ) \/
( !( moving( p ) ) /\ asking( p ) )
)
];
subformula end() := {
Only in the last state holds that in the next state a
WorkflowModelElement is not equal itself ( for other elements the same of
course) because in the next audit trail entry of the last state all
comparisons are false, the data elements does obviously not exist.}
!( _O( ate.WorkflowModelElement == ate.WorkflowModelElement ));
subformula next_older( d: bdate ) := {
Is d bigger or equal the current bdate? }
_O( bdate <= d );
formula always_nexttime_older() := {
Holds always that the birthbdate of the person in he next audit trail entry is
lesser or equal to the date of birth of the person performing the current
audit trail entry?}
[]( ( next_older( bdate ) \/ end() ) );
formula move_till_question() := {
}
(task == "asking" _U distance > 0 );