clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | List of all members
Gringo::Input::BodyAggregate Struct Referenceabstract

#include <aggregate.hh>

Inheritance diagram for Gringo::Input::BodyAggregate:
Inheritance graph
Collaboration diagram for Gringo::Input::BodyAggregate:
Collaboration graph

Public Member Functions

virtual void unpool (UBodyAggrVec &x, bool beforeRewrite)=0
 Unpool the aggregate and aggregate elements. More...
 
virtual void simplify (Projections &project, Term::DotsMap &dots, Term::ScriptMap &scripts, unsigned &auxNum)=0
 
virtual void assignLevels (AssignLevel &lvl)=0
 
virtual bool check (ChkLvlVec &lvl) const =0
 
virtual void rewriteArithmetics (Term::ArithmeticsMap &arith, Literal::AssignVec &assign, unsigned &auxNum)=0
 
virtual bool rewriteAggregates (UBodyAggrVec &aggr)=0
 
virtual void removeAssignment ()=0
 
virtual bool isAssignment () const =0
 
virtual void collect (VarTermBoundVec &vars) const =0
 
virtual bool hasPool (bool beforeRewrite) const =0
 
virtual void replace (Defines &dx)=0
 
virtual CreateBody toGround (ToGroundArg &x, Ground::UStmVec &stms) const =0
 
virtual ~BodyAggregate ()
 
- Public Member Functions inherited from Gringo::Printable
virtual void print (std::ostream &out) const =0
 
virtual ~Printable ()
 
- Public Member Functions inherited from Gringo::Hashable
virtual size_t hash () const =0
 
virtual ~Hashable ()
 
- Public Member Functions inherited from Gringo::Locatable
virtual Location const & loc () const =0
 
virtual void loc (Location const &loc)=0
 
virtual ~Locatable ()
 
- Public Member Functions inherited from Gringo::Clonable< BodyAggregate >
virtual BodyAggregate * clone () const =0
 
virtual ~Clonable ()
 
- Public Member Functions inherited from Gringo::Comparable< BodyAggregate >
virtual bool operator== (BodyAggregateconst &other) const =0
 
virtual bool operator!= (BodyAggregateconst &other) const
 
virtual ~Comparable ()
 

Constructor & Destructor Documentation

virtual Gringo::Input::BodyAggregate::~BodyAggregate ( )
inlinevirtual

Member Function Documentation

virtual void Gringo::Input::BodyAggregate::assignLevels ( AssignLevel lvl)
pure virtual

Assign levels to variables using the VarCollector.

Precondition
Must be called after simplify.

Implemented in Gringo::Input::DisjointAggregate, Gringo::Input::SimpleBodyLiteral, Gringo::Input::Conjunction, Gringo::Input::LitBodyAggregate, and Gringo::Input::TupleBodyAggregate.

virtual bool Gringo::Input::BodyAggregate::check ( ChkLvlVec lvl) const
pure virtual
virtual void Gringo::Input::BodyAggregate::collect ( VarTermBoundVec vars) const
pure virtual

Collects all variables occuring in the aggregate. Occurrences bound by the aggregate are marked as such (occurrences bound in nested scopes are not marked).

Implemented in Gringo::Input::DisjointAggregate, Gringo::Input::SimpleBodyLiteral, Gringo::Input::Conjunction, Gringo::Input::LitBodyAggregate, and Gringo::Input::TupleBodyAggregate.

virtual bool Gringo::Input::BodyAggregate::hasPool ( bool  beforeRewrite) const
pure virtual
virtual bool Gringo::Input::BodyAggregate::isAssignment ( ) const
pure virtual
virtual void Gringo::Input::BodyAggregate::removeAssignment ( )
pure virtual

Returns true if the aggregate is an assignment aggregate.

Note
Does not consider relation literals.

Implemented in Gringo::Input::DisjointAggregate, Gringo::Input::SimpleBodyLiteral, Gringo::Input::Conjunction, Gringo::Input::LitBodyAggregate, and Gringo::Input::TupleBodyAggregate.

virtual void Gringo::Input::BodyAggregate::replace ( Defines dx)
pure virtual
virtual bool Gringo::Input::BodyAggregate::rewriteAggregates ( UBodyAggrVec aggr)
pure virtual

Rewrite aggregates. Separates assignment aggregates from ordinary bounds, and transforms literal aggregates into tuple aggregates. Returns false iff the aggregates must be removed. Argument aggr contains the rewritten aggregates.

Implemented in Gringo::Input::DisjointAggregate, Gringo::Input::SimpleBodyLiteral, Gringo::Input::Conjunction, Gringo::Input::LitBodyAggregate, and Gringo::Input::TupleBodyAggregate.

virtual void Gringo::Input::BodyAggregate::rewriteArithmetics ( Term::ArithmeticsMap arith,
Literal::AssignVec assign,
unsigned &  auxNum 
)
pure virtual
virtual void Gringo::Input::BodyAggregate::simplify ( Projections project,
Term::DotsMap dots,
Term::ScriptMap scripts,
unsigned &  auxNum 
)
pure virtual

Simplify the aggregate and aggregate elements.

Precondition
Must be called after unpool.

Implemented in Gringo::Input::DisjointAggregate, Gringo::Input::SimpleBodyLiteral, Gringo::Input::Conjunction, Gringo::Input::LitBodyAggregate, and Gringo::Input::TupleBodyAggregate.

virtual CreateBody Gringo::Input::BodyAggregate::toGround ( ToGroundArg x,
Ground::UStmVec stms 
) const
pure virtual
virtual void Gringo::Input::BodyAggregate::unpool ( UBodyAggrVec x,
bool  beforeRewrite 
)
pure virtual

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