use drracket:default-filters and drracket:default-extension in datalog

original commit: 91e887300f72b8bd366030a429443fe51a4fba20
This commit is contained in:
Robby Findler 2014-05-26 19:37:47 -05:00
commit 75eb420c6f
3 changed files with 16 additions and 1 deletions

View File

@ -8,6 +8,8 @@
#:info (lambda (key defval default)
; XXX Should have different comment character key
(case key
[(drracket:default-filters) '(["Datalog Sources" "*.dl"])]
[(drracket:default-extension) "dl"]
[(drracket:submit-predicate)
(dynamic-require 'datalog/tool/submit 'repl-submit?)]
[(color-lexer)

View File

@ -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)

View File

@ -76,6 +76,11 @@
=>
(list (hasheq 'X 2))
(datalog parent
(? (add1 X :- 2)))
=>
(list)
(datalog parent
(? (#,(λ (x) (+ x 1)) 1 :- X)))
=>