dlvhex  2.5.0
ID Struct Reference

IDs are used to identify several types of objects in HEX-program evaluation. More...

#include <include/dlvhex2/ID.h>

Inheritance diagram for ID:
Collaboration diagram for ID:

Public Types

enum  TermBuiltinAddress {
  TERM_BUILTIN_EQ, TERM_BUILTIN_NE, TERM_BUILTIN_LT, TERM_BUILTIN_LE,
  TERM_BUILTIN_GT, TERM_BUILTIN_GE, TERM_BUILTIN_MUL, TERM_BUILTIN_ADD,
  TERM_BUILTIN_SUB, TERM_BUILTIN_DIV, TERM_BUILTIN_AGGCOUNT, TERM_BUILTIN_AGGMIN,
  TERM_BUILTIN_AGGMAX, TERM_BUILTIN_AGGSUM, TERM_BUILTIN_AGGTIMES, TERM_BUILTIN_AGGAVG,
  TERM_BUILTIN_AGGANY, TERM_BUILTIN_INT, TERM_BUILTIN_SUCC, TERM_BUILTIN_MOD
}
 For builtin terms, this is the address part (no table). More...

Public Member Functions

 ID ()
 Initializes the ID to ID_FAIL in order to represent that it does not yet identify a real object.
 ID (IDKind kind, IDAddress address)
 Initializes the ID with a given certain kind and address.
bool isTerm () const
 Checks if an ID represents a term.
bool isConstantTerm () const
 Checks if a term ID represents a constant other than an integer.
bool isIntegerTerm () const
 Checks if a term ID represents an integer.
bool isVariableTerm () const
 Checks if a term ID represents a variable.
bool isBuiltinTerm () const
 Checks if a term ID represents a builtin predicate.
bool isPredicateTerm () const
 Checks if a term ID represents a predicate.
bool isNestedTerm () const
 Checks if a term ID represents a nested term.
bool isRangeTerm () const
 Checks if a term ID represents a range term.
bool isAtom () const
 Checks if an ID represents an atom.
bool isHiddenAtom () const
 Checks if an atom or literal ID represents a hidden atom.
bool isOrdinaryAtom () const
 Checks if an atom or literal ID represents an ordinary atom.
bool isOrdinaryGroundAtom () const
 Checks if an atom or literal ID represents an ordinary ground atom.
bool isOrdinaryNongroundAtom () const
 Checks if an atom or literal ID represents an ordinary nonground atom.
bool isBuiltinAtom () const
 Checks if an atom or literal ID represents an atom over a builtin predicate.
bool isAggregateAtom () const
 Checks if an atom or literal ID represents an aggregate atom.
bool isExternalAtom () const
 Checks if an atom or literal ID represents an external atom.
bool isModuleAtom () const
 Checks if an atom or literal ID represents a module atom.
bool isLiteral () const
 Checks if an ID represents a literal.
bool isNaf () const
 Checks if an ID represents a default-negated object.
bool isAuxiliary () const
 Checks if an ID represents an auxiliary object.
bool isExternalAuxiliary () const
 Checks if an ID represents an external auxiliary object (auxiliary of type 'r' or 'n').
bool isExternalInputAuxiliary () const
 Checks if an ID represents an external input auxiliary object (auxiliary of type 'i').
bool isGuardAuxiliary () const
 Checks if an ID represents an guard auxiliary object (auxiliary of type 'o' over ID (0, 0)).
bool isFLPAuxiliary () const
 Checks if an ID represents an FLP auxiliary object.
bool isRule () const
 Checks if an ID represents a rule.
bool isRegularRule () const
 Checks if a rule ID represents a regular rule (other than constraint, weak constraint and weight rule).
bool isConstraint () const
 Checks if a rule ID represents a constraint.
bool isWeakConstraint () const
 Checks if a rule ID represents a weak constraint.
bool isWeightRule () const
 Checks if a rule ID represents a weight rule.
bool doesRuleContainExtatoms () const
 Checks if the rule represented by the ID contains external atoms.
bool doesRuleContainModatoms () const
 Checks if the rule represented by the ID contains module atoms.
bool isRuleDisjunctive () const
 Checks if the rule represented by the ID contains disjunctions.
bool hasRuleHeadGuard () const
 Checks if the rule represented by the ID contains a variable length disjunction.
bool isAnonymousVariable () const
 Checks if the variable term represented by the ID is anonymous ("_").
bool operator== (const ID &id2) const
 Comparison of IDs.
bool operator!= (const ID &id2) const
 Comparison of IDs.
ID operator| (const ID &id2) const
 Bitwise or.
ID operator& (const ID &id2) const
 Bitwise and.
 operator uint64_t () const
 Returns the ID as a single 64-bit integer.
std::ostream & print (std::ostream &o) const
 Prints the ID in human-readable format.

Static Public Member Functions

static IDAddress reverseBinaryOperator (IDAddress op)
 Reverses a binary builtin operator.
static IDAddress negateBinaryOperator (IDAddress op)
 Negates a binary builtin operator.
static ID termFromInteger (uint32_t i)
 Constructs an integer ID.
static ID termFromBuiltin (TermBuiltinAddress b)
 Constructs an ID for a builtin predicate.
static ID termFromBuiltinString (const std::string &op)
 Constructs an ID for a string representing a builtin operation.
static const char * stringFromBuiltinTerm (IDAddress addr)
 Outputs a bulitin term as string.
static ID posLiteralFromAtom (ID atom)
 Constructs a positive literal from an atom.
static ID nafLiteralFromAtom (ID atom)
 Constructs a default-negated literal from an atom.
static ID literalFromAtom (ID atom, bool naf)
 Constructs a positive or default-negated literal from an atom.
static ID atomFromLiteral (ID literal)
 Constructs an atom ID from a positive or default-negated literal.

Data Fields

IDKind kind
 Type of the object (see constants of type IDKind).
IDAddress address
 Unique number to distinguish different objects of the same type.

Static Public Attributes

static const uint32_t ALL_ONES = 0xFFFFFFFF
 Used as a mask for bit operations and for representing undefined values.
static const IDKind NAF_MASK = 0x80000000
 Represents that the object is default-negated (only useful in literals).
static const IDKind MAINKIND_MASK = 0x70000000
 Masks the part of the IDAddress which contains the main type.
static const uint8_t MAINKIND_SHIFT = 28
 Used in a shift-right operation to move the main type to the least significant bits.
static const IDKind SUBKIND_MASK = 0x0F000000
 Masks the part of the IDAddress which contains the sub type.
static const uint8_t SUBKIND_SHIFT = 24
 Used in a shift-right operation to move the sub type to the least significant bits.
static const IDKind PROPERTY_MASK = 0x00FF0000
 Masks the part of the IDAddress which contains the properties of the object.
static const uint8_t PROPERTY_SHIFT = 16
 Used in a shift-right operation to move the properties to the least significant bits.
