Lattice Land Powerdomains Library
Loading...
Searching...
No Matches
lala::SplitStrategy< A, Allocator > Class Template Reference

#include <split_strategy.hpp>

Classes

struct  snapshot_type
 
struct  strategy_type
 

Public Types

using allocator_type = Allocator
 
using sub_type = A
 
using sub_allocator_type = typename sub_type::allocator_type
 
using sub_tell_type = sub_type::template tell_type<allocator_type>
 
using branch_type = Branch<sub_tell_type, allocator_type>
 
using this_type = SplitStrategy<sub_type, allocator_type>
 
template<class Alloc2 >
using tell_type = battery::vector<strategy_type<Alloc2>, Alloc2>
 

Public Member Functions

CUDA SplitStrategy (AType atype, abstract_ptr< A > a, const allocator_type &alloc=allocator_type())
 
template<class A2 , class Alloc2 , class... Allocators>
CUDA SplitStrategy (const SplitStrategy< A2, Alloc2 > &other, AbstractDeps< Allocators... > &deps)
 
CUDA AType aty () const
 
CUDA allocator_type get_allocator () const
 
template<class Alloc2 = allocator_type>
CUDA snapshot_type< Alloc2 > snapshot (const Alloc2 &alloc=Alloc2()) const
 
template<class Alloc2 = allocator_type>
CUDA void restore (const snapshot_type< Alloc2 > &snap)
 
CUDA void reset ()
 
template<bool diagnose = false, class F , class Env , class Alloc2 >
CUDA NI bool interpret_tell (const F &f, Env &env, tell_type< Alloc2 > &tell, IDiagnostics &diagnostics) const
 
template<IKind kind, bool diagnose = false, class F , class Env , class I >
CUDA bool interpret (const F &f, Env &env, I &intermediate, IDiagnostics &diagnostics) const
 
template<class Alloc2 >
CUDA local::B deduce (const tell_type< Alloc2 > &t)
 
CUDA NI branch_type split ()
 
CUDA size_t num_strategies () const
 

Static Public Attributes

static constexpr const bool is_abstract_universe = false
 
static constexpr const bool sequential = sub_type::sequential
 
static constexpr const bool is_totally_ordered = false
 
static constexpr const bool preserve_bot = true
 
static constexpr const bool preserve_top = true
 
static constexpr const bool preserve_join = sub_type::preserve_join
 
static constexpr const bool preserve_meet = sub_type::preserve_meet
 
static constexpr const bool injective_concretization = sub_type::injective_concretization
 
static constexpr const bool preserve_concrete_covers = sub_type::preserve_concrete_covers
 
static constexpr const char * name = "SplitStrategy"
 

Friends

template<class A2 , class Alloc2 >
class SplitStrategy
 

Member Typedef Documentation

◆ allocator_type

template<class A , class Allocator = typename A::allocator_type>
using lala::SplitStrategy< A, Allocator >::allocator_type = Allocator

◆ sub_type

template<class A , class Allocator = typename A::allocator_type>
using lala::SplitStrategy< A, Allocator >::sub_type = A

◆ sub_allocator_type

template<class A , class Allocator = typename A::allocator_type>
using lala::SplitStrategy< A, Allocator >::sub_allocator_type = typename sub_type::allocator_type

◆ sub_tell_type

template<class A , class Allocator = typename A::allocator_type>
using lala::SplitStrategy< A, Allocator >::sub_tell_type = sub_type::template tell_type<allocator_type>

◆ branch_type

template<class A , class Allocator = typename A::allocator_type>
using lala::SplitStrategy< A, Allocator >::branch_type = Branch<sub_tell_type, allocator_type>

◆ this_type

template<class A , class Allocator = typename A::allocator_type>
using lala::SplitStrategy< A, Allocator >::this_type = SplitStrategy<sub_type, allocator_type>

◆ tell_type

template<class A , class Allocator = typename A::allocator_type>
template<class Alloc2 >
using lala::SplitStrategy< A, Allocator >::tell_type = battery::vector<strategy_type<Alloc2>, Alloc2>

Constructor & Destructor Documentation

◆ SplitStrategy() [1/2]

template<class A , class Allocator = typename A::allocator_type>
CUDA lala::SplitStrategy< A, Allocator >::SplitStrategy ( AType atype,
abstract_ptr< A > a,
const allocator_type & alloc = allocator_type() )
inline

◆ SplitStrategy() [2/2]

