dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
dlinear::vnnlib Namespace Reference

Namespace for the VNNLIB parser of the dlinear library. More...

Classes

class  FunctionDefinition
 A new function defined by the user in the VNNLIB language using the define-fun command. More...
 
class  Term
 Generic term that can be either an expression or a formula. More...
 
class  VnnlibDriver
 The VnnlibDriver class brings together all components. More...
 
class  VnnlibScanner
 VnnlibScanner is a derived class to add some extra function to the scanner class. More...
 

Enumerations

enum class  Sort { Binary , Bool , Int , Real }
 Sort of a term. More...
 

Functions

Sort ParseSort (const std::string &s)
 Parse a string to a sort.
 
Variable::Type SortToType (Sort sort)
 Convert a sort to a variable type.
 

Detailed Description

Namespace for the VNNLIB parser of the dlinear library.

Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License
Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License Driver form the parsing and execution of vnnlib files.

The driver puts in communication the parser and the scanner. In the end, it produces a context that can be used to solve the problem.

Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License Function definition class

In the VNNLIB language, a function definition is a way to define a function in terms of its parameters and body. A function defined in this way can be called with the operator() method by providing the required arguments.

Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License Sort enum.
Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License Term class.

Terms are the building blocks of a smt problem. They can take many forms, such as:

  • variables
  • constants
  • functions
Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)
Licence:
BSD 3-Clause License VNNLIB parser for the dlinear library.

Enumeration Type Documentation

◆ Sort

enum class dlinear::vnnlib::Sort
strong

Sort of a term.

Enumerator
Binary 

Binary sort.

Bool 

Boolean sort.

Int 

Integer sort.

Real 

Real sort.

Definition at line 18 of file Sort.h.

Function Documentation

◆ ParseSort()

Sort dlinear::vnnlib::ParseSort ( const std::string & s)

Parse a string to a sort.

Parameters
sstring to parse
Returns
sort parsed from s

Definition at line 12 of file Sort.cpp.

◆ SortToType()

Variable::Type dlinear::vnnlib::SortToType ( Sort sort)

Convert a sort to a variable type.

The conversion is as follows:

  • Binary -> BINARY
  • Bool -> BOOLEAN
  • Int -> INTEGER
  • Real -> CONTINUOUS
    Parameters
    sortsort to convert
    Returns
    variable type corresponding to sort

Definition at line 43 of file Sort.cpp.