Used during rule simplification. More...
#include <logic_program_types.h>
Public Member Functions | |
void | addToBody (Literal p) |
Mark p as a literal contained in the active rule. | |
void | addToHead (Var v) |
Mark v as a head of the active rule. | |
void | addToHead (PrgEdge t) |
bool | allMarked (const VarVec &vec, uint8 f) const |
void | clear (Var v, uint8 f) |
void | clear (Var v) |
void | clearAll () |
void | clearBody (Literal p) |
void | clearHead (PrgEdge t) |
bool | inBody (Literal p) const |
Does p appear in the body of the active rule? | |
bool | inHead (PrgEdge t) const |
Does t.node() appear in the head of the active rule? | |
bool | isSet (Var v, uint8 f) const |
RuleState () | |
void | set (Var v, uint8 f) |
Static Public Attributes | |
static const uint8 | any_flag = 0xFFu |
static const uint8 | choice_flag = 0x1u << 3u |
static const uint8 | disj_flag = 0x1u << 4u |
static const uint8 | head_flag = 0x1u << 2u |
static const uint8 | neg_flag = 0x2u |
static const uint8 | pos_flag = 0x1u |
Private Types | |
typedef PodVector< uint8 >::type | StateVec |
Private Member Functions | |
void | grow (Var v) |
uint8 | headFlag (PrgEdge t) const |
Private Attributes | |
StateVec | state_ |
Used during rule simplification.
Definition at line 269 of file logic_program_types.h.
typedef PodVector<uint8>::type Clasp::Asp::RuleState::StateVec [private] |
Definition at line 303 of file logic_program_types.h.
Clasp::Asp::RuleState::RuleState | ( | ) | [inline] |
Definition at line 277 of file logic_program_types.h.
void Clasp::Asp::RuleState::addToBody | ( | Literal | p | ) | [inline] |
Mark p as a literal contained in the active rule.
Definition at line 287 of file logic_program_types.h.
void Clasp::Asp::RuleState::addToHead | ( | Var | v | ) | [inline] |
Mark v as a head of the active rule.
Definition at line 284 of file logic_program_types.h.
void Clasp::Asp::RuleState::addToHead | ( | PrgEdge | t | ) | [inline] |
Definition at line 285 of file logic_program_types.h.
bool Clasp::Asp::RuleState::allMarked | ( | const VarVec & | vec, |
uint8 | f | ||
) | const [inline] |
Definition at line 296 of file logic_program_types.h.
void Clasp::Asp::RuleState::clear | ( | Var | v, |
uint8 | f | ||
) | [inline] |
Definition at line 290 of file logic_program_types.h.
void Clasp::Asp::RuleState::clear | ( | Var | v | ) | [inline] |
Definition at line 291 of file logic_program_types.h.
void Clasp::Asp::RuleState::clearAll | ( | ) | [inline] |
Definition at line 294 of file logic_program_types.h.
void Clasp::Asp::RuleState::clearBody | ( | Literal | p | ) | [inline] |
Definition at line 293 of file logic_program_types.h.
void Clasp::Asp::RuleState::clearHead | ( | PrgEdge | t | ) | [inline] |
Definition at line 292 of file logic_program_types.h.
void Clasp::Asp::RuleState::grow | ( | Var | v | ) | [inline, private] |
Definition at line 304 of file logic_program_types.h.
uint8 Clasp::Asp::RuleState::headFlag | ( | PrgEdge | t | ) | const [inline, private] |
Definition at line 305 of file logic_program_types.h.
bool Clasp::Asp::RuleState::inBody | ( | Literal | p | ) | const [inline] |
Does p appear in the body of the active rule?
Definition at line 281 of file logic_program_types.h.
bool Clasp::Asp::RuleState::inHead | ( | PrgEdge | t | ) | const [inline] |
Does t.node() appear in the head of the active rule?
Definition at line 279 of file logic_program_types.h.
bool Clasp::Asp::RuleState::isSet | ( | Var | v, |
uint8 | f | ||
) | const [inline] |
Definition at line 282 of file logic_program_types.h.
void Clasp::Asp::RuleState::set | ( | Var | v, |
uint8 | f | ||
) | [inline] |
Definition at line 289 of file logic_program_types.h.
const uint8 Clasp::Asp::RuleState::any_flag = 0xFFu [static] |
Definition at line 276 of file logic_program_types.h.
const uint8 Clasp::Asp::RuleState::choice_flag = 0x1u << 3u [static] |
Definition at line 274 of file logic_program_types.h.
const uint8 Clasp::Asp::RuleState::disj_flag = 0x1u << 4u [static] |
Definition at line 275 of file logic_program_types.h.
const uint8 Clasp::Asp::RuleState::head_flag = 0x1u << 2u [static] |
Definition at line 273 of file logic_program_types.h.
const uint8 Clasp::Asp::RuleState::neg_flag = 0x2u [static] |
Definition at line 272 of file logic_program_types.h.
const uint8 Clasp::Asp::RuleState::pos_flag = 0x1u [static] |
Definition at line 271 of file logic_program_types.h.
StateVec Clasp::Asp::RuleState::state_ [private] |
Definition at line 306 of file logic_program_types.h.