Browse Source
updated fragment checking for multi objective formulas
updated fragment checking for multi objective formulas
Former-commit-id: 8538e97e00
tempestpy_adaptions
TimQu
9 years ago
10 changed files with 94 additions and 18 deletions
-
50examples/multiobjective/ma/stream/stream.ma
-
4src/logic/CloneVisitor.cpp
-
4src/logic/FormulaInformationVisitor.cpp
-
7src/logic/FragmentChecker.cpp
-
11src/logic/FragmentSpecification.cpp
-
4src/logic/FragmentSpecification.h
-
2src/logic/MultiObjectiveFormula.cpp
-
2src/logic/MultiObjectiveFormula.h
-
2src/modelchecker/multiobjective/helper/SparseMultiObjectivePreprocessor.cpp
-
26test/functional/logic/FragmentCheckerTest.cpp
@ -0,0 +1,50 @@ |
|||||
|
|
||||
|
ma |
||||
|
|
||||
|
const int N; // num packages |
||||
|
|
||||
|
const double inRate = 4; |
||||
|
const double processingRate = 5; |
||||
|
|
||||
|
module streamingclient |
||||
|
|
||||
|
s : [0..3]; // current state: |
||||
|
// 0: decide whether to start |
||||
|
// 1: buffering |
||||
|
// 2: running |
||||
|
// 3: done |
||||
|
|
||||
|
n : [0..N]; // number of received packages |
||||
|
k : [0..N]; // number of processed packages |
||||
|
|
||||
|
[buffer] s=0 & n<N -> 1 : (s'=1); |
||||
|
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
||||
|
|
||||
|
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
||||
|
|
||||
|
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
||||
|
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
||||
|
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
||||
|
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
||||
|
|
||||
|
<> s=3 -> 1 : true; |
||||
|
endmodule |
||||
|
|
||||
|
// All packages received and buffer empty |
||||
|
label "done" = (s=3); |
||||
|
|
||||
|
rewards "buffering" |
||||
|
s=1 : 1; |
||||
|
endrewards |
||||
|
|
||||
|
rewards "initialbuffering" |
||||
|
s=1 & k = 0: 1; |
||||
|
endrewards |
||||
|
|
||||
|
rewards "intermediatebuffering" |
||||
|
s=1 & k > 0: 1; |
||||
|
endrewards |
||||
|
|
||||
|
rewards "numRestarts" |
||||
|
[start] k > 0 : 1; |
||||
|
endrewards |
Write
Preview
Loading…
Cancel
Save
Reference in new issue