Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
Clasp::ProgramBuilder Class Reference

Interface for defining an input program. More...

#include <program_builder.h>

Inheritance diagram for Clasp::ProgramBuilder:
Inheritance graph
[legend]

List of all members.

Public Types

typedef SingleOwnerPtr
< SharedMinimize,
ReleaseObject
MinPtr
typedef SharedMinimizeData SharedMinimize

Public Member Functions

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

Protected Member Functions

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

Private Types

typedef SingleOwnerPtr
< MinimizeBuilder
MinBuildPtr

Private Member Functions

virtual bool doEndProgram ()=0
virtual void doGetAssumptions (LitVec &out) const =0
virtual bool doParse (StreamSource &prg)=0
virtual bool doStartProgram ()=0
virtual int doType () const =0
virtual bool doUpdateProgram ()=0
virtual void getMinBound (SumVec &out) const
ProgramBuilderoperator= (ProgramBuilder &)
 ProgramBuilder (const ProgramBuilder &)

Private Attributes

SharedContextctx_
bool frozen_
MinBuildPtr min_
MinPtr minCon_

Detailed Description

Interface for defining an input program.

Definition at line 43 of file program_builder.h.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:41