clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Namespaces | Classes | Typedefs | Enumerations | Functions
Gringo Namespace Reference

Namespaces

 detail
 
 Ground
 
 Input
 
 IO
 
 Output
 
 Test
 

Classes

struct  AbstractDomain
 
struct  AtomState
 
struct  BindIndex
 
struct  BinOpTerm
 
struct  Bound
 
struct  call_hash
 
class  Clonable
 
struct  clone
 
struct  clone< Bound >
 
struct  clone< CSPAddTerm >
 
struct  clone< CSPMulTerm >
 
struct  clone< CSPRelTerm >
 
struct  clone< std::pair< T, U > >
 
struct  clone< std::tuple< T...> >
 
struct  clone< std::unique_ptr< T > >
 
struct  clone< std::vector< T > >
 
struct  clone< T * >
 
class  Comparable
 
struct  Control
 
struct  CSPAddTerm
 
struct  CSPMulTerm
 
struct  CSPRelTerm
 
struct  DefaultMessagePrinter
 
class  Defines
 
struct  Domain
 
struct  DotsTerm
 
class  enum_interval_set
 
struct  Exports
 
struct  extract_first
 
class  Flyweight
 
class  FlyweightVec
 
struct  FullIndex
 
struct  FunctionTerm
 
struct  FWSignature
 
struct  GFunctionTerm
 
struct  GLinearTerm
 
class  Graph
 
struct  GRef
 
struct  GTerm
 
struct  GValTerm
 
struct  GVarTerm
 
class  Hashable
 
struct  identity
 
struct  Indexed
 
struct  IndexUpdater
 
struct  IntervalSet
 
class  LexerState
 
struct  LinearTerm
 
class  Locatable
 
class  LocatableClass
 
struct  Location
 
struct  Lua
 
struct  LuaImpl
 
struct  LuaTerm
 
struct  MessagePrinter
 
struct  Model
 
struct  PoolTerm
 
struct  PredicateDomain
 
class  Printable
 
struct  Python
 
struct  PythonImpl
 
struct  Report
 
struct  SafetyChecker
 
struct  Scripts
 
struct  Signature
 
struct  SolveFuture
 
struct  SolveIter
 
struct  Statistics
 
struct  Term
 
class  unique_list
 
class  unique_list_const_iterator
 
class  unique_list_iterator
 
struct  unique_list_node
 
struct  UnOpTerm
 
struct  ValTerm
 
struct  Value
 
struct  value_equal_to
 
struct  value_equal_to< std::pair< T, U > >
 
struct  value_equal_to< std::reference_wrapper< T > >
 
struct  value_equal_to< std::tuple< T...> >
 
struct  value_equal_to< std::unique_ptr< T > >
 
struct  value_equal_to< std::vector< T...> >
 
struct  value_equal_to< T * >
 
struct  value_hash
 
struct  value_hash< std::pair< T, U > >
 
struct  value_hash< std::reference_wrapper< T > >
 
struct  value_hash< std::tuple< T...> >
 
struct  value_hash< std::unique_ptr< T > >
 
struct  value_hash< std::vector< T > >
 
struct  value_hash< T * >
 
struct  VarTerm
 

Typedefs

typedef std::vector< BoundBoundVec
 
using Int64Vec = std::vector< int64_t >
 
using FWStringVec = std::vector< FWString >
 
using SValVec = std::vector< Term::SVal >
 
using PredDomMap = unique_list< std::pair< FWSignature, PredicateDomain >, extract_first< FWSignature >>
 
using UTerm = std::unique_ptr< Term >
 
using UGTerm = std::unique_ptr< GTerm >
 
using UGTermVec = std::vector< UGTerm >
 
using SGRef = std::shared_ptr< GRef >
 
using UTermVec = std::vector< UTerm >
 
using UTermVecVec = std::vector< UTermVec >
 
using VarTermVec = std::vector< std::reference_wrapper< VarTerm >>
 
using VarTermBoundVec = std::vector< std::pair< VarTerm *, bool >>
 
using VarTermSet = std::unordered_set< std::reference_wrapper< VarTerm >, value_hash< std::reference_wrapper< VarTerm >>, value_equal_to< std::reference_wrapper< VarTerm >>>
 
using CSPGroundAdd = std::vector< std::pair< int, Value >>
 
