mirror of
https://github.com/google-deepmind/deepmind-research.git
synced 2026-05-10 05:17:46 +08:00
bf886c22bf
PiperOrigin-RevId: 360877125
47 lines
1.4 KiB
Racket
Executable File
47 lines
1.4 KiB
Racket
Executable File
#!/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*))))
|