From 8508d8b77106a2586b425df687ddb401cbcf779f Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sat, 17 Jan 2026 15:25:17 +1300 Subject: Removed free logic Variable tracking in States, removed Fresh_Node and Static_Node from Goal graphs --- src/kompsos.ads | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'src/kompsos.ads') 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; -- cgit