aboutsummaryrefslogtreecommitdiff
path: root/test/ab.adb
blob: 314b0dcd3624619044ad1c9697193aa3139a87b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


--  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 InKomp is new Kompsos (Integer);
    use InKomp;

    package Printer is new InKomp.Pretty_Print (Integer'Image);


    Relation : Goal := Empty_Goal;

    A, B : Term;

begin

    TIO.Put_Line ("Test program to output a-and-b example from 2013 microKanren paper.");

    TIO.New_Line;

    A := Relation.Fresh;
    Relation.Unify (A, 7);
    B := Relation.Fresh;
    Relation := Disjunct (Relation.Unify (B, 5), Relation.Unify (B, 6));

    TIO.Put_Line (Printer.Image (Relation));

end AB;