forked from google-deepmind/deepmind-research
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.rkt
executable file
·46 lines (39 loc) · 1.45 KB
/
main.rkt
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
46
#!/usr/bin/env racket
#lang racket/base
;**************************************************************************************;
;**** Satore ****;
;**************************************************************************************;
;;; Try:
;;; racket -l- satore --help
;;; to see all the available flags.
(module+ main
(require global
racket/file
racket/port
satore/misc
satore/rewrite-tree
satore/saturation
satore/unification)
(define-global *prog* #false
'("Data file containing a single TPTP program."
"If not provided, reads from the input port.")
file-exists?
values
'("-p"))
;; If -p is not specified, reads from current-input-port
(void (globals->command-line #:program "satore"))
;; No validation here yet.
(define program
(if (*prog*)
(file->string (*prog*))
(port->string)))
(iterative-saturation
(λ (#:clauses input-clauses #:cpu-limit cpu-limit #:rwtree-in rwtree-in #:rwtree-out rwtree-out)
(saturation input-clauses
#:cpu-limit cpu-limit
#:rwtree rwtree-in
#:rwtree-out rwtree-out))
#:tptp-program program
#:rwtree-in (make-rewrite-tree #:atom<=> (get-atom<=>)
#:dynamic-ok? (*dynamic-rules?*)
#:rules-file (*input-rules*))))