diff options
Diffstat (limited to 'test/ab.adb')
| -rw-r--r-- | test/ab.adb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/ab.adb b/test/ab.adb new file mode 100644 index 0000000..a371f2f --- /dev/null +++ b/test/ab.adb @@ -0,0 +1,44 @@ + + +-- 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 AB is + + package TIO renames Ada.Text_IO; + + + package SKomp is new Kompsos (Integer); + use SKomp; + + package SPrin is new SKomp.Pretty_Print (Integer'Image); + use SPrin; + + Verse : World := Empty_World; + Ref : Variable; + +begin + + TIO.Put_Line ("Test program to output a-and-b example from 2013 microKanren paper."); + + TIO.New_Line; + + Ref := Verse.Fresh ("a"); + Verse.Unify (Ref, 7); + Ref := Verse.Fresh ("b"); + Verse := Disjunct (Verse.Unify (Ref, 5), Verse.Unify (Ref, 6)); + + TIO.Put_Line (Image (Verse)); + +end AB; + + |
