Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | SMT-LIB parser for SWI-Prolog |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.0.6 |
SHA1 sum: | 76fe142cdea350a88a300e4f192f1af4026ec505 |
Author: | Jose Antonio Riaza Valverde <riaza.valverde@gmail.com> |
Maintainer: | Jose Antonio Riaza Valverde <riaza.valverde@gmail.com> |
Packager: | Jose Antonio Riaza Valverde <riaza.valverde@gmail.com> |
Home page: | https://github.com/jariazavalverde/prolog-smtlib |
Download URL: | https://github.com/jariazavalverde/prolog-smtlib |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.0.6 | 76fe142cdea350a88a300e4f192f1af4026ec505 | 25 | http://jariaza.es/swipl/smtlib/smtlib-0.0.6.tgz |
https://jariaza.es/swipl/smtlib/smtlib-0.0.6.tgz | |||
0.0.5 | 6c39f900a1039569a7ab5530b1cc4c3e2fa847a5 | 3 | http://jariaza.es/swipl/smtlib/smtlib-0.0.5.tgz |
0.0.4 | 3f42104f5bc9853b032d037a7ef115fa5747d4cb | 1 | http://jariaza.es/swipl/smtlib/smtlib-0.0.4.tgz |
0.0.3 | 21aefb126281d0073e65ba386ed96f066329fe99 | 1 | http://jariaza.es/swipl/smtlib/smtlib-0.0.3.tgz |
0.0.2 | 99a5a4cc61b3e7659498ec7106eef1f9dfa14995 | 1 | http://jariaza.es/swipl/smtlib/smtlib-0.0.2.tgz |
0.0.1 | dff16a3f0729ee3348742a1e8956720be3214623 | 1 | http://jariaza.es/swipl/smtlib-0.0.1.tgz |
http://jariaza.es/swipl/smtlib/smtlib-0.0.1.tgz |
SMT-LIB is an international initiative aimed at facilitating research and development in SMT. Specifically, Version 2.0 defines:
?- pack_install(smtlib).
:- use_module(library(smtlib)).
?- smtlib_read_script('../sample/script/figure-3.4.smt', X). X = list([ [reserved('set-logic'),symbol('QF_LIA')], [reserved('declare-fun'),symbol(w),[],symbol('Int')], [reserved('declare-fun'),symbol(x),[],symbol('Int')], [reserved('declare-fun'),symbol(y),[],symbol('Int')], [reserved('declare-fun'),symbol(z),[],symbol('Int')], [reserved(assert),[symbol(>),symbol(x),symbol(y)]], [reserved(assert),[symbol(>),symbol(y),symbol(z)]], [reserved('set-option'),[keyword('print-success'),symbol(false)]], [reserved(push),numeral(1)], [reserved(assert),[symbol(>),symbol(z),symbol(x)]], [reserved('check-sat')], [reserved('get-info'),keyword('all-statistics')], [reserved(pop),numeral(1)], [reserved(push),numeral(1)], [reserved('check-sat')], [reserved(exit)] ]).
?- smtlib_read_theory('../sample/theory/core.smt', X). X = list([ symbol(theory), symbol('Core'), [keyword('smt-lib-version'),decimal(2.6)], [keyword('smt-lib-release'),string('2017-11-24')], [keyword('written-by'),string(...)], [keyword(date),string(...)], [keyword('last-updated'),string(...)], [keyword('update-history'),string(...)], [keyword(sorts),[ [symbol('Bool'),numeral(0),[]] ]], [keyword(funs),[ [symbol(true),symbol('Bool')], [symbol(false),symbol('Bool')], [symbol(not),symbol('Bool'),symbol('Bool')], [symbol(=>),symbol('Bool'),symbol('Bool'),symbol('Bool'),keyword('right-assoc')], [symbol(and),symbol('Bool'),symbol('Bool'),symbol('Bool'),keyword('left-assoc')], [symbol(or),symbol('Bool'),symbol('Bool'),symbol('Bool'),keyword('left-assoc')], [symbol(xor),symbol('Bool'),symbol('Bool'),symbol('Bool'),keyword('left-assoc')], [reserved(par),[symbol('A')],[symbol(=),symbol('A'),symbol('A'),symbol('Bool'),keyword(chainable)]], [reserved(par),[symbol('A')],[symbol(distinct),symbol('A'),symbol('A'),symbol('Bool'),keyword(pairwise)]], [reserved(par),[symbol('A')],[symbol(ite),symbol('Bool'),symbol('A'),symbol('A'),symbol('A')]] ]], [keyword(definition),string(...)], [keyword(values),string(...)] ]).
?- smtlib_read_logic('../sample/logic/LIA.smt', X). X = list([ symbol(logic), symbol('LIA'), [keyword('smt-lib-version'),decimal(2.6)], [keyword('smt-lib-release'),string('2017-11-24')], [keyword('written-by'),string(...)], [keyword(date),string(...)], [keyword('update-history'),string(...)], [keyword(theories),[symbol('Ints')]], [keyword(language),string(...)], [keyword(extensions),string(...)] ]).
Source code is released under the terms of the BSD 3-Clause License.
Pack contains 4 files holding a total of 30.2K bytes.