Browse Source

updated smg shield tests

tempestpy_adaptions
Stefan Pranger 3 years ago
parent
commit
50cf8d8e7f
  1. 3
      resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyGamma05PminF5.shield
  2. 6
      resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyGamma09PminF3.shield
  3. 9
      resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyLambda05PminF5.shield
  4. 9
      resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyLambda09PminF3.shield
  5. 3
      resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyGamma05PminF5.shield
  6. 6
      resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyGamma09PminF3.shield
  7. 9
      resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyLambda05PminF5.shield
  8. 9
      resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyLambda09PminF3.shield
  9. 16
      src/test/storm/modelchecker/rpatl/smg/ShieldGenerationSmgRpatlModelCheckerTest.cpp

3
resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyGamma05PminF5.shield

@ -1,6 +1,5 @@
___________________________________________________________________
Post-Safety-Shield with absolute comparison (gamma = 0.500000):
model state: correction [<action>: (<corrected action>)}:
4 0: 0
5 0: 0
7 0: 0
___________________________________________________________________

6
resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyGamma09PminF3.shield

@ -1,6 +1,8 @@
___________________________________________________________________
Post-Safety-Shield with absolute comparison (gamma = 0.900000):
model state: correction [<action>: (<corrected action>)}:
4 0: 0
5 0: 0
1 0: 0; 1: 0
2 0: 0
7 0: 0
10 0: 0
___________________________________________________________________

9
resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyLambda05PminF5.shield

@ -1,8 +1,9 @@
___________________________________________________________________
Post-Safety-Shield with relative comparison (lambda = 0.500000):
model state: correction [<action>: (<corrected action>)}:
0 0: 0; 1: 1
4 0: 0
5 0: 0
9 0: 0; 1: 1
1 0: 0; 1: 1
2 0: 0
7 0: 0
8 0: 0
10 0: 0
___________________________________________________________________

9
resources/examples/testfiles/shields/smg-shields/rightDecisionPostSafetyLambda09PminF3.shield

@ -1,8 +1,9 @@
___________________________________________________________________
Post-Safety-Shield with relative comparison (lambda = 0.900000):
model state: correction [<action>: (<corrected action>)}:
0 0: 0; 1: 1
4 0: 0
5 0: 0
9 0: 0; 1: 1
1 0: 0; 1: 1
2 0: 0
7 0: 0
8 0: 0
10 0: 0
___________________________________________________________________

3
resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyGamma05PminF5.shield

@ -1,6 +1,5 @@
___________________________________________________________________
Pre-Safety-Shield with absolute comparison (gamma = 0.500000):
model state: choice(s) [<value>: (<action>)}:
4 0: (0)
5 0: (0)
7 0: (0)
___________________________________________________________________

6
resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyGamma09PminF3.shield

@ -1,6 +1,8 @@
___________________________________________________________________
Pre-Safety-Shield with absolute comparison (gamma = 0.900000):
model state: choice(s) [<value>: (<action>)}:
4 0: (0)
5 0: (0)
1 0.9: (0)
2 0: (0)
7 0: (0)
10 0.9: (0)
___________________________________________________________________

9
resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyLambda05PminF5.shield

@ -1,8 +1,9 @@
___________________________________________________________________
Pre-Safety-Shield with relative comparison (lambda = 0.500000):
model state: choice(s) [<value>: (<action>)}:
0 0: (1)
4 0: (0)
5 0: (0)
9 0: (1)
1 0.9: (0); 1: (1)
2 1: (0)
7 0: (0)
8 1: (0)
10 0.9: (0)
___________________________________________________________________

9
resources/examples/testfiles/shields/smg-shields/rightDecisionPreSafetyLambda09PminF3.shield

@ -1,8 +1,9 @@
___________________________________________________________________
Pre-Safety-Shield with relative comparison (lambda = 0.900000):
model state: choice(s) [<value>: (<action>)}:
0 0: (1)
4 0: (0)
5 0: (0)
9 0: (1)
1 0.9: (0); 1: (1)
2 0: (0)
7 0: (0)
8 1: (0)
10 0.9: (0)
___________________________________________________________________

16
src/test/storm/modelchecker/rpatl/smg/ShieldGenerationSmgRpatlModelCheckerTest.cpp

@ -108,22 +108,22 @@ namespace {
// testing create shielding expressions
std::string formulasString = "<" + fileNames[0] + ", PreSafety, lambda=0.9> <<hiker>> Pmax=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[1] + ", PreSafety, lambda=0.9> <<hiker>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[1] + ", PreSafety, lambda=0.9> <<native>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[2] + ", PreSafety, gamma=0.9> <<hiker>> Pmax=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[3] + ", PreSafety, gamma=0.9> <<hiker>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[3] + ", PreSafety, gamma=0.9> <<native>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[4] + ", PostSafety, lambda=0.9> <<hiker>> Pmax=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[5] + ", PostSafety, lambda=0.9> <<hiker>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[5] + ", PostSafety, lambda=0.9> <<native>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[6] + ", PostSafety, gamma=0.9> <<hiker>> Pmax=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[7] + ", PostSafety, gamma=0.9> <<hiker>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[7] + ", PostSafety, gamma=0.9> <<native>> Pmin=? [ F <=3 \"target\" ]";
formulasString += "; <" + fileNames[8] + ", PreSafety, lambda=0.5> <<hiker>> Pmax=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[9] + ", PreSafety, lambda=0.5> <<hiker>> Pmin=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[9] + ", PreSafety, lambda=0.5> <<native>> Pmin=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[10] + ", PreSafety, gamma=0.5> <<hiker>> Pmax=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[11] + ", PreSafety, gamma=0.5> <<hiker>> Pmin=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[11] + ", PreSafety, gamma=0.5> <<native>> Pmin=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[12] + ", PostSafety, lambda=0.5> <<hiker>> Pmax=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[13] + ", PostSafety, lambda=0.5> <<hiker>> Pmin=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[13] + ", PostSafety, lambda=0.5> <<native>> Pmin=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[14] + ", PostSafety, gamma=0.5> <<hiker>> Pmax=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[15] + ", PostSafety, gamma=0.5> <<hiker>> Pmin=? [ F <=5 \"target\" ]";
formulasString += "; <" + fileNames[15] + ", PostSafety, gamma=0.5> <<native>> Pmin=? [ F <=5 \"target\" ]";
auto modelFormulas = this->buildModelFormulas(STORM_TEST_RESOURCES_DIR "/smg/rightDecision.nm", formulasString);
auto smg = std::move(modelFormulas.first);

Loading…
Cancel
Save