dlvhex
2.5.0
|
Stores aggregate atoms, such as Z <= #avg{X : p(X)} <= Y. More...
#include <include/dlvhex2/Atoms.h>
Public Member Functions | |
AggregateAtom (IDKind kind) | |
Constructor. | |
AggregateAtom (IDKind kind, const Tuple &tuple, const Tuple &variables, const Tuple &literals) | |
Constructor for a single symbolic set. | |
AggregateAtom (IDKind kind, const Tuple &tuple, const std::vector< Tuple > &mvariables, const std::vector< Tuple > &mliterals) | |
Constructor for multiple symbolic sets. | |
std::ostream & | print (std::ostream &o) const |
Data Fields | |
Tuple | variables |
Variables of the symbolic set (before the colon). | |
Tuple | literals |
Literals in the conjunction of the symbolic set (after the colon). | |
std::vector< Tuple > | mvariables |
Stores the variables in case of multiple symbolic sets (semicolon-separated, see ASP-Core-2 standard). | |
std::vector< Tuple > | mliterals |
Stores the literals in case of multiple symbolic sets (semicolon-separated, see ASP-Core-2 standard). |
Stores aggregate atoms, such as Z <= #avg{X : p(X)} <= Y.
AggregateAtom::AggregateAtom | ( | IDKind | kind | ) | [inline] |
AggregateAtom::AggregateAtom | ( | IDKind | kind, |
const Tuple & | tuple, | ||
const Tuple & | variables, | ||
const Tuple & | literals | ||
) | [inline] |
Constructor for a single symbolic set.
Atom::tuple is used for outer conditions (always contains 5 elements):
kind | See Atom::kind. |
variables | See AggregateAtom::variables. |
literals | See AggregateAtom::literals. |
AggregateAtom::AggregateAtom | ( | IDKind | kind, |
const Tuple & | tuple, | ||
const std::vector< Tuple > & | mvariables, | ||
const std::vector< Tuple > & | mliterals | ||
) | [inline] |
Constructor for multiple symbolic sets.
Atom::tuple is used for outer conditions (always contains 5 elements):
kind | See Atom::kind. |
mvariables | See AggregateAtom::mvariables. |
mliterals | See AggregateAtom::mliterals. |
std::ostream& AggregateAtom::print | ( | std::ostream & | o | ) | const [inline] |
Definition at line 289 of file Atoms.h.
References printvector().
Literals in the conjunction of the symbolic set (after the colon).
All internal components of dlvhex except for the parser and the AggregatePlugin work with this field, while AggregateAtom::mliterals is only used temporarily for parsing an is later rewritten by AggregatePlugin!
Definition at line 223 of file Atoms.h.
Referenced by BOOST_AUTO_TEST_CASE(), ComponentGraph::calculatePredicatesOfComponent(), ComponentGraph::computeRecursiveAggregatesInComponent(), BaseModelGeneratorFactory::convertRuleBody(), DependencyGraph::createNodesAndIntraRuleDependenciesForBody(), Registry::getExternalAtomsInTuple(), Registry::getOutVariablesInID(), Registry::getVariablesInID(), sem< ConditionalParserModuleSemantics::conditionalLieral >::operator()(), sem< HexGrammarSemantics::aggregateAtom >::operator()(), and RawPrinter::print().
std::vector<Tuple> AggregateAtom::mliterals |
Stores the literals in case of multiple symbolic sets (semicolon-separated, see ASP-Core-2 standard).
Will be processed by AggrgatePlugin and rewritten to an aggregate with a single symbolic set. Is empty iff mliterals is nonempty and vice versa.
All internal components of dlvhex except for the parser and the AggregatePlugin work with AggregateAtom::literals only!
Definition at line 239 of file Atoms.h.
Referenced by sem< ChoiceParserModuleSemantics::choiceHead >::operator()(), sem< HexGrammarSemantics::aggregateAtom >::operator()(), and RawPrinter::print().
std::vector<Tuple> AggregateAtom::mvariables |
Stores the variables in case of multiple symbolic sets (semicolon-separated, see ASP-Core-2 standard).
Will be processed by AggrgatePlugin and rewritten to an aggregate with a single symbolic set. Is empty iff mvariables is nonempty and vice versa.
All internal components of dlvhex except for the parser and the AggregatePlugin work with AggregateAtom::variables only!
Definition at line 231 of file Atoms.h.
Referenced by sem< ChoiceParserModuleSemantics::choiceHead >::operator()(), sem< HexGrammarSemantics::aggregateAtom >::operator()(), and RawPrinter::print().
Variables of the symbolic set (before the colon).
All internal components of dlvhex except for the parser and the AggregatePlugin work with this field, while AggregateAtom::mvariables is only used temporarily for parsing an is later rewritten by AggregatePlugin!
Definition at line 218 of file Atoms.h.
Referenced by BOOST_AUTO_TEST_CASE(), Registry::getOutVariablesInID(), Registry::getVariablesInID(), sem< ConditionalParserModuleSemantics::conditionalLieral >::operator()(), sem< HexGrammarSemantics::aggregateAtom >::operator()(), and RawPrinter::print().