A long overdue scan to eliminate files without terminating newlines.

(DrRacket should really do that.)

original commit: 40124a0619da5e187d95aeb1dde237f05d6f9c6b
This commit is contained in:
Eli Barzilay 2011-06-28 02:01:41 -04:00
parent 6f10b320ac
commit 6fd31b3169
42 changed files with 44 additions and 44 deletions

View File

@ -40,4 +40,4 @@
[print-questions ((listof question/c) . -> . void)]
[eval-program (program/c . -> . void)]
[eval-top-level-statement (statement/c . -> . void)]
[eval-statement (statement/c . -> . (or/c void (listof question/c)))])
[eval-statement (statement/c . -> . (or/c void (listof question/c)))])

View File

@ -1,3 +1,3 @@
#lang setup/infotab
(define scribblings '(["scribblings/datalog.scrbl" (multi-page) (language)]))
(define compile-omit-paths '("tests"))
(define compile-omit-paths '("tests"))

View File

@ -7,4 +7,4 @@
'(#(datalog/lang/configure-runtime configure #f))]
[else
default])))
(provide get-info)
(provide get-info)

View File

@ -19,4 +19,4 @@
(define (this-read-syntax [src #f] [in (current-input-port)])
(compile-program
(parameterize ([current-source-name src])
(parse-program in)))))
(parse-program in)))))

View File

@ -3,4 +3,4 @@
"stx.rkt")
(provide make-theory
theory/c
(all-from-out "stx.rkt"))
(all-from-out "stx.rkt"))

View File

@ -79,4 +79,4 @@
[parse-literal (input-port? . -> . literal?)]
[parse-clause (input-port? . -> . clause?)]
[parse-statement (input-port? . -> . statement/c)]
[parse-program (input-port? . -> . program/c)])
[parse-program (input-port? . -> . program/c)])

View File

@ -88,4 +88,4 @@
[format-retraction (retraction? . -> . doc?)]
[format-query (query? . -> . doc?)]
[format-statement (statement/c . -> . doc?)]
[format-program (program/c . -> . doc?)])
[format-program (program/c . -> . doc?)])

View File

@ -14,4 +14,4 @@
[env/c contract?]
[empty-env (-> env/c)]
[lookup ((env/c symbol?) (term/c) . ->* . (or/c false/c term/c))]
[extend (env/c symbol? term/c . -> . void)])
[extend (env/c symbol? term/c . -> . void)])

View File

@ -33,7 +33,7 @@
[#\" (token-STRING (list->string (get-string-token input-port)))]
[#\( (token-LPAREN)]
[#\, (token-COMMA)]
[#\) (token-RPAREN)]
[#\) (token-RPAREN)]
[#\. (token-DOT)]
[#\~ (token-TILDE)]
[#\? (token-QMARK)]
@ -41,6 +41,6 @@
["!=" (token-NEQUAL)]
[(eof) (token-EOF)]))
(provide dtokens dpunct
(provide dtokens dpunct
line-break id-chars variable-re identifier-re comment-re
dlexer)
dlexer)

View File

@ -17,4 +17,4 @@
(define dot ".")
(define (nest n d) d)
(define char string)
(define doc? string?)
(define doc? string?)

View File

@ -72,4 +72,4 @@
[subst-term (env/c term/c . -> . term/c)]
[subst-clause (env/c clause? . -> . clause?)]
[rename-clause (clause? . -> . clause?)]
[rename-question (question/c . -> . question/c)])
[rename-question (question/c . -> . question/c)])

View File

@ -56,4 +56,4 @@
(provide/contract
[unify (question/c question/c . -> . (or/c false/c env/c))]
[unify-terms (env/c (listof term/c) (listof term/c) . -> . (or/c false/c env/c))]
[unify-term (env/c term/c term/c . -> . (or/c false/c env/c))])
[unify-term (env/c term/c term/c . -> . (or/c false/c env/c))])

View File

@ -102,4 +102,4 @@
[make-literal-tbl (-> literal-tbl/c)]
[literal-tbl-find (literal-tbl/c question/c . -> . (or/c false/c any/c))]
[literal-tbl-replace! (literal-tbl/c question/c any/c . -> . void)]
[mem-literal (question/c (listof question/c) . -> . boolean?)])
[mem-literal (question/c (listof question/c) . -> . boolean?)])

View File

@ -149,4 +149,4 @@
[make-theory (-> theory/c)]
[assume! (theory/c safe-clause? . -> . void)]
[retract! (theory/c clause? . -> . void)]
[prove (theory/c question/c . -> . (listof question/c))])
[prove (theory/c question/c . -> . (listof question/c))])

View File

@ -176,4 +176,4 @@ Another important reference is
@link["http://portal.acm.org/citation.cfm?id=227597"]{Tabled Evaluation with Delaying for General Logic Programs} by W. Chen and D. S. Warren.
Datalog is described in
@link["http://doi.ieeecomputersociety.org/10.1109/69.43410"]{What You Always Wanted to Know About Datalog (And Never Dared to Ask)}
by Stefano Ceri, Georg Gottlob, and Letizia Tanca.
by Stefano Ceri, Georg Gottlob, and Letizia Tanca.

View File

@ -83,4 +83,4 @@ External queries invalidate Datalog's guaranteed termination. For example, this
(add1 X :- Z)
(loop Z)))
(? (loop 1)))
]
]

View File

@ -47,4 +47,4 @@
(except-out (all-from-out racket/base)
#%top-interaction
#%module-begin)
! ~ ? :-)
! ~ ? :-)

View File

