clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Classes | Public Types | Public Member Functions | List of all members
Clasp::Asp::Preprocessor Class Reference

Preprocesses (i.e. simplifies) a logic program. More...

#include <asp_preprocessor.h>

Collaboration diagram for Clasp::Asp::Preprocessor:
Collaboration graph

Public Types

enum  EqType { no_eq, full_eq }
 Possible eq-preprocessing types. More...
 

Public Member Functions

 Preprocessor ()
 
const LogicProgramprogram () const
 
LogicProgramprogram ()
 
bool preprocess (LogicProgram &prg, EqType t, uint32 maxIters, bool dfs=true)
 Starts preprocessing of the logic program. More...
 
bool eq () const
 
Var getRootAtom (Literal p) const
 
void setRootAtom (Literal p, uint32 atomId)
 

Detailed Description

Preprocesses (i.e. simplifies) a logic program.

Preprocesses (i.e. simplifies) a logic program and associates variables with the nodes of the simplified logic program.

Member Enumeration Documentation

Possible eq-preprocessing types.

Enumerator
no_eq 

no eq-preprocessing, associate a new var with each supported atom and body

full_eq 

check for all kinds of equivalences between atoms and bodies

Constructor & Destructor Documentation

Clasp::Asp::Preprocessor::Preprocessor ( )
inline

Member Function Documentation

bool Clasp::Asp::Preprocessor::eq ( ) const
inline
Var Clasp::Asp::Preprocessor::getRootAtom ( Literal  p) const
inline

Here is the call graph for this function:

bool Clasp::Asp::Preprocessor::preprocess ( LogicProgram prg,
EqType  t,
uint32  maxIters,
bool  dfs = true 
)
inline

Starts preprocessing of the logic program.

Computes the maximum consequences of prg and associates a variable with each supported atom and body.

Parameters
prgThe logic program to preprocess.
tType of eq-preprocessing.
maxItersIf t == full_eq, maximal number of iterations during eq preprocessing.
dfsIf t == full_eq, classify in df-order (true) or bf-order (false).
const LogicProgram* Clasp::Asp::Preprocessor::program ( ) const
inline
LogicProgram* Clasp::Asp::Preprocessor::program ( )
inline
void Clasp::Asp::Preprocessor::setRootAtom ( Literal  p,
uint32  atomId 
)
inline

Here is the call graph for this function:


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