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

Interface for defining an input program. More...

#include <program_builder.h>

Inheritance diagram for Clasp::ProgramBuilder:
Inheritance graph
Collaboration diagram for Clasp::ProgramBuilder:
Collaboration graph

Public Types

typedef SharedMinimizeData SharedMinimize
 
typedef SingleOwnerPtr
< SharedMinimize,
ReleaseObject
MinPtr
 

Public Member Functions

 ProgramBuilder ()
 
virtual ~ProgramBuilder ()
 
bool startProgram (SharedContext &ctx)
 Starts the definition of a program. More...
 
bool parseProgram (StreamSource &prg)
 Parses the given stream as a program of type() and adds it to this object. More...
 
bool parseProgram (std::istream &prg)
 
bool updateProgram ()
 Unfreezes a currently frozen program. More...
 
bool endProgram ()
 Loads the program into the shared context passed to startProgram(). More...
 
void getAssumptions (LitVec &out) const
 Returns any assumptions that shall hold during solving. More...
 
SharedMinimizegetMinimizeConstraint (SumVec *softBound=0) const
 Returns an optimized representation of the program's minimize statements (if any). More...
 
void disposeMinimizeConstraint ()
 Removes a previously created minimize constraint. More...
 
int type () const
 Returns the type of program that is created by this builder. More...
 
bool frozen () const
 Returns true if the program is currently frozen. More...
 
virtual bool ok () const
 Returns true if the program is not conflicting. More...
 
SharedContextctx () const
 Returns the stored context object. More...
 

Protected Member Functions

void addMinLit (WeightLiteral x)
 
void addMinRule (const WeightLitVec &lits)
 
void disposeMin ()
 
void setFrozen (bool frozen)
 
void setCtx (SharedContext *x)
 

Detailed Description

Interface for defining an input program.


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