using CSPGroundLit = std::tuple< Relation, CSPGroundAdd, int >
 
using ValVec = std::vector< Value >
 
using FWValVec = FlyweightVec< Value >
 
using FWString = Flyweight< std::string >
 
using IdValMap = std::unordered_map< FWString, Value >
 

Enumerations

enum  NAF { NAF::POS = 0, NAF::NOT = 1, NAF::NOTNOT = 2 }
 
enum  RECNAF { RECNAF::POS, RECNAF::NOT, RECNAF::NOTNOT, RECNAF::RECNOT }
 
enum  Relation : unsigned {
  Relation::GT, Relation::LT, Relation::LEQ, Relation::GEQ,
  Relation::EQ, Relation::NEQ, Relation::ASSIGN
}
 
enum  AggregateFunction : unsigned {
  AggregateFunction::COUNT, AggregateFunction::SUM, AggregateFunction::SUMP, AggregateFunction::MIN,
  AggregateFunction::MAX
}
 
enum  SolveResult { SolveResult::UNKNOWN =0, SolveResult::SAT =1, SolveResult::UNSAT =2 }
 
enum  BinderType { BinderType::NEW, BinderType::OLD, BinderType::ALL }
 
enum  Warnings {
  W_DEFINE_REDEFINTION, W_DEFINE_CYCLIC, W_TERM_UNDEFINED, W_ATOM_UNDEFINED,
  W_NONMONOTONE_AGGREGATE, W_FILE_INCLUDED, W_TOTAL
}
 
enum  Errors { ERROR }
 
enum  BinOp : int {
  BinOp::XOR, BinOp::OR, BinOp::AND, BinOp::ADD,
  BinOp::SUB, BinOp::MUL, BinOp::DIV, BinOp::MOD,
  BinOp::POW
}
 
enum  UnOp : int { UnOp::NEG, UnOp::NOT, UnOp::ABS }
 

Functions

const char * getExecutableName ()
 
int getFileAndLine (unw_word_t addr, char *file, int *line)
 
void showBacktrace (void)
 
std::ostream & operator<< (std::ostream &out, NAF naf)
 
NAF inv (NAF naf)
 
RECNAF recnaf (NAF naf, bool recursive)
 
std::ostream & operator<< (std::ostream &out, RECNAF naf)
 
Relation inv (Relation rel)
 
Relation neg (Relation rel)
 
std::ostream & operator<< (std::ostream &out, Relation rel)
 
std::ostream & operator<< (std::ostream &out, AggregateFunction fun)
 
std::ostream & operator<< (std::ostream &out, BinderType x)
 
PredicateDomainadd (PredDomMap &domains, FWSignature const &sig)
 
template<class T >
bool operator< (T const &a, typename IntervalSet< T >::Interval const &b)
 
template<class T >
bool operator< (typename IntervalSet< T >::Interval const &a, T const &b)
 
std::ostream & operator<< (std::ostream &out, Location const &loc)
 
template<class T , class... Args>
std::unique_ptr< T > make_locatable (Location const &loc, Args &&...args)
 
std::unique_ptr< MessagePrinter > & message_printer ()
 
std::ostream & operator<< (std::ostream &out, Printable const &x)
 
int eval (UnOp op, int x)
 
int eval (BinOp op, int x, int y)
 
std::ostream & operator<< (std::ostream &out, BinOp op)
 
std::ostream & operator<< (std::ostream &out, UnOp op)
 
UTermVec unpool (UTerm const &x)
 
int toNum (UTerm const &x)
 
std::ostream & operator<< (std::ostream &out, CSPMulTerm const &x)
 
std::ostream & operator<< (std::ostream &out, CSPAddTerm const &x)
 
std::ostream & operator<< (std::ostream &out, CSPRelTerm const &x)
 
template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&...args)
 
template<class T >
bool is_value_equal_to (T const &a, T const &b)
 
template<class T >
void hash_combine (std::size_t &seed, const T &v)
 
template<class T >
size_t get_value_hash (T const &x)
 
template<class T , class U , class... V>
size_t get_value_hash (T const &x, U const &y, V const &...args)
 
template<class T >
get_clone (T const &x)
 
template<class T , class U >
void print_comma (std::ostream &out, T const &x, const char *sep, U const &f)
 
template<class T >
void print_comma (std::ostream &out, T const &x, const char *sep)
 
template<class T >
void cross_product (std::vector< std::vector< T >> &vec)
 
std::ostream & operator<< (std::ostream &out, FWString const &x)
 
std::string quote (std::string const &str)
 
std::string unquote (std::string const &str)
 
std::ostream & operator<< (std::ostream &out, Signature const &x)
 
std::ostream & operator<< (std::ostream &out, FWSignature const &x)
 
std::ostream & operator<< (std::ostream &out, const Gringo::Value &val)
 
int ipow (int a, int b)
 
UTerm wrap (UTerm &&x)
 
std::string & replace_all (std::string &haystack, std::string const &needle, std::string const &replace)
 
std::string replace_all (std::string &&haystack, std::string const &needle, std::string const &replace)
 

Typedef Documentation

typedef std::vector<Bound> Gringo::BoundVec
using Gringo::CSPGroundAdd = typedef std::vector<std::pair<int,Value>>
using Gringo::CSPGroundLit = typedef std::tuple<Relation, CSPGroundAdd, int>
using Gringo::FWString = typedef Flyweight<std::string>
using Gringo::FWStringVec = typedef std::vector<FWString>
using Gringo::IdValMap = typedef std::unordered_map<FWString, Value>
using Gringo::Int64Vec = typedef std::vector<int64_t>
typedef std::shared_ptr< GRef > Gringo::SGRef
using Gringo::SValVec = typedef std::vector<Term::SVal>
using Gringo::UGTerm = typedef std::unique_ptr<GTerm>
using Gringo::UGTermVec = typedef std::vector<UGTerm>
typedef std::unique_ptr< Term > Gringo::UTerm
using Gringo::UTermVec = typedef std::vector<UTerm>
using Gringo::UTermVecVec = typedef std::vector<UTermVec>
using Gringo::ValVec = typedef std::vector<Value>
using Gringo::VarTermBoundVec = typedef std::vector<std::pair<VarTerm*,bool>>
using Gringo::VarTermSet = typedef std::unordered_set<std::reference_wrapper<VarTerm>, value_hash<std::reference_wrapper<VarTerm>>, value_equal_to<std::reference_wrapper<VarTerm>>>
using Gringo::VarTermVec = typedef std::vector<std::reference_wrapper<VarTerm>>

Enumeration Type Documentation

enum Gringo::AggregateFunction : unsigned
strong
Enumerator
COUNT 
SUM 
SUMP 
MIN 
MAX 
enum Gringo::BinderType
strong
Enumerator
NEW 
OLD 
ALL 
enum Gringo::BinOp : int
strong
Enumerator
XOR 
OR 
AND 
ADD 
SUB 
MUL 
DIV 
MOD 
POW 
Enumerator
ERROR 
enum Gringo::NAF
strong
Enumerator
POS 
NOT 
NOTNOT 
enum Gringo::RECNAF
strong
Enumerator
POS 
NOT 
NOTNOT 
RECNOT 
enum Gringo::Relation : unsigned
strong
Enumerator
GT 
LT 
LEQ 
GEQ 
EQ 
NEQ 
ASSIGN 
enum Gringo::SolveResult
strong
Enumerator
UNKNOWN 
SAT 
UNSAT 
enum Gringo::UnOp : int
strong
Enumerator
NEG 
NOT 
ABS 
Enumerator
W_DEFINE_REDEFINTION 
W_DEFINE_CYCLIC 
W_TERM_UNDEFINED 
W_ATOM_UNDEFINED 
W_NONMONOTONE_AGGREGATE 
W_FILE_INCLUDED 
W_TOTAL 

Function Documentation

PredicateDomain& Gringo::add ( PredDomMap &  domains,
FWSignature const &  sig 
)
inline

Here is the call graph for this function:

template<class T >
void Gringo::cross_product ( std::vector< std::vector< T >> &  vec)
inline

Here is the call graph for this function:

int Gringo::eval ( UnOp  op,
int  x 
)
int Gringo::eval ( BinOp  op,
int  x,
int  y 
)

Here is the call graph for this function:

template<class T >
T Gringo::get_clone ( T const &  x)
template<class T >
size_t Gringo::get_value_hash ( T const &  x)
inline
template<class T , class U , class... V>
size_t Gringo::get_value_hash ( T const &  x,
U const &  y,
V const &...  args 
)
inline

