Skip to content
Permalink
Browse files

Improved evaluations

  • Loading branch information...
joleuger committed Jan 26, 2018
1 parent ca09660 commit 1af1015c12f96e12a3cb1458d6860f36d935c9d7
@@ -34,7 +34,6 @@ namespace SafetySharp.CaseStudies.HemodialysisMachine.Modeling
// Also called dialysate or dialyzate
public struct DialyzingFluid
{
[Range(0, 8, OverflowBehavior.Error)]
public int Quantity;
public KindOfDialysate KindOfDialysate;
public bool ContaminatedByBlood;
@@ -50,6 +50,7 @@ CompileProject($project_file_hc)
cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControl.dll" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControlUnhidden.dll"
git checkout "$PSScriptRoot\..\Models\Height Control\Modeling\Vehicles\Vehicle.cs"
CompileProject($project_file_hc)
cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControl.dll" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControlHidden.dll"


cp "$PSScriptRoot\SourceChanges\FlowPortUnhidden.cs" "$PSScriptRoot\..\Models\Hemodialysis Machine\Utilities\BidirectionalFlow\FlowPort.cs"
@@ -58,4 +59,5 @@ CompileProject($project_file_hd)
cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachine.exe" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachineUnhidden.exe"
git checkout "$PSScriptRoot\..\Models\Hemodialysis Machine\Utilities\BidirectionalFlow\FlowPort.cs"
git checkout "$PSScriptRoot\..\Models\Hemodialysis Machine\Modeling\Flows\DialyzingFluidFlow.cs"
CompileProject($project_file_hd)
CompileProject($project_file_hd)
cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachine.exe" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachineHidden.exe"
@@ -3,11 +3,21 @@
$month = (Get-Date).Month
$year = (Get-Date).Year

#..\cloc-1.72.exe --csv --out=cloc-total-${year}_${month}.csv ..\
cloc-1.72.exe --csv --out=cloc-models-${year}_${month}.csv ..\Models
cloc-1.72.exe --csv --out=cloc-safetychecking-${year}_${month}.csv ..\Source\SafetyChecking
cloc-1.72.exe --csv --out=cloc-safetysharp-${year}_${month}.csv ..\Source\SafetySharp ..\Source\Compiler
cloc-1.72.exe --csv --out=cloc-safetysharp-faultaware-${year}_${month}.csv ..\Source\SafetyChecking\FaultMinimalKripkeStructure ..\Source\SafetyChecking\MinimalCriticalSetAnalysis
cloc-1.72.exe --csv --out=cloc-safetysharp-dtmc-${year}_${month}.csv ..\Source\SafetyChecking\DiscreteTimeMarkovChain
cloc-1.72.exe --csv --out=cloc-safetysharp-mdp-${year}_${month}.csv ..\Source\SafetyChecking\MarkovDecisionProcess
cloc-1.72.exe --csv --out=cloc-tests-${year}_${month}.csv ..\SafetySharpTests ..\SafetyCheckingTests
#..\cloc-1.72.exe --csv --out=cloc-total-${year}_${month}.csv .
..\cloc-1.72.exe --csv --out=cloc-models-${year}_${month}.csv Models
..\cloc-1.72.exe --csv --out=cloc-safetychecking-${year}_${month}.csv Source\SafetyChecking
..\cloc-1.72.exe --csv --out=cloc-safetysharp-compiler${year}_${month}.csv Source\Compiler .\Source\SafetySharp\CompilerServices
..\cloc-1.72.exe --csv --out=cloc-safetysharp-common-runtime${year}_${month}.csv Source\SafetySharp\ModelChecking Source\SafetySharp\Runtime Source\SafetySharp\Utilities
..\cloc-1.72.exe --csv --out=cloc-safetysharp-modeling${year}_${month}.csv Source\SafetySharp\Modeling
..\cloc-1.72.exe --csv --out=cloc-safetysharp-faultaware-${year}_${month}.csv Source\SafetyChecking\FaultMinimalKripkeStructure Source\SafetyChecking\MinimalCriticalSetAnalysis
..\cloc-1.72.exe --csv --out=cloc-safetysharp-dtmc-${year}_${month}.csv Source\SafetyChecking\DiscreteTimeMarkovChain
..\cloc-1.72.exe --csv --out=cloc-safetysharp-mdp-${year}_${month}.csv Source\SafetyChecking\MarkovDecisionProcess
..\cloc-1.72.exe --csv --out=cloc-safetysharp-bayesian-${year}_${month}.csv Source\SafetySharp\Bayesian
..\cloc-1.72.exe --csv --out=cloc-tests-${year}_${month}.csv SafetySharpTests SafetyCheckingTests SafetyLustreTests
..\cloc-1.72.exe --csv --out=cloc-safetylustre-common-runtime${year}_${month}.csv Source\SafetyLustre

..\cloc-1.72.exe --csv --out=cloc-models-heightcontrol-${year}_${month}.csv '.\Models\Height Control\Modeling'
..\cloc-1.72.exe --csv --out=cloc-models-hemodialysis-${year}_${month}.csv '.\Models\Hemodialysis Machine\Modeling' '.\Models\Hemodialysis Machine\Utilities'
..\cloc-1.72.exe --csv --out=cloc-models-railroad-${year}_${month}.csv '.\Models\Railroad Crossing\Modeling'
..\cloc-1.72.exe --csv --out=cloc-models-deadreckoning-${year}_${month}.csv '.\Models\Small Models\DeadReckoning\Model.cs'
..\cloc-1.72.exe --csv --out=cloc-models-degraded-mode-${year}_${month}.csv '.\Models\Small Models\DegradedMode\Model.cs'
@@ -50,11 +50,13 @@ $global_testValuations = @()
# SafetySharp.CaseStudies.HemodialysisMachine.exe


AddTest -Testname "Hemodialysis_HazardUnsuccessful" -TestAssembly "SafetySharp.CaseStudies.HemodialysisMachineUnhidden.exe" -TestMethod "SafetySharp.CaseStudies.HemodialysisMachine.Analysis.HazardProbabilityTests.WaterHeaterPermanentDemandOnCustom" -TestNunitCategory "DialysisFinishedAndBloodNotCleaned" -TestCategories @("HemodialysisMachine","Unhidden")
AddTest -Testname "Hemodialysis_HazardContamination" -TestAssembly "SafetySharp.CaseStudies.HemodialysisMachineUnhidden.exe" -TestMethod "SafetySharp.CaseStudies.HemodialysisMachine.Analysis.HazardProbabilityTests.WaterHeaterPermanentDemandOnCustom" -TestNunitCategory "IncomingBloodIsContaminated" -TestCategories @("HemodialysisMachine","Unhidden")
AddTest -Testname "HeightControl_Probability_HazardCollision" -TestAssembly "SafetySharp.CaseStudies.HeightControlUnhidden.dll" -TestMethod "SafetySharp.CaseStudies.HeightControl.Analysis.HazardProbabilityTests.Original-Original-Original" -TestNunitCategory "CollisionProbability" -TestCategories @("HeightControl","Variant-Original-Original-Original","Hazard-Collision","Unhidden")
AddTest -Testname "HeightControl_Probability_HazardFalseAlarm" -TestAssembly "SafetySharp.CaseStudies.HeightControlUnhidden.dll" -TestMethod "SafetySharp.CaseStudies.HeightControl.Analysis.HazardProbabilityTests.Original-Original-Original" -TestNunitCategory "FalseAlarmProbability" -TestCategories @("HeightControl","Variant-Original-Original-Original","Hazard-FalseAlarm","Unhidden")
AddTest -Testname "HeightControl_Probability_Prevention-Collision" -TestAssembly "SafetySharp.CaseStudies.HeightControlUnhidden.dll" -TestMethod "SafetySharp.CaseStudies.HeightControl.Analysis.HazardProbabilityTests.Original-Original-Original" -TestNunitCategory "PreventionProbability" -TestCategories @("HeightControl","Variant-Original-Original-Original","Prevention-Collision","Unhidden")
AddTest -Testname "Hemodialysis_HazardUnsuccessful" -TestAssembly "SafetySharp.CaseStudies.HemodialysisMachine.exe" -TestMethod "SafetySharp.CaseStudies.HemodialysisMachine.Analysis.HazardProbabilityTests.WaterHeaterPermanentDemandOnCustom" -TestNunitCategory "DialysisFinishedAndBloodNotCleaned" -TestCategories @("HemodialysisMachine","Unhidden")
AddTest -Testname "Hemodialysis_HazardContamination" -TestAssembly "SafetySharp.CaseStudies.HemodialysisMachine.exe" -TestMethod "SafetySharp.CaseStudies.HemodialysisMachine.Analysis.HazardProbabilityTests.WaterHeaterPermanentDemandOnCustom" -TestNunitCategory "IncomingBloodIsContaminated" -TestCategories @("HemodialysisMachine","Unhidden")
AddTest -Testname "HeightControl_Probability_HazardCollision" -TestAssembly "SafetySharp.CaseStudies.HeightControl.dll" -TestMethod "SafetySharp.CaseStudies.HeightControl.Analysis.HazardProbabilityTests.Original-Original-Original" -TestNunitCategory "CollisionProbability" -TestCategories @("HeightControl","Variant-Original-Original-Original","Hazard-Collision","Unhidden")
AddTest -Testname "HeightControl_Probability_HazardFalseAlarm" -TestAssembly "SafetySharp.CaseStudies.HeightControl.dll" -TestMethod "SafetySharp.CaseStudies.HeightControl.Analysis.HazardProbabilityTests.Original-Original-Original" -TestNunitCategory "FalseAlarmProbability" -TestCategories @("HeightControl","Variant-Original-Original-Original","Hazard-FalseAlarm","Unhidden")
AddTest -Testname "HeightControl_Probability_Prevention-Collision" -TestAssembly "SafetySharp.CaseStudies.HeightControl.dll" -TestMethod "SafetySharp.CaseStudies.HeightControl.Analysis.HazardProbabilityTests.Original-Original-Original" -TestNunitCategory "PreventionProbability" -TestCategories @("HeightControl","Variant-Original-Original-Original","Prevention-Collision","Unhidden")
AddTest -Testname "HemodialysisMachine_AllHazardsWithoutStaticPruning" -TestAssembly "SafetySharp.CaseStudies.HemodialysisMachine.exe" -TestMethod "SafetySharp.CaseStudies.HemodialysisMachine.Analysis.EvaluationTests.CreateMarkovChainWithBothHazardsWithoutStaticPruning" -TestNunitCategory "" -TestCategories @("VariousEvaluations","HemodialysisMachine")
AddTest -Testname "HeightControl_AllHazardsWithoutStaticPruning" -TestAssembly "SafetySharp.CaseStudies.HeightControl.dll" -TestMethod "SafetySharp.CaseStudies.HeightControl.Analysis.EvaluationTests.CreateMarkovChainWithBothHazardsWithoutStaticPruning" -TestNunitCategory "" -TestCategories @("VariousEvaluations","HeightControl")



@@ -67,6 +69,14 @@ $global_selected_tests = $global_tests | Where { $_.TestCategories.Contains("Unh

AddTestValuation -Name "Unhidden" -Script "copy -Force $PSScriptRoot\HeightControlNormal.json $global_compilate_directory\Analysis\heightcontrol_probabilities.json" -ResultDir "$PSScriptRoot\Unhidden" -FilesOfTestValuation @("$global_compilate_directory\Analysis\heightcontrol_probabilities.json")



cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControlHidden.dll" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControl.dll"
cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachineHidden.exe" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachine.exe"

Foreach ($testvaluation in $global_testValuations) {
ExecuteTestValuation -TestValuation $testvaluation -Tests $global_selected_tests
}

cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControlUnhidden.dll" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HeightControl.dll"
cp "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachineUnhidden.exe" "$PSScriptRoot\..\Binaries\Release\SafetySharp.CaseStudies.HemodialysisMachine.exe"

0 comments on commit 1af1015

Please sign in to comment.
You can’t perform that action at this time.