@ -1,2 +1,2 @@
(module reader syntax/module-reader
#:language 'datalog/sexp/lang)
#:language 'datalog/sexp/lang)

View File

@ -51,4 +51,4 @@
delimiter-stack
closed?)])))))
(provide repl-submit?)
(provide repl-submit?)

View File

@ -33,4 +33,4 @@
[(:or "!=" #\= #\? #\~ #\. #\, ":-") (syn-val lexeme 'parenthesis #f start-pos end-pos)]
[(eof) (syn-val lexeme 'eof #f start-pos end-pos)]
[#\" ((colorize-string start-pos) input-port)]
[any-char (syn-val lexeme 'error #f start-pos end-pos)]))
[any-char (syn-val lexeme 'error #f start-pos end-pos)]))

View File

@ -77,4 +77,4 @@
(test-false "lit" (clause-equal? (make-clause #f (make-literal #f 'lit1 empty) (list (make-literal #f 'lit1 empty)))
(make-clause #f (make-literal #f 'lit1 empty) empty)))
(test-false "lit" (clause-equal? (make-clause #f (make-literal #f 'lit1 empty) (list (make-literal #f 'lit1 empty)))
(make-clause #f (make-literal #f 'lit1 empty) (list (make-literal #f 'lit2 empty))))))))
(make-clause #f (make-literal #f 'lit1 empty) (list (make-literal #f 'lit2 empty))))))))

View File

@ -35,4 +35,4 @@
"eval"
(test-examples (build-path here "examples"))
(test-examples (build-path here "paren-examples"))))
(test-examples (build-path here "paren-examples"))))

View File

@ -9,4 +9,4 @@ ancestor(A, B) :-
parent(john, douglas).
parent(bob, john).
parent(ebbon, bob).
ancestor(A, B)?
ancestor(A, B)?

View File

@ -1 +1 @@
#lang datalog
#lang datalog

View File

@ -5,4 +5,4 @@ sym(b).
sym(c).
perm(X,Y) :- sym(X), sym(Y), X != Y.
perm(X,Y)?
perm(X,Y)?

View File

@ -42,4 +42,4 @@
(test-case "Racket Interop"
(parameterize ([current-output-port stdout])
(dynamic-require racket-mod #f)))))
(dynamic-require racket-mod #f)))))

View File

@ -7,4 +7,4 @@
(? (add2 1 3))
(? (add1 X :- 1))
(? (add1 X :- 1))

View File

@ -12,4 +12,4 @@
(! (:- (path X Y)
(path X Z)
(edge Z Y)))
(? (path X Y))
(? (path X Y))

View File

@ -1 +1 @@
#lang datalog/sexp
#lang datalog/sexp

View File

@ -1,4 +1,4 @@
#lang datalog/sexp
(require racket/math)
(? (sqr 4 :- X))
(? (sqr 4 :- X))

View File

@ -9,4 +9,4 @@
(! (:- (path X Y)
(path X Z)
(edge Z Y)))
(? (path X Y))
(? (path X Y))

View File

@ -8,4 +8,4 @@
(sym Y)
(!= X Y)))
(? (perm X Y))
(? (perm X Y))

View File

@ -1,3 +1,3 @@
#lang datalog/sexp
(! true)
(? true)
(? true)

View File

@ -51,4 +51,4 @@
"statement"
(test-not-false "assertion" (assertion? (parse-statement (open-input-string "parent(john, douglas)."))))
(test-not-false "retraction" (retraction? (parse-statement (open-input-string "parent(john, douglas)~"))))
(test-not-false "query" (query? (parse-statement (open-input-string "parent(john, douglas)?")))))))
(test-not-false "query" (query? (parse-statement (open-input-string "parent(john, douglas)?")))))))

View File

@ -46,4 +46,4 @@ parent(bob, john)~
parent(A, B)?
ancestor(A, B)?
END
)))
)))

View File

@ -19,4 +19,4 @@
(lookup (extend (extend (empty-env) 'v1 t1)
'v1 t1)
'v1)
t1)))
t1)))

View File

@ -35,4 +35,4 @@
(test-lexer " =" 'EQUAL #f)
(test-lexer "% 12453\n=" 'EQUAL #f)
))
))

View File

@ -111,4 +111,4 @@
(first
(clause-body
(rename-clause (make-clause #f (make-literal #f 'lit (list (make-constant #f 'v1)))
(list (make-literal #f 'lit (list (make-variable #f 'v1)))))))))))))))
(list (make-literal #f 'lit (list (make-variable #f 'v1)))))))))))))))

View File

@ -51,4 +51,4 @@
(test-false "lit/lit" (unify (make-literal #f 'lit1 empty) (make-literal #f 'lit2 empty)))
(test-equal? "con/con" (unify (make-literal #f 'lit1 (list (make-constant #f 'k1)))
(make-literal #f 'lit1 (list (make-constant #f 'k1))))
(empty-env)))))
(empty-env)))))

View File

@ -56,4 +56,4 @@
(make-literal #f 'lit1 (list (make-variable #f 'v1)))))
(test-not-false "var (dif name)" (literal-hash-equal? (make-literal #f 'lit1 (list (make-variable #f 'v2)))
(make-literal #f 'lit1 (list (make-variable #f 'v1)))))))))
(make-literal #f 'lit1 (list (make-variable #f 'v1)))))))))

View File

@ -81,4 +81,4 @@
(hasheq 'A 'ebbon 'B 'john)
(hasheq 'A 'ebbon 'B 'douglas))
)
)

View File

@ -35,4 +35,4 @@
(test-color "\"fo\\\"o\"" 'string)
(test-color "\"fo\no\"" 'string)
(test-color "\"foo" 'error)
(test-color ":" 'error)))
(test-color ":" 'error)))