Public Types | Public Member Functions | Private Attributes
Clasp::Asp::PrgAtom Class Reference

An atom in a logic program. More...

#include <logic_program_types.h>

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

List of all members.

Public Types

typedef LitVec::const_iterator dep_iterator
enum  Dependency { dep_pos = 0, dep_neg = 1, dep_all = 2 }

Public Member Functions

Literal eqGoal (bool sign) const
 If eq(), stores the literal that is eq to this atom.
bool inDisj () const
 Returns true if atom belongs to a disjunctive head.
 PrgAtom (uint32 id, bool checkScc=true)
uint32 scc () const
 Strongly connected component of this node.
forward dependencies (bodies containing this atom)
dep_iterator deps_begin () const
dep_iterator deps_end () const
bool hasDep (Dependency d) const
void addDep (Var bodyId, bool pos)
void removeDep (Var bodyId, bool pos)
void clearDeps (Dependency d)
implementation functions

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

void setEqGoal (Literal x)
bool propagateValue (LogicProgram &prg, bool backprop)
bool addConstraints (const LogicProgram &prg, ClauseCreator &c)
void setScc (uint32 scc)
void setState (State s)

Private Attributes

LitVec deps_

Detailed Description

An atom in a logic program.

An atom stores the list of bodies depending on it. Furthermore, once strongly-connected components are identified, atoms store their SCC-number. All trivial SCCs are represented with the special SCC-number PrgNode::noScc.

Definition at line 456 of file logic_program_types.h.


Member Typedef Documentation

typedef LitVec::const_iterator Clasp::Asp::PrgAtom::dep_iterator

Definition at line 459 of file logic_program_types.h.


Member Enumeration Documentation

Enumerator:
dep_pos 
dep_neg 
dep_all 

Definition at line 458 of file logic_program_types.h.


Constructor & Destructor Documentation

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

Definition at line 638 of file logic_program_types.cpp.


Member Function Documentation

Definition at line 733 of file logic_program_types.cpp.

void Clasp::Asp::PrgAtom::addDep ( Var  bodyId,
bool  pos 
)

Definition at line 658 of file logic_program_types.cpp.

Definition at line 671 of file logic_program_types.cpp.

Definition at line 472 of file logic_program_types.h.

Definition at line 473 of file logic_program_types.h.

Literal Clasp::Asp::PrgAtom::eqGoal ( bool  sign) const

If eq(), stores the literal that is eq to this atom.

Definition at line 648 of file logic_program_types.cpp.

Definition at line 685 of file logic_program_types.cpp.

Returns true if atom belongs to a disjunctive head.

Definition at line 693 of file logic_program_types.cpp.

bool Clasp::Asp::PrgAtom::propagateValue ( LogicProgram prg,
bool  backprop 
)

Definition at line 703 of file logic_program_types.cpp.

void Clasp::Asp::PrgAtom::removeDep ( Var  bodyId,
bool  pos 
)

Definition at line 665 of file logic_program_types.cpp.

uint32 Clasp::Asp::PrgAtom::scc ( ) const [inline]

Strongly connected component of this node.

Definition at line 462 of file logic_program_types.h.

Definition at line 643 of file logic_program_types.cpp.

void Clasp::Asp::PrgAtom::setScc ( uint32  scc) [inline]

Definition at line 489 of file logic_program_types.h.

void Clasp::Asp::PrgAtom::setState ( State  s) [inline]

Definition at line 490 of file logic_program_types.h.


Member Data Documentation

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