Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions
Clasp::Asp::PrgNode Class Reference

#include <logic_program_types.h>

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

List of all members.

Public Member Functions

bool eq () const
 Returns true if this node is equivalent to some other node.
bool hasVar () const
 Returns true if node has an associated variable in a solver.
uint32 id () const
 Returns the current id of this node.
bool ignoreScc () const
 Ignore the node during scc checking?
Literal literal () const
 Returns the literal associated with this node or a sentinel literal if no var is associated with this node.
 PrgNode (uint32 id, bool checkScc=true)
 Creates a new node that corresponds to a literal that is false.
bool relevant () const
 Is the node still relevant or removed() resp. eq()?
bool removed () const
 Was the node removed?
bool seen () const
Literal trueLit () const
 Returns the literal that must be true in order to fulfill the truth-value of this node.
ValueRep value () const
 Returns the value currently assigned to this node.
Var var () const
 Returns the variable associated with this node or sentVar if no var is associated with this node.
implementation functions

Low-level implementation functions. Use with care and only if you know what you are doing!

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 Attributes

static const uint32 maxVertex = (1u << 28)-1
static const uint32 noIdx = 1
static const uint32 noScc = (1u << 27)-1

Protected Attributes

uint32 eq_: 1
uint32 id_: 28
uint32 litIdx_: 31
uint32 noScc_: 1
uint32 seen_: 1
uint32 val_: 2

Private Member Functions

PrgNodeoperator= (const PrgNode &)
 PrgNode (const PrgNode &)

Detailed Description

A node of a program-dependency graph.

A node represents a relevant part in a logic program. Each node has at least a literal and a value.

Definition at line 314 of file logic_program_types.h.


Constructor & Destructor Documentation

Clasp::Asp::PrgNode::PrgNode ( uint32  id,
bool  checkScc = true 
) [explicit]

Creates a new node that corresponds to a literal that is false.

Definition at line 500 of file logic_program_types.cpp.

Clasp::Asp::PrgNode::PrgNode ( const PrgNode ) [private]

Member Function Documentation

bool Clasp::Asp::PrgNode::assignValueImpl ( ValueRep  v,
bool  noWeak 
) [inline]

Definition at line 370 of file logic_program_types.h.

void Clasp::Asp::PrgNode::clearLiteral ( bool  clVal) [inline]

Definition at line 359 of file logic_program_types.h.

bool Clasp::Asp::PrgNode::eq ( ) const [inline]

Returns true if this node is equivalent to some other node.

If eq() is true, the node is no longer relevant and must not be used any further. The only sensible operation is to call id() in order to get the id of the node that is equivalent to this node.

Definition at line 333 of file logic_program_types.h.

bool Clasp::Asp::PrgNode::hasVar ( ) const [inline]

Returns true if node has an associated variable in a solver.

Definition at line 336 of file logic_program_types.h.

uint32 Clasp::Asp::PrgNode::id ( ) const [inline]

Returns the current id of this node.

Definition at line 344 of file logic_program_types.h.

bool Clasp::Asp::PrgNode::ignoreScc ( ) const [inline]

Ignore the node during scc checking?

Definition at line 326 of file logic_program_types.h.

Returns the literal associated with this node or a sentinel literal if no var is associated with this node.

Definition at line 340 of file logic_program_types.h.

Definition at line 363 of file logic_program_types.h.

void Clasp::Asp::PrgNode::markSeen ( bool  b) [inline]

Definition at line 364 of file logic_program_types.h.

PrgNode& Clasp::Asp::PrgNode::operator= ( const PrgNode ) [private]
bool Clasp::Asp::PrgNode::relevant ( ) const [inline]

Is the node still relevant or removed() resp. eq()?

Definition at line 322 of file logic_program_types.h.

bool Clasp::Asp::PrgNode::removed ( ) const [inline]

Was the node removed?

Definition at line 324 of file logic_program_types.h.

void Clasp::Asp::PrgNode::resetId ( uint32  id,
bool  seen 
) [inline]

Definition at line 365 of file logic_program_types.h.

bool Clasp::Asp::PrgNode::seen ( ) const [inline]

Definition at line 334 of file logic_program_types.h.

void Clasp::Asp::PrgNode::setEq ( uint32  eqId) [inline]

Definition at line 361 of file logic_program_types.h.

void Clasp::Asp::PrgNode::setIgnoreScc ( bool  b) [inline]

Definition at line 362 of file logic_program_types.h.

Definition at line 358 of file logic_program_types.h.

Definition at line 360 of file logic_program_types.h.

Returns the literal that must be true in order to fulfill the truth-value of this node.

Definition at line 346 of file logic_program_types.h.

Returns the value currently assigned to this node.

Definition at line 342 of file logic_program_types.h.

Var Clasp::Asp::PrgNode::var ( ) const [inline]

Returns the variable associated with this node or sentVar if no var is associated with this node.

Definition at line 338 of file logic_program_types.h.


Member Data Documentation

uint32 Clasp::Asp::PrgNode::eq_ [protected]

Definition at line 384 of file logic_program_types.h.

uint32 Clasp::Asp::PrgNode::id_ [protected]

Definition at line 382 of file logic_program_types.h.

uint32 Clasp::Asp::PrgNode::litIdx_ [protected]

Definition at line 380 of file logic_program_types.h.

const uint32 Clasp::Asp::PrgNode::maxVertex = (1u << 28)-1 [static]

Definition at line 317 of file logic_program_types.h.

const uint32 Clasp::Asp::PrgNode::noIdx = 1 [static]

Definition at line 318 of file logic_program_types.h.

const uint32 Clasp::Asp::PrgNode::noScc = (1u << 27)-1 [static]

Definition at line 316 of file logic_program_types.h.

uint32 Clasp::Asp::PrgNode::noScc_ [protected]

Definition at line 381 of file logic_program_types.h.

uint32 Clasp::Asp::PrgNode::seen_ [protected]

Definition at line 385 of file logic_program_types.h.

uint32 Clasp::Asp::PrgNode::val_ [protected]

Definition at line 383 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