dlvhex  2.5.0
AggregateAtom Struct Reference

Stores aggregate atoms, such as Z <= #avg{X : p(X)} <= Y. More...

#include <include/dlvhex2/Atoms.h>

Inheritance diagram for AggregateAtom:
Collaboration diagram for AggregateAtom:

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< Tuplemvariables
 Stores the variables in case of multiple symbolic sets (semicolon-separated, see ASP-Core-2 standard).
std::vector< Tuplemliterals
 Stores the literals in case of multiple symbolic sets (semicolon-separated, see ASP-Core-2 standard).

Detailed Description

Stores aggregate atoms, such as Z <= #avg{X : p(X)} <= Y.

See ID::TermBuiltinAddress.

Definition at line 210 of file Atoms.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
kindSee Atom::kind.

Definition at line 245 of file Atoms.h.

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):

Definition at line 262 of file Atoms.h.

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):

Definition at line 281 of file Atoms.h.


Member Function Documentation

std::ostream& AggregateAtom::print ( std::ostream &  o) const [inline]

Definition at line 289 of file Atoms.h.

References printvector().


Field Documentation

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().

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().


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