Close
Close window
Session - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

SMTLIB

Session

construct session object for SMT problem

Calling Sequence

Session(expr,options)

Parameters

expr

-

set, function, or boolean; expression to be checked for satisfiability

options

-

(optional) options as specified below

Options

logic = string

The value of option logic is a string which must correspond to one of the following logic names defined by the SMT-LIB standard: "QF_UF", "QF_LIA", "QF_NIA", "QF_LRA", "QF_NRA", "LIA", and "LRA".

For an explanation of these logics, see Formats,SMTLIB .

timelimit = positive or infinity

Specify a time limit for the call to the SMT solver. A nonzero value represents a time budget in seconds for SMTLIB[Session][Satisfiable] or SMTLIB[Session][Satisfy] calls. The default is infinity, meaning no limit is imposed.

Description

The Session(expr) command creates a session object for working interactively with an SMT solver. In particular, the session has a stack which can be pushed to add additional assumptions onto the current problem, and popped to remove these assumptions to restore the previous problem state.

Operations with Sessions

The following functions can be performed with a SMTLIB Session.

Examples

Create a a SMTLIB session object for solving over quantifier-free integer linear arithmetic.

>

withSMTLIB:

>

sessSessionlogic=QF_LIA

sessSMTLIB Session506413144Variables: 0Stack Depth: 0

(1)

Assert this Diophantine problem.

>

sess:-Assertx+y=3,2x+3y=5

>

sess:-Satisfiable

true

(2)

Push the stack and add a side assumption. The problem becomes unsatisfiable.

>

sess:-Push

1

(3)
>

sess:-Assert0<y

>

sess:-Satisfiable

false

(4)

Pop the stack and verify the problem is once again satisfiable.

>

sess:-Pop

0

(5)
>

sess:-Satisfy

x=4&comma;y=−1

(6)

Compatibility

The SMTLIB[Session] command was introduced in Maple 2022.

For more information on Maple 2022 changes, see Updates in Maple 2022 .

See Also


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /