Lattice Land Parsing Library
Loading...
Searching...
No Matches
lala Namespace Reference

Classes

class  SolverOutput
 

Enumerations

enum class  OutputType { XCSP , FLATZINC }
 
enum class  TableDecomposition { DISJUNCTIVE , TABLE_PREDICATE , ELEMENTS }
 

Functions

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > parse_flatzinc_str (const std::string &input, SolverOutput< Allocator > &output)
 
template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > parse_flatzinc (const std::string &filename, SolverOutput< Allocator > &output)
 
template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > parse_flatzinc_str (const std::string &input, const Allocator &allocator=Allocator())
 
template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > parse_flatzinc (const std::string &filename, const Allocator &allocator=Allocator())
 
template<class Allocator >
void parse_xcsp3 (const std::string &filename, XCSP3Core::XCSP3_turbo_callbacks< Allocator > &cb)
 
template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > parse_xcsp3 (const std::string &filename, SolverOutput< Allocator > &output, TableDecomposition d=TableDecomposition::ELEMENTS)
 
template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > parse_xcsp3_str (const std::string &input, TableDecomposition d=TableDecomposition::ELEMENTS, const Allocator &allocator=Allocator())
 
template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > parse_xcsp3 (const std::string &filename, TableDecomposition d=TableDecomposition::ELEMENTS, const Allocator &allocator=Allocator())
 

Enumeration Type Documentation

◆ OutputType

enum class lala::OutputType
strong
Enumerator
XCSP 
FLATZINC 

◆ TableDecomposition

enum class lala::TableDecomposition
strong
Enumerator
DISJUNCTIVE 
TABLE_PREDICATE 
ELEMENTS 

Function Documentation

◆ parse_flatzinc_str() [1/2]

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > lala::parse_flatzinc_str ( const std::string & input,
SolverOutput< Allocator > & output )

We parse the constraint language FlatZinc as described in the documentation: https://www.minizinc.org/doc-2.4.1/en/fzn-spec.html#specification-of-flatzinc. We also extend FlatZinc conservatively for the purposes of our framework:

  • Add the type alias real (same as float).
  • Add the predicates int_ge, int_gt mainly to simplify testing in lala_core.
  • Add the functions int_minus, float_minus, int_neg, float_neg.
  • Add the ability to have true and false in the constraint statement.
  • Parameters of predicates are not required to be flat, every constraint comes with a functional flavor, e.g., int_le(int_plus(a,b), 5) stands for a+b <= 5.
  • Several solve items are allowed, which is useful for multi-objectives optimization.

◆ parse_flatzinc() [1/2]

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > lala::parse_flatzinc ( const std::string & filename,
SolverOutput< Allocator > & output )

◆ parse_flatzinc_str() [2/2]

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > lala::parse_flatzinc_str ( const std::string & input,
const Allocator & allocator = Allocator() )

◆ parse_flatzinc() [2/2]

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > lala::parse_flatzinc ( const std::string & filename,
const Allocator & allocator = Allocator() )

◆ parse_xcsp3() [1/3]

template<class Allocator >
void lala::parse_xcsp3 ( const std::string & filename,
XCSP3Core::XCSP3_turbo_callbacks< Allocator > & cb )

◆ parse_xcsp3() [2/3]

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > lala::parse_xcsp3 ( const std::string & filename,
SolverOutput< Allocator > & output,
TableDecomposition d = TableDecomposition::ELEMENTS )

◆ parse_xcsp3_str()

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > lala::parse_xcsp3_str ( const std::string & input,
TableDecomposition d = TableDecomposition::ELEMENTS,
const Allocator & allocator = Allocator() )

◆ parse_xcsp3() [3/3]

template<class Allocator >
battery::shared_ptr< TFormula< Allocator >, Allocator > lala::parse_xcsp3 ( const std::string & filename,
TableDecomposition d = TableDecomposition::ELEMENTS,
const Allocator & allocator = Allocator() )