Here is the call graph for this function:

const char* Gringo::getExecutableName ( )
inline
int Gringo::getFileAndLine ( unw_word_t  addr,
char *  file,
int *  line 
)
inline

Here is the call graph for this function:

template<class T >
void Gringo::hash_combine ( std::size_t &  seed,
const T &  v 
)
inline
NAF Gringo::inv ( NAF  naf)
inline
Relation Gringo::inv ( Relation  rel)
inline
int Gringo::ipow ( int  a,
int  b 
)
inline
template<class T >
bool Gringo::is_value_equal_to ( T const &  a,
T const &  b 
)
inline
template<class T , class... Args>
std::unique_ptr< T > Gringo::make_locatable ( Location const &  loc,
Args &&...  args 
)
template<typename T , typename... Args>
std::unique_ptr< T > Gringo::make_unique ( Args &&...  args)
std::unique_ptr<MessagePrinter>& Gringo::message_printer ( )
inline
Relation Gringo::neg ( Relation  rel)
inline
template<class T >
bool Gringo::operator< ( T const &  a,
typename IntervalSet< T >::Interval const &  b 
)
template<class T >
bool Gringo::operator< ( typename IntervalSet< T >::Interval const &  a,
T const &  b 
)
std::ostream & Gringo::operator<< ( std::ostream &  out,
NAF  naf 
)
inline
std::ostream& Gringo::operator<< ( std::ostream &  out,
Printable const &  x 
)
inline

Here is the call graph for this function:

std::ostream & Gringo::operator<< ( std::ostream &  out,
BinderType  x 
)
inline
std::ostream & Gringo::operator<< ( std::ostream &  out,
RECNAF  naf 
)
inline
std::ostream & Gringo::operator<< ( std::ostream &  out,
BinOp  op 
)
std::ostream & Gringo::operator<< ( std::ostream &  out,
UnOp  op 
)
std::ostream & Gringo::operator<< ( std::ostream &  out,
Location const &  loc 
)
inline
std::ostream& Gringo::operator<< ( std::ostream &  out,
FWString const &  x 
)
inline
std::ostream & Gringo::operator<< ( std::ostream &  out,
Relation  rel 
)
inline
std::ostream & Gringo::operator<< ( std::ostream &  out,
CSPMulTerm const &  x 
)
std::ostream & Gringo::operator<< ( std::ostream &  out,
AggregateFunction  fun 
)
inline
std::ostream& Gringo::operator<< ( std::ostream &  out,
Signature const &  x 
)
inline

Here is the call graph for this function:

std::ostream & Gringo::operator<< ( std::ostream &  out,
CSPAddTerm const &  x 
)

Here is the call graph for this function:

std::ostream& Gringo::operator<< ( std::ostream &  out,
FWSignature const &  x 
)
inline
std::ostream & Gringo::operator<< ( std::ostream &  out,
CSPRelTerm const &  x 
)
std::ostream & Gringo::operator<< ( std::ostream &  out,
const Gringo::Value val 
)
inline

Here is the call graph for this function:

template<class T , class U >
void Gringo::print_comma ( std::ostream &  out,
T const &  x,
const char *  sep,
U const &  f 
)

Here is the call graph for this function:

template<class T >
void Gringo::print_comma ( std::ostream &  out,
T const &  x,
const char *  sep 
)

Here is the call graph for this function:

std::string Gringo::quote ( std::string const &  str)
inline
RECNAF Gringo::recnaf ( NAF  naf,
bool  recursive 
)
inline
std::string& Gringo::replace_all ( std::string &  haystack,
std::string const &  needle,
std::string const &  replace 
)
inline

Here is the call graph for this function:

std::string Gringo::replace_all ( std::string &&  haystack,
std::string const &  needle,
std::string const &  replace 
)
inline

Here is the call graph for this function:

void Gringo::showBacktrace ( void  )
inline

Here is the call graph for this function:

int Gringo::toNum ( UTerm const &  x)

Here is the call graph for this function:

UTermVec Gringo::unpool ( UTerm const &  x)

Here is the call graph for this function:

std::string Gringo::unquote ( std::string const &  str)
inline
UTerm Gringo::wrap ( UTerm &&  x)