Generated on Thu Mar 22 10:39:54 2012 for Gecode by doxygen 1.6.3

Gecode::FlatZinc Namespace Reference

Interpreter for the FlatZinc language. More...

Namespaces

namespace  AST
 

Abstract syntax trees for the FlatZinc interpreter.


Classes

class  ConExpr
 Abstract representation of a constraint. More...
struct  Option
 Optional value. More...
class  OutputOrder
 Strict weak ordering for output items. More...
class  SymbolEntry
 Entries in the symbol table. More...
class  ParserState
 State of the FlatZinc parser More...
class  Registry
 Map from constraint identifier to constraint posting functions. More...
class  SymbolTable
 Symbol table mapping identifiers (strings) to values. More...
class  Alias
 Alias for a variable specification More...
class  VarSpec
 Base class for variable specifications. More...
class  IntVarSpec
 Specification for integer variables. More...
class  BoolVarSpec
 Specification for Boolean variables. More...
class  FloatVarSpec
 Specification for floating point variables. More...
class  SetVarSpec
 Specification for set variables. More...
class  Printer
 Output support class for FlatZinc interpreter. More...
class  FlatZincOptions
 Options for running FlatZinc models More...
class  FlatZincSpace
 A space that can be initialized with a FlatZinc model. More...
class  Error
 Exception class for FlatZinc errors More...

Typedefs

typedef std::pair< std::string,
Option< std::vector< int > * > > 
intvartype
typedef std::pair< std::string,
VarSpec * > 
varspec

Enumerations

enum  SymbolType {
  ST_INTVAR, ST_BOOLVAR, ST_FLOATVAR, ST_SETVAR,
  ST_INTVARARRAY, ST_BOOLVARARRAY, ST_SETVARARRAY, ST_FLOATVARARRAY,
  ST_INTVALARRAY, ST_BOOLVALARRAY, ST_SETVALARRAY, ST_INT,
  ST_BOOL, ST_SET
}
 

Types of symbols.

More...

Functions

IntSet vs2is (IntVarSpec *vs)
int vs2bsl (BoolVarSpec *bs)
int vs2bsh (BoolVarSpec *bs)
TieBreakVarBranch< IntVarBranchann2ivarsel (AST::Node *ann)
IntValBranch ann2ivalsel (AST::Node *ann)
IntAssign ann2asnivalsel (AST::Node *ann)
SetVarBranch ann2svarsel (AST::Node *ann)
SetValBranch ann2svalsel (AST::Node *ann)
void flattenAnnotations (AST::Array *ann, std::vector< AST::Node * > &out)
SymbolEntry se_iv (int i)
 Construct integer variable entry.
SymbolEntry se_bv (int i)
 Construct Boolean variable entry.
SymbolEntry se_fv (int i)
 Construct float variable entry.
SymbolEntry se_sv (int i)
 Construct set variable entry.
SymbolEntry se_iva (int i)
 Construct integer variable array entry.
SymbolEntry se_bva (int i)
 Construct Boolean variable array entry.
SymbolEntry se_fva (int i)
 Construct float variable array entry.
SymbolEntry se_sva (int i)
 Construct set variable array entry.
SymbolEntry se_i (int i)
 Construct integer entry.
SymbolEntry se_b (bool b)
 Construct Boolean entry.
SymbolEntry se_s (int i)
 Construct set entry.
SymbolEntry se_ia (int i)
 Construct integer array entry.
SymbolEntry se_ba (int i)
 Construct Boolean array entry.
SymbolEntry se_sa (int i)
 Construct set array entry.
Registryregistry (void)
 Return global registry object.
GECODE_FLATZINC_EXPORT
FlatZincSpace
parse (const std::string &fileName, Printer &p, std::ostream &err=std::cerr, FlatZincSpace *fzs=NULL)
 Parse FlatZinc file fileName into fzs and return it.
GECODE_FLATZINC_EXPORT
FlatZincSpace
parse (std::istream &is, Printer &p, std::ostream &err=std::cerr, FlatZincSpace *fzs=NULL)
 Parse FlatZinc from is into fzs and return it.

Detailed Description

Interpreter for the FlatZinc language.

The Gecode::FlatZinc namespace contains all functionality required to parse and solve constraint models written in the FlatZinc language.


Typedef Documentation

typedef std::pair<std::string,Option<std::vector<int>* > > Gecode::FlatZinc::intvartype

