summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-11-18 16:57:17 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-11-18 16:57:17 +1300
commit5c077a81964096daf997949da695500c8ab4a7d3 (patch)
tree1c86b2be3379d34bbeccc74cddd94f7c6f7281c4
parentfc4bc559d3f1ebf056c4afb8280a1ec8f4d90bc2 (diff)
Removed Buffer variant Generator
-rw-r--r--src/kompsos.adb18
-rw-r--r--src/kompsos.ads12
2 files changed, 3 insertions, 27 deletions
diff --git a/src/kompsos.adb b/src/kompsos.adb
index d0005cb..1370f37 100644
--- a/src/kompsos.adb
+++ b/src/kompsos.adb
@@ -320,26 +320,15 @@ package body Kompsos is
end Roll_Unify_Gen;
- procedure Roll_Buffer_Gen
- (This : in out World) is
- begin
- Ptr (This.Engine.Buff_World).Rollover;
- This.Possibles.Append (Ptr (This.Engine.Buff_World).Possibles);
- if Ptr (This.Engine.Buff_World).Engine.Kind = No_Gen then
- This.Engine := (Kind => No_Gen);
- else
- Ptr (This.Engine.Buff_World).Possibles.Clear;
- end if;
- end Roll_Buffer_Gen;
-
-
procedure Roll_Disjunct_Gen
(This : in out World) is
begin
Ptr (This.Engine.Dis_World1).Rollover;
This.Possibles.Append (Ptr (This.Engine.Dis_World1).Possibles);
if Ptr (This.Engine.Dis_World1).Engine.Kind = No_Gen then
- This.Engine := (Kind => Buffer_Gen, Buff_World => This.Engine.Dis_World2);
+ Ptr (This.Engine.Dis_World2).Rollover; -- why is this line needed?
+ This.Possibles.Append (Ptr (This.Engine.Dis_World2).Possibles);
+ This.Engine := World (This.Engine.Dis_World2.Element).Engine;
else
Ptr (This.Engine.Dis_World1).Possibles.Clear;
Swap (This.Engine.Dis_World1, This.Engine.Dis_World2);
@@ -398,7 +387,6 @@ package body Kompsos is
when No_Gen => null;
when Fresh_Gen => This.Roll_Fresh_Gen;
when Unify_Gen => This.Roll_Unify_Gen;
- when Buffer_Gen => This.Roll_Buffer_Gen;
when Disjunct_Gen => This.Roll_Disjunct_Gen;
when Conjunct_Gen => This.Roll_Conjunct_Gen;
when Recurse_Gen => This.Roll_Recurse_Gen;
diff --git a/src/kompsos.ads b/src/kompsos.ads
index 7b79d60..89ea88b 100644
--- a/src/kompsos.ads
+++ b/src/kompsos.ads
@@ -525,15 +525,6 @@ private
return World_Holders.Holder
with Inline;
- function Ptr
- (This : in out World_Holders.Holder)
- return World_Access
- with Inline;
-
- procedure Swap
- (Left, Right : in out World_Holders.Holder)
- with Inline;
-
type Lazy_Kind is (Zero_Arg, One_Arg, Many_Arg);
type Lazy_Data (Kind : Lazy_Kind) is record
@@ -555,7 +546,6 @@ private
(No_Gen,
Fresh_Gen,
Unify_Gen,
- Buffer_Gen,
Disjunct_Gen,
Conjunct_Gen,
Recurse_Gen);
@@ -572,8 +562,6 @@ private
Uni_World : World_Holders.Holder;
Uni_Term1 : Term;
Uni_Term2 : Term;
- when Buffer_Gen =>
- Buff_World : World_Holders.Holder;
when Disjunct_Gen =>
Dis_World1 : World_Holders.Holder;
Dis_World2 : World_Holders.Holder;