clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Classes | Namespaces | Typedefs | Functions | Variables
literal.h File Reference
#include <clasp/util/platform.h>
#include <clasp/pod_vector.h>
#include <algorithm>
#include <limits>
Include dependency graph for literal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Clasp::Var_t
 Possible types of a variable. More...
 
class  Clasp::Literal
 A literal is a variable or its negation. More...
 
class  Clasp::SymbolTable
 Symbol table that maps external ids to internal literals. More...
 
struct  Clasp::SymbolTable::symbol_type
 
class  Clasp::ClaspError
 

Namespaces

 Clasp
 

Typedefs

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

Contains the definition of the class Literal.