SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
interval.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 
6 
7 /**
8  * @brief Single cell construction algorithm.
9  *
10  * @tparam op The operator.
11  * @tparam cell_heuristic The cell heuristic.
12  * @param cell_deriv A derivation object to construct the cell from.
13  * @return A vector of pairs of variables and their symbolic intervals on success or std::nullopt otherwise.
14  */
15 template<typename op, representation::CellHeuristic cell_heuristic>
16 std::optional<std::pair<carl::Variable, datastructures::SymbolicInterval>> get_interval(datastructures::SampledDerivationRef<typename op::PropertiesSet>& cell_deriv) {
17  SMTRAT_LOG_TRACE("smtrat.cadcells.algorithms.onecell", "Constructing cell on level " << cell_deriv->level());
18 
19  SMTRAT_LOG_TRACE("smtrat.cadcells.algorithms.onecell", "Project properties");
20  if (!op::project_basic_properties(*cell_deriv)) return std::nullopt;
21  SMTRAT_LOG_TRACE("smtrat.cadcells.algorithms.onecell", "Delineate properties");
22  op::delineate_properties(*cell_deriv);
23  cell_deriv->delineate_cell();
24  SMTRAT_LOG_TRACE("smtrat.cadcells.algorithms.onecell", "Got interval " << cell_deriv->cell() << " wrt " << cell_deriv->delin());
25  SMTRAT_LOG_TRACE("smtrat.cadcells.algorithms.onecell", "Compute cell representation");
26  auto cell_repr = representation::cell<cell_heuristic>::compute(cell_deriv);
27  SMTRAT_LOG_TRACE("smtrat.cadcells.algorithms.onecell", "Got representation " << cell_repr);
28  if (cell_deriv->level() > 1) {
29  SMTRAT_LOG_TRACE("smtrat.cadcells.algorithms.onecell", "Project cell");
30  if (!op::project_cell_properties(cell_repr)) return std::nullopt;
31  }
32 
33  return std::make_pair(cell_deriv->main_var(),cell_repr.description);
34 }
35 
36 }
Various algorithms as well as helper functions for developing new algorithms.
Definition: interval.h:5
std::optional< std::pair< carl::Variable, datastructures::SymbolicInterval > > get_interval(datastructures::SampledDerivationRef< typename op::PropertiesSet > &cell_deriv)
Single cell construction algorithm.
Definition: interval.h:16
std::shared_ptr< SampledDerivation< Properties > > SampledDerivationRef
Definition: derivation.h:25
#define SMTRAT_LOG_TRACE(channel, msg)
Definition: logging.h:36
static datastructures::CellRepresentation< T > compute(datastructures::SampledDerivationRef< T > &der)