diff --git a/basics_input.txt b/basics_input.txt new file mode 100644 index 0000000..beaf9b3 --- /dev/null +++ b/basics_input.txt @@ -0,0 +1,23 @@ +add track (0,0) -> (-5,0) +add track (-5,0) -> (-5,5) +add switch (0,5) -> (0,0),(-5,5) +list tracks +set switch 3 position (0,0) +list tracks +add track (0,0) -> (5,0) +create train-set A B 6 true true +add train 1 A-B +put train 1 at (0,5) in direction 0,1 +step 1 +put train 1 at (-5,5) in direction 0,3 +step 1 +delete train 1 +delete rolling stock A-B +create engine steam T1 Alpha 1 false false +create engine electrical T1 Beta 1 false false +add train 1 T1-Alpha +add train 2 T1-Beta +put train 1 at (0,5) in direction 0,1 +put train 2 at (0,0) in direction 1,0 +step 1 +exit diff --git a/basics_output.txt b/basics_output.txt new file mode 100644 index 0000000..9126d5f --- /dev/null +++ b/basics_output.txt @@ -0,0 +1,26 @@ +1 +2 +3 +t 1 (0,0) -> (-5,0) 5 +t 2 (-5,0) -> (-5,5) 5 +s 3 (0,5) -> (0,0),(-5,5) +OK +t 1 (0,0) -> (-5,0) 5 +t 2 (-5,0) -> (-5,5) 5 +s 3 (0,5) -> (0,0),(-5,5) 5 +Error, track is not connected to other tracks +A-B +train-set A-B added to train 1 +OK +Crash of train 1 +OK +Crash of train 1 +OK +OK +T1-Alpha +T1-Beta +steam engine T1-Alpha added to train 1 +electrical engine T1-Beta added to train 2 +OK +OK +Crash of train 1,2 diff --git a/example1ONLYoutput.txt b/example1ONLYoutput.txt new file mode 100644 index 0000000..21a0c97 --- /dev/null +++ b/example1ONLYoutput.txt @@ -0,0 +1,64 @@ +1 +Error, track is not connected to other tracks +t 1 (1,1) -> (5,1) 4 +2 +Error, invalid track segment: not a straight line +3 +4 +5 +6 +7 +8 +9 +10 +T3-Emma +none s T3 Emma 1 false true +103-118 +none e 103 118 3 true true +none s T3 Emma 1 false true +Error, could not delete rolling stock +OK +1 +2 +1 none p 1 true true +2 none p 1 true true +passenger coach W1 added to train 1 +1 W1 +____________________ +| ___ ___ ___ ___ | +| |_| |_| |_| |_| | +|__________________| +|__________________| + (O) (O) +OK +No train exists +steam engine T3-Emma added to train 1 +passenger coach W1 added to train 1 +passenger coach W2 added to train 1 +1 T3-Emma W1 W2 + ++ +------ ____________________ ____________________ + || |+-+ | | ___ ___ ___ ___ | | ___ ___ ___ ___ | + /---------|| | | | |_| |_| |_| |_| | | |_| |_| |_| |_| | + + ======== +-+ | |__________________| |__________________| + _|--/~\------/~\-+ |__________________| |__________________| +//// \_/ \_/ (O) (O) (O) (O) +1 s T3 Emma 1 false true +403-145 +train-set 403-145 added to train 2 +OK +Error, rail tracks/switches not set up +OK +OK +OK +OK +OK +Train 1 at (3,1) +Train 2 at (10,0) +Train 1 at (1,1) +Train 2 at (10,-2) +Train 1 at (3,1) +Train 2 at (10,0) +Train 1 at (6,1) +Train 2 at (8,1) +Crash of train 1,2 +OK diff --git a/example1input.txt b/example1input.txt new file mode 100644 index 0000000..a569eb5 --- /dev/null +++ b/example1input.txt @@ -0,0 +1,51 @@ +add track (1,1) -> (5,1) +add track (10,10) -> (10,11) +list tracks +add switch (5,1) -> (8,1),(5,3) +add track (5,3) -> (8,1) +add track (10,1) -> (8,1) +add switch (10,-3) -> (10,1),(12,-3) +add track (10,-3) -> (1,-3) +add track (1,-3) -> (1,1) +add track (5,3) -> (10,3) +add track (10,3) -> (12,3) +add switch (12,3) -> (12,-3),(14,3) +add track (14,-1) -> (14,3) +create engine steam T3 Emma 1 false true +list engines +create engine electrical 103 118 3 true true +list engines +delete rolling stock 3 +delete rolling stock 103-118 +create coach passenger 1 true true +create coach passenger 1 true true +list coaches +add train 1 W1 +list trains +show train 01 +delete train 1 +list trains +add train 1 T3-Emma +add train 1 W1 +add train 1 W2 +list trains +show train 01 +list engines +create train-set 403 145 4 true true +add train 2 403-145 +set switch 4 position (10,1) +step 1 +set switch 2 position (8,1) +set switch 9 position (12,-3) +step 1 +put train 1 at (1,1) in direction 1,0 +put train 2 at (10,-2) in direction 0,1 +step 2 +step -2 +step 2 +step 3 +step 1 +put train 1 at (1,1) in direction 0,-1 +exit +quit + diff --git a/example1output.txt b/example1output.txt new file mode 100644 index 0000000..977d59c --- /dev/null +++ b/example1output.txt @@ -0,0 +1,108 @@ +> add track (1,1) -> (5,1) +1 +> add track (10,10) -> (10,11) +Error, track not connected to other track +> list tracks +t 1 (1,1) -> (5,1) 4 +> add switch (5,1) -> (8,1),(5,3) +2 +> add track (5,3) -> (8,1) +Error, creation not possible wrong position +> add track (10,1) -> (8,1) +3 +> add switch (10,-3) -> (10,1),(12,-3) +4 +> add track (10,-3) -> (1,-3) +5 +> add track (1,-3) -> (1,1) +6 +> add track (5,3) -> (10,3) +7 +> add track (10,3) -> (12,3) +8 +>add switch (12,3) -> (12,-3),(14,3) +9 +>add track (14,-1) -> (14,3) +10 +> create engine steam T3 Emma 1 false true +T3-Emma +> list engines +none s T3 Emma 1 false true +> create engine electrical 103 118 3 true true +103-118 +> list engines +none e 103 118 3 true true +none s T3 Emma 1 false true +> delete rolling stock 3 +Error, rolling stock with ID 03 not found +> delete rolling stock 103-118 +OK +> create coach passenger 1 true true +1 +> create coach passenger 1 true true +2 +> list coaches +1 none p 1 true true +2 none p 1 true true +> add train 1 W1 +passenger coach W1 added to train 1 +> list trains +1 W1 +> show train 01 +____________________ +| ___ ___ ___ ___ | +| |_| |_| |_| |_| | +|__________________| +|__________________| + (O) (O) +> delete train 1 +OK +> list trains +No train exists +> add train 1 T3-Emma +steam engine T3-Emma added to train 1 +> add train 1 W1 +passenger coach W1 added to train 1 +> add train 1 W2 +passenger coach W2 added to train 1 +> list trains +1 T3-Emma W1 W2 +> show train 01 ++++------ ____________________ ____________________|||+-+ | | ___ ___ ___ ___ | | ___ ___ ___ ___ |/---------|| | | | |_| |_| |_| |_| | | |_| |_| |_| |_| |+ ======== +-+ | |__________________| |__________________|_|--/~\------/~\-+ |__________________| |__________________|//// \_/\_/(O)(O)(O)(O) +> list engines +1 s T3 Emma 1 false true +> create train-set 403 145 4 true true +403-145 +> add train 2 403-145 +train-set 403-145 added to train 2 +> set switch 4 position (10,1) +OK +> step 1 +Error, position of switches not set +> set switch 2 position (8,1) +OK +> set switch 9 position (12,-3) +OK +> step 1 +OK +> put train 1 at (1,1) in direction 1,0 +OK +> put train 2 at (10,-2) in direction 0,1 +OK +> step 2 +Train 1 at (3,1) +Train 2 at (10,0) +> step -2 +Train 1 at (1,1) +Train 2 at (10,-2) +> step 2 +Train 1 at (3,1) +Train 2 at (10,0) +> step 3 +Train 1 at (6,1) +Train 2 at (8,1) +> step 1 +Crash of train 1,2 +> put train 1 at (1,1) in direction 0,-1 +OK +> exit diff --git a/example2.txt b/example2.txt new file mode 100644 index 0000000..a04fb63 --- /dev/null +++ b/example2.txt @@ -0,0 +1,59 @@ +> step 32768 + add track (2147483647,0) -> (-2147483648,0) +1 +> add track (2147483648,0) -> (-2147483649,0) + delete track 2147483648 + create engine diesel W aaa 32 true false + delete track 1 +OK +> list tracks +No track exists +> add track (-5,0) -> (0,0) +1 +> add track (0,0) -> (5,0) +2 +> create engine diesel Reihe1 Name1 3 true true +Reihe1-Name1 +> create train-set Reihe2 Name2 2 true true +Reihe2-Name2 +> create train-set Reihe3 Name3 3 true true +Reihe3-Name3 +> add train 1 Reihe2-Name2 +train-set Reihe2-Name2 added to train 1 +> add train 1 Reihe3-Name3 + add train 2 Reihe1-Name1 +diesel engine Reihe1-Name1 added to train 2 +> add train 2 Reihe1-Name1 + add train 2 Reihe3-Name3 + create engine electrical Reihe1 Name4 11 true true +Reihe1-Name4 +> add train 3 Reihe1-Name4 +electrical engine Reihe1-Name4 added to train 3 +> put train 3 at (0,0) in direction 1,0 + delete train 3 +OK +> delete train 3 + put train 1 at (0,0) in direction 1,0 +OK +> put train 2 at (0,0) in direction -1,0 +OK +> step 1 +Crash of train 1,2 +> step 42 +OK +> delete rolling stock Reihe1-Name1 + delete train 2 +OK +> delete rolling stock Reihe1-Name1 +OK +> exit diff --git a/example2input.txt b/example2input.txt new file mode 100644 index 0000000..90685db --- /dev/null +++ b/example2input.txt @@ -0,0 +1,31 @@ +step 32768 +add track (2147483647,0) -> (-2147483648,0) +add track (2147483648,0) -> (-2147483649,0) +delete track 2147483648 +create engine diesel W aaa 32 true false +delete track 1 +list tracks +add track (-5,0) -> (0,0) +add track (0,0) -> (5,0) +create engine diesel Reihe1 Name1 3 true true +create train-set Reihe2 Name2 2 true true +create train-set Reihe3 Name3 3 true true +add train 1 Reihe2-Name2 +add train 1 Reihe3-Name3 +add train 2 Reihe1-Name1 +add train 2 Reihe1-Name1 +add train 2 Reihe3-Name3 +create engine electrical Reihe1 Name4 11 true true +add train 3 Reihe1-Name4 +put train 3 at (0,0) in direction 1,0 +delete train 3 +delete train 3 +put train 1 at (0,0) in direction 1,0 +put train 2 at (0,0) in direction -1,0 +step 1 +step 42 +delete rolling stock Reihe1-Name1 +delete train 2 +delete rolling stock Reihe1-Name1 +exit + diff --git a/example2output.txt b/example2output.txt new file mode 100644 index 0000000..fc82983 --- /dev/null +++ b/example2output.txt @@ -0,0 +1,29 @@ +Error, number too big +1 +Error, number too big +Error, number too big +Error, invalid engine class/series +OK +No track exists +1 +2 +Reihe1-Name1 +Reihe2-Name2 +Reihe3-Name3 +train-set Reihe2-Name2 added to train 1 +Error, could not modify train +diesel engine Reihe1-Name1 added to train 2 +Error, could not modify train +Error, could not modify train +Reihe1-Name4 +electrical engine Reihe1-Name4 added to train 3 +Error, could not place train +OK +Error, could not remove train +OK +Error, could not place train +Train 1 at (1,0) +Crash of train 1 +Error, could not delete rolling stock +OK +OK diff --git a/fuzz1_input.txt b/fuzz1_input.txt new file mode 100644 index 0000000..7bac73e --- /dev/null +++ b/fuzz1_input.txt @@ -0,0 +1,20 @@ +add track (0,0) -> (0,14) +add track (0,340282366920938463463374607431768211457) -> (0,15) +add track (0,15) -> (1,15) +add track (1,1) -> (1,14) +add switch (1,14) -> (0,14),(1,0) +set switch 5 positio (1,0) +create engine diesel T3 Emma 1 false true +add train 1 T3-Emma +create coach passenger 1906 true true +create coach passenger 2 true false +create coach passenger 2 true true +add train 1 W1 +add train 1 W2 +add train 1 W3 +put train 1 at (0,0) in direction 0,-1 +step -20 +step 20 +set switch 5 position (0,14) +step -20 +exit diff --git a/fuzz1_output.txt b/fuzz1_output.txt new file mode 100644 index 0000000..fbef785 --- /dev/null +++ b/fuzz1_output.txt @@ -0,0 +1,19 @@ +1 +Error, number too big +Error, track is not connected to other tracks +Error, track is not connected to other tracks +2 +Error, invalid set switch argument syntax +T3-Emma +diesel engine T3-Emma added to train 1 +1 +2 +3 +passenger coach W1 added to train 1 +passenger coach W2 added to train 1 +Error, could not modify train +Error, could not place train +Error, rail tracks/switches not set up +Error, rail tracks/switches not set up +Error, could not set switch +Error, rail tracks/switches not set up diff --git a/fuzz2_input.txt b/fuzz2_input.txt new file mode 100644 index 0000000..a1a67ca --- /dev/null +++ b/fuzz2_input.txt @@ -0,0 +1,2 @@ +add train 1 W2147483649 +exit diff --git a/fuzz2_output.txt b/fuzz2_output.txt new file mode 100644 index 0000000..0efe9a8 --- /dev/null +++ b/fuzz2_output.txt @@ -0,0 +1 @@ +Error, number too big diff --git a/fuzz3_input.txt b/fuzz3_input.txt new file mode 100644 index 0000000..76b4f99 --- /dev/null +++ b/fuzz3_input.txt @@ -0,0 +1,13 @@ +add track (1,1) -> (5,1) +add track (1,-3) -> (1,1) +add switch (5,1) -> (8,1),(5,3) +create engine diesel T3 Emma 1 false true +create coach freight 2 true true +create coach special 3 true true +create coach passenger 2 true false +add train 1 T3-Emma +add train 1 W1 +add train 1 W2 +add train 1 W3 +put train 1 at (1,1) in direction 0,-1 +exit diff --git a/fuzz3_output.txt b/fuzz3_output.txt new file mode 100644 index 0000000..9b743b7 --- /dev/null +++ b/fuzz3_output.txt @@ -0,0 +1,12 @@ +1 +2 +3 +T3-Emma +1 +2 +3 +diesel engine T3-Emma added to train 1 +freight coach W1 added to train 1 +special coach W2 added to train 1 +passenger coach W3 added to train 1 +Error, could not place train diff --git a/fuzz4_input.txt b/fuzz4_input.txt new file mode 100644 index 0000000..3b7aac5 --- /dev/null +++ b/fuzz4_input.txt @@ -0,0 +1,19 @@ +# create really small loop +add track (0,0) -> (0,0) +# create loop +add track (0,0) -> (2,0) +add track (2,0) -> (2,2) +add track (2,2) -> (0,2) +add track (0,2) -> (0,0) +# try to create 3-way +add track (0,0) -> (-2,0) +create engine diesel T3 Emma 1 false true +create coach passenger 2 true true +create coach passenger 3 true true +create coach passenger 138549970 true false +add train 1 T3-Emma +add train 1 W+1 +add train 1 W2 +add train 1 W3 +put train 1 at (0,0) in direction 1,0 +exit diff --git a/fuzz4_output.txt b/fuzz4_output.txt new file mode 100644 index 0000000..3af0857 --- /dev/null +++ b/fuzz4_output.txt @@ -0,0 +1,15 @@ +Error, track has length 0 +1 +2 +3 +4 +Error, track is not connected to other tracks +T3-Emma +1 +2 +3 +diesel engine T3-Emma added to train 1 +passenger coach W1 added to train 1 +passenger coach W2 added to train 1 +passenger coach W3 added to train 1 +Error, could not place train diff --git a/fuzz5_input.txt b/fuzz5_input.txt new file mode 100644 index 0000000..91e8f78 --- /dev/null +++ b/fuzz5_input.txt @@ -0,0 +1,16 @@ +# create three rails +add track (0,2) -> (0,0) +add track (0,0) -> (0,-2) +add track (0,-2) -> (0,-4) +delete track 2 +delete track 1 +delete track 2 +delete track 3 +# try to delete track under train +add track (-5,0) -> (0,0) +add track (0,0) -> (5,0) +create engine diesel ABC DEF 1 true true +add train 1 ABC-DEF +put train 1 at (0,0) in direction 1,0 +delete track 1 +exit diff --git a/fuzz5_output.txt b/fuzz5_output.txt new file mode 100644 index 0000000..7802697 --- /dev/null +++ b/fuzz5_output.txt @@ -0,0 +1,13 @@ +1 +2 +3 +Error, could not delete rail segment +OK +OK +OK +1 +2 +ABC-DEF +diesel engine ABC-DEF added to train 1 +OK +Error, could not delete rail segment diff --git a/fuzz6_input.txt b/fuzz6_input.txt new file mode 100644 index 0000000..980ebf4 --- /dev/null +++ b/fuzz6_input.txt @@ -0,0 +1,28 @@ +add track (1,1) -> (5,1) +add switch (6,1) -> (8,1),(5,1) +add track (10,1) -> (8,1) +add switch (10,-3) -> (10,1),(12,-3) +add track (10,-3) -> (1,-3) +add track (1,-3) -> (1,1) +create engine steam T3 Emma 1 false true +create engine electrical 103 118 4294967300 true true +list engines +delete rolling stock 103-118 +create coach passenger 1 true true +create coach passenger 1 true true +list coaches +add train 1 W1 +delete train 1 +list trains +add train 1 T3-Emma +add train 1 W1 +add train 1 W2 +list trains +list engines +create train-set 403 145 4 true true +set switch 4 position (10,1) +set switch 2 position (8,1) +put train 1 at (1,1) in direction 2,0 +put train 2 at (10,-2) in direction 0,1 +step 5 +exit diff --git a/fuzz6_output.txt b/fuzz6_output.txt new file mode 100644 index 0000000..e5dfc11 --- /dev/null +++ b/fuzz6_output.txt @@ -0,0 +1,28 @@ +1 +2 +3 +4 +5 +6 +T3-Emma +Error, number too big +none s T3 Emma 1 false true +Error, could not delete rolling stock +1 +2 +1 none p 1 true true +2 none p 1 true true +passenger coach W1 added to train 1 +OK +No train exists +steam engine T3-Emma added to train 1 +passenger coach W1 added to train 1 +passenger coach W2 added to train 1 +1 T3-Emma W1 W2 +1 s T3 Emma 1 false true +403-145 +OK +OK +OK +Error, could not place train +Crash of train 1 diff --git a/loopyinput.txt b/loopyinput.txt new file mode 100644 index 0000000..ac99348 --- /dev/null +++ b/loopyinput.txt @@ -0,0 +1,21 @@ +# create loop +add track (0,0) -> (2,0) +add track (2,0) -> (2,2) +add track (2,2) -> (0,2) +add track (0,2) -> (0,0) +create engine diesel T3 Emma 1 false true +create coach passenger 2 true true +create coach passenger 3 true true +create coach passenger 2 true false +add train 1 T3-Emma +add train 1 W1 +add train 1 W2 +add train 1 W3 +show train 1 +put train 1 at (0,0) in direction 1,0 +step 64 +delete track 1 +delete track 2 +delete track 3 +delete track 4 +exit diff --git a/loopyoutput.txt b/loopyoutput.txt new file mode 100644 index 0000000..e69523b --- /dev/null +++ b/loopyoutput.txt @@ -0,0 +1,24 @@ +1 +2 +3 +4 +T3-Emma +1 +2 +3 +diesel engine T3-Emma added to train 1 +passenger coach W1 added to train 1 +passenger coach W2 added to train 1 +passenger coach W3 added to train 1 + _____________|____ ____________________ ____________________ ____________________ + /_| ____________ |_\ | ___ ___ ___ ___ | | ___ ___ ___ ___ | | ___ ___ ___ ___ | +/ |____________| \ | |_| |_| |_| |_| | | |_| |_| |_| |_| | | |_| |_| |_| |_| | +\ / |__________________| |__________________| |__________________| + \__________________/ |__________________| |__________________| |__________________| + (O)(O) (O)(O) (O) (O) (O) (O) (O) (O) +OK +Train 1 at (0,0) +Error, could not delete rail segment +Error, could not delete rail segment +Error, could not delete rail segment +Error, could not delete rail segment diff --git a/stophittingyourself_input.txt b/stophittingyourself_input.txt new file mode 100644 index 0000000..a9cf41d --- /dev/null +++ b/stophittingyourself_input.txt @@ -0,0 +1,5 @@ +add track (0,0) -> (0,14) +add track (0,14) -> (0,15) +add track (0,15) -> (1,15) +add track (1,15) -> (1,14) +add switch (1,14) -> (0,14),(1,0) diff --git a/stophittingyourself_old_input.txt b/stophittingyourself_old_input.txt new file mode 100644 index 0000000..26a0c55 --- /dev/null +++ b/stophittingyourself_old_input.txt @@ -0,0 +1,20 @@ +add track (0,0) -> (0,14) +add track (0,14) -> (0,15) +add track (0,15) -> (1,15) +add track (1,15) -> (1,14) +add switch (1,14) -> (0,14),(1,0) +set switch 5 position (1,0) +create engine diesel T3 Emma 1 false true +create coach passenger 2 true true +create coach passenger 3 true true +create coach passenger 2 true false +add train 1 T3-Emma +add train 1 W1 +add train 1 W2 +add train 1 W3 +put train 1 at (0,0) in direction 0,-1 +step -20 +step 20 +set switch 5 position (0,14) +step -20 +exit diff --git a/stophittingyourself_old_output.txt b/stophittingyourself_old_output.txt new file mode 100644 index 0000000..963e0e4 --- /dev/null +++ b/stophittingyourself_old_output.txt @@ -0,0 +1,19 @@ +1 +2 +3 +4 +5 +OK +T3-Emma +1 +2 +3 +diesel engine T3-Emma added to train 1 +passenger coach W1 added to train 1 +passenger coach W2 added to train 1 +passenger coach W3 added to train 1 +OK +Train 1 at (1,11) +Train 1 at (0,0) +OK +Crash of train 1 diff --git a/stophittingyourself_output.txt b/stophittingyourself_output.txt new file mode 100644 index 0000000..06842d6 --- /dev/null +++ b/stophittingyourself_output.txt @@ -0,0 +1,5 @@ +1 +2 +3 +4 +Error, switch not connected to existing rails