summaryrefslogtreecommitdiff
path: root/app/Main.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2022-10-14 21:36:08 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2022-10-14 21:36:08 +0200
commiteb67b6b665f5f3afefd39799fa6f579dc65d1565 (patch)
treed2afa43c3a0b7e329e789fef5b79e85d54e9a9ae /app/Main.hs
parent3bfa127cbccbc77bb1b993153d6a6a2db2ec3ee4 (diff)
downloadprlg-eb67b6b665f5f3afefd39799fa6f579dc65d1565.tar.gz
prlg-eb67b6b665f5f3afefd39799fa6f579dc65d1565.tar.bz2
backtracking
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs23
1 files changed, 22 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 9d8fc29..be4febe 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -2,5 +2,26 @@ module Main where
import Interpreter
+import qualified Data.Map as M
+
main :: IO ()
-main = putStrLn "Hello, Prolog!"
+main =
+ print $
+ prove [Goal, U (Struct (1, 2)), U (Atom 1), U (Atom 2), LastCall] $
+ M.fromList
+ [ ( (1, 2)
+ , [ [U (Atom 333), U (Atom 444), NoGoal]
+ , [ U (Atom 1)
+ , U (Atom 2)
+ , Goal
+ , U (Struct (2, 0))
+ , Call
+ , Goal
+ , U (Struct (1, 2))
+ , U (Atom 333)
+ , U (Atom 444)
+ , LastCall
+ ]
+ ])
+ , ((2, 0), [[NoGoal]])
+ ]