SMTLIB
Tools for parsing and generating files in SMT-LIB format
Calling Sequence
Description
Accessing SMTLIB Package Commands
List of SMTLIB Package Commands
Examples
References
Compatibility
SMTLIB:-command(arguments)
command(arguments)
The SMTLIB package provides tools for encoding Maple expressions into SMT-LIB format.
The SMT-LIB format is an interface language for interacting with programs which solve Satisfiability Modulo Theories (SMT) problems.
Each command in the SMTLIB package can be accessed by using either the long form or the short form of the command symbol in the command calling sequence.
The long form, SMTLIB:-command, is always available. The short form can be used after loading the package.
The following is a list of commands available in the SMTLIB package.
ParseFile
ParseString
Satisfiable
Satisfy
Session
Simplify
ToString
To display the help page for a particular SMTLIB command, see Getting Help with a Command in a Package.
Generate an SMT-LIB script which tests for satisfiability of the input expression
with(SMTLIB):
ToString( (a and b and c) or (not a or b or not c) );
(declare-fun a () Bool) (declare-fun b () Bool) (declare-fun c () Bool) (assert (or (and a b c) (not a) b (not c))) (check-sat) (exit)
Find a satisfying assignment for the previous example.
Satisfy( (a and b and c) or (not a or b or not c) );
a=false,b=false,c=true
Generate an SMT-LIB script which returns a satisfying assignment for an equation using the logic of quantifier-free nonlinear integer arithmetic.
ToString( x^3+y^3=z^3, logic="QF_NIA" ) assuming posint;
(set-logic QF_NIA) (declare-fun x () Int) (declare-fun y () Int) (declare-fun z () Int) (assert (and (= (+ (* x x x) (* y y y)) (* z z z)) (<= 1 x) (<= 1 y) (<= 1 z))) (check-sat) (exit)
Check if a satisfying assignment for the previous example.
Satisfiable( x^3+y^3=z^3, logic="QF_NIA" ) assuming posint;
FAIL
Clark Barrett, Pascal Fontaine, and Cesare Tinelli. The SMT-LIB Standard: Version 2.5
The SMTLIB package was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
See Also
Formats,SMTLIB
Logic:-Satisfy
Download Help Document