template<class A , class Allocator = typename A::allocator_type>
template<class A2 , class Alloc2 , class... Allocators>
CUDA lala::SplitStrategy< A, Allocator >::SplitStrategy ( const SplitStrategy< A2, Alloc2 > & other,
AbstractDeps< Allocators... > & deps )
inline

Member Function Documentation

◆ aty()

template<class A , class Allocator = typename A::allocator_type>
CUDA AType lala::SplitStrategy< A, Allocator >::aty ( ) const
inline

◆ get_allocator()

template<class A , class Allocator = typename A::allocator_type>
CUDA allocator_type lala::SplitStrategy< A, Allocator >::get_allocator ( ) const
inline

◆ snapshot()

template<class A , class Allocator = typename A::allocator_type>
template<class Alloc2 = allocator_type>
CUDA snapshot_type< Alloc2 > lala::SplitStrategy< A, Allocator >::snapshot ( const Alloc2 & alloc = Alloc2()) const
inline

◆ restore()

template<class A , class Allocator = typename A::allocator_type>
template<class Alloc2 = allocator_type>
CUDA void lala::SplitStrategy< A, Allocator >::restore ( const snapshot_type< Alloc2 > & snap)
inline

◆ reset()

template<class A , class Allocator = typename A::allocator_type>
CUDA void lala::SplitStrategy< A, Allocator >::reset ( )
inline

Restart the search from the first variable.

◆ interpret_tell()

template<class A , class Allocator = typename A::allocator_type>
template<bool diagnose = false, class F , class Env , class Alloc2 >
CUDA NI bool lala::SplitStrategy< A, Allocator >::interpret_tell ( const F & f,
Env & env,
tell_type< Alloc2 > & tell,
IDiagnostics & diagnostics ) const
inline

This interpretation function expects f to be a predicate of the form search(VariableOrder, ValueOrder, x_1, x_2, ..., x_n).

◆ interpret()

template<class A , class Allocator = typename A::allocator_type>
template<IKind kind, bool diagnose = false, class F , class Env , class I >
CUDA bool lala::SplitStrategy< A, Allocator >::interpret ( const F & f,
Env & env,
I & intermediate,
IDiagnostics & diagnostics ) const
inline

◆ deduce()

template<class A , class Allocator = typename A::allocator_type>
template<class Alloc2 >
CUDA local::B lala::SplitStrategy< A, Allocator >::deduce ( const tell_type< Alloc2 > & t)
inline

This deduce method adds new strategies, and therefore do not satisfy the PCCP model. Calling this function multiple times will create multiple strategies, that will be called in sequence along a branch of the search tree. @sequential

◆ split()

template<class A , class Allocator = typename A::allocator_type>
CUDA NI branch_type lala::SplitStrategy< A, Allocator >::split ( )
inline

Split the next unassigned variable according to the current strategy. If all variables of the current strategy are assigned, use the next strategy. If no strategy remains, returns an empty set of branches.

If the next unassigned variable cannot be split, for instance because the value ordering strategy maps to bot or top, an empty set of branches is returned. This also means that you cannot suppose split(a) = {} to mean a is at bot.

◆ num_strategies()

template<class A , class Allocator = typename A::allocator_type>
CUDA size_t lala::SplitStrategy< A, Allocator >::num_strategies ( ) const
inline

Friends And Related Symbol Documentation

◆ SplitStrategy

template<class A , class Allocator = typename A::allocator_type>
template<class A2 , class Alloc2 >
friend class SplitStrategy
friend

Member Data Documentation

◆ is_abstract_universe

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::is_abstract_universe = false
staticconstexpr

◆ sequential

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::sequential = sub_type::sequential
staticconstexpr

◆ is_totally_ordered

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::is_totally_ordered = false
staticconstexpr

◆ preserve_bot

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::preserve_bot = true
staticconstexpr

◆ preserve_top

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::preserve_top = true
staticconstexpr

◆ preserve_join

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::preserve_join = sub_type::preserve_join
staticconstexpr

◆ preserve_meet

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::preserve_meet = sub_type::preserve_meet
staticconstexpr

◆ injective_concretization

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::injective_concretization = sub_type::injective_concretization
staticconstexpr

◆ preserve_concrete_covers

template<class A , class Allocator = typename A::allocator_type>
const bool lala::SplitStrategy< A, Allocator >::preserve_concrete_covers = sub_type::preserve_concrete_covers
staticconstexpr

◆ name

template<class A , class Allocator = typename A::allocator_type>
const char* lala::SplitStrategy< A, Allocator >::name = "SplitStrategy"
staticconstexpr

The documentation for this class was generated from the following file: