dlinear
0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
SmtSolver.h
1
7
#pragma once
8
9
#include <string>
10
11
#include "dlinear/solver/Context.h"
12
#include "dlinear/solver/SmtSolverOutput.h"
13
#include "dlinear/symbolic/symbolic.h"
14
#include "dlinear/util/Box.h"
15
#include "dlinear/util/Config.h"
16
17
namespace
dlinear
{
18
41
class
SmtSolver
{
42
public
:
47
explicit
SmtSolver
(
Config
config =
Config
{});
52
explicit
SmtSolver
(
const
std::string &filename);
53
SmtSolver
(
const
SmtSolver
&) =
delete
;
54
SmtSolver
(
SmtSolver
&&)
noexcept
=
default
;
55
SmtSolver
&operator=(
const
SmtSolver
&) =
delete
;
56
SmtSolver
&operator=(
SmtSolver
&&) =
delete
;
57
58
[[nodiscard]] std::string GetInfo(
const
std::string &key)
const
;
59
[[nodiscard]] std::string GetOption(
const
std::string &key)
const
;
60
[[nodiscard]]
SmtResult
GetExpected()
const
;
61
69
void
Assert
(
const
Formula
&f);
70
81
const
SmtSolverOutput
&
Parse
();
82
95
const
SmtSolverOutput
&
Parse
(
const
std::string &filename);
96
101
const
SmtSolverOutput
&
CheckSat
();
102
111
[[nodiscard]]
bool
Verify
(
const
Box
&model)
const
;
112
113
private
:
124
bool
ParseInput
();
125
126
Config
config_
;
127
SmtSolverOutput
output_
;
128
Context
context_
;
129
};
130
131
}
// namespace dlinear
dlinear::Box
Collection of variables with associated intervals.
Definition
Box.h:31
dlinear::Config
Simple dataclass used to store the configuration of the program.
Definition
Config.h:38
dlinear::Context
Context class that holds the set of constraints and provide Assert/Push/Pop/CheckSat functionalities.
Definition
Context.h:31
dlinear::SmtSolver
This class provides an easy interface for using the underling solver.
Definition
SmtSolver.h:41
dlinear::SmtSolver::SmtSolver
SmtSolver(Config config=Config{})
Construct a new SmtSolver object with the given config .
Definition
SmtSolver.cpp:42
dlinear::SmtSolver::Parse
const SmtSolverOutput & Parse()
Parse the problem from the input indicated in the configuration.
Definition
SmtSolver.cpp:73
dlinear::SmtSolver::context_
Context context_
Context obtained from the input file and passed to the SAT and SMT solvers.
Definition
SmtSolver.h:128
dlinear::SmtSolver::output_
SmtSolverOutput output_
Output of the solver.
Definition
SmtSolver.h:127
dlinear::SmtSolver::CheckSat
const SmtSolverOutput & CheckSat()
Check the satisfiability of the current context.
Definition
SmtSolver.cpp:44
dlinear::SmtSolver::ParseInput
bool ParseInput()
Parse the problem from the input indicated in the configuration.
Definition
SmtSolver.cpp:101
dlinear::SmtSolver::Assert
void Assert(const Formula &f)
Assert a formula to the current context.
Definition
SmtSolver.cpp:94
dlinear::SmtSolver::Verify
bool Verify(const Box &model) const
Check whether the model satisfies all the assertions loaded in the context.
Definition
SmtSolver.cpp:66
dlinear::SmtSolver::config_
Config config_
Configuration of the solver.
Definition
SmtSolver.h:126
dlinear::drake::symbolic::Formula
Represents a symbolic form of a first-order logic formula.
Definition
symbolic_formula.h:100
dlinear
Global namespace for the dlinear library.
dlinear::SmtResult
SmtResult
SmtSolver Result based on the result of the solver.
Definition
SmtSolverOutput.h:24
dlinear::SmtSolverOutput
Data struct containing the output of the solver, such as the result of the computation as well as som...
Definition
SmtSolverOutput.h:44
dlinear
solver
SmtSolver.h
Generated by
1.11.0