From cc6796b30499ad1345a2d116149ec75497405600 Mon Sep 17 00:00:00 2001 From: AndrewRatkov Date: Sun, 22 Jun 2025 18:07:12 +0300 Subject: [PATCH 1/2] some tests added --- test-shared/gen/CubicSPPFLangRsm | 19 +++ .../kotlin/solver/AbstractCorrectnessTest.kt | 2 +- .../cubic_small_example/input.dot | 7 + .../cubic_small_example/result.dot | 151 ++++++++++++++++++ .../cubic_tiny_example/input.dot | 5 + .../cubic_tiny_example/result.dot | 54 +++++++ 6 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 test-shared/gen/CubicSPPFLangRsm create mode 100644 test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/input.dot create mode 100644 test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot create mode 100644 test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/input.dot create mode 100644 test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot diff --git a/test-shared/gen/CubicSPPFLangRsm b/test-shared/gen/CubicSPPFLangRsm new file mode 100644 index 000000000..0919d69ef --- /dev/null +++ b/test-shared/gen/CubicSPPFLangRsm @@ -0,0 +1,19 @@ +digraph g { +S_0 [label = "S,S_0", shape = doublecircle, color = green] +S_1 [label = "S,S_1", shape = circle, color = black] +S_2 [label = "S,S_2", shape = circle, color = black] +S_3 [label = "S,S_3", shape = circle, color = black] +S_4 [label = "S,S_4", shape = doublecircle, color = red] +S_0 -> S_1 [label = "a"] +S_1 -> S_2 [label = "S"] +S_2 -> S_3 [label = "a"] +S_3 -> S_4 [label = "S"] +subgraph cluster_S { +S_0 +S_1 +S_2 +S_3 +S_4 +label = "S" +} +} diff --git a/test-shared/src/test/kotlin/solver/AbstractCorrectnessTest.kt b/test-shared/src/test/kotlin/solver/AbstractCorrectnessTest.kt index eeb18d32a..8b7c2be4c 100644 --- a/test-shared/src/test/kotlin/solver/AbstractCorrectnessTest.kt +++ b/test-shared/src/test/kotlin/solver/AbstractCorrectnessTest.kt @@ -13,7 +13,7 @@ abstract class AbstractCorrectnessTest { abstract fun getRootDataFolder(): Path - val grammars = listOf(SimplifiedDyck(), ABGrammar(), SALang(), Epsilon(), LoopDyck(), AmbiguousAStar2(), AmbiguousAStar1()) + val grammars = listOf(SimplifiedDyck(), ABGrammar(), SALang(), Epsilon(), LoopDyck(), AmbiguousAStar2(), AmbiguousAStar1(), CubicSPPFLang(), CubicSPPFLang()) //TODO return only one result for ambiguous AmbiguousAStar2(), AmbiguousAStar1() // TODO fix worst case for loopdyck val regenerate = false diff --git a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/input.dot b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/input.dot new file mode 100644 index 000000000..7dafdc1b5 --- /dev/null +++ b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/input.dot @@ -0,0 +1,7 @@ +digraph Input { + start -> 0; + 0 -> 1 [label = "a"]; + 1 -> 2 [label = "a"]; + 2 -> 3 [label = "a"]; + 3 -> 4 [label = "a"]; +} \ No newline at end of file diff --git a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot new file mode 100644 index 000000000..300a56957 --- /dev/null +++ b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot @@ -0,0 +1,151 @@ +digraph g { +labelloc="t" +label="" +subgraph cluster_0{ +labelloc="t" +_0_0 [label = "Epsilon S_0", shape = invhouse] +_0_1 [label = "Nonterminal S input:[0;0] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_0_2 [label = "Range input:[0;0] rsm:[S_0;S_0]", shape = ellipse] +_0_1->_0_2 +_0_2->_0_0 +} + +subgraph cluster_1{ +labelloc="t" +_1_0 [label = "Epsilon S_0", shape = invhouse] +_1_1 [label = "Epsilon S_0", shape = invhouse] +_1_2 [label = "Intermediate input:1 rsm:S_1", shape = plain] +_1_3 [label = "Intermediate input:1 rsm:S_2", shape = plain] +_1_4 [label = "Intermediate input:2 rsm:S_3", shape = plain] +_1_5 [label = "Nonterminal S input:[0;2] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_1_6 [label = "Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] +_1_7 [label = "Nonterminal S input:[2;2] rsm:[S_3;S_4]", shape = invtrapezium] +_1_8 [label = "Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] +_1_9 [label = "Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] +_1_10 [label = "Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] +_1_11 [label = "Range input:[0;2] rsm:[S_0;S_4]", shape = ellipse] +_1_12 [label = "Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] +_1_13 [label = "Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] +_1_14 [label = "Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] +_1_15 [label = "Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] +_1_16 [label = "Range input:[2;2] rsm:[S_3;S_4]", shape = ellipse] +_1_17 [label = "Terminal `a` input:[0;1]", shape = rectangle] +_1_18 [label = "Terminal `a` input:[1;2]", shape = rectangle] +_1_2->_1_8 +_1_2->_1_13 +_1_3->_1_9 +_1_3->_1_14 +_1_4->_1_10 +_1_4->_1_16 +_1_5->_1_11 +_1_6->_1_12 +_1_7->_1_15 +_1_8->_1_17 +_1_9->_1_2 +_1_10->_1_3 +_1_11->_1_4 +_1_12->_1_0 +_1_13->_1_6 +_1_14->_1_18 +_1_15->_1_0 +_1_16->_1_7 +} + +subgraph cluster_2{ +labelloc="t" +_2_0 [label = "Epsilon S_0", shape = invhouse] +_2_1 [label = "Epsilon S_0", shape = invhouse] +_2_2 [label = "Epsilon S_0", shape = invhouse] +_2_3 [label = "Epsilon S_0", shape = invhouse] +_2_4 [label = "Intermediate input:1 rsm:S_1", shape = plain] +_2_5 [label = "Intermediate input:1 rsm:S_1", shape = plain] +_2_6 [label = "Intermediate input:1 rsm:S_2", shape = plain] +_2_7 [label = "Intermediate input:2 rsm:S_1", shape = plain] +_2_8 [label = "Intermediate input:2 rsm:S_2", shape = plain] +_2_9 [label = "Intermediate input:2 rsm:S_3", shape = plain] +_2_10 [label = "Intermediate input:3 rsm:S_2", shape = plain] +_2_11 [label = "Intermediate input:3 rsm:S_3", shape = plain] +_2_12 [label = "Intermediate input:4 rsm:S_3", shape = plain] +_2_13 [label = "Nonterminal S input:[0;4] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_2_14 [label = "Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] +_2_15 [label = "Nonterminal S input:[1;3] rsm:[S_1;S_2]", shape = invtrapezium] +_2_16 [label = "Nonterminal S input:[2;2] rsm:[S_1;S_2]", shape = invtrapezium] +_2_17 [label = "Nonterminal S input:[2;4] rsm:[S_3;S_4]", shape = invtrapezium] +_2_18 [label = "Nonterminal S input:[3;3] rsm:[S_3;S_4]", shape = invtrapezium] +_2_19 [label = "Nonterminal S input:[4;4] rsm:[S_3;S_4]", shape = invtrapezium] +_2_20 [label = "Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] +_2_21 [label = "Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] +_2_22 [label = "Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] +_2_23 [label = "Range input:[0;3] rsm:[S_0;S_2]", shape = ellipse] +_2_24 [label = "Range input:[0;4] rsm:[S_0;S_3]", shape = ellipse] +_2_25 [label = "Range input:[0;4] rsm:[S_0;S_4]", shape = ellipse] +_2_26 [label = "Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] +_2_27 [label = "Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] +_2_28 [label = "Range input:[1;2] rsm:[S_0;S_1]", shape = ellipse] +_2_29 [label = "Range input:[1;2] rsm:[S_0;S_2]", shape = ellipse] +_2_30 [label = "Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] +_2_31 [label = "Range input:[1;3] rsm:[S_0;S_3]", shape = ellipse] +_2_32 [label = "Range input:[1;3] rsm:[S_0;S_4]", shape = ellipse] +_2_33 [label = "Range input:[1;3] rsm:[S_1;S_2]", shape = ellipse] +_2_34 [label = "Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] +_2_35 [label = "Range input:[2;2] rsm:[S_1;S_2]", shape = ellipse] +_2_36 [label = "Range input:[2;3] rsm:[S_2;S_3]", shape = ellipse] +_2_37 [label = "Range input:[2;4] rsm:[S_3;S_4]", shape = ellipse] +_2_38 [label = "Range input:[3;3] rsm:[S_0;S_0]", shape = ellipse] +_2_39 [label = "Range input:[3;3] rsm:[S_3;S_4]", shape = ellipse] +_2_40 [label = "Range input:[3;4] rsm:[S_2;S_3]", shape = ellipse] +_2_41 [label = "Range input:[4;4] rsm:[S_0;S_0]", shape = ellipse] +_2_42 [label = "Range input:[4;4] rsm:[S_3;S_4]", shape = ellipse] +_2_43 [label = "Terminal `a` input:[0;1]", shape = rectangle] +_2_44 [label = "Terminal `a` input:[1;2]", shape = rectangle] +_2_45 [label = "Terminal `a` input:[2;3]", shape = rectangle] +_2_46 [label = "Terminal `a` input:[3;4]", shape = rectangle] +_2_4->_2_20 +_2_4->_2_33 +_2_6->_2_21 +_2_6->_2_30 +_2_7->_2_28 +_2_7->_2_35 +_2_8->_2_29 +_2_8->_2_36 +_2_9->_2_22 +_2_9->_2_37 +_2_10->_2_23 +_2_10->_2_40 +_2_11->_2_31 +_2_11->_2_39 +_2_12->_2_24 +_2_12->_2_42 +_2_13->_2_25 +_2_14->_2_26 +_2_15->_2_32 +_2_16->_2_34 +_2_18->_2_38 +_2_19->_2_41 +_2_20->_2_43 +_2_21->_2_4 +_2_22->_2_6 +_2_23->_2_4 +_2_24->_2_10 +_2_25->_2_12 +_2_25->_2_9 +_2_26->_2_0 +_2_27->_2_14 +_2_28->_2_44 +_2_29->_2_7 +_2_30->_2_44 +_2_31->_2_8 +_2_32->_2_11 +_2_33->_2_15 +_2_34->_2_0 +_2_35->_2_16 +_2_36->_2_45 +_2_37->_2_17 +_2_38->_2_0 +_2_39->_2_18 +_2_40->_2_46 +_2_41->_2_0 +_2_42->_2_19 +} + +} diff --git a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/input.dot b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/input.dot new file mode 100644 index 000000000..4695ed86e --- /dev/null +++ b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/input.dot @@ -0,0 +1,5 @@ +digraph Input { + start -> 0; + 0 -> 1 [label = "a"]; + 1 -> 2 [label = "a"]; +} \ No newline at end of file diff --git a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot new file mode 100644 index 000000000..ff12f7803 --- /dev/null +++ b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot @@ -0,0 +1,54 @@ +digraph g { +labelloc="t" +label="" +subgraph cluster_0{ +labelloc="t" +_0_0 [label = "Epsilon S_0", shape = invhouse] +_0_1 [label = "Nonterminal S input:[0;0] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_0_2 [label = "Range input:[0;0] rsm:[S_0;S_0]", shape = ellipse] +_0_1->_0_2 +_0_2->_0_0 +} + +subgraph cluster_1{ +labelloc="t" +_1_0 [label = "Epsilon S_0", shape = invhouse] +_1_1 [label = "Epsilon S_0", shape = invhouse] +_1_2 [label = "Intermediate input:1 rsm:S_1", shape = plain] +_1_3 [label = "Intermediate input:1 rsm:S_2", shape = plain] +_1_4 [label = "Intermediate input:2 rsm:S_3", shape = plain] +_1_5 [label = "Nonterminal S input:[0;2] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_1_6 [label = "Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] +_1_7 [label = "Nonterminal S input:[2;2] rsm:[S_3;S_4]", shape = invtrapezium] +_1_8 [label = "Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] +_1_9 [label = "Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] +_1_10 [label = "Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] +_1_11 [label = "Range input:[0;2] rsm:[S_0;S_4]", shape = ellipse] +_1_12 [label = "Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] +_1_13 [label = "Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] +_1_14 [label = "Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] +_1_15 [label = "Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] +_1_16 [label = "Range input:[2;2] rsm:[S_3;S_4]", shape = ellipse] +_1_17 [label = "Terminal `a` input:[0;1]", shape = rectangle] +_1_18 [label = "Terminal `a` input:[1;2]", shape = rectangle] +_1_2->_1_8 +_1_2->_1_13 +_1_3->_1_9 +_1_3->_1_14 +_1_4->_1_10 +_1_4->_1_16 +_1_5->_1_11 +_1_6->_1_12 +_1_7->_1_15 +_1_8->_1_17 +_1_9->_1_2 +_1_10->_1_3 +_1_11->_1_4 +_1_12->_1_0 +_1_13->_1_6 +_1_14->_1_18 +_1_15->_1_0 +_1_16->_1_7 +} + +} From e6d410dcf5b62174e2faaeef117b18c488a61f7a Mon Sep 17 00:00:00 2001 From: AndrewRatkov Date: Mon, 23 Jun 2025 12:01:47 +0300 Subject: [PATCH 2/2] cubic tests regenerated --- .../cubic_small_example/result.dot | 270 +++++++++--------- .../cubic_tiny_example/result.dot | 80 +++--- 2 files changed, 176 insertions(+), 174 deletions(-) diff --git a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot index 300a56957..b6786c1d9 100644 --- a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot +++ b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_small_example/result.dot @@ -3,149 +3,151 @@ labelloc="t" label="" subgraph cluster_0{ labelloc="t" -_0_0 [label = "Epsilon S_0", shape = invhouse] -_0_1 [label = "Nonterminal S input:[0;0] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] -_0_2 [label = "Range input:[0;0] rsm:[S_0;S_0]", shape = ellipse] -_0_1->_0_2 +_0_0 [label = "2 Range input:[0;0] rsm:[S_0;S_0]", shape = ellipse] +_0_1 [label = "3 Epsilon S_0", shape = invhouse] +_0_2 [label = "5 Nonterminal S input:[0;0] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_0_0->_0_1 _0_2->_0_0 } subgraph cluster_1{ labelloc="t" -_1_0 [label = "Epsilon S_0", shape = invhouse] -_1_1 [label = "Epsilon S_0", shape = invhouse] -_1_2 [label = "Intermediate input:1 rsm:S_1", shape = plain] -_1_3 [label = "Intermediate input:1 rsm:S_2", shape = plain] -_1_4 [label = "Intermediate input:2 rsm:S_3", shape = plain] -_1_5 [label = "Nonterminal S input:[0;2] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] -_1_6 [label = "Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] -_1_7 [label = "Nonterminal S input:[2;2] rsm:[S_3;S_4]", shape = invtrapezium] -_1_8 [label = "Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] -_1_9 [label = "Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] -_1_10 [label = "Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] -_1_11 [label = "Range input:[0;2] rsm:[S_0;S_4]", shape = ellipse] -_1_12 [label = "Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] -_1_13 [label = "Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] -_1_14 [label = "Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] -_1_15 [label = "Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] -_1_16 [label = "Range input:[2;2] rsm:[S_3;S_4]", shape = ellipse] -_1_17 [label = "Terminal `a` input:[0;1]", shape = rectangle] -_1_18 [label = "Terminal `a` input:[1;2]", shape = rectangle] -_1_2->_1_8 -_1_2->_1_13 -_1_3->_1_9 -_1_3->_1_14 -_1_4->_1_10 -_1_4->_1_16 -_1_5->_1_11 -_1_6->_1_12 -_1_7->_1_15 -_1_8->_1_17 -_1_9->_1_2 -_1_10->_1_3 -_1_11->_1_4 -_1_12->_1_0 -_1_13->_1_6 -_1_14->_1_18 -_1_15->_1_0 -_1_16->_1_7 +_1_0 [label = "10 Epsilon S_0", shape = invhouse] +_1_1 [label = "11 Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] +_1_2 [label = "12 Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] +_1_3 [label = "121 Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] +_1_4 [label = "123 Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] +_1_5 [label = "124 Intermediate input:1 rsm:S_2", shape = plain] +_1_6 [label = "126 Range input:[2;2] rsm:[S_3;S_4]", shape = ellipse] +_1_7 [label = "127 Nonterminal S input:[2;2] rsm:[S_3;S_4]", shape = invtrapezium] +_1_8 [label = "128 Range input:[0;2] rsm:[S_0;S_4]", shape = ellipse] +_1_9 [label = "129 Intermediate input:2 rsm:S_3", shape = plain] +_1_10 [label = "13 Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] +_1_11 [label = "135 Nonterminal S input:[0;2] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_1_12 [label = "14 Intermediate input:1 rsm:S_1", shape = plain] +_1_13 [label = "16 Terminal `a` input:[1;2]", shape = rectangle] +_1_14 [label = "18 Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] +_1_15 [label = "19 Epsilon S_0", shape = invhouse] +_1_16 [label = "6 Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] +_1_17 [label = "7 Terminal `a` input:[0;1]", shape = rectangle] +_1_18 [label = "9 Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] +_1_1->_1_2 +_1_2->_1_18 +_1_3->_1_13 +_1_4->_1_5 +_1_5->_1_10 +_1_5->_1_3 +_1_6->_1_7 +_1_7->_1_14 +_1_8->_1_9 +_1_9->_1_4 +_1_9->_1_6 +_1_10->_1_12 +_1_11->_1_8 +_1_12->_1_16 +_1_12->_1_1 +_1_14->_1_15 +_1_16->_1_17 +_1_18->_1_0 } subgraph cluster_2{ labelloc="t" -_2_0 [label = "Epsilon S_0", shape = invhouse] -_2_1 [label = "Epsilon S_0", shape = invhouse] -_2_2 [label = "Epsilon S_0", shape = invhouse] -_2_3 [label = "Epsilon S_0", shape = invhouse] -_2_4 [label = "Intermediate input:1 rsm:S_1", shape = plain] -_2_5 [label = "Intermediate input:1 rsm:S_1", shape = plain] -_2_6 [label = "Intermediate input:1 rsm:S_2", shape = plain] -_2_7 [label = "Intermediate input:2 rsm:S_1", shape = plain] -_2_8 [label = "Intermediate input:2 rsm:S_2", shape = plain] -_2_9 [label = "Intermediate input:2 rsm:S_3", shape = plain] -_2_10 [label = "Intermediate input:3 rsm:S_2", shape = plain] -_2_11 [label = "Intermediate input:3 rsm:S_3", shape = plain] -_2_12 [label = "Intermediate input:4 rsm:S_3", shape = plain] -_2_13 [label = "Nonterminal S input:[0;4] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] -_2_14 [label = "Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] -_2_15 [label = "Nonterminal S input:[1;3] rsm:[S_1;S_2]", shape = invtrapezium] -_2_16 [label = "Nonterminal S input:[2;2] rsm:[S_1;S_2]", shape = invtrapezium] -_2_17 [label = "Nonterminal S input:[2;4] rsm:[S_3;S_4]", shape = invtrapezium] -_2_18 [label = "Nonterminal S input:[3;3] rsm:[S_3;S_4]", shape = invtrapezium] -_2_19 [label = "Nonterminal S input:[4;4] rsm:[S_3;S_4]", shape = invtrapezium] -_2_20 [label = "Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] -_2_21 [label = "Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] -_2_22 [label = "Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] -_2_23 [label = "Range input:[0;3] rsm:[S_0;S_2]", shape = ellipse] -_2_24 [label = "Range input:[0;4] rsm:[S_0;S_3]", shape = ellipse] -_2_25 [label = "Range input:[0;4] rsm:[S_0;S_4]", shape = ellipse] -_2_26 [label = "Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] -_2_27 [label = "Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] -_2_28 [label = "Range input:[1;2] rsm:[S_0;S_1]", shape = ellipse] -_2_29 [label = "Range input:[1;2] rsm:[S_0;S_2]", shape = ellipse] -_2_30 [label = "Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] -_2_31 [label = "Range input:[1;3] rsm:[S_0;S_3]", shape = ellipse] -_2_32 [label = "Range input:[1;3] rsm:[S_0;S_4]", shape = ellipse] -_2_33 [label = "Range input:[1;3] rsm:[S_1;S_2]", shape = ellipse] -_2_34 [label = "Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] -_2_35 [label = "Range input:[2;2] rsm:[S_1;S_2]", shape = ellipse] -_2_36 [label = "Range input:[2;3] rsm:[S_2;S_3]", shape = ellipse] -_2_37 [label = "Range input:[2;4] rsm:[S_3;S_4]", shape = ellipse] -_2_38 [label = "Range input:[3;3] rsm:[S_0;S_0]", shape = ellipse] -_2_39 [label = "Range input:[3;3] rsm:[S_3;S_4]", shape = ellipse] -_2_40 [label = "Range input:[3;4] rsm:[S_2;S_3]", shape = ellipse] -_2_41 [label = "Range input:[4;4] rsm:[S_0;S_0]", shape = ellipse] -_2_42 [label = "Range input:[4;4] rsm:[S_3;S_4]", shape = ellipse] -_2_43 [label = "Terminal `a` input:[0;1]", shape = rectangle] -_2_44 [label = "Terminal `a` input:[1;2]", shape = rectangle] -_2_45 [label = "Terminal `a` input:[2;3]", shape = rectangle] -_2_46 [label = "Terminal `a` input:[3;4]", shape = rectangle] -_2_4->_2_20 -_2_4->_2_33 -_2_6->_2_21 -_2_6->_2_30 -_2_7->_2_28 -_2_7->_2_35 -_2_8->_2_29 -_2_8->_2_36 -_2_9->_2_22 -_2_9->_2_37 -_2_10->_2_23 -_2_10->_2_40 -_2_11->_2_31 -_2_11->_2_39 -_2_12->_2_24 -_2_12->_2_42 -_2_13->_2_25 -_2_14->_2_26 -_2_15->_2_32 -_2_16->_2_34 -_2_18->_2_38 -_2_19->_2_41 -_2_20->_2_43 -_2_21->_2_4 -_2_22->_2_6 -_2_23->_2_4 -_2_24->_2_10 -_2_25->_2_12 -_2_25->_2_9 -_2_26->_2_0 -_2_27->_2_14 -_2_28->_2_44 -_2_29->_2_7 -_2_30->_2_44 -_2_31->_2_8 -_2_32->_2_11 -_2_33->_2_15 -_2_34->_2_0 -_2_35->_2_16 -_2_36->_2_45 -_2_37->_2_17 -_2_38->_2_0 -_2_39->_2_18 -_2_40->_2_46 -_2_41->_2_0 -_2_42->_2_19 +_2_0 [label = "10 Epsilon S_0", shape = invhouse] +_2_1 [label = "11 Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] +_2_2 [label = "12 Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] +_2_3 [label = "121 Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] +_2_4 [label = "123 Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] +_2_5 [label = "124 Intermediate input:1 rsm:S_2", shape = plain] +_2_6 [label = "13 Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] +_2_7 [label = "130 Range input:[2;4] rsm:[S_3;S_4]", shape = ellipse] +_2_8 [label = "131 Nonterminal S input:[2;4] rsm:[S_3;S_4]", shape = invtrapezium] +_2_9 [label = "133 Intermediate input:2 rsm:S_3", shape = plain] +_2_10 [label = "14 Intermediate input:1 rsm:S_1", shape = plain] +_2_11 [label = "15 Range input:[1;2] rsm:[S_0;S_1]", shape = ellipse] +_2_12 [label = "16 Terminal `a` input:[1;2]", shape = rectangle] +_2_13 [label = "18 Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] +_2_14 [label = "19 Epsilon S_0", shape = invhouse] +_2_15 [label = "20 Range input:[2;2] rsm:[S_1;S_2]", shape = ellipse] +_2_16 [label = "21 Nonterminal S input:[2;2] rsm:[S_1;S_2]", shape = invtrapezium] +_2_17 [label = "22 Range input:[1;2] rsm:[S_0;S_2]", shape = ellipse] +_2_18 [label = "23 Intermediate input:2 rsm:S_1", shape = plain] +_2_19 [label = "25 Terminal `a` input:[2;3]", shape = rectangle] +_2_20 [label = "27 Range input:[3;3] rsm:[S_0;S_0]", shape = ellipse] +_2_21 [label = "28 Epsilon S_0", shape = invhouse] +_2_22 [label = "34 Terminal `a` input:[3;4]", shape = rectangle] +_2_23 [label = "36 Range input:[4;4] rsm:[S_0;S_0]", shape = ellipse] +_2_24 [label = "37 Epsilon S_0", shape = invhouse] +_2_25 [label = "42 Range input:[3;4] rsm:[S_2;S_3]", shape = ellipse] +_2_26 [label = "47 Range input:[4;4] rsm:[S_3;S_4]", shape = ellipse] +_2_27 [label = "48 Nonterminal S input:[4;4] rsm:[S_3;S_4]", shape = invtrapezium] +_2_28 [label = "6 Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] +_2_29 [label = "65 Range input:[2;3] rsm:[S_2;S_3]", shape = ellipse] +_2_30 [label = "67 Range input:[1;3] rsm:[S_0;S_3]", shape = ellipse] +_2_31 [label = "68 Intermediate input:2 rsm:S_2", shape = plain] +_2_32 [label = "7 Terminal `a` input:[0;1]", shape = rectangle] +_2_33 [label = "70 Range input:[3;3] rsm:[S_3;S_4]", shape = ellipse] +_2_34 [label = "71 Nonterminal S input:[3;3] rsm:[S_3;S_4]", shape = invtrapezium] +_2_35 [label = "72 Range input:[1;3] rsm:[S_0;S_4]", shape = ellipse] +_2_36 [label = "73 Intermediate input:3 rsm:S_3", shape = plain] +_2_37 [label = "74 Range input:[1;3] rsm:[S_1;S_2]", shape = ellipse] +_2_38 [label = "75 Nonterminal S input:[1;3] rsm:[S_1;S_2]", shape = invtrapezium] +_2_39 [label = "76 Range input:[0;3] rsm:[S_0;S_2]", shape = ellipse] +_2_40 [label = "77 Intermediate input:1 rsm:S_1", shape = plain] +_2_41 [label = "80 Range input:[0;4] rsm:[S_0;S_3]", shape = ellipse] +_2_42 [label = "81 Intermediate input:3 rsm:S_2", shape = plain] +_2_43 [label = "85 Range input:[0;4] rsm:[S_0;S_4]", shape = ellipse] +_2_44 [label = "86 Intermediate input:4 rsm:S_3", shape = plain] +_2_45 [label = "9 Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] +_2_46 [label = "92 Nonterminal S input:[0;4] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_2_1->_2_2 +_2_2->_2_45 +_2_3->_2_12 +_2_4->_2_5 +_2_5->_2_6 +_2_5->_2_3 +_2_6->_2_10 +_2_7->_2_8 +_2_9->_2_4 +_2_9->_2_7 +_2_10->_2_28 +_2_10->_2_1 +_2_11->_2_12 +_2_13->_2_14 +_2_15->_2_16 +_2_16->_2_13 +_2_17->_2_18 +_2_18->_2_11 +_2_18->_2_15 +_2_20->_2_21 +_2_23->_2_24 +_2_25->_2_22 +_2_26->_2_27 +_2_27->_2_23 +_2_28->_2_32 +_2_29->_2_19 +_2_30->_2_31 +_2_31->_2_17 +_2_31->_2_29 +_2_33->_2_34 +_2_34->_2_20 +_2_35->_2_36 +_2_36->_2_30 +_2_36->_2_33 +_2_37->_2_38 +_2_38->_2_35 +_2_39->_2_40 +_2_40->_2_28 +_2_40->_2_37 +_2_41->_2_42 +_2_42->_2_39 +_2_42->_2_25 +_2_43->_2_44 +_2_43->_2_9 +_2_44->_2_41 +_2_44->_2_26 +_2_45->_2_0 +_2_46->_2_43 } } diff --git a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot index ff12f7803..c13b58174 100644 --- a/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot +++ b/test-shared/src/test/resources/correctness/tree/CubicSPPFLang/cubic_tiny_example/result.dot @@ -3,52 +3,52 @@ labelloc="t" label="" subgraph cluster_0{ labelloc="t" -_0_0 [label = "Epsilon S_0", shape = invhouse] -_0_1 [label = "Nonterminal S input:[0;0] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] -_0_2 [label = "Range input:[0;0] rsm:[S_0;S_0]", shape = ellipse] -_0_1->_0_2 +_0_0 [label = "150 Range input:[0;0] rsm:[S_0;S_0]", shape = ellipse] +_0_1 [label = "151 Epsilon S_0", shape = invhouse] +_0_2 [label = "153 Nonterminal S input:[0;0] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_0_0->_0_1 _0_2->_0_0 } subgraph cluster_1{ labelloc="t" -_1_0 [label = "Epsilon S_0", shape = invhouse] -_1_1 [label = "Epsilon S_0", shape = invhouse] -_1_2 [label = "Intermediate input:1 rsm:S_1", shape = plain] -_1_3 [label = "Intermediate input:1 rsm:S_2", shape = plain] -_1_4 [label = "Intermediate input:2 rsm:S_3", shape = plain] -_1_5 [label = "Nonterminal S input:[0;2] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] -_1_6 [label = "Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] -_1_7 [label = "Nonterminal S input:[2;2] rsm:[S_3;S_4]", shape = invtrapezium] -_1_8 [label = "Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] -_1_9 [label = "Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] -_1_10 [label = "Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] -_1_11 [label = "Range input:[0;2] rsm:[S_0;S_4]", shape = ellipse] -_1_12 [label = "Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] -_1_13 [label = "Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] -_1_14 [label = "Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] -_1_15 [label = "Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] -_1_16 [label = "Range input:[2;2] rsm:[S_3;S_4]", shape = ellipse] -_1_17 [label = "Terminal `a` input:[0;1]", shape = rectangle] -_1_18 [label = "Terminal `a` input:[1;2]", shape = rectangle] -_1_2->_1_8 -_1_2->_1_13 -_1_3->_1_9 -_1_3->_1_14 -_1_4->_1_10 -_1_4->_1_16 -_1_5->_1_11 -_1_6->_1_12 -_1_7->_1_15 -_1_8->_1_17 -_1_9->_1_2 -_1_10->_1_3 -_1_11->_1_4 -_1_12->_1_0 +_1_0 [label = "154 Range input:[0;1] rsm:[S_0;S_1]", shape = ellipse] +_1_1 [label = "155 Terminal `a` input:[0;1]", shape = rectangle] +_1_2 [label = "157 Range input:[1;1] rsm:[S_0;S_0]", shape = ellipse] +_1_3 [label = "158 Epsilon S_0", shape = invhouse] +_1_4 [label = "159 Range input:[1;1] rsm:[S_1;S_2]", shape = ellipse] +_1_5 [label = "160 Nonterminal S input:[1;1] rsm:[S_1;S_2]", shape = invtrapezium] +_1_6 [label = "161 Range input:[0;1] rsm:[S_0;S_2]", shape = ellipse] +_1_7 [label = "162 Intermediate input:1 rsm:S_1", shape = plain] +_1_8 [label = "164 Terminal `a` input:[1;2]", shape = rectangle] +_1_9 [label = "166 Range input:[2;2] rsm:[S_0;S_0]", shape = ellipse] +_1_10 [label = "167 Epsilon S_0", shape = invhouse] +_1_11 [label = "172 Range input:[1;2] rsm:[S_2;S_3]", shape = ellipse] +_1_12 [label = "174 Range input:[0;2] rsm:[S_0;S_3]", shape = ellipse] +_1_13 [label = "175 Intermediate input:1 rsm:S_2", shape = plain] +_1_14 [label = "177 Range input:[2;2] rsm:[S_3;S_4]", shape = ellipse] +_1_15 [label = "178 Nonterminal S input:[2;2] rsm:[S_3;S_4]", shape = invtrapezium] +_1_16 [label = "179 Range input:[0;2] rsm:[S_0;S_4]", shape = ellipse] +_1_17 [label = "180 Intermediate input:2 rsm:S_3", shape = plain] +_1_18 [label = "182 Nonterminal S input:[0;2] rsm:[fictiveStart_0;fictiveStart_1]", shape = invtrapezium] +_1_0->_1_1 +_1_2->_1_3 +_1_4->_1_5 +_1_5->_1_2 +_1_6->_1_7 +_1_7->_1_0 +_1_7->_1_4 +_1_9->_1_10 +_1_11->_1_8 +_1_12->_1_13 _1_13->_1_6 -_1_14->_1_18 -_1_15->_1_0 -_1_16->_1_7 +_1_13->_1_11 +_1_14->_1_15 +_1_15->_1_9 +_1_16->_1_17 +_1_17->_1_12 +_1_17->_1_14 +_1_18->_1_16 } }