syn::TypeDecl Class Reference

Type declaration. More...

#include <basic.h>

Inheritance diagram for syn::TypeDecl:

Inheritance graph
[legend]
Collaboration diagram for syn::TypeDecl:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void add (const string &s)
 Add type declaration.
bool find (const string &var, size_t &pos) const
 Find whether a variable is typed.
const TypegetType (size_t i) const
 Get variable type.
string getVarList () const
 Get the list of typed variables.
const string & getVarName (size_t i) const
 Get variable name.
bool implies (const TypeDecl *d) const
 Return true if the type declaration implies a given one.
TypeDeclrestrict (const string &varlist) const
 Return a new type declaration obtained by restricting to a list of variables.
void setAllType (Type v)
 Set all variable to a given type.
void setType (size_t i, Type v)
 Set variable type.
size_t size () const
 Length of the type declaration.
string to_string () const
 Get string representation.
 TypeDecl (const string &s="")
 Constructor.
Type::TypeSystem typeSystem () const
 Return which type system is used.

Private Member Functions

void add_single (const string &s)

Private Attributes

vector< string > varname
 Variable names.
vector< Typevartype
 Variable types.

Friends

ostream & operator<< (ostream &os, const TypeDecl &decl)
 Stream output.


Detailed Description

Type declaration.

Stored in almost normal form, i.e., there is no duplicate type for a single variable, but atd x:* may appear.


Constructor & Destructor Documentation

syn::TypeDecl::TypeDecl ( const string &  s = ""  )  [inline]

Constructor.


Member Function Documentation

void syn::TypeDecl::add ( const string &  s  )  [inline]

Add type declaration.

void syn::TypeDecl::add_single ( const string &  s  )  [inline, private]

bool syn::TypeDecl::find ( const string &  var,
size_t &  pos 
) const [inline]

Find whether a variable is typed.

const Type& syn::TypeDecl::getType ( size_t  i  )  const [inline]

Get variable type.

string syn::TypeDecl::getVarList (  )  const [inline]

Get the list of typed variables.

const string& syn::TypeDecl::getVarName ( size_t  i  )  const [inline]

Get variable name.

bool syn::TypeDecl::implies ( const TypeDecl d  )  const [inline]

Return true if the type declaration implies a given one.

TypeDecl* syn::TypeDecl::restrict ( const string &  varlist  )  const [inline]

Return a new type declaration obtained by restricting to a list of variables.

void syn::TypeDecl::setAllType ( Type  v  )  [inline]

Set all variable to a given type.

void syn::TypeDecl::setType ( size_t  i,
Type  v 
) [inline]

Set variable type.

size_t syn::TypeDecl::size (  )  const [inline]

Length of the type declaration.

string syn::TypeDecl::to_string (  )  const [inline]

Get string representation.

Type::TypeSystem syn::TypeDecl::typeSystem (  )  const [inline]

Return which type system is used.

UP2BOX if variables are typed in {*,_,^,|} UP2DEF if variables are typed in {*,_,^,|,!} UP2BT if variables are typed in {*,_,^,|,!,|r} for some r > 0 UP2PT if parametric types


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const TypeDecl decl 
) [friend]

Stream output.


Member Data Documentation

vector<string> syn::TypeDecl::varname [private]

Variable names.

vector<Type> syn::TypeDecl::vartype [private]

Variable types.


The documentation for this class was generated from the following file:
Generated on Sun Nov 23 14:52:47 2008 for Typing linear constraints by  doxygen 1.5.4