static const IDKind UNUSED_MASK = 0x0000FFFF
 Masks the unused bits in the kind flag.
static const IDKind MAINKIND_ATOM = 0x00000000
 Marks object IDs as atoms.
static const IDKind MAINKIND_TERM = 0x10000000
 Marks object IDs as terms.
static const IDKind MAINKIND_LITERAL = 0x20000000
 Marks object IDs as literals.
static const IDKind MAINKIND_RULE = 0x30000000
 Marks object IDs as rules.
static const IDKind SUBKIND_TERM_CONSTANT = 0x00000000
 Marks term IDs as constants other than integers.
static const IDKind SUBKIND_TERM_INTEGER = 0x01000000
 Marks term IDs as integers.
static const IDKind SUBKIND_TERM_VARIABLE = 0x02000000
 Marks term IDs as variables.
static const IDKind SUBKIND_TERM_BUILTIN = 0x03000000
 Marks term IDs as builtin predicates, such as <=, <, etc.
static const IDKind SUBKIND_TERM_PREDICATE = 0x04000000
 Marks term IDs as predicates (a special kind of constants).
static const IDKind SUBKIND_TERM_NESTED = 0x05000000
 Marks term IDs as nested terms (terms consisting of function symbols and sub-terms).
static const IDKind SUBKIND_ATOM_ORDINARYG = 0x00000000
 Marks atom IDs as ordinary ground atoms.
static const IDKind SUBKIND_ATOM_ORDINARYN = 0x01000000
 Marks atom IDs as ordinary nonground atoms.
static const IDKind SUBKIND_ATOM_BUILTIN = 0x02000000
 Marks atom IDs as builtin atoms (e.g.
static const IDKind SUBKIND_ATOM_AGGREGATE = 0x03000000
 Marks atom IDs as aggregate atoms.
static const IDKind SUBKIND_ATOM_EXTERNAL = 0x06000000
 Marks atom IDs as external atoms.
static const IDKind SUBKIND_ATOM_MODULE = 0x0A000000
 Marks atom IDs as atom from modules (cf.
static const IDKind SUBKIND_RULE_REGULAR = 0x00000000
 Marks rule IDs as regular rules (all rules except constraints, weak constraints and weight rules).
static const IDKind SUBKIND_RULE_CONSTRAINT = 0x01000000
 Marks rule IDs as constraints.
static const IDKind SUBKIND_RULE_WEAKCONSTRAINT = 0x02000000
 Marks rule IDs as weak constraints.
static const IDKind SUBKIND_RULE_WEIGHT = 0x03000000
 Marks rule IDs as weight rules.
static const IDKind PROPERTY_ATOM_HIDDEN = 0x00010000
 Hidden atoms are skipped when printed for the user and excluded from predicate masks.
static const IDKind PROPERTY_VAR_ANONYMOUS = 0x00010000
 Encodes that a variable IDs represents an anonymous variable, i.e.
static const IDKind PROPERTY_RULE_EXTATOMS = 0x00080000
 Encodes that a rule contains external atoms.
static const IDKind PROPERTY_RULE_DISJ = 0x00100000
 Encodes that a rule contains disjunctions in the head.
static const IDKind PROPERTY_RULE_HEADGUARD = 0x00300000
 Encodes that a rule contains a variable length disjunction in the head.
static const IDKind PROPERTY_RULE_MODATOMS = 0x00400000
 Encodes that a rule contains atoms from modules (cf.
static const IDKind PROPERTY_RULE_UNMODATOMS = 0xFFBFFFFF
 See modular HEX.
static const IDKind PROPERTY_TERM_RANGE = 0x00010000
 Marks term IDs as range terms of kind a..b (special kind of nested terms).
static const IDKind PROPERTY_AUX = 0x00800000
 Encodes that an atom uses an auxiliary predicate.
static const IDKind PROPERTY_EXTERNALAUX = 0x00400000
 Encodes that an atom uses an auxiliary predicate of type 'r' or 'n'.
static const IDKind PROPERTY_EXTERNALINPUTAUX = 0x00200000
 Encodes that an atom uses an auxiliary predicate of type 'i'.
static const IDKind PROPERTY_GUARDAUX = 0x00A00000
 Encodes that an atom uses an auxiliary predicate of type 'i'.
static const IDKind PROPERTY_FLPAUX = 0x00100000
 Used for auxiliaries which represent rule satisfaction for FLP reduct computation in the explicit FLP check.

Detailed Description

IDs are used to identify several types of objects in HEX-program evaluation.

IDs consist of a kind and an address field, where the kind is used to distinguish types of objects, namely atoms, literals, terms, and rules, with several subtypes. Moreover, the kind may also store additional properties of such objects. The address field is used to distinguish different objects of the same type.

For storing sets of objects of a single type, one may use the class Interpretation which allows for storing sets of addresses efficiently.

Definition at line 56 of file ID.h.


Member Enumeration Documentation

For builtin terms, this is the address part (no table).

Beware: must be synchronized with isInfixBuiltin() and builtinTerms[].

Enumerator:
TERM_BUILTIN_EQ 

Predicate ==.

TERM_BUILTIN_NE 

Predicate !=.

TERM_BUILTIN_LT 

Predicate <.

TERM_BUILTIN_LE 

Predicate <=.

TERM_BUILTIN_GT 

Predicate >.

TERM_BUILTIN_GE 

Predicate >=.

TERM_BUILTIN_MUL 

Predicate *.

TERM_BUILTIN_ADD 

Predicate +.

TERM_BUILTIN_SUB 

Predicate -.

TERM_BUILTIN_DIV 

Predicate /.

TERM_BUILTIN_AGGCOUNT 

Predicate #count.

TERM_BUILTIN_AGGMIN 

Predicate #min.

TERM_BUILTIN_AGGMAX 

Predicate #max.

TERM_BUILTIN_AGGSUM 

Predicate #sum.

TERM_BUILTIN_AGGTIMES 

Predicate #times.

TERM_BUILTIN_AGGAVG 

Predicate #avg.

TERM_BUILTIN_AGGANY 

Predicate #any.

TERM_BUILTIN_INT 

Predicate #int.

TERM_BUILTIN_SUCC 

Predicate #succ.

TERM_BUILTIN_MOD 

Predicate %.

Definition at line 211 of file ID.h.


Constructor & Destructor Documentation

ID::ID ( ) [inline]

Initializes the ID to ID_FAIL in order to represent that it does not yet identify a real object.

Definition at line 73 of file ID.h.

ID::ID ( IDKind  kind,
IDAddress  address 
) [inline]

Initializes the ID with a given certain kind and address.

Parameters:
kindKind of the new ID.
addressAddress of the new ID.

Definition at line 78 of file ID.h.


Member Function Documentation

bool ID::doesRuleContainExtatoms ( ) const [inline]

Checks if the rule represented by the ID contains external atoms.

The given ID must be a valid rule ID.

Returns:
True if the rule contains external atoms.

Definition at line 509 of file ID.h.

Referenced by BaseModelGeneratorFactory::addDomainPredicatesAndCreateDomainExplorationProgram(), ComponentGraph::calculateFixedDomain(), BaseModelGeneratorFactory::convertRule(), FLPModelGeneratorFactoryBase::createEatomGuessingRules(), and StrongSafetyChecker::operator()().

bool ID::doesRuleContainModatoms ( ) const [inline]

Checks if the rule represented by the ID contains module atoms.

The given ID must be a valid rule ID.

Returns:
True if the rule contains module atoms.

Definition at line 515 of file ID.h.

bool ID::hasRuleHeadGuard ( ) const [inline]

Checks if the rule represented by the ID contains a variable length disjunction.

The given ID must be a valid rule ID.

Returns:
True if the rule contains a variable length disjunction.

Definition at line 527 of file ID.h.

Referenced by InternalGrounder::preprocessRule().

bool ID::isAnonymousVariable ( ) const [inline]

Checks if the variable term represented by the ID is anonymous ("_").

The given ID must be a valid variable term ID.

Returns:
True if the variable is anonymous.

Definition at line 533 of file ID.h.

Referenced by SimpleNogoodContainer::addAllResolvents(), InternalGrounder::preprocessRule(), and BaseModelGenerator::verifyEAtomAnswerTuple().

bool ID::isAtom ( ) const [inline]

Checks if an ID represents an atom.

Returns:
True if it is an atom ID.

Definition at line 405 of file ID.h.

Referenced by DependencyGraph::createNodesAndIntraRuleDependenciesForRuleAddHead(), literalFromAtom(), nafLiteralFromAtom(), and posLiteralFromAtom().

bool ID::isAuxiliary ( ) const [inline]

Checks if an ID represents an auxiliary object.

Returns:
True if it represents an auxiliary object.

Definition at line 457 of file ID.h.

Referenced by GenuineGuessAndCheckModelGenerator::inlineExternalAtoms(), and Registry::isNullTerm().

bool ID::isBuiltinTerm ( ) const [inline]

Checks if a term ID represents a builtin predicate.

The given ID must be a valid term ID!

Returns:
True if it is a builtin predicate ID and false otherwise.

Definition at line 386 of file ID.h.

bool ID::isConstantTerm ( ) const [inline]

Checks if a term ID represents a constant other than an integer.

The given ID must be a valid term ID!

Returns:
True if it is a constant ID and false otherwise.

Definition at line 371 of file ID.h.

Referenced by PredicateMask::addPredicate(), InternalGrounder::computeGloballyNewAtom(), DependencyGraph::createExternalPredicateInputDependencies(), Registry::getIDByAuxiliaryConstantSymbol(), ExternalAtomMask::matchOutputAtom(), TestConcatAtom::retrieve(), and TestListConcatAtom::retrieve().

bool ID::isConstraint ( ) const [inline]

Checks if a rule ID represents a constraint.

The given ID must be a valid rule ID.

Returns:
True if it represents a constraint.

Definition at line 490 of file ID.h.

Referenced by FLPModelGeneratorFactoryBase::createFLPRules().

bool ID::isExternalInputAuxiliary ( ) const [inline]

Checks if an ID represents an external input auxiliary object (auxiliary of type 'i').

Returns:
True if it represents an external input auxiliary object.

Definition at line 465 of file ID.h.

Referenced by DLVHEX_NAMESPACE_BEGIN::EvalHeuristicFromHEXSourcecode::build(), Registry::isNegativeExternalAtomAuxiliaryAtom(), Registry::isPositiveExternalAtomAuxiliaryAtom(), and Registry::swapExternalAtomAuxiliaryAtom().

bool ID::isFLPAuxiliary ( ) const [inline]

Checks if an ID represents an FLP auxiliary object.

Returns:
True if it represents an FLP auxiliary object.

Definition at line 473 of file ID.h.

Referenced by FLPModelGeneratorBase::computeShadowAndUnfoundedPredicates().

bool ID::isGuardAuxiliary ( ) const [inline]

Checks if an ID represents an guard auxiliary object (auxiliary of type 'o' over ID (0, 0)).

Returns:
True if it represents a guard auxiliary object.

Definition at line 469 of file ID.h.

bool ID::isHiddenAtom ( ) const [inline]

Checks if an atom or literal ID represents a hidden atom.

The given ID must be a valid atom or literal ID!

Returns:
True if it is a hidden atom ID.

Definition at line 410 of file ID.h.

Referenced by Registry::printAtomForUser().

bool ID::isIntegerTerm ( ) const [inline]

Checks if a term ID represents an integer.

The given ID must be a valid term ID!

Returns:
True if it is an integer ID and false otherwise.

Definition at line 376 of file ID.h.

Referenced by ExtSourceProperties::interpretProperties(), ExternalAtomMask::matchOutputAtom(), TestConcatAtom::retrieve(), and TestListConcatAtom::retrieve().

bool ID::isLiteral ( ) const [inline]

Checks if an ID represents a literal.

Returns:
True if it represents a literal.

Definition at line 449 of file ID.h.

Referenced by atomFromLiteral(), BOOST_AUTO_TEST_CASE(), and DependencyGraph::createNodesAndIntraRuleDependenciesForBody().

bool ID::isModuleAtom ( ) const [inline]

Checks if an atom or literal ID represents a module atom.

The given ID must be an atom or literal ID!

Returns:
True if it represents a module atom.

Definition at line 445 of file ID.h.

Referenced by BOOST_AUTO_TEST_CASE().

bool ID::isNaf ( ) const [inline]

Checks if an ID represents a default-negated object.

Returns:
True if it represents default-negated object.

Definition at line 453 of file ID.h.

Referenced by SimpleNogoodContainer::addAllResolvents(), BaseModelGeneratorFactory::addDomainPredicatesAndCreateDomainExplorationProgram(), ExternalAtomVerificationTree::addNogood(), CDNLSolver::addNogoodAndUpdateWatchingStructures(), InternalGrounder::buildGroundInstance(), ComponentGraph::calculateComponents(), ComponentGraph::calculateFixedDomain(), ComponentGraph::calculateStratificationInfo(), AnnotatedGroundProgram::computeAdditionalDependencies(), AnnotatedGroundProgram::computeAtomDependencyGraph(), LiberalSafetyChecker::computeBuiltinInformationFlow(), InternalGroundASPSolver::computeDepGraph(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemNecessaryPart(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartEAEnforement(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRule(), BaseModelGeneratorFactory::convertRuleBody(), LiberalSafetyChecker::createDependencyGraph(), FLPModelGeneratorFactoryBase::createEatomGuessingRule(), NogoodContainer::createLiteral(), DependencyGraph::createNodesAndIntraRuleDependenciesForBody(), LiberalSafetyChecker::createPreconditionsAndLocationIndices(), LiberalSafetyChecker::ensureOrdinarySafety(), CDNLSolver::falsified(), PluginAtom::generalizeNogood(), FLPModelGeneratorBase::getFLPNogood(), InternalGroundASPSolver::getInitialNewlyUnfoundedAtomsAfterSetFact(), Nogood::getStringRepresentation(), UnfoundedSetChecker::getUFSNogoodReductBased(), UnfoundedSetChecker::getUFSNogoodUFSBased(), InternalGroundASPSolver::getUnfoundedSet(), InternalGrounder::groundRule(), GenuineGuessAndCheckModelGenerator::inlineExternalAtoms(), ExternalLearningHelper::learnFromInputOutputBehavior(), ExternalLearningHelper::learnFromNegativeAtoms(), ExternalLearningHelper::learnFromRule(), CDNLSolver::litToString(), InternalGrounder::match(), Nogood::match(), InternalGrounder::matchBuiltin(), InternalGrounder::matchNextFromExtensionBuiltin(), InternalGrounder::matchNextFromExtensionOrdinary(), EncodingBasedUnfoundedSetChecker::nogoodTransformation(), AssumptionBasedUnfoundedSetChecker::nogoodTransformation(), StrongSafetyChecker::operator()(), InternalGrounder::preprocessRule(), Nogood::print(), InternalGrounder::reorderRuleBody(), CDNLSolver::restartWithAssumptions(), TestASPQueryAtom::retrieveOrLearnSupportSets(), FunctionRewriter::rewrite(), DLVHEX_NAMESPACE_BEGIN::FinitenessChecker::run(), DLVHEX_NAMESPACE_BEGIN::FiniteFiberChecker::run(), DLVHEX_NAMESPACE_BEGIN::AggregateAndBuildinChecker::run(), CDNLSolver::satisfied(), AssumptionBasedUnfoundedSetChecker::setAssumptions(), CDNLSolver::setFact(), CDNLSolver::startWatching(), CDNLSolver::stopWatching(), CDNLSolver::touchVarsInNogood(), ImmediateNogoodGrounder::update(), InternalGroundASPSolver::updateUnfoundedSetStructuresAfterSetFact(), CDNLSolver::updateWatchingStructuresAfterAddNogood(), CDNLSolver::updateWatchingStructuresAfterSetFact(), and AnnotatedGroundProgram::verifyExternalAtomsUsingCompleteSupportSets().

bool ID::isNestedTerm ( ) const [inline]

Checks if a term ID represents a nested term.

The given ID must be a valid term ID!

Returns:
True if it is a nested term ID.

Definition at line 396 of file ID.h.

Referenced by FunctionRewriter::composeTerm(), and FunctionRewriter::decomposeTerm().

bool ID::isOrdinaryNongroundAtom ( ) const [inline]

Checks if an atom or literal ID represents an ordinary nonground atom.

The given ID must be an atom or literal ID!

Returns:
True if it is an ordinary nonground atom ID.

Definition at line 425 of file ID.h.

Referenced by DLVHEX_NAMESPACE_BEGIN::EvalHeuristicFromHEXSourcecode::build(), FLPModelGeneratorFactoryBase::createEatomGuessingRule(), FLPModelGeneratorFactoryBase::createFLPRules(), ExternalLearningHelper::learnFromRule(), and InternalGrounder::matchNextFromExtensionOrdinary().

bool ID::isPredicateTerm ( ) const [inline]

Checks if a term ID represents a predicate.

The given ID must be a valid term ID!

Returns:
True if it is a predicate.

Definition at line 391 of file ID.h.

Referenced by InternalGrounder::computeGloballyNewAtom().

bool ID::isRangeTerm ( ) const [inline]

Checks if a term ID represents a range term.

The given ID must be a valid term ID!

Returns:
True if it is a range term ID.

Definition at line 401 of file ID.h.

Referenced by sem< HexGrammarSemantics::rule >::operator()().

bool ID::isRegularRule ( ) const [inline]

Checks if a rule ID represents a regular rule (other than constraint, weak constraint and weight rule).

The given ID must be a valid rule ID.

Returns:
True if it represents a regular rule.

Definition at line 484 of file ID.h.

Referenced by FLPModelGeneratorFactoryBase::createFLPRules(), and DependencyGraph::createNodesAndIntraRuleDependenciesForBody().

bool ID::isRule ( ) const [inline]

Checks if an ID represents a rule.

Returns:
True if it represents a rule.

Definition at line 478 of file ID.h.

Referenced by DependencyGraph::createNodesAndIntraRuleDependenciesForRule(), and DependencyGraph::writeGraphViz().

bool ID::isRuleDisjunctive ( ) const [inline]

Checks if the rule represented by the ID contains disjunctions.

The given ID must be a valid rule ID.

Returns:
True if the rule contains disjunctions.

Definition at line 521 of file ID.h.

bool ID::isTerm ( ) const [inline]

Checks if an ID represents a term.

Returns:
True if it is a term ID and false otherwise.

Definition at line 366 of file ID.h.

Referenced by PredicateMask::addPredicate(), MLPSyntaxChecker::getArity(), Registry::replaceVariablesInTerm(), TestConcatAtom::retrieve(), and TestListConcatAtom::retrieve().

bool ID::isWeakConstraint ( ) const [inline]

Checks if a rule ID represents a weak constraint.

The given ID must be a valid rule ID.

Returns:
True if it represents a weak constraint.

Definition at line 496 of file ID.h.

Referenced by InternalGroundASPSolver::computeClarkCompletion().

static ID ID::literalFromAtom ( ID  atom,
bool  naf 
) [inline, static]

Constructs a positive or default-negated literal from an atom.

Parameters:
atomID of a ground or nonground atom.
nafTrue to create a default-negated literal and false to create a positive one.
Returns:
ID of a literal over atom.

Definition at line 352 of file ID.h.

References isAtom().

Referenced by BaseModelGeneratorFactory::convertRuleBody(), FLPModelGeneratorFactoryBase::createFLPRules(), sem< HexGrammarSemantics::bodyLiteral >::operator()(), and InternalGrounder::preprocessRule().

static IDAddress ID::negateBinaryOperator ( IDAddress  op) [inline, static]

Negates a binary builtin operator.

Allows for optimizing negation away. Example: < is negated to >=, <= is converted to >.

Parameters:
opBinary TermBuiltinAddress.
Returns:
Negated op; any atom using the original operator is true iff the one using the returned operator instead if false and vice versa.

Definition at line 282 of file ID.h.

References TERM_BUILTIN_EQ, TERM_BUILTIN_GE, TERM_BUILTIN_GT, TERM_BUILTIN_LE, TERM_BUILTIN_LT, and TERM_BUILTIN_NE.

Referenced by sem< ChoiceParserModuleSemantics::choiceHead >::operator()().

ID::operator uint64_t ( ) const [inline]

Returns the ID as a single 64-bit integer.

Definition at line 556 of file ID.h.

bool ID::operator!= ( const ID id2) const [inline]

Comparison of IDs.

Parameters:
id2ID to compare to.
Returns:
True if not equal in both fields.

Definition at line 544 of file ID.h.

References address, and kind.

ID ID::operator& ( const ID id2) const [inline]

Bitwise and.

Parameters:
id2Second ID.
Returns:
ID consisting of the kind and address fields of this ID and id2 after application of bitwise and.

Definition at line 554 of file ID.h.

References address, and kind.

bool ID::operator== ( const ID id2) const [inline]

Comparison of IDs.

Parameters:
id2ID to compare to.
Returns:
True if equal in both fields.

Definition at line 539 of file ID.h.

References address, and kind.

ID ID::operator| ( const ID id2) const [inline]

Bitwise or.

Parameters:
id2Second ID.
Returns:
ID consisting of the kind and address fields of this ID and id2 after application of bitwise or.

Definition at line 549 of file ID.h.

References address, and kind.

std::ostream & ID::print ( std::ostream &  o) const

Prints the ID in human-readable format.

Parameters:
oStream to print.
Returns:
o.

Definition at line 53 of file ID.cpp.

References address, ID_FAIL(), kind, MAINKIND_MASK, MAINKIND_SHIFT, NAF_MASK, SUBKIND_MASK, and SUBKIND_SHIFT.

static IDAddress ID::reverseBinaryOperator ( IDAddress  op) [inline, static]

Reverses a binary builtin operator.

Example: < is converted to >, <= is converted to >=.

Parameters:
opBinary TermBuiltinAddress.
Returns:
Reversed op; allows for swapping the operands in a builtin atom.

Definition at line 262 of file ID.h.

References TERM_BUILTIN_EQ, TERM_BUILTIN_GE, TERM_BUILTIN_GT, TERM_BUILTIN_LE, TERM_BUILTIN_LT, and TERM_BUILTIN_NE.

const char * ID::stringFromBuiltinTerm ( IDAddress  addr) [static]

Outputs a bulitin term as string.

Inverse operation of termFromBuiltinString.

Parameters:
addrElement from enum TermBuiltinAddress.
Returns:
String representation of addr.

Definition at line 177 of file ID.cpp.

Referenced by RawPrinter::print().

static ID ID::termFromBuiltin ( TermBuiltinAddress  b) [inline, static]
ID ID::termFromBuiltinString ( const std::string &  op) [static]

Constructs an ID for a string representing a builtin operation.

Transforms a string which represents a builtin predicate (e.g. "+", "<", etc) into an according ID.

Parameters:
opString with builtin predicate.
Returns:
ID representing op.

Definition at line 91 of file ID.cpp.

References ID_FAIL(), TERM_BUILTIN_ADD, TERM_BUILTIN_AGGANY, TERM_BUILTIN_AGGAVG, TERM_BUILTIN_AGGCOUNT, TERM_BUILTIN_AGGMAX, TERM_BUILTIN_AGGMIN, TERM_BUILTIN_AGGSUM, TERM_BUILTIN_AGGTIMES, TERM_BUILTIN_DIV, TERM_BUILTIN_EQ, TERM_BUILTIN_GE, TERM_BUILTIN_GT, TERM_BUILTIN_INT, TERM_BUILTIN_LE, TERM_BUILTIN_LT, TERM_BUILTIN_MOD, TERM_BUILTIN_MUL, TERM_BUILTIN_NE, TERM_BUILTIN_SUB, TERM_BUILTIN_SUCC, and termFromBuiltin().


Field Documentation

Unique number to distinguish different objects of the same type.

Definition at line 71 of file ID.h.

Referenced by SimpleNogoodContainer::addAllResolvents(), ExternalAtomVerificationTree::addNogood(), CDNLSolver::addNogoodAndUpdateWatchingStructures(), PredicateMask::addPredicate(), InternalGroundASPSolver::addSourceToAtom(), CDNLSolver::analysis(), InternalGrounder::applyIntFunction(), Nogood::applyVariableSubstitution(), atomFromLiteral(), BOOST_AUTO_TEST_CASE(), DLVHEX_NAMESPACE_BEGIN::EvalHeuristicFromHEXSourcecode::build(), InternalGrounder::buildGroundInstance(), AnnotatedGroundProgram::computeAtomDependencyGraph(), InternalGroundASPSolver::computeClarkCompletion(), InternalGroundASPSolver::computeDepGraph(), LiberalSafetyChecker::computeDomainExpansionSafety(), BaseModelGenerator::computeExtensionOfDomainPredicates(), AnnotatedGroundProgram::computeHeadCycles(), AnnotatedGroundProgram::computeStronglyConnectedComponents(), AssumptionBasedUnfoundedSetChecker::constructDomain(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemBasicEABehavior(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemDefineAuxiliaries(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemNecessaryPart(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemNonempty(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartEAEnforement(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartRestrictToCompatibleSet(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRestrictToSCC(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRule(), AnnotatedGroundProgram::containsHeadCycles(), NogoodContainer::createLiteral(), FLPModelGeneratorBase::createMinimalityRules(), InternalGroundASPSolver::createNewBodyAtom(), DependencyGraph::createNodesAndIntraRuleDependenciesForRule(), InternalGroundASPSolver::createNogoodsForRule(), AnnotatedGroundProgram::createProgramMask(), InternalGroundASPSolver::createShiftedProgram(), InternalGroundASPSolver::doesRuleExternallySupportLiteral(), LiberalSafetyChecker::ensureOrdinarySafety(), CDNLSolver::falsified(), CDNLSolver::flipDecisionLiteral(), GenuineGuessAndCheckModelGenerator::generalizeNogood(), PluginAtom::generalizeNogood(), InternalGroundASPSolver::getDependingAtoms(), InternalGroundASPSolver::getExternalSupport(), FLPModelGeneratorBase::getFLPNogood(), CDNLSolver::getGuess(), InternalGroundASPSolver::getInconsistencyCause(), InternalGroundASPSolver::getInitialNewlyUnfoundedAtomsAfterSetFact(), CDNLSolver::getNextModel(), InternalGrounder::getOutputVariables(), InternalGroundASPSolver::getPossibleSourceRule(), Nogood::getStringRepresentation(), UnfoundedSetChecker::getUFSNogoodReductBased(), UnfoundedSetChecker::getUFSNogoodUFSBased(), InternalGroundASPSolver::getUnfoundedSet(), InternalGrounder::groundStratum(), DLVHEX_NAMESPACE_BEGIN::hash_value(), CDNLSolver::inactivateNogood(), GenuineGuessAndCheckModelGenerator::inlineExternalAtoms(), ExtSourceProperties::interpretProperties(), InternalGrounder::isAtomDerivable(), LiberalSafetyChecker::isExternalAtomNecessaryForDomainExpansionSafety(), UnfoundedSetChecker::isUnfoundedSet(), ExternalLearningHelper::learnFromInputOutputBehavior(), ExternalLearningHelper::learnFromNegativeAtoms(), ExternalLearningHelper::learnFromRule(), GenuineGuessAndCheckModelGenerator::learnSupportSets(), CDNLSolver::litToString(), InternalGrounder::matchNextFromExtensionOrdinary(), nafLiteralFromAtom(), CDNLSolver::negation(), EncodingBasedUnfoundedSetChecker::nogoodTransformation(), AssumptionBasedUnfoundedSetChecker::nogoodTransformation(), operator!=(), operator&(), operator==(), operator|(), BaseModelGenerator::VerifyExternalAnswerAgainstPosNegGuessInterpretationCB::output(), BaseModelGenerator::VerifyExternalAtomCB::output(), BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::output(), posLiteralFromAtom(), RawPrinter::print(), Nogood::print(), Rule::print(), print(), Nogood::recomputeHash(), InternalGroundASPSolver::removeSourceFromAtom(), InternalGrounder::reorderRuleBody(), GenuineGuessAndCheckModelGenerator::replacePredForInlinedEAs(), Nogood::resolve(), InternalGroundASPSolver::restartWithAssumptions(), CDNLSolver::restartWithAssumptions(), TestConcatAtom::retrieve(), TestListConcatAtom::retrieve(), SenseNotArmed2PluginAtom::retrieve(), GenPluginAtom2::retrieve(), TestHashAtom::retrieve(), CDNLSolver::satisfied(), InternalGroundASPSolver::satisfiesIndependently(), AssumptionBasedUnfoundedSetChecker::setAssumptions(), ExternalAtomMask::setEAtom(), CDNLSolver::setFact(), InternalGrounder::setToTrue(), PluginAtom::splitQuery(), CDNLSolver::startWatching(), CDNLSolver::stopWatching(), InternalGroundASPSolver::toString(), CDNLSolver::touchVarsInNogood(), GenuineGuessAndCheckModelGenerator::unfoundedSetCheck(), UnfoundedSetCheckHeuristics::UnfoundedSetCheckHeuristics(), UnfoundedSetChecker::UnfoundedSetVerificationStatus::UnfoundedSetVerificationStatus(), CDNLSolver::unitPropagation(), ImmediateNogoodGrounder::update(), LazyNogoodGrounder::update(), UnfoundedSetCheckHeuristics::updateSkipProgram(), InternalGroundASPSolver::updateUnfoundedSetStructuresAfterSetFact(), CDNLSolver::updateWatchingStructuresAfterAddNogood(), CDNLSolver::updateWatchingStructuresAfterClearFact(), CDNLSolver::updateWatchingStructuresAfterRemoveNogood(), CDNLSolver::updateWatchingStructuresAfterSetFact(), InternalGroundASPSolver::useAsNewSourceForHeadAtom(), UnfoundedSetChecker::verifyExternalAtomByEvaluation(), AnnotatedGroundProgram::verifyExternalAtomsUsingCompleteSupportSets(), and DependencyGraph::writeGraphVizNodeLabel().

const IDKind ID::MAINKIND_ATOM = 0x00000000 [static]

Marks object IDs as atoms.

Definition at line 103 of file ID.h.

Referenced by BaseModelGeneratorFactory::addDomainPredicatesAndCreateDomainExplorationProgram(), FLPModelGeneratorBase::addShadowInterpretation(), InternalGrounder::applySubstitutionToBuiltinAtom(), InternalGrounder::applySubstitutionToOrdinaryAtom(), BOOST_AUTO_TEST_CASE(), FunctionRewriter::composeTerm(), InternalGrounder::computeDepGraph(), BaseModelGenerator::computeExtensionOfDomainPredicates(), InternalGrounder::computeGloballyNewAtom(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemAndInstantiateSolver(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemCreateAuxAtoms(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemNecessaryPart(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartEAEnforement(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRule(), BaseModelGeneratorFactory::convertRuleBody(), DependencyGraph::createAuxiliaryRuleHead(), FLPModelGeneratorFactoryBase::createEatomGuessingRule(), FLPModelGeneratorFactoryBase::createFLPRules(), FLPModelGeneratorBase::createFoundingRules(), FLPModelGeneratorBase::createMinimalityRules(), InternalGroundASPSolver::createNewAtom(), FunctionRewriter::decomposeTerm(), AssumptionBasedUnfoundedSetChecker::expandUFSDetectionProblemAndReinstantiateSolver(), InternalGrounder::getGroundProgramString(), InternalGrounder::getNongroundProgramString(), ExternalLearningHelper::getOutputAtom(), ExternalLearningHelper::getOutputAtoms(), InternalGrounder::groundStratum(), GenuineGuessAndCheckModelGenerator::inlineExternalAtoms(), InternalGrounder::matchNextFromExtensionOrdinary(), ExternalLearningHelper::DefaultInputNogoodProvider::operator()(), sem< HigherOrderParserModuleSemantics::higherOrderAtom >::operator()(), sem< ConditionalParserModuleSemantics::conditionalLieral >::operator()(), sem< StrongNegationParserModuleSemantics::stronglyNegatedPrefixAtom >::operator()(), sem< ChoiceParserModuleSemantics::choiceHead >::operator()(), handle_fact::operator()(), sem< HexGrammarSemantics::classicalAtomFromPrefix >::operator()(), sem< HexGrammarSemantics::classicalAtomFromTuple >::operator()(), sem< HexGrammarSemantics::builtinTernaryInfix >::operator()(), sem< HexGrammarSemantics::builtinBinaryInfix >::operator()(), sem< HexGrammarSemantics::builtinUnaryPrefix >::operator()(), sem< HexGrammarSemantics::builtinBinaryPrefix >::operator()(), sem< HexGrammarSemantics::builtinTernaryPrefix >::operator()(), sem< HexGrammarSemantics::aggregateAtom >::operator()(), sem< HexGrammarSemantics::externalAtom >::operator()(), sem< FunctionParserModuleTermSemantics::functionTermConstruct >::operator()(), sem< HexGrammarSemantics::mlpModuleAtom >::operator()(), sem< FunctionParserModuleAtomSemantics::functionTermEval >::operator()(), RawPrinter::print(), Interpretation::print(), Registry::printAtomForUser(), RawPrinter::printWithoutPrefix(), Interpretation::printWithoutPrefix(), GenPluginAtom1::retrieve(), ComfortPluginAtom::retrieve(), TestSetMinusNonComfortAtom::retrieve(), TestSetMinusPartialAtom::retrieve(), TestSetMinusNogoodBasedLearningAtom::retrieve(), TestSetMinusNongroundNogoodBasedLearningAtom::retrieve(), TestSetMinusRuleBasedLearningAtom::retrieve(), TestNonmonAtom::retrieve(), TestNonmon2Atom::retrieve(), TestIdAtom::retrieve(), TestIdpAtom::retrieve(), TestNegAtom::retrieve(), TestDisjAtom::retrieve(), TestPlugin::TestSetUnionAtom::retrieve(), TestPlugin::TestGen2Atom::retrieve(), TestPlugin::TestIsEmpty::retrieve(), TestPlugin::TestNumberOfBalls::retrieve(), TestPlugin::TestNumberOfBallsSE::retrieve(), TestPlugin::TestNumberOfBallsGE::retrieve(), and PluginAtom::splitQuery().

const IDKind ID::MAINKIND_MASK = 0x70000000 [static]

Masks the part of the IDAddress which contains the main type.

Definition at line 88 of file ID.h.

Referenced by InternalGrounder::applySubstitutionToOrdinaryAtom(), InternalGrounder::matchNextFromExtensionOrdinary(), RawPrinter::print(), print(), and RawPrinter::printWithoutPrefix().

const uint8_t ID::MAINKIND_SHIFT = 28 [static]

Used in a shift-right operation to move the main type to the least significant bits.

Definition at line 90 of file ID.h.

Referenced by print().

const IDKind ID::MAINKIND_TERM = 0x10000000 [static]

Marks object IDs as terms.

Definition at line 105 of file ID.h.

Referenced by Term::analyzeTerm(), BOOST_AUTO_TEST_CASE(), FunctionRewriter::composeTerm(), InternalGrounder::computeGloballyNewAtom(), FLPModelGeneratorBase::computeShadowAndUnfoundedPredicates(), FLPModelGeneratorBase::createMinimalityRules(), FunctionRewriter::decomposeTerm(), Registry::getAuxiliaryConstantSymbol(), Registry::getAuxiliaryVariableSymbol(), Registry::getNewConstantTerm(), ExternalLearningHelper::learnFromRule(), sem< HexGrammarSemantics::termFromCIdent >::operator()(), sem< HexGrammarSemantics::termFromFunctionTerm >::operator()(), sem< HexGrammarSemantics::termFromRange >::operator()(), sem< HexGrammarSemantics::termFromString >::operator()(), sem< HexGrammarSemantics::termFromVariable >::operator()(), sem< HigherOrderParserModuleSemantics::higherOrderAtom >::operator()(), sem< HexGrammarSemantics::predFromPredDecl >::operator()(), sem< HexGrammarSemantics::predFromNameOnly >::operator()(), sem< HexGrammarSemantics::predFromString >::operator()(), sem< FunctionParserModuleTermSemantics::functionTermConstruct >::operator()(), sem< FunctionParserModuleAtomSemantics::functionTermEval >::operator()(), RawPrinter::print(), TestConcatAtom::retrieve(), FunctionComposeAtom::retrieve(), TestConcatAllAtom::retrieve(), TestListDomainAtom::retrieve(), TestListConcatAtom::retrieve(), TestListSplitAtom::retrieve(), TestListSplitHalfAtom::retrieve(), TestListMergeAtom::retrieve(), TestCycleAtom::retrieve(), TestAppendAtom::retrieve(), PluginAtom::setRegistry(), Registry::storeConstantTerm(), storePredicate(), Registry::storeVariableTerm(), termFromBuiltin(), termFromInteger(), and PredicateMask::updateMask().

const IDKind ID::PROPERTY_AUX = 0x00800000 [static]

Encodes that an atom uses an auxiliary predicate.

The predicate can be of any type generated by Registry::getAuxiliaryConstantSymbol. This includes external atom auxiliaries, strong negation auxiliaries, etc.

Definition at line 176 of file ID.h.

Referenced by BaseModelGeneratorFactory::addDomainPredicatesAndCreateDomainExplorationProgram(), BaseModelGenerator::computeExtensionOfDomainPredicates(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemAndInstantiateSolver(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemCreateAuxAtoms(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemNecessaryPart(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartEAEnforement(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRule(), BaseModelGeneratorFactory::convertRule(), BaseModelGeneratorFactory::convertRuleBody(), DependencyGraph::createAuxiliaryRule(), DependencyGraph::createAuxiliaryRuleHead(), FLPModelGeneratorFactoryBase::createEatomGuessingRule(), FLPModelGeneratorFactoryBase::createFLPRules(), FLPModelGeneratorBase::createFoundingRules(), FLPModelGeneratorBase::createMinimalityRules(), AssumptionBasedUnfoundedSetChecker::expandUFSDetectionProblemAndReinstantiateSolver(), Registry::getAuxiliaryAtom(), Registry::getAuxiliaryConstantSymbol(), Registry::getAuxiliaryVariableSymbol(), ExternalLearningHelper::getOutputAtom(), ExternalLearningHelper::getOutputAtoms(), GenuineGuessAndCheckModelGenerator::inlineExternalAtoms(), sem< HigherOrderParserModuleSemantics::higherOrderAtom >::operator()(), sem< StrongNegationParserModuleSemantics::stronglyNegatedPrefixAtom >::operator()(), handle_fact::operator()(), sem< ChoiceParserModuleSemantics::choiceElement >::operator()(), Registry::printAtomForUser(), OrdinaryAtomTable::storeAndGetID(), Registry::storeConstantTerm(), and Registry::storeVariableTerm().

const IDKind ID::PROPERTY_EXTERNALAUX = 0x00400000 [static]

Encodes that an atom uses an auxiliary predicate of type 'r' or 'n'.

Used for auxiliaries which represent external atoms the genuine solver needs to distinct them from other auxiliaries like HO-, strong negation-replacements and EA-input).

Definition at line 183 of file ID.h.

Referenced by BaseModelGeneratorFactory::addDomainPredicatesAndCreateDomainExplorationProgram(), BaseModelGeneratorFactory::convertRuleBody(), FLPModelGeneratorFactoryBase::createEatomGuessingRule(), Registry::getAuxiliaryConstantSymbol(), ExternalLearningHelper::getOutputAtom(), ExternalLearningHelper::getOutputAtoms(), GenuineGuessAndCheckModelGenerator::replacePredForInlinedEAs(), and AnnotatedGroundProgram::verifyExternalAtomsUsingCompleteSupportSets().

const IDKind ID::PROPERTY_EXTERNALINPUTAUX = 0x00200000 [static]

Encodes that an atom uses an auxiliary predicate of type 'i'.

Used for auxiliaries which represent aux input to external atoms (the genuine solver needs to distinct them from other auxiliaries like HO-, strong negation-replacements and EA-input).

Definition at line 190 of file ID.h.

Referenced by DependencyGraph::createAuxiliaryRule(), DependencyGraph::createAuxiliaryRuleHead(), FLPModelGeneratorFactoryBase::createEatomGuessingRule(), and Registry::getAuxiliaryConstantSymbol().

const IDKind ID::PROPERTY_FLPAUX = 0x00100000 [static]

Used for auxiliaries which represent rule satisfaction for FLP reduct computation in the explicit FLP check.

Definition at line 204 of file ID.h.

Referenced by FLPModelGeneratorFactoryBase::createFLPRules().

const IDKind ID::PROPERTY_GUARDAUX = 0x00A00000 [static]

Encodes that an atom uses an auxiliary predicate of type 'i'.

Used for auxiliaries which represent aux input to external atoms (the genuine solver needs to distinct them from other auxiliaries like HO-, strong negation-replacements and EA-input). Used to mark atoms as guards, whose truth value is determined wrt. external sources (relevant for nogood grounding).

Although not necessary, such atoms usually use an auxiliary predicate of type 'o' over ID(0, 0).

Definition at line 202 of file ID.h.

const IDKind ID::PROPERTY_MASK = 0x00FF0000 [static]

Masks the part of the IDAddress which contains the properties of the object.

Definition at line 96 of file ID.h.

Referenced by Registry::getAuxiliaryAtom(), and Term::updateSymbolOfNestedTerm().

const IDKind ID::PROPERTY_RULE_HEADGUARD = 0x00300000 [static]

Encodes that a rule contains a variable length disjunction in the head.

Definition at line 162 of file ID.h.

Referenced by sem< HexGrammarSemantics::ruleVariableDisjunction >::operator()().

const IDKind ID::PROPERTY_RULE_MODATOMS = 0x00400000 [static]

Encodes that a rule contains atoms from modules (cf.

modular HEX).

Definition at line 164 of file ID.h.

Referenced by BOOST_AUTO_TEST_CASE(), and HexGrammarSemantics::markModulePropertyIfModuleBody().

const IDKind ID::PROPERTY_RULE_UNMODATOMS = 0xFFBFFFFF [static]

See modular HEX.

Definition at line 166 of file ID.h.

const uint8_t ID::PROPERTY_SHIFT = 16 [static]

Used in a shift-right operation to move the properties to the least significant bits.

Definition at line 98 of file ID.h.

const IDKind ID::PROPERTY_TERM_RANGE = 0x00010000 [static]

Marks term IDs as range terms of kind a..b (special kind of nested terms).

Definition at line 168 of file ID.h.

Referenced by sem< HexGrammarSemantics::termFromRange >::operator()(), and Term::updateSymbolOfNestedTerm().

const IDKind ID::PROPERTY_VAR_ANONYMOUS = 0x00010000 [static]

Encodes that a variable IDs represents an anonymous variable, i.e.

"_".

Definition at line 156 of file ID.h.

Referenced by SimpleNogoodContainer::addAllResolvents(), BOOST_AUTO_TEST_CASE(), and sem< HexGrammarSemantics::termFromVariable >::operator()().

const IDKind ID::SUBKIND_ATOM_MODULE = 0x0A000000 [static]

Marks atom IDs as atom from modules (cf.

modular HEX).

Definition at line 135 of file ID.h.

Referenced by BOOST_AUTO_TEST_CASE(), sem< HexGrammarSemantics::mlpModuleAtom >::operator()(), and RawPrinter::print().

const IDKind ID::SUBKIND_ATOM_ORDINARYG = 0x00000000 [static]

Marks atom IDs as ordinary ground atoms.

Definition at line 125 of file ID.h.

Referenced by FLPModelGeneratorBase::addShadowInterpretation(), InternalGrounder::applySubstitutionToOrdinaryAtom(), BOOST_AUTO_TEST_CASE(), InternalGrounder::buildGroundInstance(), InternalGrounder::computeDepGraph(), BaseModelGenerator::computeExtensionOfDomainPredicates(), InternalGrounder::computeGloballyNewAtom(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemAndInstantiateSolver(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemCreateAuxAtoms(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemNecessaryPart(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartEAEnforement(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRule(), sem< StrongNegationParserModuleSemantics::stronglyNegatedPrefixAtom >::createAtom(), sem< HexGrammarSemantics::classicalAtomFromPrefix >::createAtom(), FLPModelGeneratorFactoryBase::createEatomGuessingRule(), FLPModelGeneratorFactoryBase::createFLPRules(), FLPModelGeneratorBase::createFoundingRules(), NogoodContainer::createLiteral(), FLPModelGeneratorBase::createMinimalityRules(), InternalGroundASPSolver::createNewAtom(), AssumptionBasedUnfoundedSetChecker::expandUFSDetectionProblemAndReinstantiateSolver(), InternalGrounder::getGroundProgramString(), InternalGrounder::getNongroundProgramString(), ExternalLearningHelper::getOutputAtom(), ExternalLearningHelper::getOutputAtoms(), InternalGrounder::groundStratum(), GenuineGuessAndCheckModelGenerator::inlineExternalAtoms(), ExternalLearningHelper::learnFromRule(), Nogood::match(), ExternalLearningHelper::DefaultInputNogoodProvider::operator()(), RawPrinter::print(), Interpretation::print(), Registry::printAtomForUser(), RawPrinter::printWithoutPrefix(), Interpretation::printWithoutPrefix(), GenPluginAtom1::retrieve(), ComfortPluginAtom::retrieve(), TestSetMinusNonComfortAtom::retrieve(), TestSetMinusPartialAtom::retrieve(), TestSetMinusNogoodBasedLearningAtom::retrieve(), TestSetMinusNongroundNogoodBasedLearningAtom::retrieve(), TestSetMinusRuleBasedLearningAtom::retrieve(), TestNonmonAtom::retrieve(), TestNonmon2Atom::retrieve(), TestIdAtom::retrieve(), TestIdpAtom::retrieve(), TestNegAtom::retrieve(), TestDisjAtom::retrieve(), TestPlugin::TestSetUnionAtom::retrieve(), PluginAtom::splitQuery(), and Registry::storeOrdinaryAtom().

const IDKind ID::SUBKIND_RULE_WEIGHT = 0x03000000 [static]

Marks rule IDs as weight rules.

Definition at line 145 of file ID.h.

Referenced by RawPrinter::print().

const uint8_t ID::SUBKIND_SHIFT = 24 [static]

Used in a shift-right operation to move the sub type to the least significant bits.

Definition at line 94 of file ID.h.

Referenced by print(), and DependencyGraph::writeGraphVizNodeLabel().

const IDKind ID::SUBKIND_TERM_INTEGER = 0x01000000 [static]

Marks term IDs as integers.

Definition at line 114 of file ID.h.

Referenced by BOOST_AUTO_TEST_CASE(), RawPrinter::print(), Registry::replaceVariablesInTerm(), and termFromInteger().

const IDKind ID::SUBKIND_TERM_NESTED = 0x05000000 [static]
const IDKind ID::SUBKIND_TERM_PREDICATE = 0x04000000 [static]

Marks term IDs as predicates (a special kind of constants).

Definition at line 120 of file ID.h.

Referenced by sem< HexGrammarSemantics::predFromPredDecl >::operator()(), RawPrinter::print(), Registry::replaceVariablesInTerm(), and storePredicate().

const IDKind ID::UNUSED_MASK = 0x0000FFFF [static]

Masks the unused bits in the kind flag.

Definition at line 100 of file ID.h.


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