Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Clasp::Asp::PrgHead Class Reference

A head node of a program-dependency graph. More...

#include <logic_program_types.h>

Inheritance diagram for Clasp::Asp::PrgHead:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.


Member Typedef Documentation

Definition at line 400 of file logic_program_types.h.


Member Enumeration Documentation

Enumerator:
no_simplify 
force_simplify 

Definition at line 398 of file logic_program_types.h.

Enumerator:
state_normal 
state_in_flux 
state_freeze 
state_freeze_true 

Definition at line 399 of file logic_program_types.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

Adds r as support edge for this node.

Definition at line 417 of file logic_program_types.h.

Definition at line 516 of file logic_program_types.cpp.

Assigns the value v to this head.

Definition at line 426 of file logic_program_types.h.

Definition at line 583 of file logic_program_types.cpp.

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.

Definition at line 528 of file logic_program_types.cpp.

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.

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.

Definition at line 408 of file logic_program_types.h.

Definition at line 409 of file logic_program_types.h.


Member Data Documentation

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.

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.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:41