souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions
souffle::ast::AllBoundSips Class Reference

Goal: Prioritise atoms with all arguments bound. More...

#include <SipsMetric.h>

Inheritance diagram for souffle::ast::AllBoundSips:
Inheritance graph
Collaboration diagram for souffle::ast::AllBoundSips:
Collaboration graph

Public Member Functions

 AllBoundSips ()=default
 
- Public Member Functions inherited from souffle::ast::SipsMetric
std::vector< unsigned int > getReordering (const Clause *clause) const
 Determines the new ordering of a clause after the SIPS is applied. More...
 
virtual ~SipsMetric ()=default
 

Protected Member Functions

std::vector< double > evaluateCosts (const std::vector< Atom * > atoms, const BindingStore &bindingStore) const override
 Evaluates the cost of choosing each atom next in the current schedule. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from souffle::ast::SipsMetric
static std::unique_ptr< SipsMetriccreate (const std::string &heuristic, const TranslationUnit &tu)
 Create a SIPS metric based on a given heuristic. More...
 

Detailed Description

Goal: Prioritise atoms with all arguments bound.

Definition at line 74 of file SipsMetric.h.

Constructor & Destructor Documentation

◆ AllBoundSips()

souffle::ast::AllBoundSips::AllBoundSips ( )
default

Member Function Documentation

◆ evaluateCosts()

std::vector< double > souffle::ast::AllBoundSips::evaluateCosts ( const std::vector< Atom * >  atoms,
const BindingStore bindingStore 
) const
overrideprotectedvirtual

Evaluates the cost of choosing each atom next in the current schedule.

Parameters
atomsatoms to choose from; may be nullptr
bindingStorethe variables already bound to a value

Implements souffle::ast::SipsMetric.

Definition at line 109 of file SipsMetric.cpp.

115  : 1);
116  }
117  assert(atoms.size() == cost.size() && "each atom should have exactly one cost");
118  return cost;
119 }
120 
121 std::vector<double> NaiveSips::evaluateCosts(
122  const std::vector<Atom*> atoms, const BindingStore& bindingStore) const {
123  // Goal: Prioritise (1) all bound, then (2) atoms with at least one bound argument, then (3) left-most
124  std::vector<double> cost;
125  for (const auto* atom : atoms) {

The documentation for this class was generated from the following files:
souffle::ast::NaiveSips::evaluateCosts
std::vector< double > evaluateCosts(const std::vector< Atom * > atoms, const BindingStore &bindingStore) const override
Evaluates the cost of choosing each atom next in the current schedule.
Definition: SipsMetric.cpp:127