AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
OpenSMT 솔버를 사용해 SMT 문제를 해결합니다
Solve satisfiability modulo theories (SMT) problems using the bundled OpenSMT solver, described in Hyvärinen, Marescotti, Alt and Sharygina (2016) <doi:10.1007/978-3-319-40970-2_35>. Problems are writ
개발 도구C++ · RGitHub @pedrobtz온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Solve satisfiability modulo theories (SMT) problems using the bundled OpenSMT solver, described in Hyvärinen, Marescotti, Alt and Sharygina (2016) <doi:10.1007/978-3-319-40970-2_35>. Problems are written in the SMT-LIB standard language and answers come back as R values, with model values carrying the solver's exact rational alongside the double. Supported theories include uninterpreted functions, linear integer and real arithmetic and their combinations, difference logic, and arrays. The solver
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
An SMT solver in R. zusmt bundles OpenSMT
and exposes it through a small R interface: you write problems in SMT-LIB2 and get answers back as R
values. There is no separate solver to install and nothing to configure — the solver is compiled into
the package.
Building from source needs a C++20 compiler and GMP with its C++ bindings
(libgmp-dev on Debian and Ubuntu, gmp-devel on Fedora, brew install gmp on macOS; Rtools
supplies it on Windows).
Three people need distinct meeting slots between 9 and 17, Alice before Bob, and Carol two hours
after Bob:README 전문 보기 ↗An SMT solver in R. zusmt bundles OpenSMT and exposes it through a small R interface: you write problems in SMT-LIB2 and get answers back as R values. There is no separate solver to install and nothing to configure — the solver is compiled into the package.
install.packages("zusmt")
Or the development version:
# install.packages("pak")
pak::pak("pedrobtz/zusmt")
Building from source needs a C++20 compiler and GMP with its C++ bindings
(libgmp-dev on Debian and Ubuntu, gmp-devel on Fedora, brew install gmp on macOS; Rtools
supplies it on Windows).
Three people need distinct meeting slots between 9 and 17, Alice before Bob, and Carol two hours after Bob:
library(zusmt)
s <- smt_solver("QF_LIA")
smt_assert(s, "
(declare-const alice Int)
(declare-const bob Int)
(declare-const carol Int)
(assert (and (>= alice 9) (<= alice 17)))
(assert (and (>= bob 9) (<= bob 17)))
(assert (and (>= carol 9) (<= carol 17)))
(assert (distinct alice bob carol))
(assert (< alice bob))
(assert (= carol (+ bob 2)))
")
smt_check(s)
#> [1] "sat"
smt_model(s)
#> $alice
#> [1] 9
#> $bob
#> [1] 10
#> $carol
#> [1] 12
When a problem has no solution, you are told so rather than given a wrong answer. 2x = 3 has no
integer solution:
u <- smt_solver("QF_LIA")
smt_assert(u, "(declare-const x Int) (assert (= (* 2 x) 3))")
smt_check(u)
#> [1] "unsat"
Solvers work in rationals, and not every rational is a double. Model values carry the solver's exact
answer alongside the numeric one, so you can compute with the double and still see what was meant:
r <- smt_solver("QF_LRA")
smt_assert(r, "(declare-const third Real) (assert (= (* 3.0 third) 1.0))")
smt_check(r)
#> [1] "sat"
value <- smt_model(r)$third
value
#> [1] 0.3333333
attr(value, "exact")
#> [1] "1/3"
smt_logics()
#> [1] "QF_UF" "QF_LIA" "QF_LRA" "QF_UFLIA" "QF_UFLRA" "QF_IDL" "QF_RDL"
#> [8] "QF_AX"
Uninterpreted functions, linear integer and real arithmetic and their combinations, difference logic,
and arrays. smt_assert() accepts any SMT-LIB2 command, not only assert — push, pop,
declarations and options all work, so a script written for another solver usually runs unchanged.
A long search can be interrupted: Ctrl-C stops it and raises an R condition, rather than leaving
the session wedged in the solver.
OpenSMT v2.9.2, under src/opensmt/, imported by tools/vendor.sh and recorded in
tools/vendor/manifest.tsv. Both zusmt and OpenSMT are MIT licensed; see LICENSE.note for the
bundled copyright notices. The vendored sources carry a small set of patches, applied mechanically by
tools/patches.sh, so that the solver writes to R's console rather than to stdout, raises exceptions
instead of calling exit(), and stops when you interrupt it.