diff options
| author | Jedidiah Barber <contact@jedbarber.id.au> | 2026-02-06 17:19:26 +1300 |
|---|---|---|
| committer | Jedidiah Barber <contact@jedbarber.id.au> | 2026-02-06 17:19:26 +1300 |
| commit | 6bced91bd28f860d830dfda921ee5056ec93f48c (patch) | |
| tree | a91432226dbf11ed944cfe50507e0b7a03870bd2 /src/kompsos-pretty_print.adb | |
| parent | 9b964acdb0cc36d09193861b8f7d33aea248ee46 (diff) | |
Evaluation algorithm changed to inverted interleaved depth first search
Diffstat (limited to 'src/kompsos-pretty_print.adb')
| -rw-r--r-- | src/kompsos-pretty_print.adb | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/kompsos-pretty_print.adb b/src/kompsos-pretty_print.adb index 2befe6d..328f467 100644 --- a/src/kompsos-pretty_print.adb +++ b/src/kompsos-pretty_print.adb @@ -112,21 +112,14 @@ package body Kompsos.Pretty_Print is is Result : SU.Unbounded_String; begin - if Item.Ctrl.Actual = null then + if Item.Binds.Is_Empty then SU.Append (Result, Latin.HT & "N/A" & Latin.LF); else - declare - Marker : State_Component_Access := Item.Ctrl.Actual; - begin - while Marker /= null loop - for Index in Valid_Count range Valid_Count'First .. Marker.Valid loop - SU.Append (Result, Latin.HT & - Image (Marker.Data (Index).Key) & " => " & - Image (Marker.Data (Index).Value) & Latin.LF); - end loop; - Marker := Marker.Next.Ctrl.Actual; - end loop; - end; + for Bind of Item.Binds loop + SU.Append (Result, Latin.HT & + Image (Bind.Key) & " => " & + Image (Bind.Value) & Latin.LF); + end loop; end if; return SU.To_String (Result); end Image; @@ -224,15 +217,6 @@ package body Kompsos.Pretty_Print is "n" & Image (Nodes.Element (This.Actual)) & " -> " & "n" & Image (Nodes.Element (This.Actual.Con_Goal.Actual)) & ";" & Latin.LF); end if; - when Recurse_Node => - SU.Append (Result, Latin.HT & - "n" & Image (Nodes.Element (This.Actual)) & " [label=""recurse""];" & Latin.LF); - Do_Structure_DOT (This.Actual.Rec_Goal, Nodes, Next, Result); - if Nodes.Contains (This.Actual.Rec_Goal.Actual) then - SU.Append (Result, Latin.HT & - "n" & Image (Nodes.Element (This.Actual)) & " -> " & - "n" & Image (Nodes.Element (This.Actual.Rec_Goal.Actual)) & ";" & Latin.LF); - end if; end case; end Do_Structure_DOT; |
