Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype SMT backend #273

Merged
merged 167 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
f5958cf
add: working on contract for collector
tnelson Jun 18, 2024
88127d4
add: template w/ Karim
tnelson Jun 18, 2024
9d1fcc2
add: Easy way to find Java Temp folder
tnelson Jun 19, 2024
ec18c92
change: send-to-kodkod -> send-to-solver
tnelson Jun 20, 2024
1f8de89
change: factor out pardinus backend
tnelson Jun 20, 2024
e38ad72
Merge branch 'dev' into feat_smt
tnelson Jun 20, 2024
5e6ed36
remove: experiment skeleton
tnelson Jun 20, 2024
d2ecaa0
Converted to format strings
k-mouline Jun 20, 2024
7fe890e
fix: ->
tnelson Jun 20, 2024
b82a887
first changes to parsing
k-mouline Jun 21, 2024
19da701
add: join builder, no preservation of loc
tnelson Jun 21, 2024
dfc9dbc
preserve syntax loc
tnelson Jun 21, 2024
03569ec
updated interpret calls
k-mouline Jun 24, 2024
8ec583b
examples added
k-mouline Jun 24, 2024
55e3c5a
pair with Karim, demo of match
tnelson Jun 24, 2024
c3aed57
identity parsing
k-mouline Jun 24, 2024
47ae4cf
NNF parser
k-mouline Jun 24, 2024
87ea87f
Draft of testing; needs to be validated
bisheshank Jun 25, 2024
68e42ad
Substitutor push
k-mouline Jun 25, 2024
f61ba63
updated testing; needs review
bisheshank Jun 25, 2024
17dd94c
updating substitutor
k-mouline Jun 26, 2024
7d83d9c
add: programming together in NNF/NNF testing, macros
tnelson Jun 26, 2024
5062063
quantifiers and decls fixed
k-mouline Jun 26, 2024
bf430e4
nnf testing updated; need to fix sig-rel contract vio
bisheshank Jun 26, 2024
d4e8a69
small sub tests and nnf conversion modified
k-mouline Jun 26, 2024
2c9de2e
verbosity added and sub tests
k-mouline Jun 26, 2024
23f820e
nnf-testing suite rewritten
bisheshank Jun 26, 2024
8d69be9
nff-test updated with comparision tests
bisheshank Jun 26, 2024
44d0280
refactor: one-sided integration prototype for cvc5
tnelson Jun 27, 2024
f1e5100
skolemization first implementation
k-mouline Jun 27, 2024
ff7e392
bounds propagate up
k-mouline Jun 27, 2024
7162ae1
add: additional refactoring around SMTlib backend
tnelson Jun 28, 2024
01dd402
minor: print out raw cvc5 response in sat case
tnelson Jun 28, 2024
2c8f5c6
working: basic parsing of SMTlib SAT response
tnelson Jun 28, 2024
eb4c77f
add: own-grandpa, sterling proof of concept
tnelson Jun 28, 2024
33f32d1
integer reconciliation
k-mouline Jun 28, 2024
a912f9a
first attempt at converting to smtlib
k-mouline Jun 28, 2024
649d3d6
add: working on integration. NNF and int-conversion in pipeline
tnelson Jun 29, 2024
abfa8ed
partial conversion, need to stop soon
tnelson Jun 29, 2024
e85656b
more adjustments to skolem
tnelson Jun 29, 2024
0c30972
add: more fixes, see initialed comments in skolem
tnelson Jun 29, 2024
c4c8fd1
add: final pipeline step
tnelson Jun 29, 2024
658ce7a
working through skolem, starting SMT conversion add
tnelson Jun 29, 2024
45b3297
rough mapping into cvc5, not done yet'
tnelson Jun 29, 2024
e26fd69
working on SMT conversion
tnelson Jun 29, 2024
59ebf96
fix: skolemize _inner_ formula as well. also fix var call order
tnelson Jun 29, 2024
c709c44
fix: quantifier IDs, more robust cmd line args
tnelson Jun 29, 2024
7ff052a
fix: use XSort in quantifier domains
tnelson Jun 29, 2024
1805e3c
intermediate checkpoint: multi-run is combining results
tnelson Jun 29, 2024
a4c7d5e
fix: singleton tuple processing. note failing test, skolem issue
tnelson Jun 29, 2024
83697e4
fix: skolem depth 0 only; cleanup
tnelson Jun 30, 2024
33c32fa
misc fixes, 3-ary relations
tnelson Jun 30, 2024
171e249
add test
tnelson Jul 1, 2024
9a1d174
add: print stderr from cvc5 in another location
tnelson Jul 1, 2024
52514ab
add: basic collector draft, working on smoke tests
tnelson Jul 2, 2024
3464314
update: collector
tnelson Jul 2, 2024
810c352
fix: ordering in collector, add tesT
tnelson Jul 2, 2024
ef54bb2
Small edits to skolemization
k-mouline Jul 2, 2024
d412ba1
atom test added
k-mouline Jul 3, 2024
ea59bec
several changes, mostly multiplicity
k-mouline Jul 3, 2024
6218d18
saving intermediate work
tnelson Jul 3, 2024
504ea94
adding tests
tnelson Jul 3, 2024
c46abe5
paren fix and beginning some work on ints
k-mouline Jul 3, 2024
0396f60
disable int literal checking for smtlibtor
tnelson Jul 3, 2024
0ab2f30
decl domains are expressions
tnelson Jul 3, 2024
5b8a834
add: fix errors with skolem, contract
tnelson Jul 3, 2024
9a2c532
working; will convert join to application on merge
tnelson Jul 3, 2024
e8a7c9f
convert join to application
tnelson Jul 3, 2024
5ae8d8c
add: allow Unknown message to Sterling; blank right now
tnelson Jul 3, 2024
b973852
defensive check
tnelson Jul 3, 2024
0fb298a
more int work
k-mouline Jul 3, 2024
a8dec28
merge
tnelson Jul 3, 2024
ba285b2
add: handle unknown in tests, etc. (cannot test much yet)
tnelson Jul 4, 2024
69c7123
to-skolem func args fixed
k-mouline Jul 5, 2024
0cda303
fun spacer maintained in substitutor
k-mouline Jul 5, 2024
df80e05
fix: error message string
tnelson Jul 5, 2024
9358764
add: pair programming
tnelson Jul 5, 2024
a7534bb
add: comment only, thinking re: int
tnelson Jul 5, 2024
06d4100
add: Goldbach for unsat
tnelson Jul 5, 2024
b614800
Vars and decls sorted out
k-mouline Jul 5, 2024
64d1b15
resolve conflict
tnelson Jul 8, 2024
a6574ce
fix: missing annotation #f
tnelson Jul 8, 2024
972ba22
add: annotation to qvar for smtlib integer conversion'
tnelson Jul 8, 2024
ae0d390
add: draft annotation use
tnelson Jul 8, 2024
0fb841e
add: define sign SMT function, question re ints
tnelson Jul 8, 2024
4e114a8
add: comment, question about ints
tnelson Jul 8, 2024
26a74a2
add: untangle expr/const case
tnelson Jul 8, 2024
6ae6ae9
add: relational update unsupported
tnelson Jul 8, 2024
a4bfc03
add: draft for translating none
tnelson Jul 8, 2024
b874a48
add: notes on int
tnelson Jul 8, 2024
dfd6128
oops
tnelson Jul 8, 2024
7c48a42
add: proof of concept, pair programming with Karim
tnelson Jul 8, 2024
b54323c
add: stop policy to collector
tnelson Jul 8, 2024
87342b7
fix: hacky fix for substitutor fun-spacer; needs expanding
tnelson Jul 9, 2024
32a92e0
quantifier grounding added
k-mouline Jul 9, 2024
efc57cf
fake run added
k-mouline Jul 9, 2024
a07b349
fix: minor to collector, add grandpa
tnelson Jul 9, 2024
80a1c1e
Comparison pull request (#265)
k-mouline Aug 1, 2024
e0686e8
patch
tnelson Aug 1, 2024
37d99b6
manual merge from dev
tnelson Aug 1, 2024
cc08cd9
minor: comment change to avoid confusion
tnelson Aug 1, 2024
35e7e4b
minor: comment fix
tnelson Aug 1, 2024
0c3e9e5
fix: get-annotation for nodes
tnelson Aug 1, 2024
2e22980
Fixing issue with to-smt visitor; refactor lang-specific error code (…
tnelson Aug 5, 2024
4cfef1a
fix: quantifier case in tor conversion
tnelson Aug 5, 2024
7717a47
fix: blocking in error case from cvc5
tnelson Aug 5, 2024
d4509d5
Comprehension and integer handling improved
k-mouline Aug 5, 2024
f9e4855
fix: parsing smt response, allow 'some Node'
tnelson Aug 5, 2024
cbc2b61
rename univInt, no longer pass IntAtom-to-Int
tnelson Aug 5, 2024
9e669dc
Cardinality supported, a few fixes needed
k-mouline Aug 6, 2024
9d4ed97
match against nested ites
tnelson Aug 7, 2024
5a1adf3
fix: issue with chained ite
tnelson Aug 7, 2024
dfc5daa
fix: negative numbers in IntAtom-to-Int
tnelson Aug 7, 2024
ea152f2
fix more
tnelson Aug 7, 2024
83e7bbc
fix: update sterling for larger numbers
tnelson Aug 7, 2024
af90532
Added more comp/card tests, added to expression-type struct
k-mouline Aug 7, 2024
462edb1
fix: remove leftover prints
tnelson Aug 8, 2024
7923a0d
fix: arity of function call
tnelson Aug 8, 2024
b05b7d5
Tests for Tim
k-mouline Aug 8, 2024
4aae72f
fix to use of 'second' in last-checker, clarifying comments
tnelson Aug 8, 2024
f3c86d4
Multiplicities fixed and tests added
k-mouline Aug 8, 2024
fa5b2e3
More tests
k-mouline Aug 12, 2024
48769bc
Relational override, reflexive tc typing, lone sig, and tests
k-mouline Aug 14, 2024
212463a
add: don't pass translation-helpers to sterling
tnelson Aug 14, 2024
17cde9e
Fixed cardinality of size 0 set typing
k-mouline Aug 14, 2024
dce6b19
Cardinality error fixed
k-mouline Aug 14, 2024
24a8905
add: finite int set, commented test example
tnelson Aug 15, 2024
1a23e3e
add: additional comment
tnelson Aug 15, 2024
b11ffa8
Plenty more tests added
k-mouline Aug 16, 2024
e9cbfeb
Tests fixed
k-mouline Aug 19, 2024
3312ac6
update pardinus: return parse error text
tnelson Aug 20, 2024
2768b8b
fix for non-smt, which gives no Int sig in instances
tnelson Aug 20, 2024
d91d825
Feat smt s exp (#271)
tnelson Aug 20, 2024
4bcfe5b
Fix prime check (#272)
tnelson Aug 20, 2024
f167639
Extra files removed
k-mouline Aug 20, 2024
8b62e4a
fix: skolemization tests robust to suffix
tnelson Aug 20, 2024
ff2ca40
S-exp descent and substitution added
k-mouline Aug 21, 2024
876db0e
Small errors fixed
k-mouline Aug 21, 2024
13c725b
refactor: SMT ToR tests into CI folder
tnelson Aug 21, 2024
3d8df26
Two out of three tests fixed
k-mouline Aug 21, 2024
2fefb34
remove outdated test
tnelson Aug 21, 2024
cc34513
Temp file added for verbose SMT runs
k-mouline Aug 21, 2024
f29b42c
cleanup verbosity, test cvc5 in CI
tnelson Aug 22, 2024
8efdc1e
experiment: actions
tnelson Aug 22, 2024
c67df5e
refine CI, update racket version and print cvc5 version
tnelson Aug 22, 2024
6b961d2
Wrap negative numbers for earlier cvc5 versions
tnelson Aug 22, 2024
7b068ed
fix: wrap -1 in sign built-in
tnelson Aug 22, 2024
e101a6d
minor: cleanup
tnelson Aug 22, 2024
a9f2c6d
add: more comprehension tests
tnelson Aug 22, 2024
54fe251
fix: uniqueness of ints, regression tests
tnelson Aug 22, 2024
da9777c
add: understanding ic3 example
tnelson Aug 23, 2024
66f377d
fix: remainder lambda
tnelson Aug 23, 2024
d01c5a9
minor fixes, mod
tnelson Sep 2, 2024
fe8d3e0
add: avoid asserting true
tnelson Sep 29, 2024
0c23720
add: include options in SMT-lib, not command line, where applicable
tnelson Sep 29, 2024
60a292f
add: simplify 'one' constraint
tnelson Oct 1, 2024
61d7392
adjust CI
tnelson Oct 15, 2024
050b654
update: CI
tnelson Oct 15, 2024
740b65b
smt tests verbosity set to 0
k-mouline Oct 17, 2024
85ca793
add: improve debugging line in reader
tnelson Oct 23, 2024
8fd9b3d
add: exclude examples from domains from compile
tnelson Nov 12, 2024
9ef1c70
Docker container for CI (#280)
k-mouline Nov 19, 2024
ccc9da5
add: null for PR in CI script
tnelson Nov 19, 2024
d654466
Merge branch 'dev' into feat_smt
tnelson Nov 19, 2024
d1dbee2
update: continue reconciling dev with feature branch
tnelson Nov 19, 2024
6d650ef
fix: is_theorem_disabled test, ++ case in smtlibtor conversion
tnelson Nov 19, 2024
82ca78a
cleanup: SMT / solver specifics
tnelson Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: skolem depth 0 only; cleanup
  • Loading branch information
tnelson committed Jun 30, 2024
commit 83697e45f676d0a34643a76236e43796cb8a8071
2 changes: 1 addition & 1 deletion forge/lang/bounds.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

; Error-checking constructors for bounds
(define (make-bound relation lower upper)
(printf "make-bound; upper was: ~a~n" upper)
;(printf "make-bound; upper was: ~a~n" upper)
(for ([t (in-list lower)])
(unless (and (list? t) (= (length t) (relation-arity relation)))
(raise-arguments-error 'make-bound (format "lower bounds must contain tuples of arity ~a" (relation-arity relation)) "lower" t)))
Expand Down
71 changes: 45 additions & 26 deletions forge/solver-specific/cvc5-tor.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -73,30 +73,43 @@
(bound-upper b)))
; Declare the "used" relation for this sig
name name)]
; Skolem relation of arity 1
[(equal? (string-ref name 0) #\$)
; Temporarily disable situations where Skolem relations would need to be non-nullary
; this "as uninterpreted function" approach required us to wrap references to these
; in (singleton (tuple ...)) in to-smtlib-tor.rkt.
(unless (equal? arity 1)
(raise-forge-error #:msg (format "SMT backend does not currently support problems that require Skolemization depth > 0; ~a had arity ~a." name arity)
#:context #f))
(format "(declare-const ~a ~a)~n" name (deparen (map sort-name-of typenames)))]
; Fields
[else
(format "(declare-fun ~a () (Relation ~a))~n" name (deparen (map sort-name-of typenames)))]))

(define (translate-to-cvc5-tor run-spec all-atoms relations total-bounds step0)
; For now, just print constraints, etc.
; For now, just print constraints, etc.
(printf "~n********************************~n")
(printf "Translating to CVC5 theory-of-relations~nConstraints:~n")

; Last version pre-solver, pre-SMT conversion
(printf "~nStep 0 (from Forge):~n")
(for ([constraint step0])
(printf " ~a~n" constraint))
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "~nStep 0 (from Forge):~n")
(for ([constraint step0])
(printf " ~a~n" constraint)))

; Convert to negation normal form
(define step1 (map (lambda (f) (nnf:interpret-formula run-spec f relations all-atoms '())) step0))
(printf "~nStep 1 (post NNF conversion):~n")
(for ([constraint step1])
(printf " ~a~n" constraint))
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "~nStep 1 (post NNF conversion):~n")
(for ([constraint step1])
(printf " ~a~n" constraint)))

; Convert boxed integer references to existential quantifiers
(define step2 (map (lambda (f) (boxed-int:interpret-formula run-spec f relations all-atoms '())) step1))
(printf "~nStep 2 (post boxed-integer translation):~n")
(for ([constraint step2])
(printf " ~a~n" constraint))
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "~nStep 2 (post boxed-integer translation):~n")
(for ([constraint step2])
(printf " ~a~n" constraint)))

; Skolemize (2nd empty list = types for quantified variables, unneeded in other descents)
; Note that Skolemization changes the *final* bounds. There is no Run struct for this run yet;
Expand All @@ -114,19 +127,20 @@

(define step3 (first step3-both))
(define step3-bounds (second step3-both))
(printf "~nStep 3 (post Skolemization):~n")
(for ([constraint step3])
(printf " ~a~n" constraint))
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "~nStep 3 (post Skolemization):~n")
(for ([constraint step3])
(printf " ~a~n" constraint)))

(define step4 (map (lambda (f) (smt-tor:convert-formula run-spec f relations all-atoms '())) step3))
(printf "~nStep 4 (post SMT-LIB conversion):~n")
(for ([constraint step4])
(printf " ~a~n" constraint))

(printf "~nBounds (post Skolemization):~n")
(for ([bound step3-bounds])
(printf " ~a/lower: ~a~n" (bound-relation bound) (bound-lower bound))
(printf " ~a/upper: ~a~n" (bound-relation bound) (bound-upper bound)))
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "~nStep 4 (post SMT-LIB conversion):~n")
(for ([constraint step4])
(printf " ~a~n" constraint))
(printf "~nBounds (post Skolemization):~n")
(for ([bound step3-bounds])
(printf " ~a/lower: ~a~n" (bound-relation bound) (bound-lower bound))
(printf " ~a/upper: ~a~n" (bound-relation bound) (bound-upper bound))))

; Now, convert bounds into SMT-LIB (theory of relations) and assert all formulas

Expand Down Expand Up @@ -179,16 +193,21 @@
(begin
(smtlib-display stdin "(get-model)")
(define model-s-expression (read stdout))
(printf "----- RECEIVED -----~n")
(for ([s-expr model-s-expression])
(printf "~a~n" s-expr))
(printf "--------------------~n")
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "----- RECEIVED -----~n")
(for ([s-expr model-s-expression])
(printf "~a~n" s-expr))
(printf "--------------------~n"))

; Forge still uses the Alloy 6 modality overall: Sat structs contain a _list_ of instances,
; each corresponding to the state of the instance at a given time index. Here, just 1.
(define response (Sat (list (smtlib-tor-to-instance model-s-expression)) #f '()))
(printf "~nSAT: ~a~n" response)
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "~nSAT: ~a~n" response))
response)]
['unsat
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "~nUNSAT~n"))
; No cores or statistics yet
(Unsat #f #f 'unsat)]
['unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
-- Test the SMT-LIB Theory-of-Relations translation
option backend smtlibtor

-- Sterling should now get a workable instance
-- option run_sterling off
-- Sterling should now get a workable instance, but leaving it off here since we are testing
-- soundness and completeness of the translation, not end-to-end functionality.
option run_sterling off

-- More debugging output
option verbose 5
-- Enable for more debugging output
-- option verbose 5

sig Node {edges: set Node}

Expand All @@ -20,9 +21,12 @@ test expect {
} is sat
{
-- for every node, there is some in-edge
all n: Node | some n2: Node | n in n2.edges
-- TODO: not currently supported because of skolem restrictions
--all n: Node | some n2: Node | n in n2.edges
-- for every node, there are no in-edges
no n: Node | some n2: Node | n in n2.edges
-- Should introduce a contradiction:
some n: Node | some n2: Node | n in n2.edges
} is unsat
}

Expand Down
9 changes: 7 additions & 2 deletions forge/utils/to-nnf.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
(map (lambda (x) (interpret-formula run-or-state (node/formula/op/! info (list x)) relations atom-names quantvars)) args))

(define (negate-quantifier run-or-state new-quantifier decls form relations atom-names quantvars info)
(node/formula/quantified info new-quantifier decls (node/formula/op/! info (list (interpret-formula run-or-state form relations atom-names quantvars)))))
; Called in a context like !(some ...) ~~~> (all !...).
; NNF conversion thus needs to recur on the inner formula _including_ the negation.
(define negated-inner-form (node/formula/op/! info (list form)))
(define nnf-negated-inner-form (interpret-formula run-or-state negated-inner-form relations atom-names quantvars))
(node/formula/quantified info new-quantifier decls nnf-negated-inner-form))

(define (interpret-formula-op run-or-state formula relations atom-names quantvars args)
(when (@>= (get-verbosity) VERBOSITY_DEBUG)
Expand Down Expand Up @@ -137,7 +141,8 @@
[(node/formula/op/! not-info not-children) (interpret-formula run-or-state (car not-children) relations atom-names quantvars)]
; Converting quantifiers to NNF
[(node/formula/quantified quant-info quantifier decls form)
(match quantifier
(match quantifier
; !!!
; not (all x | A) = some (x | not A)
['all (negate-quantifier run-or-state 'some decls form relations atom-names quantvars quant-info)]
; not (some x | A) = all (x | not A)
Expand Down
7 changes: 4 additions & 3 deletions forge/utils/to-skolem.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(only-in racket index-of match string-join first second rest flatten cartesian-product thunk empty?)
(only-in racket/contract define/contract or/c listof any/c)
(prefix-in @ (only-in racket/contract ->))
(prefix-in @ (only-in racket/base >= +)))
(prefix-in @ (only-in racket/base >= + >)))
(provide interpret-formula)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -39,7 +39,8 @@
new-join-expr))

(define (skolemize-formula run-spec total-bounds formula relations atom-names quantvars quantvar-types info quantifier decls form)
(printf "skolemize-formula: ~a ~a~n" formula quantvars)
(when (@> (get-verbosity) VERBOSITY_LOW)
(printf "skolemize-formula: ~a ~a~n" formula quantvars))
; RESTRICTION: Because we are mapping top-level sigs to sorts, we have no "univ".
; Discuss. May be better to not use sorts (or worse).
; TODO: *top level* only! Right now, all sorts get added (For KM: discuss)
Expand Down Expand Up @@ -107,7 +108,7 @@
(first upper-bound-list)
; otherwise, build product
(apply cartesian-product upper-bound-list)))
(printf "~nskolem-upper-bound: ~a~n" skolem-upper-bound)
;(printf "~nskolem-upper-bound: ~a~n" skolem-upper-bound)

; 4. add that new relation to the bounds
(define skolem-bounds (make-bound skolem-relation '() skolem-upper-bound))
Expand Down
16 changes: 8 additions & 8 deletions forge/utils/to-smtlib-tor.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,14 @@
(printf "to-smtlib-tor: convert-expr: ~a~n" expr))
(match expr
[(node/expr/relation info arity name typelist-thunk parent isvar)
(if (equal? name "Int")
; *******
; TODO: this is not correct *****
;; ************
;"(as set.universe (Set Int))"
"(as set.universe (Relation Int))"
(format "~a" name))]
; Declared sigs <A> correspond to sort <ASort>, with <A> as a relation to
; denote which are used. In contrast, <Int> is the _sort_ in SMT.
(cond [(equal? name "Int") "(as set.universe (Relation Int))"]
[(equal? #\$ (string-ref name 0)) (format "(set.singleton (tuple ~a))" name)]
[else (format "~a" name)])]
[(node/expr/atom info arity name)
"TODO: ATOM"]
(raise-forge-error #:msg (format "direct atom references unsupported by SMT backend")
#:context expr)]
[(node/expr/fun-spacer info arity name args result expanded)
(convert-expr run-or-state expanded relations atom-names quantvars)]
[(node/expr/ite info arity a b c)
Expand All @@ -149,6 +148,7 @@
[processed-c (convert-expr run-or-state c relations atom-names quantvars)])
(format "(ite ~a ~a ~a)" processed-a processed-b processed-c))]
[(node/expr/constant info 1 'Int)
; TODO: Is this production being used? 'Int is a symbol, not expanded to the Int sig?
"TODO: EXPR CONSTANT? IDK WHAT THIS IS"]
[(node/expr/constant info arity type)
"TODO: ANOTHER EXPR CONSTANT? IDK WHAT THIS IS"]
Expand Down