From 27782632f57cd2824d1ebc3a7e1ac08032d2eb0a Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Mon, 18 May 2026 12:19:16 -0700 Subject: [PATCH 1/2] Remove redunancy in verbose output: "hocc: 0 unresolvable conflicts in 0 states" Simplify verbose output: hocc: 0 unresolvable conflicts in 0 states to: hocc: 0 unresolvable conflicts --- bootstrap/bin/hocc/spec.ml | 15 ++++++++++++--- bootstrap/test/hocc/Example.expected | 2 +- bootstrap/test/hocc/Example_b.expected | 2 +- bootstrap/test/hocc/Example_c.expected | 2 +- bootstrap/test/hocc/Hocc.expected | 2 +- bootstrap/test/hocc/IelrFig1.expected | 2 +- bootstrap/test/hocc/IelrFig2.expected | 2 +- bootstrap/test/hocc/IelrFig3.expected | 2 +- bootstrap/test/hocc/IelrFig3_apgm.expected | 2 +- bootstrap/test/hocc/IelrFig5.expected | 2 +- bootstrap/test/hocc/IelrFig5Diamond.expected | 2 +- bootstrap/test/hocc/IelrFig5Diamonds.expected | 2 +- bootstrap/test/hocc/IelrFig6.expected | 4 ++-- .../hocc/IelrRemergeable_aaplr_gpost.expected | 2 +- .../test/hocc/IelrRemergeable_aaplr_gpre.expected | 2 +- .../test/hocc/IelrRemergeable_aielr_gno.expected | 2 +- .../test/hocc/IelrRemergeable_aielr_myes.expected | 2 +- bootstrap/test/hocc/Lyken.expected | 2 +- bootstrap/test/hocc/Menhir21Longer.expected | 2 +- bootstrap/test/hocc/Menhir21Shorter.expected | 2 +- bootstrap/test/hocc/MulAddParen.expected | 2 +- bootstrap/test/hocc/MulAddParenPrec.expected | 2 +- bootstrap/test/hocc/OCaml.expected | 2 +- bootstrap/test/hocc/PagerG2.expected | 2 +- bootstrap/test/hocc/PagerG2_aielr.expected | 2 +- bootstrap/test/hocc/PagerG2_gno.expected | 2 +- bootstrap/test/hocc/PagerG3.expected | 2 +- bootstrap/test/hocc/TokenCoverage.expected | 2 +- 28 files changed, 40 insertions(+), 31 deletions(-) diff --git a/bootstrap/bin/hocc/spec.ml b/bootstrap/bin/hocc/spec.ml index d428c1ced..a7e4aa7e5 100644 --- a/bootstrap/bin/hocc/spec.ml +++ b/bootstrap/bin/hocc/spec.ml @@ -1040,9 +1040,18 @@ and log_conflicts io ~resolve states = ) |> Fmt.fmt " conflict" |> (fun formatter -> match conflicts with 1L -> formatter | _ -> formatter |> Fmt.fmt "s") - |> Fmt.fmt " in " |> Uns.pp conflict_states - |> Fmt.fmt " state" - |> (fun formatter -> match conflict_states with 1L -> formatter | _ -> formatter |> Fmt.fmt "s") + |> (fun formatter -> + match conflicts with + | 0L -> formatter + | _ -> begin + formatter + |> Fmt.fmt " in " |> Uns.pp conflict_states + |> Fmt.fmt " state" + |> (fun formatter -> + match conflict_states with 1L -> formatter | _ -> formatter |> Fmt.fmt "s" + ) + end + ) |> (fun formatter -> match conflicts = 0L with | true -> formatter | false -> begin diff --git a/bootstrap/test/hocc/Example.expected b/bootstrap/test/hocc/Example.expected index cffab1012..45c858831 100644 --- a/bootstrap/test/hocc/Example.expected +++ b/bootstrap/test/hocc/Example.expected @@ -9,7 +9,7 @@ hocc: Tracing automaton (.+=actions[+gotos])+.+.+.++ hocc: 0 unreachable states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] hocc: 0 remergeable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Writing "./hocc/Example.txt" hocc: Writing "./Example.hmi" diff --git a/bootstrap/test/hocc/Example_b.expected b/bootstrap/test/hocc/Example_b.expected index 2b532c2ce..666d9dc36 100644 --- a/bootstrap/test/hocc/Example_b.expected +++ b/bootstrap/test/hocc/Example_b.expected @@ -9,6 +9,6 @@ hocc: Tracing automaton (.+=actions[+gotos])+.+.+.++ hocc: 0 unreachable states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] hocc: 0 remergeable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Writing "./Example_b.hmi" hocc: Writing "./Example_b.hm" diff --git a/bootstrap/test/hocc/Example_c.expected b/bootstrap/test/hocc/Example_c.expected index 86620c0ae..61d7ba293 100644 --- a/bootstrap/test/hocc/Example_c.expected +++ b/bootstrap/test/hocc/Example_c.expected @@ -9,6 +9,6 @@ hocc: Tracing automaton (.+=actions[+gotos])+.+.+.++ hocc: 0 unreachable states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] hocc: 0 remergeable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Writing "./Example_c.hmi" hocc: Writing "./Example_c.hm" diff --git a/bootstrap/test/hocc/Hocc.expected b/bootstrap/test/hocc/Hocc.expected index a5c50566b..36492b586 100644 --- a/bootstrap/test/hocc/Hocc.expected +++ b/bootstrap/test/hocc/Hocc.expected @@ -10,7 +10,7 @@ hocc: Reindexing 859 LR(1) states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/601[785] 601/601[0] hocc: Remerging 601 LR(1) states hocc: Reindexing 258 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/Hocc.txt" diff --git a/bootstrap/test/hocc/IelrFig1.expected b/bootstrap/test/hocc/IelrFig1.expected index b3e0156dd..846051643 100644 --- a/bootstrap/test/hocc/IelrFig1.expected +++ b/bootstrap/test/hocc/IelrFig1.expected @@ -12,7 +12,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/12 hocc: Generating 12 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+.+ hocc: 0 unreachable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/IelrFig1.txt" diff --git a/bootstrap/test/hocc/IelrFig2.expected b/bootstrap/test/hocc/IelrFig2.expected index 6057492ef..689209384 100644 --- a/bootstrap/test/hocc/IelrFig2.expected +++ b/bootstrap/test/hocc/IelrFig2.expected @@ -13,7 +13,7 @@ hocc: Generating 21 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+.+ hocc: 2 unreachable states hocc: Reindexing 19 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: 1 unused production: hocc: S ::= Tb C Ta hocc: Generating text report diff --git a/bootstrap/test/hocc/IelrFig3.expected b/bootstrap/test/hocc/IelrFig3.expected index b05f3bf3b..e875f9916 100644 --- a/bootstrap/test/hocc/IelrFig3.expected +++ b/bootstrap/test/hocc/IelrFig3.expected @@ -13,7 +13,7 @@ hocc: Generating 21 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+.+ hocc: 6 unreachable states hocc: Reindexing 15 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: 1 unused precedence: hocc: neutral p3 < p2 hocc: 1 unused non-terminal: diff --git a/bootstrap/test/hocc/IelrFig3_apgm.expected b/bootstrap/test/hocc/IelrFig3_apgm.expected index c07829f04..06e7f40b6 100644 --- a/bootstrap/test/hocc/IelrFig3_apgm.expected +++ b/bootstrap/test/hocc/IelrFig3_apgm.expected @@ -7,7 +7,7 @@ hocc: Generating 19 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+.+ hocc: 8 unreachable states hocc: Reindexing 11 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: 2 unused precedences: hocc: neutral p2 < p1 hocc: neutral p3 < p2 diff --git a/bootstrap/test/hocc/IelrFig5.expected b/bootstrap/test/hocc/IelrFig5.expected index 479ab16dd..c2263a727 100644 --- a/bootstrap/test/hocc/IelrFig5.expected +++ b/bootstrap/test/hocc/IelrFig5.expected @@ -12,7 +12,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/22 hocc: Generating 22 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+++.++.+.+.+ hocc: 0 unreachable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/IelrFig5.txt" diff --git a/bootstrap/test/hocc/IelrFig5Diamond.expected b/bootstrap/test/hocc/IelrFig5Diamond.expected index f176c7ef5..21003c663 100644 --- a/bootstrap/test/hocc/IelrFig5Diamond.expected +++ b/bootstrap/test/hocc/IelrFig5Diamond.expected @@ -12,7 +12,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/28 hocc: Generating 28 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+....+++.++.++.+.+ hocc: 0 unreachable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/IelrFig5Diamond.txt" diff --git a/bootstrap/test/hocc/IelrFig5Diamonds.expected b/bootstrap/test/hocc/IelrFig5Diamonds.expected index 7b8ff9ad3..fd140fe1e 100644 --- a/bootstrap/test/hocc/IelrFig5Diamonds.expected +++ b/bootstrap/test/hocc/IelrFig5Diamonds.expected @@ -12,7 +12,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/34 hocc: Generating 34 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.....+++.++.+++.+.+ hocc: 0 unreachable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/IelrFig5Diamonds.txt" diff --git a/bootstrap/test/hocc/IelrFig6.expected b/bootstrap/test/hocc/IelrFig6.expected index f4b9d99ff..d05866b34 100644 --- a/bootstrap/test/hocc/IelrFig6.expected +++ b/bootstrap/test/hocc/IelrFig6.expected @@ -5,14 +5,14 @@ hocc: Generating LALR(1) specification as IELR(1) prerequisite hocc: LR(1) item set compatibility: lalr hocc: Generating LR(1) item set closures (workq/total) 0/15 hocc: Generating 15 LR(1) states -hocc: 0 conflicts in 0 states +hocc: 0 conflicts hocc: Gathering IELR(1) conflict state attributions (/=none/some) hocc: LR(1) item set compatibility: ielr hocc: Generating LR(1) item set closures (workq/total) 0/15 hocc: Generating 15 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+++.+ hocc: 0 unreachable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/IelrFig6.txt" diff --git a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected index 1f9a72f4b..12133f86f 100644 --- a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected +++ b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected @@ -9,6 +9,6 @@ hocc: Remerging 223 LR(1) states hocc: Reindexing 45 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+..+.+.+..+.+.+.+ hocc: 0 unreachable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Writing "./hocc/IelrRemergeable_aaplr_gpost.txt" diff --git a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected index bb9a25cf3..fef21afd6 100644 --- a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected +++ b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected @@ -10,6 +10,6 @@ hocc: Reindexing 264 LR(1) states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/219[259] 219/219[0] hocc: Remerging 219 LR(1) states hocc: Reindexing 45 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Writing "./hocc/IelrRemergeable_aaplr_gpre.txt" diff --git a/bootstrap/test/hocc/IelrRemergeable_aielr_gno.expected b/bootstrap/test/hocc/IelrRemergeable_aielr_gno.expected index a3ba1c954..846f64679 100644 --- a/bootstrap/test/hocc/IelrRemergeable_aielr_gno.expected +++ b/bootstrap/test/hocc/IelrRemergeable_aielr_gno.expected @@ -10,6 +10,6 @@ hocc: Gathering IELR(1) conflict state attributions (/=none/some) hocc: LR(1) item set compatibility: ielr hocc: Generating LR(1) item set closures (workq/total) 0/58 hocc: Generating 58 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Writing "./hocc/IelrRemergeable_aielr_gno.txt" diff --git a/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected b/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected index 05def2df2..a141cf104 100644 --- a/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected +++ b/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected @@ -15,6 +15,6 @@ hocc: 0 unreachable states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/13[25] 13/13[0] hocc: Remerging 13 LR(1) states hocc: Reindexing 45 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Writing "./hocc/IelrRemergeable_aielr_myes.txt" diff --git a/bootstrap/test/hocc/Lyken.expected b/bootstrap/test/hocc/Lyken.expected index b01d5ee6c..0e77726ae 100644 --- a/bootstrap/test/hocc/Lyken.expected +++ b/bootstrap/test/hocc/Lyken.expected @@ -7,7 +7,7 @@ hocc: Generating 1_375 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+........+.....+.....+.....+...+....+..+.+.+.+.++ hocc: 35 unreachable states hocc: Reindexing 1_340 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: 15 unused precedence set associativities: hocc: left pColon < pGenericParamOne hocc: left pRparen < pProcParmBody diff --git a/bootstrap/test/hocc/Menhir21Longer.expected b/bootstrap/test/hocc/Menhir21Longer.expected index c52bd36c2..05a9f3e15 100644 --- a/bootstrap/test/hocc/Menhir21Longer.expected +++ b/bootstrap/test/hocc/Menhir21Longer.expected @@ -6,7 +6,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/33 hocc: Generating 33 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+....+.+.+.++.++ hocc: 0 unreachable states -hocc: 0 conflicts in 0 states +hocc: 0 conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/Menhir21Longer.txt" diff --git a/bootstrap/test/hocc/Menhir21Shorter.expected b/bootstrap/test/hocc/Menhir21Shorter.expected index 65644a399..fc30908c6 100644 --- a/bootstrap/test/hocc/Menhir21Shorter.expected +++ b/bootstrap/test/hocc/Menhir21Shorter.expected @@ -6,7 +6,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/22 hocc: Generating 22 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+.+ hocc: 0 unreachable states -hocc: 0 conflicts in 0 states +hocc: 0 conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/Menhir21Shorter.txt" diff --git a/bootstrap/test/hocc/MulAddParen.expected b/bootstrap/test/hocc/MulAddParen.expected index f5798b876..adbcf582d 100644 --- a/bootstrap/test/hocc/MulAddParen.expected +++ b/bootstrap/test/hocc/MulAddParen.expected @@ -6,7 +6,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/15 hocc: Generating 15 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.++.+.+.+ hocc: 0 unreachable states -hocc: 0 conflicts in 0 states +hocc: 0 conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/MulAddParen.txt" diff --git a/bootstrap/test/hocc/MulAddParenPrec.expected b/bootstrap/test/hocc/MulAddParenPrec.expected index 5674cae40..140110d4b 100644 --- a/bootstrap/test/hocc/MulAddParenPrec.expected +++ b/bootstrap/test/hocc/MulAddParenPrec.expected @@ -9,7 +9,7 @@ hocc: 0 unreachable states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/10[20] 10/10[0] hocc: Remerging 10 LR(1) states hocc: Reindexing 15 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: 2 unused precedence set associativities: hocc: left p1 hocc: left p2 < p1 diff --git a/bootstrap/test/hocc/OCaml.expected b/bootstrap/test/hocc/OCaml.expected index 2e661ba45..626394711 100644 --- a/bootstrap/test/hocc/OCaml.expected +++ b/bootstrap/test/hocc/OCaml.expected @@ -4,7 +4,7 @@ hocc: 71 precedences, 126 tokens, 223 non-terminals (15 starts), 867 productions hocc: LR(1) item set compatibility: lalr hocc: Generating LR(1) item set closures (workq/total) 230/1_000 0/1_878 hocc: Generating 1_878 LR(1) states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: 23 unused precedence set associativities: hocc: nonassoc p_BACKQUOTE, p_BANG, p_BEGIN, p_CHAR, p_FALSE, p_FLOAT, p_INT, p_LBRACE, p_LBRACELESS, p_LBRACKET, p_LBRACKETBAR, p_LBRACKETPERCENT, p_LIDENT, p_LPAREN, p_NEW, p_OBJECT, p_PREFIXOP, p_QUOTED_STRING_EXPR, p_STRING, p_TRUE, p_UIDENT hocc: nonassoc p_DOT, p_DOTOP < p_BACKQUOTE diff --git a/bootstrap/test/hocc/PagerG2.expected b/bootstrap/test/hocc/PagerG2.expected index 9d3ac8af3..455fb69a1 100644 --- a/bootstrap/test/hocc/PagerG2.expected +++ b/bootstrap/test/hocc/PagerG2.expected @@ -7,7 +7,7 @@ hocc: Generating 27 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+.+.+ hocc: 1 unreachable state hocc: Reindexing 26 LR(1) states -hocc: 0 conflicts in 0 states +hocc: 0 conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/PagerG2.txt" diff --git a/bootstrap/test/hocc/PagerG2_aielr.expected b/bootstrap/test/hocc/PagerG2_aielr.expected index e96e6b74a..af3d09d3f 100644 --- a/bootstrap/test/hocc/PagerG2_aielr.expected +++ b/bootstrap/test/hocc/PagerG2_aielr.expected @@ -12,7 +12,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/26 hocc: Generating 26 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+...+.+.+.+ hocc: 0 unreachable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/PagerG2_aielr.txt" diff --git a/bootstrap/test/hocc/PagerG2_gno.expected b/bootstrap/test/hocc/PagerG2_gno.expected index 8b7126e9c..8265d7c47 100644 --- a/bootstrap/test/hocc/PagerG2_gno.expected +++ b/bootstrap/test/hocc/PagerG2_gno.expected @@ -4,6 +4,6 @@ hocc: 0 precedences, 10 tokens, 8 non-terminals (1 start), 14 productions hocc: LR(1) item set compatibility: weak hocc: Generating LR(1) item set closures (workq/total) 0/27 hocc: Generating 27 LR(1) states -hocc: 0 conflicts in 0 states +hocc: 0 conflicts hocc: Generating text report hocc: Writing "./hocc/PagerG2_gno.txt" diff --git a/bootstrap/test/hocc/PagerG3.expected b/bootstrap/test/hocc/PagerG3.expected index 3d0abe83e..0bf396381 100644 --- a/bootstrap/test/hocc/PagerG3.expected +++ b/bootstrap/test/hocc/PagerG3.expected @@ -6,7 +6,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/19 hocc: Generating 19 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+....+.+.+ hocc: 0 unreachable states -hocc: 0 conflicts in 0 states +hocc: 0 conflicts hocc: Generating text report hocc: Generating hocc report hocc: Writing "./hocc/PagerG3.txt" diff --git a/bootstrap/test/hocc/TokenCoverage.expected b/bootstrap/test/hocc/TokenCoverage.expected index b5f7c861f..481ebd293 100644 --- a/bootstrap/test/hocc/TokenCoverage.expected +++ b/bootstrap/test/hocc/TokenCoverage.expected @@ -9,4 +9,4 @@ hocc: Tracing automaton (.+=actions[+gotos])++.+ hocc: 0 unreachable states hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] hocc: 0 remergeable states -hocc: 0 unresolvable conflicts in 0 states +hocc: 0 unresolvable conflicts From ff6b9b21456ed690335a889b884038822bee9ca1 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Mon, 18 May 2026 22:50:18 -0700 Subject: [PATCH 2/2] Simplify/optimize APLR remergeability search In practice APLR-generated automata have thus far been completely impervious to remergeability search order. Simplify the search code and change the ordering to one that performs better in benchmarks, namely searching low-cardinality isocore sets first. --- bootstrap/bin/hocc/aplr.ml | 149 +++++++----------- bootstrap/bin/hocc/aplr.mli | 10 +- bootstrap/bin/hocc/isocores.ml | 21 ++- bootstrap/bin/hocc/isocores.mli | 5 +- bootstrap/bin/hocc/remergeables.ml | 2 + bootstrap/bin/hocc/remergeables.mli | 7 +- bootstrap/test/hocc/Example.expected | 2 +- bootstrap/test/hocc/Example_b.expected | 2 +- bootstrap/test/hocc/Example_c.expected | 2 +- bootstrap/test/hocc/Gawk_aielr_myes.expected | 2 +- bootstrap/test/hocc/Gpic_aaplr.expected | 2 +- bootstrap/test/hocc/Gpic_aielr_myes.expected | 2 +- bootstrap/test/hocc/Hocc.expected | 2 +- .../hocc/IelrRemergeable_aaplr_gpost.expected | 2 +- .../hocc/IelrRemergeable_aaplr_gpre.expected | 2 +- .../hocc/IelrRemergeable_aielr_myes.expected | 2 +- bootstrap/test/hocc/MulAddParenPrec.expected | 2 +- .../test/hocc/PSEUDO_END_conflict.expected | 2 +- bootstrap/test/hocc/TokenCoverage.expected | 2 +- bootstrap/test/hocc/Unused.expected | 2 +- 20 files changed, 102 insertions(+), 120 deletions(-) diff --git a/bootstrap/bin/hocc/aplr.ml b/bootstrap/bin/hocc/aplr.ml index bb10b7105..7031212f4 100644 --- a/bootstrap/bin/hocc/aplr.ml +++ b/bootstrap/bin/hocc/aplr.ml @@ -1,13 +1,8 @@ open Basis open! Basis.Rudiments -(* Pairwise state nubs comprising the (reversed) path from frontiers to roots. Spines are tracked in - * case a `Distinct` pair is discovered, in which case the spines are passed to - * `Remergeables.distinct`. *) -type spines = (StateNub.t * StateNub.t) list - type remergeable = - | NotRemergeable of spines (* Spines' state nubs are pairwise distinct. *) + | NotRemergeable of Remergeables.spines (* Spines' state nubs are pairwise distinct. *) | Remergeable let bool_of_remergeable remergeable = @@ -219,101 +214,65 @@ let remergeable_statenubs states remergeables statenub0 statenub1 = inner states remergeables ~frontiers_next:[] ~frontiers_current let remergeable_search io isocores states = - let remergeables = Remergeables.empty in - (* Initialize the work list with indices of all states in non-singleton isocore sets. *) - let worklst, worklst_length, max_mergeable = - Isocores.fold_isocore_sets ~init:([], 0L, 0L) - ~f:(fun (worklst, worklst_length, max_mergeable) isocore_set -> - match Ordset.length isocore_set with - | 0L -> not_reached () - | 1L -> worklst, worklst_length, max_mergeable - | _ -> begin - let worklst = - Ordset.fold ~init:worklst ~f:(fun worklst index -> index :: worklst) isocore_set in - let isocore_set_length = Ordset.length isocore_set in - let worklst_length = worklst_length + isocore_set_length in - let max_mergeable = max_mergeable + (pred isocore_set_length) in - worklst, worklst_length, max_mergeable - end - ) isocores - in let io = io.log - |> Fmt.fmt "hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/" - |> Uns.pp max_mergeable - |> Fmt.fmt "[" |> Uns.pp worklst_length |> Fmt.fmt "]" + |> Fmt.fmt "hocc: Searching for remergeable states" |> Io.with_log io in - let io, nmergeable, remergeables = - worklst - (* Reverse the work list so that remerging tends to follow the same order as splits occurred. *) - |> List.rev - |> List.foldi_until ~init:(io, 0L, remergeables) - ~f:(fun i (io, nmergeable, remergeables) statenub0 -> - let io = match i <> 0L && (worklst_length - i) % 1000L = 0L with - | false -> io - | true -> begin - let io = - io.log - |> Fmt.fmt " " - |> Uns.pp nmergeable |> Fmt.fmt "/" |> Uns.pp max_mergeable - |> Fmt.fmt "[" |> Uns.pp (worklst_length - i) |> Fmt.fmt "]" - |> Io.with_log io - in - io - end - in - let StateNub.{isocore_set_sn=issn0; _} = statenub0 in - let core = Lr1Itemset.core StateNub.(statenub0.lr1itemsetclosure).kernel in - let isocore_set = Isocores.get_isocore_set_hlt core isocores in - let nmergeable, remergeables = Ordset.fold_until ~init:(nmergeable, remergeables) - ~f:(fun (nmergeable, remergeables) statenub1 -> - let StateNub.{isocore_set_sn=issn1; _} = statenub1 in - (* Eliminate redundant/self pairs via `>`. Furthermore, use issn for comparison rather - * than state index so that the order of merge attempts follows the same order as splits - * occurred. For example, given a set {0,1,2,3,4}, the order of compatibility tests - * during splitting was: - * - * (1,0) - * (2,0), (2,1) - * (3,0), (3,1), (3,2) - * (4,0), (4,1), (4,2), (4,3) *) - match issn0 > issn1 with - | false -> (nmergeable, remergeables), true - | true -> begin - let nmergeable, remergeables = - match Remergeables.rel statenub0 statenub1 remergeables with - | Distinct - | Mergeable -> nmergeable, remergeables - | Unknown -> begin - let remergeables, remergeable = - remergeable_statenubs states remergeables statenub0 statenub1 in - let subgraph_size = Remergeables.subgraph_size remergeables in - match remergeable with - | NotRemergeable spines -> - nmergeable, Remergeables.distinct spines remergeables - | Remergeable -> - nmergeable + subgraph_size, Remergeables.mergeable remergeables - end - in - (nmergeable, remergeables), false - end - ) isocore_set in - (io, nmergeable, remergeables), nmergeable = max_mergeable - ) - in + (* Fold over all non-singleton isocoric state nub sets in `isocores` to search for remergeable + * pairs within each set. Process sets in order of increasing cardinality based on the heuristic + * that smaller sets will be involved in less complex splits. Determining the remergeability of + * small subgraphs early on reduces the search complexity for large adjacent/containing subgraphs + * later on, whereas the converse — searching large subgraphs first — is of negligible benefit + * to later searches of small subgraphs. *) + let nmergeable, max_mergeable, remergeables = + Isocores.fold_non_singleton_isocore_sets ~init:(0L, 0L, Remergeables.empty) + ~f:(fun (nmergeable, max_mergeable, remergeables) isocore_set0 -> + let isocore_set_length = Ordset.length isocore_set0 in + match isocore_set_length with + | 0L -> not_reached () + | 1L -> nmergeable, max_mergeable, remergeables + | _ -> begin + let max_mergeable = max_mergeable + (pred isocore_set_length) in + (* Test all n-choose-2 pairings for remergeability. *) + let nmergeable, remergeables, _isocore_set1 = + Ordset.fold ~init:(nmergeable, remergeables, isocore_set0) + ~f:(fun (nmergeable, remergeables, isocore_set1) statenub0 -> + let isocore_set1 = Ordset.remove statenub0 isocore_set1 in + let nmergeable, remergeables = + Ordset.fold ~init:(nmergeable, remergeables) + ~f:(fun (nmergeable, remergeables) statenub1 -> + let nmergeable, remergeables = + (* `Distinct`/`Mergeable` indicates that an earlier search starting at + * predecessors transitively determined this pair's relationship. *) + match Remergeables.rel statenub0 statenub1 remergeables with + | Distinct + | Mergeable -> nmergeable, remergeables + | Unknown -> begin + let remergeables, remergeable = + remergeable_statenubs states remergeables statenub0 statenub1 in + match remergeable with + | NotRemergeable spines -> + nmergeable, Remergeables.distinct spines remergeables + | Remergeable -> begin + let subgraph_size = Remergeables.subgraph_size remergeables in + nmergeable + subgraph_size, Remergeables.mergeable remergeables + end + end + in + nmergeable, remergeables + ) isocore_set1 + in + nmergeable, remergeables, isocore_set1 + ) isocore_set0 + in + nmergeable, max_mergeable, remergeables + end + ) isocores in let io = io.log - |> (fun formatter -> - match worklst_length = 0L with - | true -> formatter - | false -> begin - formatter - |> Fmt.fmt " " - |> Uns.pp nmergeable |> Fmt.fmt "/" |> Uns.pp max_mergeable - |> Fmt.fmt "[0]" - end - ) + |> Fmt.fmt ": " + |> Uns.pp nmergeable |> Fmt.fmt "/" |> Uns.pp max_mergeable |> Fmt.fmt "\n" |> Io.with_log io in diff --git a/bootstrap/bin/hocc/aplr.mli b/bootstrap/bin/hocc/aplr.mli index 5b96ed63e..beb68adfa 100644 --- a/bootstrap/bin/hocc/aplr.mli +++ b/bootstrap/bin/hocc/aplr.mli @@ -1,9 +1,9 @@ -(** APLR(1) state subgraph remerging functionality. This functionality can also be used as a final - compaction step for IELR(1) and PGM LR(1), with the caveat that merged IELR(1) conflict - contributions can be difficult to interpret. +(** APLR(1) state subgraph remerging functionality. Remerging can also be used as a final compaction + step for IELR(1) and PGM LR(1), with the caveat that merged IELR(1) conflict contributions can + be difficult to interpret. - Although this module drives LR(1) -> APLR(1) transformation the implementation relies on - facilities distributed across other modules, especially: + This module drives LR(1) -> APLR(1) transformation using facilities distributed across other + modules, especially: - {!module:Remeargeables} maintains state nub remergeability metadata, fed by paired subgraph searches. diff --git a/bootstrap/bin/hocc/isocores.ml b/bootstrap/bin/hocc/isocores.ml index a40d4136f..08865ea38 100644 --- a/bootstrap/bin/hocc/isocores.ml +++ b/bootstrap/bin/hocc/isocores.ml @@ -178,7 +178,22 @@ let fold ~init ~f {statenubs_map; _} = f accum statenub ) statenubs_map -let fold_isocore_sets ~init ~f {isocores; _} = - Map.fold ~init:[] ~f:(fun accum (_k, v) -> v :: accum ) isocores - |> List.sort ~cmp:(fun {isocores_sn=isn0; _} {isocores_sn=isn1; _} -> Uns.cmp isn0 isn1) +let fold_non_singleton_isocore_sets ~init ~f {isocores; _} = + let vs, nvs = + isocores + |> Map.fold ~init:([], 0L) ~f:(fun (vs, nvs) (_k, ({isocore_set; _} as v)) -> + match Ordset.length isocore_set with + | 0L -> not_reached () + | 1L -> vs, nvs + | _ -> v :: vs, succ nvs + ) + in + vs + |> List.sort ~length:nvs + ~cmp:(fun {isocore_set=set0; isocores_sn=sn0} {isocore_set=set1; isocores_sn=sn1} -> + match Uns.cmp (Ordset.length set0) (Ordset.length set1) with + | Lt -> Lt + | Eq -> Uns.cmp sn0 sn1 + | Gt -> Gt + ) |> List.fold ~init ~f:(fun accum {isocore_set; _} -> f accum isocore_set) diff --git a/bootstrap/bin/hocc/isocores.mli b/bootstrap/bin/hocc/isocores.mli index 7a9964ee6..013343208 100644 --- a/bootstrap/bin/hocc/isocores.mli +++ b/bootstrap/bin/hocc/isocores.mli @@ -75,7 +75,8 @@ val fold: init:'accum -> f:('accum -> StateNub.t -> 'accum) -> t -> 'accum (** [fold ~init ~f t] iteratively applies [f] to the state nubs in [t], in increasing state nub index order. *) -val fold_isocore_sets: init:'accum +val fold_non_singleton_isocore_sets: init:'accum -> f:('accum -> (StateNub.t, StateNub.cmper_witness) Ordset.t -> 'accum) -> t -> 'accum -(** [fold_isocore_sets ~init ~f t] iteratively applies [f] to the isocore sets in [t], in increasing +(** [fold_non_singleton_isocore_sets ~init ~f t] iteratively applies [f] to the non-singleton + isocore sets in [t], ordered primarily by increasing set cardinality, secondarily by stable isocore sequence number order. *) diff --git a/bootstrap/bin/hocc/remergeables.ml b/bootstrap/bin/hocc/remergeables.ml index 754f8ca6c..f3da30f0c 100644 --- a/bootstrap/bin/hocc/remergeables.ml +++ b/bootstrap/bin/hocc/remergeables.ml @@ -6,6 +6,8 @@ type rel = | Distinct | Mergeable +type spines = (StateNub.t * StateNub.t) list + type core_rels = { (* Sets of `Mergeable` states, where each bitset index is an isocore set serial number (issn). * Mergeability is transitive, so each issn is a member of at most one set. *) diff --git a/bootstrap/bin/hocc/remergeables.mli b/bootstrap/bin/hocc/remergeables.mli index d794afd01..6cbf6e347 100644 --- a/bootstrap/bin/hocc/remergeables.mli +++ b/bootstrap/bin/hocc/remergeables.mli @@ -10,6 +10,11 @@ type rel = | Distinct (* Distinct subgraph features prevent remerging. *) | Mergeable (* Remergeable. *) +(** Pairwise state nubs comprising the (reversed) path from [frontiers..roots]. Spines are tracked + in case a `Distinct` pair is discovered, in which case the spines are passed to `distinct` to + be recorded as pairwise distinct. *) +type spines = (StateNub.t * StateNub.t) list + type t val fmt: ?alt:bool -> ?width:uns -> t -> (module Fmt.Formatter) -> (module Fmt.Formatter) @@ -33,7 +38,7 @@ val expand: StateNub.t -> StateNub.t -> t -> t (** [expand statenub0 statenub1] expands the subgraphs being explored by tentatively recording a [Remergeable] relationship between [statenub0] and [statenub1]. *) -val distinct: (StateNub.t * StateNub.t) list -> t -> t +val distinct: spines -> t -> t (** [distinct spines t] concludes subgraph exploration with a determination that the subgraphs are distinct, and therefore the spines (i.e. paths from exploration roots to distinct state pair) are distinct. The spines' relationships transition to [Distinct] and all other tentative diff --git a/bootstrap/test/hocc/Example.expected b/bootstrap/test/hocc/Example.expected index 45c858831..9356d84ab 100644 --- a/bootstrap/test/hocc/Example.expected +++ b/bootstrap/test/hocc/Example.expected @@ -7,7 +7,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/14 hocc: Generating 14 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+.+.++ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] +hocc: Searching for remergeable states: 0/0 hocc: 0 remergeable states hocc: 0 unresolvable conflicts hocc: Generating text report diff --git a/bootstrap/test/hocc/Example_b.expected b/bootstrap/test/hocc/Example_b.expected index 666d9dc36..3c7fa3236 100644 --- a/bootstrap/test/hocc/Example_b.expected +++ b/bootstrap/test/hocc/Example_b.expected @@ -7,7 +7,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/14 hocc: Generating 14 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+.+.++ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] +hocc: Searching for remergeable states: 0/0 hocc: 0 remergeable states hocc: 0 unresolvable conflicts hocc: Writing "./Example_b.hmi" diff --git a/bootstrap/test/hocc/Example_c.expected b/bootstrap/test/hocc/Example_c.expected index 61d7ba293..4d899f954 100644 --- a/bootstrap/test/hocc/Example_c.expected +++ b/bootstrap/test/hocc/Example_c.expected @@ -7,7 +7,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/14 hocc: Generating 14 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+.+.++ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] +hocc: Searching for remergeable states: 0/0 hocc: 0 remergeable states hocc: 0 unresolvable conflicts hocc: Writing "./Example_c.hmi" diff --git a/bootstrap/test/hocc/Gawk_aielr_myes.expected b/bootstrap/test/hocc/Gawk_aielr_myes.expected index 8241f62f0..45b95adb4 100644 --- a/bootstrap/test/hocc/Gawk_aielr_myes.expected +++ b/bootstrap/test/hocc/Gawk_aielr_myes.expected @@ -13,7 +13,7 @@ hocc: Generating 616 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+....+..+.....+.....+.+.....+.....+.++.+.++++++ hocc: 4 unreachable states hocc: Reindexing 612 LR(1) states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/292[423] 245/292[0] +hocc: Searching for remergeable states: 245/292 hocc: Remerging 245 LR(1) states hocc: Reindexing 367 LR(1) states hocc: 104 unresolvable conflicts in 66 states (38 ⊥, 66 shift-reduce, 0 reduce-reduce) diff --git a/bootstrap/test/hocc/Gpic_aaplr.expected b/bootstrap/test/hocc/Gpic_aaplr.expected index 16cbfe0e1..40af4ec88 100644 --- a/bootstrap/test/hocc/Gpic_aaplr.expected +++ b/bootstrap/test/hocc/Gpic_aaplr.expected @@ -7,7 +7,7 @@ hocc: Generating 4_871 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+......+....+.....+....+..+..+..+.+++ hocc: 37 unreachable states hocc: Reindexing 4_834 LR(1) states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/4_411[4_810] 3_411/4_411[4_000] 3_954/4_411[3_000] 4_262/4_411[2_000] 4_404/4_411[1_000] 4_406/4_411[0] +hocc: Searching for remergeable states: 4_406/4_411 hocc: Remerging 4_406 LR(1) states hocc: Reindexing 428 LR(1) states hocc: 239 unresolvable conflicts in 239 states (239 ⊥, 0 shift-reduce, 0 reduce-reduce) diff --git a/bootstrap/test/hocc/Gpic_aielr_myes.expected b/bootstrap/test/hocc/Gpic_aielr_myes.expected index 299fac4eb..e8aaa7bf3 100644 --- a/bootstrap/test/hocc/Gpic_aielr_myes.expected +++ b/bootstrap/test/hocc/Gpic_aielr_myes.expected @@ -13,7 +13,7 @@ hocc: Generating 450 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+....+....+..+.+.+.+++ hocc: 3 unreachable states hocc: Reindexing 447 LR(1) states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/24[38] 19/24[0] +hocc: Searching for remergeable states: 19/24 hocc: Remerging 19 LR(1) states hocc: Reindexing 428 LR(1) states hocc: 239 unresolvable conflicts in 239 states (239 ⊥, 0 shift-reduce, 0 reduce-reduce) diff --git a/bootstrap/test/hocc/Hocc.expected b/bootstrap/test/hocc/Hocc.expected index 36492b586..93f3c6695 100644 --- a/bootstrap/test/hocc/Hocc.expected +++ b/bootstrap/test/hocc/Hocc.expected @@ -7,7 +7,7 @@ hocc: Generating 860 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+.....+...+....+..+..+....+..+..+..+.+...+.++.+.+.++ hocc: 1 unreachable state hocc: Reindexing 859 LR(1) states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/601[785] 601/601[0] +hocc: Searching for remergeable states: 601/601 hocc: Remerging 601 LR(1) states hocc: Reindexing 258 LR(1) states hocc: 0 unresolvable conflicts diff --git a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected index 12133f86f..124acf337 100644 --- a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected +++ b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpost.expected @@ -4,7 +4,7 @@ hocc: 5 precedences, 13 tokens, 5 non-terminals (1 start), 15 productions hocc: LR(1) item set compatibility: lr hocc: Generating LR(1) item set closures (workq/total) 0/268 hocc: Generating 268 LR(1) states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/223[263] 223/223[0] +hocc: Searching for remergeable states: 223/223 hocc: Remerging 223 LR(1) states hocc: Reindexing 45 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+..+.+.+..+.+.+.+ diff --git a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected index fef21afd6..cc1e11c31 100644 --- a/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected +++ b/bootstrap/test/hocc/IelrRemergeable_aaplr_gpre.expected @@ -7,7 +7,7 @@ hocc: Generating 268 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+..+...+..+.+...+..+..+..+..+.+.+ hocc: 4 unreachable states hocc: Reindexing 264 LR(1) states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/219[259] 219/219[0] +hocc: Searching for remergeable states: 219/219 hocc: Remerging 219 LR(1) states hocc: Reindexing 45 LR(1) states hocc: 0 unresolvable conflicts diff --git a/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected b/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected index a141cf104..ad539ed17 100644 --- a/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected +++ b/bootstrap/test/hocc/IelrRemergeable_aielr_myes.expected @@ -12,7 +12,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/58 hocc: Generating 58 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+..+.+.+..+.+.+.++ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/13[25] 13/13[0] +hocc: Searching for remergeable states: 13/13 hocc: Remerging 13 LR(1) states hocc: Reindexing 45 LR(1) states hocc: 0 unresolvable conflicts diff --git a/bootstrap/test/hocc/MulAddParenPrec.expected b/bootstrap/test/hocc/MulAddParenPrec.expected index 140110d4b..4db5acbad 100644 --- a/bootstrap/test/hocc/MulAddParenPrec.expected +++ b/bootstrap/test/hocc/MulAddParenPrec.expected @@ -6,7 +6,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/25 hocc: Generating 25 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+..++.+.+.+ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/10[20] 10/10[0] +hocc: Searching for remergeable states: 10/10 hocc: Remerging 10 LR(1) states hocc: Reindexing 15 LR(1) states hocc: 0 unresolvable conflicts diff --git a/bootstrap/test/hocc/PSEUDO_END_conflict.expected b/bootstrap/test/hocc/PSEUDO_END_conflict.expected index 7eebc6823..6d53aab84 100644 --- a/bootstrap/test/hocc/PSEUDO_END_conflict.expected +++ b/bootstrap/test/hocc/PSEUDO_END_conflict.expected @@ -6,7 +6,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/12 hocc: Generating 12 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+.+++ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] +hocc: Searching for remergeable states: 0/0 hocc: 0 remergeable states hocc: 4 unresolvable conflicts in 4 states (4 ⊥, 0 shift-reduce, 0 reduce-reduce) hocc: Generating text report diff --git a/bootstrap/test/hocc/TokenCoverage.expected b/bootstrap/test/hocc/TokenCoverage.expected index 481ebd293..1b2ff4f80 100644 --- a/bootstrap/test/hocc/TokenCoverage.expected +++ b/bootstrap/test/hocc/TokenCoverage.expected @@ -7,6 +7,6 @@ hocc: Generating LR(1) item set closures (workq/total) 0/6 hocc: Generating 6 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])++.+ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] +hocc: Searching for remergeable states: 0/0 hocc: 0 remergeable states hocc: 0 unresolvable conflicts diff --git a/bootstrap/test/hocc/Unused.expected b/bootstrap/test/hocc/Unused.expected index 73c203c5d..d78794bfc 100644 --- a/bootstrap/test/hocc/Unused.expected +++ b/bootstrap/test/hocc/Unused.expected @@ -6,7 +6,7 @@ hocc: Generating LR(1) item set closures (workq/total) 0/5 hocc: Generating 5 LR(1) states hocc: Tracing automaton (.+=actions[+gotos])+.+.+ hocc: 0 unreachable states -hocc: Searching for remergeable state subgraphs (mergeable/max[worklst]) 0/0[0] +hocc: Searching for remergeable states: 0/0 hocc: 0 remergeable states hocc: 1 unresolvable conflict in 1 state (1 ⊥, 0 shift-reduce, 0 reduce-reduce) hocc: 2 unused precedences: