Clarify Datalog/Racket interaction re Matthias
original commit: 2846764a93d3317b0934c61d078f54baf3a18599
This commit is contained in:
parent
7b98f39e5a
commit
f66ee21a2f
|
@ -61,6 +61,8 @@ The Datalog database can be directly used by Racket programs through this API.
|
|||
|
||||
(datalog family
|
||||
(? (add1 1 :- X)))
|
||||
(datalog family
|
||||
(? (add1 X :- 2)))
|
||||
(datalog family
|
||||
(? (#,(λ (x) (+ x 1)) 1 :- X)))]
|
||||
|
||||
|
@ -107,7 +109,13 @@ for a variable symbol, or @RACKET[#,expr] where @racket[expr]
|
|||
evaluates to a constant datum. Bound identifiers in terms are treated
|
||||
as the datum they are bound to.
|
||||
|
||||
External queries invalidate Datalog's guaranteed termination. For example, this program does not terminate:
|
||||
External queries fail if any logic variable is not fully resolved to a
|
||||
datum on the Datalog side. In other words, unbound logic variables
|
||||
never flow to Racket.
|
||||
|
||||
External queries invalidate Datalog's guaranteed termination. For
|
||||
example, this program does not terminate:
|
||||
|
||||
@racketblock[
|
||||
(datalog (make-theory)
|
||||
(! (:- (loop X)
|
||||
|
|
|
@ -76,6 +76,11 @@
|
|||
=>
|
||||
(list (hasheq 'X 2))
|
||||
|
||||
(datalog parent
|
||||
(? (add1 X :- 2)))
|
||||
=>
|
||||
(list)
|
||||
|
||||
(datalog parent
|
||||
(? (#,(λ (x) (+ x 1)) 1 :- X)))
|
||||
=>
|
||||
|
|
Loading…
Reference in New Issue
Block a user