diff options
| author | Jedidiah Barber <contact@jedbarber.id.au> | 2026-01-19 15:21:43 +1300 |
|---|---|---|
| committer | Jedidiah Barber <contact@jedbarber.id.au> | 2026-01-19 15:21:43 +1300 |
| commit | f6cc00c7e53ea5bc6fa19177bdb98ddcf25440d0 (patch) | |
| tree | 6b0c302bc48801e983bca6066e1915611ca4673a /src/kompsos.ads | |
| parent | 0c3e440a6eaf45e83654e9d8f5471e88a2eacf77 (diff) | |
State now uses a Vector instead of a Map
Diffstat (limited to 'src/kompsos.ads')
| -rw-r--r-- | src/kompsos.ads | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/kompsos.ads b/src/kompsos.ads index 9ab7994..9a00251 100644 --- a/src/kompsos.ads +++ b/src/kompsos.ads @@ -463,15 +463,26 @@ private - package Binding_Maps is new Ada.Containers.Ordered_Maps - (Key_Type => Variable, - Element_Type => Term); + type Binding is record + Key : Variable; + Elem : Term; + end record; + + package Binding_Vectors is new Ada.Containers.Vectors + (Index_Type => Long_Positive, + Element_Type => Binding); type State is record - Actual : Binding_Maps.Map; + Actual : Binding_Vectors.Vector; end record; - Empty_State : constant State := (Actual => Binding_Maps.Empty_Map); + function Lookup + (This : in State; + Key : in Variable; + Value : out Term'Class) + return Boolean; + + Empty_State : constant State := (Actual => Binding_Vectors.Empty_Vector); |
