dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
SmtSolverOutput.h
1
7#pragma once
8
9#include <chrono>
10#include <iosfwd>
11#include <string>
12
13#include "dlinear/libs/libgmp.h"
14#include "dlinear/solver/LpResult.h"
15#include "dlinear/solver/SatResult.h"
16#include "dlinear/util/Box.h"
17#include "dlinear/util/Config.h"
18#include "dlinear/util/Stats.h"
19#include "dlinear/util/Timer.h"
20
21namespace dlinear {
22
24enum class SmtResult {
25 UNSOLVED,
26 SKIP_SAT,
27 SAT,
28 DELTA_SAT,
29 OPTIMAL,
31 UNBOUNDED,
33 UNSAT,
34 UNKNOWN,
35 ERROR,
36};
37
38SmtResult parse_smt_result(SatResult sat_result);
39SmtResult parse_smt_result(LpResult lp_result);
40
114
115std::ostream &operator<<(std::ostream &os, const SmtResult &result);
116std::ostream &operator<<(std::ostream &os, const SmtSolverOutput &output);
117
118} // namespace dlinear
Collection of variables with associated intervals.
Definition Box.h:31
Simple dataclass used to store the configuration of the program.
Definition Config.h:38
Dataclass collecting statistics about some operation or process.
Definition Stats.h:71
Dataclass collecting statistics about some operation or process.
Definition Stats.h:23
Timer class using the a steady clock.
Definition Timer.h:95
Global namespace for the dlinear library.
SatResult
Result of running the theory solver over the literals decided by the SAT solver.
Definition SatResult.h:17
SmtResult
SmtSolver Result based on the result of the solver.
@ UNSAT
The problem is unsatisfiable.
@ SAT
The problem is satisfiable.
@ UNKNOWN
Could not determine satisfiability.
@ INFEASIBLE
The problem is infeasible.
@ DELTA_OPTIMAL
The optimization problem is delta-optimal.
@ UNBOUNDED
The problem is unbounded.
@ ERROR
An error occurred.
@ SKIP_SAT
The user asked to skip the satisfiability check.
@ DELTA_SAT
The problem is delta-satisfiable.
@ OPTIMAL
The optimization problem is optimal.
@ UNSOLVED
The solver has not yet been run.
LpResult
Result of running the LP solver over the input problem.
Definition LpResult.h:14
Data struct containing the output of the solver, such as the result of the computation as well as som...
bool with_timings
Whether the solver should show timings.
mpq_class lower_bound
Lower bound of the result.
Box complete_model
Model of the result that include the auxilary variables introduced.
Stats parser_stats
Statistics about the solver.
unsigned int n_assertions
Number of assertions in the input.
Box model
Model of the result.
mpq_class upper_bound
Upper bound of the result.
IterationStats preprocessor_stats
Statistics about the bound preprocessor.
mpq_class actual_precision
Actual precision of the computation. Always <= than precision.
int exit_code() const
Exit code of the solver to return to the user.
bool produce_models
Whether the solver should produce models.
Timer smt_solver_timer
Timer keeping track of the time spent in the SMT solver.
IterationStats sat_stats
Statistics about the satisfiability check.
IterationStats theory_stats
Statistics about the theory check.
IterationStats cnfizer_stats
Statistics about the formula cnfizer.
double precision_upper_bound() const
Return the precision upper bound.
IterationStats ite_stats
Statistics about the if-then-else simplifier.
SmtResult result
Result of the computation.
SmtSolverOutput(const Config &config)
Construct a new SmtSolverOutput object.
mpq_class precision
User-provided precision of the computation.
bool matches_expectation(SmtResult expectation) const
Check if the result of the computation matches the expectation.
IterationStats predicate_abstractor_stats
Statistics about the predicate abstractor.
bool is_sat() const
Return whether the problem is satisfiable or some variant of it.