24#ifndef __NAMESPACES_H__
25#define __NAMESPACES_H__
27#include <common/hash.h>
28#include <common/list.h>
29#include <common/bitset.h>
30#include <common/array.h>
271 void setPInt(
unsigned long id,
unsigned long val);
557 char *
Name (
bool add_colon =
false);
Array expressions.
Definition: act_array.h:529
Class for stepping through an array expression element-by-element.
Definition: act_array.h:631
This class is used to hold the contents of the body of any user-defined type or namespace....
Definition: body.h:52
The main Act class used to read in an ACT file and create basic data structures. All design informati...
Definition: act.h:334
This class is used to store Act identifiers that correspond to instances. Identifiers have an optiona...
Definition: act_id.h:56
This is an iterator that, when passed a Scope pointer, allows you to iterate through all instances wi...
Definition: iter.h:95
The ActNamespace class holds all the information about a namespace.
Definition: namespaces.h:469
unsigned int exported
Definition: namespaces.h:737
Scope * I
Definition: namespaces.h:722
ActBody * B
Definition: namespaces.h:727
ActNamespace * Parent()
Definition: namespaces.h:551
void _init(ActNamespace *parent, const char *s)
InstType * findInstance(const char *s)
void AppendBody(ActBody *b)
ActNamespace * findNS(const char *s)
char * Name(bool add_colon=false)
struct Hashtable * T
Definition: namespaces.h:716
static class Act * Act()
Definition: namespaces.h:636
static ActNamespace * global
Definition: namespaces.h:742
void setBody(ActBody *b)
Definition: namespaces.h:647
act_languages * lang
the sub-languages in the namespace
Definition: namespaces.h:698
struct Hashtable * N
Definition: namespaces.h:708
list_t * getSubNamespaces()
ActBody * getBody()
Definition: namespaces.h:658
int isExported()
Definition: namespaces.h:535
void _subst_globals_addconn(list_t *subst, listitem_t *start, InstType *it, const char *s)
ActNamespace(const char *s)
void _subst_globals(list_t *subst, InstType *it, const char *s)
int findName(const char *s)
static void setAct(class Act *a)
hash_bucket_t * self_bucket
Definition: namespaces.h:703
Scope * CurScope()
Definition: namespaces.h:599
ActNamespace(ActNamespace *ns, const char *s)
int isExpanded()
Definition: namespaces.h:620
static class Act * act
Definition: namespaces.h:747
int EditType(const char *s, UserDef *u)
const char * getName()
Definition: namespaces.h:494
static ActNamespace * Global()
Definition: namespaces.h:631
static int creating_global
Definition: namespaces.h:752
void Link(ActNamespace *up, const char *name)
void MkExported()
Definition: namespaces.h:540
UserDef * findType(const char *s)
ActNamespace * parent
Definition: namespaces.h:732
int CreateType(const char *s, UserDef *u)
void clrExported()
Definition: namespaces.h:545
act_languages * getlang()
Definition: namespaces.h:673
This is an iterator that, when passed an ActNamespace pointer, allows you to iterate through nested n...
Definition: iter.h:65
Functions to manage namespace search paths.
Definition: namespaces.h:798
list_t * search_path
Definition: namespaces.h:841
int Open(ActNamespace *ns, const char *newname=NULL)
ActNamespace * findType(ActNamespace *cur, const char *s)
list_t * findAll(ActNamespace *cur, const char *s)
ActNamespace * find(ActNamespace *cur, const char *s)
This is an iterator that, when passed an ActNamespace pointer, allows you to iterate through all user...
Definition: iter.h:153
This is an iterator that, when passed a Scope pointer, allows you to iterate through all the uinque p...
Definition: iter.h:186
Dense arrays, sparse arrays, and array dereferences.
Definition: act_array.h:65
An instance type.
Definition: inst.h:92
This is the data structure that holds all instances and their associated types within a scope....
Definition: namespaces.h:77
void DeallocPBool(unsigned long idx, int count=1)
void BindParam(ActId *id, AExpr *ae)
void DeallocPInts(unsigned long idx, int count=1)
unsigned long AllocPType(int count=1)
InstType * FullLookup(ActId *id, Array **aref)
void setPType(unsigned long id, InstType *val)
void setUserDef(UserDef *_u)
Definition: namespaces.h:220
A_DECL(unsigned long, vpint)
void setNamespace(ActNamespace *_ns)
Definition: namespaces.h:242
unsigned long getPInt(unsigned long id)
void BindParam(ActId *id, AExprstep *aes, int idx=-1)
void mkFunction()
Definition: namespaces.h:225
struct Hashtable * H
Definition: namespaces.h:431
void BindParam(const char *s, InstType *tt)
int getPBool(unsigned long id)
bitset_t * vptype_set
Definition: namespaces.h:452
bitset_t * vpbool_set
Definition: namespaces.h:456
void DeallocPInt(unsigned long idx, int count=1)
void setPInts(unsigned long id, long val)
bitset_t * vpreal_set
Definition: namespaces.h:449
ValueIdx * FullLookupVal(const char *s)
int issetPReal(unsigned long id)
ActNamespace * getNamespace()
Definition: namespaces.h:248
long getPInts(unsigned long id)
InstType * localLookup(ActId *id, Array **aref)
int is_function
Definition: namespaces.h:439
A_DECL(InstType *, vptype)
unsigned int expanded
Definition: namespaces.h:436
ActNamespace * ns
Definition: namespaces.h:437
int issetPBool(unsigned long id)
int issetPInts(unsigned long id)
bitset_t * vpint_set
Definition: namespaces.h:443
unsigned long AllocPInts(int count=1)
void setPInt(unsigned long id, unsigned long val)
Scope(Scope *parent, int is_expanded=0)
bitset_t * vpints_set
Definition: namespaces.h:446
unsigned long AllocPBool(int count=1)
void refineBaseType(const char *s, InstType *u)
unsigned long AllocPInt(int count=1)
ValueIdx * LookupVal(const char *s)
InstType * getPType(unsigned long id)
bitset_t * vpbool
Definition: namespaces.h:455
int issetPInt(unsigned long id)
InstType * Lookup(const char *s)
void DeallocPReal(unsigned long idx, int count=1)
void setPBool(unsigned long id, int val)
int isExpanded()
Definition: namespaces.h:370
Scope * Parent()
Definition: namespaces.h:90
UserDef * u
Definition: namespaces.h:435
unsigned long vpbool_len
Definition: namespaces.h:454
int Add(const char *s, InstType *it)
int isFunction()
Definition: namespaces.h:230
Scope * up
Definition: namespaces.h:433
void setPReal(unsigned long id, double val)
void DeallocPType(unsigned long idx, int count=1)
InstType * FullLookup(const char *s)
double getPReal(unsigned long id)
void playBody(ActBody *b)
int issetPType(unsigned long id)
InstType * Lookup(ActId *id, int err=1)
void BindParam(ActId *id, InstType *tt)
UserDef * getUserDef()
Definition: namespaces.h:236
void BindParam(const char *s, AExpr *ae)
unsigned long AllocPReal(int count=1)
static void printConnections(FILE *fp, act_connection *cx, bool force=false)
int isGlobal(const char *s)
The abstract base class for all types in the system.
Definition: basetype.h:45
UserDef stores information that is common to all user-defined types. User-defined types are more comp...
Definition: types.h:310
This class is used to create an instance in a scope. The name comes from the fact that this is used t...
Definition: value.h:342
Connections.
Definition: value.h:113
This holds all the sub-langugae bodies in a namespace/user-defined type definition.
Definition: lang.h:641
Holds a CHP sub-language.
Definition: lang.h:367
Structure that holds all the prs { } blocks in a particular scope. This is a linked-list of blocks,...
Definition: lang.h:194
The specification sub-language.
Definition: lang.h:397