clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Classes | Typedefs | Functions | Variables
Boolean Constraints

Classes

class  Clasp::ClauseCreator
 A helper-class for creating/adding clauses. More...
 
class  Clasp::LoopFormula
 Constraint for Loop-Formulas. More...
 
struct  Clasp::Constraint_t
 Constraint types distinguished by a Solver. More...
 
struct  Clasp::Activity
 Type storing a constraint's activity. More...
 
class  Clasp::Constraint
 Base class for (boolean) constraints to be used in a Solver. More...
 
class  Clasp::LearntConstraint
 Base class for learnt constraints. More...
 
class  Clasp::PostPropagator
 Base class for post propagators. More...
 
class  Clasp::MessageHandler
 
struct  Clasp::Var_t
 Possible types of a variable. More...
 
class  Clasp::Literal
 A literal is a variable or its negation. More...
 
class  Clasp::MinimizeConstraint
 Base class for implementing (mulit-level) minimize statements. More...
 
class  Clasp::DefaultUnfoundedCheck
 Clasp's default unfounded set checker. More...
 
class  Clasp::WeightConstraint
 Class implementing smodels-like cardinality- and weight constraints. More...
 

Typedefs

typedef Constraint_t::Type Clasp::ConstraintType
 
typedef Constraint_t::Set Clasp::TypeSet
 
typedef uint32 Clasp::Var
 A variable is currently nothing more but an integer in the range [0..varMax). More...
 
typedef Var_t::Type Clasp::VarType
 
typedef int32 Clasp::weight_t
 A signed integer type used to represent weights. More...
 
typedef int64 Clasp::wsum_t
 A signed integer type used to represent sums of weights. More...
 
typedef PodVector< Var >::type Clasp::VarVec
 
typedef PodVector< Literal >::type Clasp::LitVec
 
typedef PodVector< weight_t >::type Clasp::WeightVec
 
typedef PodVector< wsum_t >::type Clasp::SumVec
 
typedef std::pair< Literal,
weight_t > 
Clasp::WeightLiteral
 
typedef PodVector
< WeightLiteral >::type 
Clasp::WeightLitVec
 
typedef uint8 Clasp::ValueRep
 
typedef PodVector< ValueRep >::type Clasp::ValueVec
 

Functions

Literal Clasp::operator^ (Literal lhs, bool sign)
 
Literal Clasp::operator^ (bool sign, Literal rhs)
 
Literal Clasp::negLit (Var v)
 Creates the negative literal of variable v. More...
 
Literal Clasp::posLit (Var v)
 Creates the positive literal of variable v. More...
 
uint32 Clasp::index (Var v)
 Returns the index of variable v. More...
 
bool Clasp::isSentinel (Literal p)
 Returns true if p represents the special variable 0. More...
 
bool Clasp::operator< (const Literal &lhs, const Literal &rhs)
 Defines a strict-weak-ordering for Literals. More...
 
bool Clasp::operator!= (const Literal &lhs, const Literal &rhs)
 Returns !(lhs == rhs). More...
 
void Clasp::swap (Literal &l, Literal &r)
 
ValueRep Clasp::trueValue (const Literal &lit)
 Returns the value that makes the literal lit true. More...
 
ValueRep Clasp::falseValue (const Literal &lit)
 Returns the value that makes the literal lit false. More...
 
bool Clasp::valSign (ValueRep v)
 Returns the sign that matches the value. More...
 

Variables

const Var Clasp::varMax = (Var(1) << 30)
 varMax is not a valid variale, i.e. currently Clasp supports at most 2^30 variables. More...
 
const Var Clasp::sentVar = 0
 The variable 0 has a special meaning in the solver. More...
 
const uint32 Clasp::idMax = UINT32_MAX
 Ids are integers in the range [0..idMax). More...
 
const ValueRep Clasp::value_true = 1
 
const ValueRep Clasp::value_false = 2
 
const ValueRep Clasp::value_free = 0
 

Detailed Description

Typedef Documentation

typedef Constraint_t::Type Clasp::ConstraintType
typedef PodVector<Literal>::type Clasp::LitVec

A vector of literals.

typedef PodVector<wsum_t>::type Clasp::SumVec

A vector of sums of weights.

typedef Constraint_t::Set Clasp::TypeSet
typedef uint8 Clasp::ValueRep

Type of the three value-literals.

typedef PodVector<ValueRep>::type Clasp::ValueVec
typedef uint32 Clasp::Var

A variable is currently nothing more but an integer in the range [0..varMax).

typedef Var_t::Type Clasp::VarType
typedef PodVector<Var>::type Clasp::VarVec

A vector of variables.

typedef int32 Clasp::weight_t

A signed integer type used to represent weights.

typedef std::pair<Literal, weight_t> Clasp::WeightLiteral

A weight-literal.

typedef PodVector<WeightLiteral>::type Clasp::WeightLitVec

A vector of weight-literals.

typedef PodVector<weight_t>::type Clasp::WeightVec

A vector of weights.

typedef int64 Clasp::wsum_t

A signed integer type used to represent sums of weights.

Function Documentation

ValueRep Clasp::falseValue ( const Literal &  lit)
inline

Returns the value that makes the literal lit false.

Parameters
litThe literal for which the false-value should be determined.
Returns
  • value_false iff lit is a positive literal
  • value_true iff lit is a negative literal.

Here is the call graph for this function:

uint32 Clasp::index ( Var  v)
inline

Returns the index of variable v.

Note
same as posLit(v).index()
bool Clasp::isSentinel ( Literal  p)
inline

Returns true if p represents the special variable 0.

Here is the call graph for this function:

Literal Clasp::negLit ( Var  v)
inline

Creates the negative literal of variable v.

bool Clasp::operator!= ( const Literal &  lhs,
const Literal &  rhs 
)
inline

Returns !(lhs == rhs).

bool Clasp::operator< ( const Literal &  lhs,
const Literal &  rhs 
)
inline

Defines a strict-weak-ordering for Literals.

Here is the call graph for this function:

Literal Clasp::operator^ ( Literal  lhs,
bool  sign 
)
inline

Here is the call graph for this function:

Literal Clasp::operator^ ( bool  sign,
Literal  rhs 
)
inline
Literal Clasp::posLit ( Var  v)
inline

Creates the positive literal of variable v.

void Clasp::swap ( Literal &  l,
Literal &  r 
)
inline

Here is the call graph for this function:

ValueRep Clasp::trueValue ( const Literal &  lit)
inline

Returns the value that makes the literal lit true.

Parameters
litThe literal for which the true-value should be determined.
Returns
  • value_true iff lit is a positive literal
  • value_false iff lit is a negative literal.

Here is the call graph for this function:

bool Clasp::valSign ( ValueRep  v)
inline

Returns the sign that matches the value.

Returns
  • false iff v == value_true
  • true otherwise

Variable Documentation

const uint32 Clasp::idMax = UINT32_MAX

Ids are integers in the range [0..idMax).

const Var Clasp::sentVar = 0

The variable 0 has a special meaning in the solver.

const ValueRep Clasp::value_false = 2

Value used for variables that are false.

const ValueRep Clasp::value_free = 0

Value used for variables that are unassigned.

const ValueRep Clasp::value_true = 1

Value used for variables that are true.

const Var Clasp::varMax = (Var(1) << 30)

varMax is not a valid variale, i.e. currently Clasp supports at most 2^30 variables.