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 | |
| void | addSupport (PrgEdge r) |
| Adds r as support edge for this node. | |
| void | addSupport (PrgEdge r, Simplify s) |
| bool | assignValue (ValueRep v) |
| Assigns the value v to this head. | |
| Literal | assumption () const |
| void | clearSupports () |
| void | clearSupports (EdgeVec &to) |
| bool | frozen () const |
| Defined in a later incremental step? | |
| bool | inFlux () const |
| Thawed in this step? | |
| bool | inUpper () const |
| Is the head part of the (simplified) program? | |
| bool | isAtom () const |
| Is this head an atom? | |
| void | removeSupport (PrgEdge r) |
| Removes r from the head's list of supports. | |
| bool | simplifySupports (LogicProgram &prg, bool strong, uint32 *numDiffSupps=0) |
| Removes any superfluous/irrelevant supports. | |
| State | state () const |
| uint32 | supports () const |
| Number of supports (rules) for this head. | |
| sup_iterator | supps_begin () const |
| sup_iterator | supps_end () const |
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) |
Protected Member Functions | |
| bool | backpropagate (LogicProgram &prg, ValueRep val, bool bpFull) |
| PrgHead (uint32 id, NodeType t, uint32 data=0, bool checkScc=true) | |
| Creates a new node that corresponds to a literal that is false. | |
Protected Attributes | |
| uint32 | data_: 27 |
| uint32 | dirty_: 1 |
| uint32 | isAtom_: 1 |
| uint32 | state_: 2 |
| EdgeVec | supports_ |
| uint32 | upper_: 1 |
A head node of a program-dependency graph.
A head node stores its possible supports and is either an atom or a disjunction.
Definition at line 396 of file logic_program_types.h.
Definition at line 400 of file logic_program_types.h.
Definition at line 398 of file logic_program_types.h.
Definition at line 399 of file logic_program_types.h.
| Clasp::Asp::PrgHead::PrgHead | ( | uint32 | id, |
| NodeType | t, | ||
| uint32 | data = 0, |
||
| bool | checkScc = true |
||
| ) | [explicit, protected] |
Creates a new node that corresponds to a literal that is false.
Definition at line 507 of file logic_program_types.cpp.
| void Clasp::Asp::PrgHead::addSupport | ( | PrgEdge | r | ) | [inline] |
Adds r as support edge for this node.
Definition at line 417 of file logic_program_types.h.
| void Clasp::Asp::PrgHead::addSupport | ( | PrgEdge | r, |
| Simplify | s | ||
| ) |
Definition at line 516 of file logic_program_types.cpp.
| bool Clasp::Asp::PrgHead::assignValue | ( | ValueRep | v | ) | [inline] |
Assigns the value v to this head.
Definition at line 426 of file logic_program_types.h.
| void Clasp::Asp::PrgHead::assignVar | ( | LogicProgram & | prg, |
| PrgEdge | it | ||
| ) |
Definition at line 583 of file logic_program_types.cpp.
| Literal Clasp::Asp::PrgHead::assumption | ( | ) | const [inline] |
Definition at line 414 of file logic_program_types.h.
| bool Clasp::Asp::PrgHead::backpropagate | ( | LogicProgram & | prg, |
| ValueRep | val, | ||
| bool | bpFull | ||
| ) | [protected] |
Definition at line 604 of file logic_program_types.cpp.
| void Clasp::Asp::PrgHead::clearSupports | ( | ) |
Definition at line 528 of file logic_program_types.cpp.
| void Clasp::Asp::PrgHead::clearSupports | ( | EdgeVec & | to | ) | [inline] |
Definition at line 422 of file logic_program_types.h.
| bool Clasp::Asp::PrgHead::frozen | ( | ) | const [inline] |
Defined in a later incremental step?
Definition at line 411 of file logic_program_types.h.
| bool Clasp::Asp::PrgHead::inFlux | ( | ) | const [inline] |
Thawed in this step?
Definition at line 413 of file logic_program_types.h.
| bool Clasp::Asp::PrgHead::inUpper | ( | ) | const [inline] |
Is the head part of the (simplified) program?
Definition at line 403 of file logic_program_types.h.
| bool Clasp::Asp::PrgHead::isAtom | ( | ) | const [inline] |
Is this head an atom?
Definition at line 405 of file logic_program_types.h.
| void Clasp::Asp::PrgHead::markDirty | ( | ) | [inline] |
Definition at line 434 of file logic_program_types.h.
| void Clasp::Asp::PrgHead::removeSupport | ( | PrgEdge | r | ) |
Removes r from the head's list of supports.
Definition at line 521 of file logic_program_types.cpp.
| void Clasp::Asp::PrgHead::setInUpper | ( | bool | b | ) | [inline] |
Definition at line 433 of file logic_program_types.h.
| bool Clasp::Asp::PrgHead::simplifySupports | ( | LogicProgram & | prg, |
| bool | strong, | ||
| uint32 * | numDiffSupps = 0 |
||
| ) |
Removes any superfluous/irrelevant supports.
Definition at line 536 of file logic_program_types.cpp.
| State Clasp::Asp::PrgHead::state | ( | ) | const [inline] |
Definition at line 415 of file logic_program_types.h.
| uint32 Clasp::Asp::PrgHead::supports | ( | ) | const [inline] |
Number of supports (rules) for this head.
Definition at line 407 of file logic_program_types.h.
| sup_iterator Clasp::Asp::PrgHead::supps_begin | ( | ) | const [inline] |
Definition at line 408 of file logic_program_types.h.
| sup_iterator Clasp::Asp::PrgHead::supps_end | ( | ) | const [inline] |
Definition at line 409 of file logic_program_types.h.
uint32 Clasp::Asp::PrgHead::data_ [protected] |
Definition at line 442 of file logic_program_types.h.
uint32 Clasp::Asp::PrgHead::dirty_ [protected] |
Definition at line 444 of file logic_program_types.h.
uint32 Clasp::Asp::PrgHead::isAtom_ [protected] |
Definition at line 446 of file logic_program_types.h.
uint32 Clasp::Asp::PrgHead::state_ [protected] |
Definition at line 445 of file logic_program_types.h.
EdgeVec Clasp::Asp::PrgHead::supports_ [protected] |
Definition at line 441 of file logic_program_types.h.
uint32 Clasp::Asp::PrgHead::upper_ [protected] |
Definition at line 443 of file logic_program_types.h.