aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2026-01-17 00:12:45 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2026-01-17 00:12:45 +1300
commitaa31ebe381d555725cdae2abafa93bac976f1c7e (patch)
tree3f434726e6719fd3b07e01aa16262b132a19e978 /test
parent616f41d15009b1133cbdc14bace6ab84f1325921 (diff)
Recurse fixed, caching functions consolidated
Diffstat (limited to 'test')
-rw-r--r--test/repeat.adb46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/repeat.adb b/test/repeat.adb
new file mode 100644
index 0000000..0eec066
--- /dev/null
+++ b/test/repeat.adb
@@ -0,0 +1,46 @@
+
+
+-- Programmed by Jedidiah Barber
+-- Licensed under the Sunset License v1.0
+
+-- See license.txt for further details
+
+
+with
+
+ Ada.Text_IO,
+ Kompsos.Pretty_Print;
+
+
+procedure Repeat is
+
+ package TIO renames Ada.Text_IO;
+
+
+ package InKomp is new Kompsos (Integer);
+ use InKomp;
+
+ package Printer is new InKomp.Pretty_Print (Integer'Image);
+
+
+ Relation : Goal := Empty_Goal;
+
+ A : constant Term := Relation.Fresh;
+ B : constant Term := Relation.Fresh;
+
+begin
+
+ TIO.Put_Line ("Test program to check whether Recurse is working properly.");
+ TIO.Put_Line ("There should be 5 results, all identical.");
+
+ TIO.New_Line;
+
+ Relation := Disjunct (Relation.Unify (A, 1), Relation.Unify (B, 2));
+ Relation.Unify (A, 3);
+ Relation.Recurse;
+
+ TIO.Put_Line (Printer.Image (Relation.Run (5)));
+
+end Repeat;
+
+