clingo
|
A head node of a program-dependency graph. More...
#include <logic_program_types.h>
Public Types | |
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 | |
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... | |
implementation functions | |
Low-level implementation functions. Use with care and only if you know what you are doing! | |
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) |
Protected Member Functions | |
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 | |
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 |
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 |
A head node of a program-dependency graph.
A head node stores its possible supports and is either an atom or a disjunction.
|
explicitprotected |
Creates a new node that corresponds to a literal that is false.
|
inline |
Adds r as support edge for this node.
|
inline |
Assigns the value v to this head.
void Clasp::Asp::PrgHead::assignVar | ( | LogicProgram & | prg, |
PrgEdge | it | ||
) |
|
inline |
|
protected |
void Clasp::Asp::PrgHead::clearSupports | ( | ) |
|
inline |
|
inline |
Defined in a later incremental step?
|
inline |
Thawed in this step?
|
inline |
Is the head part of the (simplified) program?
|
inline |
Is this head an atom?
|
inline |
void Clasp::Asp::PrgHead::removeSupport | ( | PrgEdge | r | ) |
Removes r from the head's list of supports.
|
inline |
bool Clasp::Asp::PrgHead::simplifySupports | ( | LogicProgram & | prg, |
bool | strong, | ||
uint32 * | numDiffSupps = 0 |
||
) |
Removes any superfluous/irrelevant supports.
|
inline |
|
inline |
Number of supports (rules) for this head.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |