https://github.com/zhanghongce/smtlib2parser
SMT-LIB v2 Parser
https://github.com/zhanghongce/smtlib2parser
formal-verification smt-lib
Last synced: 19 days ago
JSON representation
SMT-LIB v2 Parser
- Host: GitHub
- URL: https://github.com/zhanghongce/smtlib2parser
- Owner: zhanghongce
- License: mit
- Created: 2019-03-12T20:16:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-05T02:29:33.000Z (almost 5 years ago)
- Last Synced: 2025-02-16T09:20:40.497Z (3 months ago)
- Topics: formal-verification, smt-lib
- Language: C
- Size: 104 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
A Generic Parser for SMT-LIB v2
===============================Alberto Griggio
This is a (complete, I think) parser/lexer for the SMT-LIB v2 language,
implemented in Flex, Bison and C99, released under the MIT license (see
LICENSE.txt). Besides a grammar and an abstract interface for implementing
backends, a sample implementation using the Yices 1 solver
(http://yices.csl.sri.com) is provided. The implementation is not 100%
complete, but it should be enough for understanding how the interface is
supposed to work.REQUIREMENTS:
-------------- a C99 compiler (tested only under gcc),
- GNU flex >= 2.5.33
- GNU bison (tested under bison 2.4.1)For compiling, copy Makefile.in to Makefile, edit the compilation flags and
the YICES_DIR variable, and run makeCONTENTS:
---------LICENSE.txt:
the license fileMakefile.in:
Makefile templatesmtlib2parserinterface.h:
abstract interface for implementing backends to the parsersmtlib2abstractparser.h, smtlib2abstractparser.c:
an abstract implementation of the parser interface, providing default
implementation for the callbacks and support for parsing termssmtlib2abstractparser_private.h:
"protected" part of the abstract parsersmtlib2bisonparser.y:
Bison grammar for the SMT-LIB v2 language, defining a re-entrant parsersmtlib2flexlexer.l:
Flex definitions for a re-entrant SMT-LIB v2 lexical scannersmtlib2termparser.c, smtlib2termparser.h:
helper class for parsing terms and managing let bindings and definitionssmtlib2charbuf.h, smtlib2charbuf.c, smtlib2genvector.h, smtlib2hashtable.c,
smtlib2hashtable.h, smtlib2scanner.c, smtlib2scanner.h, smtlib2stream.c,
smtlib2stream.h, smtlib2types.h, smtlib2utils.c, smtlib2utils.h,
smtlib2vector.c, smtlib2vector.h:
several utility data structures and functionssmtlib2yices.c, smtlib2yices.h, main.c:
example backend using the Yices 1 SMT solvertest1.smt2, test2.smt2, test3.smt2, test4.smt2, test5.smt2, test6.smt2:
small test inputs for the Yices backend