-- Programmed by Jedidiah Barber -- Licensed under the Sunset License v1.0 -- See license.txt for further details private with Ada.Containers.Ordered_Maps, Ada.Containers.Vectors, Ada.Finalization; generic Source : in World; package Kompsos.Collector is State_Not_Found_Error : exception; function Has_Next return Boolean; function Next return State; function Next (Default : in State) return State; procedure Reset; private type World_Access is access all World; type Constant_World_Access is access constant World; function "<" (Left, Right : in World_Component_Access) return Boolean; type Eval_Kind is (Unify_Data, Disjunct_Data, Conjunct_Data, Recurse_Data); type Eval_Data (Kind : Eval_Kind := Unify_Data) is record case Kind is when Unify_Data => Uni_Offset : Long_Natural := 0; when Disjunct_Data => Dis_Flag : Boolean := True; Dis_Next1 : Long_Positive := 1; Dis_Next2 : Long_Positive := 1; Dis_Gone1 : Boolean := False; Dis_Gone2 : Boolean := False; when Conjunct_Data => Con_Part : World_Access := null; Con_From : Long_Positive := 1; Con_Next : Long_Positive := 1; Con_Gone : Boolean := False; when Recurse_Data => Rec_Next : Long_Positive := 1; Rec_Gone : Boolean := False; end case; end record; package Eval_Maps is new Ada.Containers.Ordered_Maps (Key_Type => World_Component_Access, Element_Type => Eval_Data); type Managed_Map is new Ada.Finalization.Controlled with record Actual : Eval_Maps.Map; end record; overriding procedure Finalize (This : in out Managed_Map); package Cache_Maps is new Ada.Containers.Ordered_Maps (Key_Type => World_Component_Access, Element_Type => State_Vectors.Vector, "=" => State_Vectors."="); end Kompsos.Collector;