Commit fa057f03 authored by Joshua Moerman's avatar Joshua Moerman
Browse files

Final results are in! and converted to csv

parent cb27bbb8
......@@ -15,3 +15,4 @@ In this repo I collect all the stuff I used/created/... for the RERS challenge.
one alphabet issue).
* postprocessing: Contains code to convert the dot files and ltl formulas to
a format NuSMV understands.
* results: Has the results for all problems.
......@@ -38,4 +38,11 @@ executable MainDot2Nu
build-depends:
base >=4.9 && <5.0,
containers,
parsec
\ No newline at end of file
parsec
executable MainErr
hs-source-dirs: src
default-language: Haskell2010
main-is: MainErr.hs
build-depends:
base >=4.9 && <5.0,
containers
\ No newline at end of file
import qualified Data.Set as Set
import Data.Set (Set)
import Control.Monad (forM_)
import System.Environment (getArgs)
getn :: String -> Int
getn ('E':'R':'R':'O':'R':n) = read n
isIn = Set.member
main = do
[arg] <- getArgs
let problem = read arg :: Int
file <- lines <$> getContents
let ns = map getn file
let errorStates = Set.fromList ns
let printCase n = putStrLn $ show problem ++ ", error_" ++ show n ++ ", " ++ if n `isIn` errorStates then "true" else "false"
forM_ [0..99] printCase
# Along the way I learnt some powershell:
for ($x=1; $x -le 9; $x++) { $n=$x; $i=@(0,5,5,10,10,10,20,20,20,20)[$x]; gc .\challenge\Problem$n\constraints-RERS16-$i.txt | .\postprocessing\LTL\dist\build\MainR2Nu\MainR2Nu.exe | out-file -Encoding ascii .\models\nusmv\Problem$n-LTL.smv }
for ($x=1; $x -le 9; $x++) { $n=$x; cp Problem$n.smv Problem$n-Full.smv; gc Problem$n-LTL.smv | ac -Path Problem$n-Full.smv }
for ($x=1; $x -le 9; $x++) { $n=$x; gc .\models\dot\Problem$n.dot | .\postprocessing\LTL\dist\build\MainDot2Nu\MainDot2Nu.exe | out-file -Encoding ascii .\models\nusmv\Problem$n.smv }
for ($x=10; $x -le 18; $x++) { $n=$x; gc .\results\Problem$n.txt | .\postprocessing\LTL\dist\build\MainErr\MainErr.exe $n | out-file -Encoding ascii .\results\submission\Problem$n.csv }
1, 0, false
1, 1, false
1, 2, true
1, 3, true
1, 4, false
1, 5, false
1, 6, false
1, 7, false
1, 8, false
1, 9, false
1, 10, false
1, 11, false
1, 12, true
1, 13, false
1, 14, true
1, 15, false
1, 16, false
1, 17, false
1, 18, true
1, 19, true
1, 20, true
1, 21, false
1, 22, false
1, 23, false
1, 24, false
1, 25, true
1, 26, true
1, 27, true
1, 28, true
1, 29, true
1, 30, false
1, 31, false
1, 32, true
1, 33, false
1, 34, false
1, 35, false
1, 36, true
1, 37, false
1, 38, false
1, 39, false
1, 40, true
1, 41, false
1, 42, true
1, 43, false
1, 44, true
1, 45, true
1, 46, false
1, 47, true
1, 48, false
1, 49, false
1, 50, false
1, 51, false
1, 52, true
1, 53, false
1, 54, true
1, 55, false
1, 56, true
1, 57, false
1, 58, false
1, 59, true
1, 60, true
1, 61, true
1, 62, true
1, 63, false
1, 64, false
1, 65, true
1, 66, true
1, 67, true
1, 68, true
1, 69, true
1, 70, false
1, 71, false
1, 72, true
1, 73, false
1, 74, true
1, 75, true
1, 76, false
1, 77, true
1, 78, true
1, 79, true
1, 80, true
1, 81, true
1, 82, true
1, 83, false
1, 84, true
1, 85, false
1, 86, false
1, 87, true
1, 88, true
1, 89, false
1, 90, false
1, 91, false
1, 92, true
1, 93, false
1, 94, false
1, 95, false
1, 96, false
1, 97, true
1, 98, true
1, 99, true
10, error_0, false
10, error_1, false
10, error_2, false
10, error_3, false
10, error_4, false
10, error_5, false
10, error_6, false
10, error_7, false
10, error_8, false
10, error_9, false
10, error_10, false
10, error_11, false
10, error_12, false
10, error_13, false
10, error_14, true
10, error_15, true
10, error_16, true
10, error_17, false
10, error_18, false
10, error_19, false
10, error_20, true
10, error_21, false
10, error_22, true
10, error_23, false
10, error_24, true
10, error_25, true
10, error_26, true
10, error_27, false
10, error_28, true
10, error_29, true
10, error_30, true
10, error_31, true
10, error_32, false
10, error_33, false
10, error_34, false
10, error_35, true
10, error_36, false
10, error_37, true
10, error_38, true
10, error_39, true
10, error_40, false
10, error_41, false
10, error_42, true
10, error_43, true
10, error_44, false
10, error_45, false
10, error_46, false
10, error_47, false
10, error_48, false
10, error_49, false
10, error_50, true
10, error_51, false
10, error_52, true
10, error_53, true
10, error_54, true
10, error_55, true
10, error_56, false
10, error_57, false
10, error_58, true
10, error_59, false
10, error_60, false
10, error_61, true
10, error_62, true
10, error_63, false
10, error_64, false
10, error_65, true
10, error_66, false
10, error_67, false
10, error_68, false
10, error_69, false
10, error_70, false
10, error_71, false
10, error_72, false
10, error_73, false
10, error_74, false
10, error_75, true
10, error_76, true
10, error_77, true
10, error_78, true
10, error_79, false
10, error_80, true
10, error_81, false
10, error_82, false
10, error_83, false
10, error_84, false
10, error_85, false
10, error_86, true
10, error_87, true
10, error_88, true
10, error_89, true
10, error_90, true
10, error_91, true
10, error_92, false
10, error_93, true
10, error_94, true
10, error_95, true
10, error_96, true
10, error_97, true
10, error_98, true
10, error_99, true
11, error_0, false
11, error_1, false
11, error_2, false
11, error_3, false
11, error_4, false
11, error_5, true
11, error_6, true
11, error_7, false
11, error_8, false
11, error_9, false
11, error_10, false
11, error_11, true
11, error_12, false
11, error_13, false
11, error_14, false
11, error_15, false
11, error_16, false
11, error_17, false
11, error_18, false
11, error_19, false
11, error_20, false
11, error_21, false
11, error_22, false
11, error_23, false
11, error_24, false
11, error_25, true
11, error_26, true
11, error_27, false
11, error_28, false
11, error_29, false
11, error_30, false
11, error_31, false
11, error_32, true
11, error_33, false
11, error_34, false
11, error_35, false
11, error_36, false
11, error_37, false
11, error_38, true
11, error_39, true
11, error_40, true
11, error_41, false
11, error_42, true
11, error_43, false
11, error_44, false
11, error_45, false
11, error_46, false
11, error_47, false
11, error_48, false
11, error_49, true
11, error_50, false
11, error_51, false
11, error_52, true
11, error_53, true
11, error_54, false
11, error_55, false
11, error_56, false
11, error_57, false
11, error_58, false
11, error_59, false
11, error_60, false
11, error_61, false
11, error_62, true
11, error_63, true
11, error_64, false
11, error_65, false
11, error_66, false
11, error_67, false
11, error_68, false
11, error_69, false
11, error_70, false
11, error_71, false
11, error_72, false
11, error_73, false
11, error_74, false
11, error_75, false
11, error_76, true
11, error_77, false
11, error_78, false
11, error_79, false
11, error_80, false
11, error_81, false
11, error_82, false
11, error_83, false
11, error_84, false
11, error_85, true
11, error_86, false
11, error_87, false
11, error_88, false
11, error_89, false
11, error_90, false
11, error_91, true
11, error_92, false
11, error_93, true
11, error_94, false
11, error_95, false
11, error_96, false
11, error_97, false
11, error_98, true
11, error_99, false
12, error_0, true
12, error_1, true
12, error_2, false
12, error_3, false
12, error_4, false
12, error_5, false
12, error_6, true
12, error_7, false
12, error_8, false
12, error_9, false
12, error_10, false
12, error_11, false
12, error_12, false
12, error_13, false
12, error_14, false
12, error_15, true
12, error_16, false
12, error_17, false
12, error_18, false
12, error_19, true
12, error_20, false
12, error_21, false
12, error_22, false
12, error_23, false
12, error_24, true
12, error_25, false
12, error_26, true
12, error_27, true
12, error_28, false
12, error_29, false
12, error_30, false
12, error_31, false
12, error_32, false
12, error_33, false
12, error_34, true
12, error_35, false
12, error_36, false
12, error_37, false
12, error_38, false
12, error_39, true
12, error_40, false
12, error_41, true
12, error_42, false
12, error_43, false
12, error_44, true
12, error_45, false
12, error_46, true
12, error_47, false
12, error_48, false
12, error_49, false
12, error_50, false
12, error_51, false
12, error_52, false
12, error_53, false
12, error_54, false
12, error_55, false
12, error_56, true
12, error_57, true
12, error_58, false
12, error_59, false
12, error_60, false
12, error_61, false
12, error_62, false
12, error_63, false
12, error_64, true
12, error_65, false
12, error_66, false
12, error_67, false
12, error_68, false
12, error_69, false
12, error_70, false
12, error_71, true
12, error_72, true
12, error_73, false
12, error_74, false
12, error_75, false
12, error_76, false
12, error_77, false
12, error_78, false
12, error_79, true
12, error_80, false
12, error_81, false
12, error_82, false
12, error_83, false
12, error_84, false
12, error_85, false
12, error_86, false
12, error_87, false
12, error_88, false
12, error_89, true
12, error_90, false
12, error_91, false
12, error_92, false
12, error_93, true
12, error_94, false
12, error_95, false
12, error_96, false
12, error_97, false
12, error_98, false
12, error_99, false
13, error_0, false
13, error_1, true
13, error_2, false
13, error_3, false
13, error_4, false
13, error_5, false
13, error_6, true
13, error_7, false
13, error_8, false
13, error_9, false
13, error_10, false
13, error_11, false
13, error_12, true
13, error_13, true
13, error_14, false
13, error_15, true
13, error_16, false
13, error_17, false
13, error_18, true
13, error_19, false
13, error_20, false
13, error_21, true
13, error_22, false
13, error_23, true
13, error_24, false
13, error_25, true
13, error_26, false
13, error_27, true
13, error_28, false
13, error_29, false
13, error_30, true
13, error_31, false
13, error_32, false
13, error_33, true
13, error_34, false
13, error_35, false
13, error_36, false
13, error_37, false
13, error_38, false
13, error_39, false
13, error_40, true
13, error_41, false
13, error_42, false
13, error_43, false
13, error_44, false
13, error_45, false
13, error_46, false
13, error_47, true
13, error_48, false
13, error_49, false
13, error_50, true
13, error_51, false
13, error_52, false
13, error_53, true
13, error_54, false
13, error_55, false
13, error_56, false
13, error_57, false
13, error_58, false
13, error_59, true
13, error_60, false
13, error_61, false
13, error_62, false
13, error_63, false
13, error_64, true
13, error_65, false
13, error_66, false
13, error_67, false
13, error_68, false
13, error_69, false
13, error_70, false
13, error_71, false
13, error_72, false
13, error_73, false
13, error_74, false
13, error_75, false
13, error_76, false
13, error_77, false
13, error_78, true
13, error_79, false
13, error_80, false
13, error_81, true
13, error_82, false
13, error_83, true
13, error_84, false
13, error_85, false
13, error_86, false
13, error_87, true
13, error_88, false
13, error_89, false
13, error_90, false
13, error_91, false
13, error_92, true
13, error_93, true
13, error_94, true
13, error_95, true
13, error_96, true
13, error_97, false
13, error_98, true
13, error_99, false
14, error_0, true
14, error_1, false
14, error_2, true
14, error_3, false
14, error_4, false
14, error_5, false
14, error_6, true
14, error_7, false
14, error_8, false
14, error_9, false
14, error_10, true
14, error_11, false
14, error_12, false
14, error_13, false
14, error_14, false
14, error_15, false
14, error_16, false
14, error_17, true
14, error_18, false
14, error_19, false
14, error_20, true
14, error_21, false
14, error_22, false
14, error_23, false
14, error_24, false
14, error_25, true
14, error_26, false
14, error_27, false
14, error_28, true
14, error_29, false
14, error_30, false
14, error_31, false
14, error_32, false
14, error_33, false
14, error_34, false
14, error_35, true
14, error_36, false
14, error_37, true
14, error_38, false
14, error_39, false
14, error_40, true
14, error_41, false
14, error_42, false
14, error_43, false
14, error_44, false
14, error_45, false
14, error_46, true
14, error_47, true
14, error_48, false
14, error_49, false
14, error_50, true
14, error_51, false
14, error_52, false
14, error_53, false
14, error_54, true
14, error_55, false
14, error_56, false
14, error_57, false
14, error_58, false
14, error_59, false
14, error_60, true
14, error_61, true
14, error_62, false
14, error_63, true
14, error_64, false
14, error_65, false
14, error_66, true
14, error_67, true
14, error_68, false
14, error_69, false
14, error_70, true
14, error_71, false
14, error_72, false
14, error_73, true
14, error_74, false
14, error_75, false
14, error_76, false
14, error_77, false
14, error_78, false
14, error_79, false
14, error_80, false
14, error_81, false
14, error_82, false
14, error_83, false
14, error_84, true
14, error_85, false
14, error_86, false
14, error_87, false
14, error_88, false
14, error_89, true
14, error_90, false