clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Clasp::Asp::PrgDisj Class Reference

The head of a disjunctive rule. More...

#include <logic_program_types.h>

Inheritance diagram for Clasp::Asp::PrgDisj:
Inheritance graph
Collaboration diagram for Clasp::Asp::PrgDisj:
Collaboration graph

Public Types

typedef EdgeIterator atom_iterator
 
- Public Types inherited from Clasp::Asp::PrgHead
enum  Simplify { no_simplify = 0, force_simplify = 1 }
 
enum  State { state_normal = 0u, state_in_flux = 1u, state_freeze = 2u, state_freeze_true = 3u }
 
typedef EdgeIterator sup_iterator
 

Public Member Functions

void destroy ()
 Destroys a disjunction created via create(). More...
 
void detach (LogicProgram &prg)
 
uint32 size () const
 Number of atoms in disjunction. More...
 
atom_iterator begin () const
 
atom_iterator end () const
 
bool propagateAssigned (LogicProgram &prg, PrgHead *at, EdgeType t)
 Propagates the assignment of an atom in this disjunction. More...
 
- Public Member Functions inherited from Clasp::Asp::PrgHead
bool inUpper () const
 Is the head part of the (simplified) program? More...
 
bool isAtom () const
 Is this head an atom? More...
 
uint32 supports () const
 Number of supports (rules) for this head. More...
 
sup_iterator supps_begin () const
 
sup_iterator supps_end () const
 
bool frozen () const
 Defined in a later incremental step? More...
 
bool inFlux () const
 Thawed in this step? More...
 
Literal assumption () const
 
State state () const
 
void addSupport (PrgEdge r)
 Adds r as support edge for this node. More...
 
void addSupport (PrgEdge r, Simplify s)
 
void removeSupport (PrgEdge r)
 Removes r from the head's list of supports. More...
 
void clearSupports ()
 
void clearSupports (EdgeVec &to)
 
bool simplifySupports (LogicProgram &prg, bool strong, uint32 *numDiffSupps=0)
 Removes any superfluous/irrelevant supports. More...
 
bool assignValue (ValueRep v)
 Assigns the value v to this head. More...
 
void setInUpper (bool b)
 
void markDirty ()
 
void assignVar (LogicProgram &prg, PrgEdge it)
 
- Public Member Functions inherited from Clasp::Asp::PrgNode
 PrgNode (uint32 id, bool checkScc=true)
 Creates a new node that corresponds to a literal that is false. More...
 
bool relevant () const
 Is the node still relevant or removed() resp. eq()? More...
 
bool removed () const
 Was the node removed? More...
 
bool ignoreScc () const
 Ignore the node during scc checking? More...
 
bool eq () const
 Returns true if this node is equivalent to some other node. More...
 
bool seen () const
 
bool hasVar () const
 Returns true if node has an associated variable in a solver. More...
 
Var var () const
 Returns the variable associated with this node or sentVar if no var is associated with this node. More...
 
Literal literal () const
 Returns the literal associated with this node or a sentinel literal if no var is associated with this node. More...
 
ValueRep value () const
 Returns the value currently assigned to this node. More...
 
uint32 id () const
 Returns the current id of this node. More...
 
Literal trueLit () const
 Returns the literal that must be true in order to fulfill the truth-value of this node. More...
 
void setLiteral (Literal x)
 
void clearLiteral (bool clVal)
 
void setValue (ValueRep v)
 
void setEq (uint32 eqId)
 
void setIgnoreScc (bool b)
 
void markRemoved ()
 
void markSeen (bool b)
 
void resetId (uint32 id, bool seen)
 
bool assignValueImpl (ValueRep v, bool noWeak)
 

Static Public Member Functions

static PrgDisjcreate (uint32 id, const VarVec &heads)
 Constructor for disjunctions. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Clasp::Asp::PrgNode
static const uint32 noScc = (1u << 27)-1
 
static const uint32 maxVertex = (1u << 28)-1
 
static const uint32 noIdx = 1
 
- Protected Member Functions inherited from Clasp::Asp::PrgHead
 PrgHead (uint32 id, NodeType t, uint32 data=0, bool checkScc=true)
 Creates a new node that corresponds to a literal that is false. More...
 
bool backpropagate (LogicProgram &prg, ValueRep val, bool bpFull)
 
- Protected Attributes inherited from Clasp::Asp::PrgHead
EdgeVec supports_
 
uint32 data_: 27
 
uint32 upper_: 1
 
uint32 dirty_: 1
 
uint32 state_: 2
 
uint32 isAtom_: 1
 
- Protected Attributes inherited from Clasp::Asp::PrgNode
uint32 litIdx_: 31
 
uint32 noScc_: 1
 
uint32 id_: 28
 
uint32 val_: 2
 
uint32 eq_: 1
 
uint32 seen_: 1
 

Detailed Description

The head of a disjunctive rule.

Member Typedef Documentation

Member Function Documentation

atom_iterator Clasp::Asp::PrgDisj::begin ( ) const
inline
PrgDisj * Clasp::Asp::PrgDisj::create ( uint32  id,
const VarVec heads 
)
static

Constructor for disjunctions.

void Clasp::Asp::PrgDisj::destroy ( )

Destroys a disjunction created via create().

void Clasp::Asp::PrgDisj::detach ( LogicProgram prg)

Here is the call graph for this function:

atom_iterator Clasp::Asp::PrgDisj::end ( ) const
inline

Here is the call graph for this function:

bool Clasp::Asp::PrgDisj::propagateAssigned ( LogicProgram prg,
PrgHead at,
EdgeType  t 
)

Propagates the assignment of an atom in this disjunction.

Here is the call graph for this function:

uint32 Clasp::Asp::PrgDisj::size ( ) const
inline

Number of atoms in disjunction.


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