Analysis Commands

MaudeSE provides various analysis commands:

check

This command determines the satisfiability of Boolean formulas. Given a module M, a Boolean formula f, and an SMT theory Th, it checks whether f is satisfiable under Th.

MaudeSE> check in M : f using Th .

For example, consider the module EUF-EX (euf-ex.maude) which contains uninterpreted function symbols declared using metadata with smt euf.

fmod EUF-EX is
  protecting INTEGER .
  sort A .

  op f : A -> A [metadata "smt euf"] .
  op _xor_ : Integer Integer -> A [prec 30 metadata "smt euf"] .
  op _===_ : A A -> Boolean .
endfm

Note

See More examples to learn how to declare SMT symbols using metadata.

You can check satisfiability using the following command:

MaudeSE> check in EUF-EX : I:Integer > 2 and 
            f(X:A) === (I:Integer xor J:Integer) using QF_UFLIA .
result: sat

show model

The show model command returns the satisfying assignment, if any, for the most recent check command. For example, you can obtain the assignment for the above check example as follows:

MaudeSE> show model .

  assignment:
    I:Integer |--> 3
    J:Integer |--> 2

show smt-path

This command returns either a symbolic or concrete path for the most recent smt-search result. It takes a path type as an argument (symbolic or concrete).

A symbolic path consists of a sequence of contracted terms and rewrite rules. The corresponding concrete path is an instance of the symbolic path instantiated with a satisfying assignment. For example, the following show the symbolic and concrete paths of the above search command.

MaudeSE> show smt-path concrete .
< idle ; 0/1 ; 0/1 > < 0/1 ; 0/1 ; 0/1 >
=====[toAddsugar]=====>
[addsugar ; 0/1 ; 0/1]< 0/1 ; 0/1 ; 0/1 >
 ...

MaudeSE> show smt-path symbolic .
Constrained Term:
 Term: < idle ; V0:Real ; V1:Real > < V2:Real ; V3:Real ; V4:Real >
 Constraint: not (not V0:Real === X:Real or ...)
=====[toAddsugar]=====>
Constrained Term:
 Term: [addsugar ; #5-V15:Real ; #6-V16:Real]< #7-V17:Real ; #8-V18:Real ; #9-V19:Real >
 Constraint: not (not V0:Real === X:Real or ...)
 ...