forked from emina/rosette
-
Notifications
You must be signed in to change notification settings - Fork 0
/
safe.rkt
36 lines (30 loc) · 1.06 KB
/
safe.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
#lang racket
(require "solver/solver.rkt" "solver/smt/z3.rkt"
"solver/solution.rkt"
(only-in "solver/smt/server.rkt" output-smt)
"base/base.rkt"
"query/query.rkt"
(for-syntax racket)
(prefix-in racket/ (only-in racket append append-map map car)))
(define (exported mod)
(let*-values ([(vars stx) (module->exports mod)]
[(all) (racket/append (racket/append-map cdr vars) (racket/append-map cdr stx))])
(racket/map racket/car all)))
(define (rosette)
(racket/append (exported 'rosette/solver/solver)
(exported 'rosette/solver/solution)
(exported 'rosette/base/base)
(exported 'rosette/query/query)))
(define (clear-state!)
(current-bitwidth #f)
(clear-vc!)
(clear-terms!)
(current-solver (z3)))
(provide
(except-out (all-from-out "solver/solver.rkt") prop:solver-constructor solver-constructor)
(all-from-out
"solver/solution.rkt"
"base/base.rkt"
"query/query.rkt")
(for-syntax (all-from-out racket))
rosette clear-state! output-smt)