aboutsummaryrefslogtreecommitdiff
path: root/src/kompsos.ads
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2026-01-17 15:25:17 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2026-01-17 15:25:17 +1300
commit8508d8b77106a2586b425df687ddb401cbcf779f (patch)
treec989d176d68227c34638bf48259bb634b820d607 /src/kompsos.ads
parentaa31ebe381d555725cdae2abafa93bac976f1c7e (diff)
Removed free logic Variable tracking in States, removed Fresh_Node and Static_Node from Goal graphs
Diffstat (limited to 'src/kompsos.ads')
-rw-r--r--src/kompsos.ads32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/kompsos.ads b/src/kompsos.ads
index 19cfeb8..32cfc24 100644
--- a/src/kompsos.ads
+++ b/src/kompsos.ads
@@ -415,7 +415,6 @@ private
-
type Term_Component;
type Term_Component_Access is access Term_Component;
@@ -464,28 +463,15 @@ private
-
- package Variable_Vectors is new Ada.Containers.Vectors
- (Index_Type => Long_Positive,
- Element_Type => Variable);
-
package Binding_Maps is new Ada.Containers.Ordered_Maps
(Key_Type => Variable,
Element_Type => Term);
type State is record
- LVars : Variable_Vectors.Vector;
- Subst : Binding_Maps.Map;
+ Actual : Binding_Maps.Map;
end record;
- package State_Vectors is new Ada.Containers.Vectors
- (Index_Type => Long_Positive,
- Element_Type => State);
-
- Empty_State : constant State :=
- (LVars => Variable_Vectors.Empty_Vector,
- Subst => Binding_Maps.Empty_Map);
-
+ Empty_State : constant State := (Actual => Binding_Maps.Empty_Map);
@@ -515,9 +501,7 @@ private
package Lazy_Holders is new Ada.Containers.Indefinite_Holders (Lazy_Data);
type Node_Kind is
- (Static_Node,
- Fresh_Node,
- Unify_Node,
+ (Unify_Node,
Disjunct_Node,
Conjunct_Node,
Recurse_Node);
@@ -525,11 +509,6 @@ private
type Goal_Component (Kind : Node_Kind) is limited record
Counter : Natural;
case Kind is
- when Static_Node =>
- null;
- when Fresh_Node =>
- Frs_Goal : aliased Goal;
- Frs_Var : Variable;
when Unify_Node =>
Uni_Goal : aliased Goal;
Uni_Term1 : Term;
@@ -558,10 +537,7 @@ private
overriding procedure Finalize
(This : in out Goal);
- Empty_Goal : constant Goal := (Ada.Finalization.Controlled with
- Actual => new Goal_Component'(
- (Kind => Static_Node,
- Counter => 1)));
+ Empty_Goal : constant Goal := (Ada.Finalization.Controlled with Actual => null);
end Kompsos;