Definition at line 72 of file parser.hh.

typedef std::pair<std::string, VarSpec*> Gecode::FlatZinc::varspec

Definition at line 74 of file parser.hh.


Enumeration Type Documentation

Types of symbols.

Enumerator:
ST_INTVAR 
ST_BOOLVAR 
ST_FLOATVAR 
ST_SETVAR 
ST_INTVARARRAY 
ST_BOOLVARARRAY 
ST_SETVARARRAY 
ST_FLOATVARARRAY 
ST_INTVALARRAY 
ST_BOOLVALARRAY 
ST_SETVALARRAY 
ST_INT 
ST_BOOL 
ST_SET 

Definition at line 88 of file parser.hh.


Function Documentation

IntSet Gecode::FlatZinc::vs2is ( IntVarSpec *  vs  ) 

Definition at line 50 of file flatzinc.cpp.

int Gecode::FlatZinc::vs2bsl ( BoolVarSpec *  bs  ) 

Definition at line 70 of file flatzinc.cpp.

int Gecode::FlatZinc::vs2bsh ( BoolVarSpec *  bs  ) 

Definition at line 82 of file flatzinc.cpp.

TieBreakVarBranch<IntVarBranch> Gecode::FlatZinc::ann2ivarsel ( AST::Node *  ann  ) 

Definition at line 94 of file flatzinc.cpp.

IntValBranch Gecode::FlatZinc::ann2ivalsel ( AST::Node *  ann  ) 

Definition at line 130 of file flatzinc.cpp.

IntAssign Gecode::FlatZinc::ann2asnivalsel ( AST::Node *  ann  ) 

Definition at line 163 of file flatzinc.cpp.

SetVarBranch Gecode::FlatZinc::ann2svarsel ( AST::Node *  ann  ) 

Definition at line 181 of file flatzinc.cpp.

SetValBranch Gecode::FlatZinc::ann2svalsel ( AST::Node *  ann  ) 

Definition at line 200 of file flatzinc.cpp.

void Gecode::FlatZinc::flattenAnnotations ( AST::Array *  ann,
std::vector< AST::Node * > &  out 
)

Definition at line 350 of file flatzinc.cpp.

SymbolEntry Gecode::FlatZinc::se_iv ( int  i  )  [inline]

Construct integer variable entry.

Definition at line 118 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_bv ( int  i  )  [inline]

Construct Boolean variable entry.

Definition at line 122 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_fv ( int  i  )  [inline]

Construct float variable entry.

Definition at line 126 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_sv ( int  i  )  [inline]

Construct set variable entry.

Definition at line 130 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_iva ( int  i  )  [inline]

Construct integer variable array entry.

Definition at line 135 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_bva ( int  i  )  [inline]

Construct Boolean variable array entry.

Definition at line 139 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_fva ( int  i  )  [inline]

Construct float variable array entry.

Definition at line 143 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_sva ( int  i  )  [inline]

Construct set variable array entry.

Definition at line 147 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_i ( int  i  )  [inline]

Construct integer entry.

Definition at line 152 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_b ( bool  b  )  [inline]

Construct Boolean entry.

Definition at line 156 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_s ( int  i  )  [inline]

Construct set entry.

Definition at line 160 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_ia ( int  i  )  [inline]

Construct integer array entry.

Definition at line 165 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_ba ( int  i  )  [inline]

Construct Boolean array entry.

Definition at line 169 of file parser.hh.

SymbolEntry Gecode::FlatZinc::se_sa ( int  i  )  [inline]

Construct set array entry.

Definition at line 173 of file parser.hh.

Registry & Gecode::FlatZinc::registry ( void   ) 

Return global registry object.

GECODE_FLATZINC_EXPORT FlatZincSpace* Gecode::FlatZinc::parse ( const std::string &  fileName,
Printer &  p,
std::ostream &  err = std::cerr,
FlatZincSpace *  fzs = NULL 
)

Parse FlatZinc file fileName into fzs and return it.

Creates a new empty FlatZincSpace if fzs is NULL.

GECODE_FLATZINC_EXPORT FlatZincSpace* Gecode::FlatZinc::parse ( std::istream &  is,
Printer &  p,
std::ostream &  err = std::cerr,
FlatZincSpace *  fzs = NULL 
)

Parse FlatZinc from is into fzs and return it.

Creates a new empty FlatZincSpace if fzs is NULL.