11 enum SemanticTypes {SEM_TYPE_STRUCTURE=1,SEM_TYPE_SYMBOL,SEM_TYPE_PROCESS,SEM_TYPE_RECEPTOR,SEM_TYPE_PROTOCOL};
12 #define is_symbol(s) ((s).semtype == SEM_TYPE_SYMBOL)
13 #define is_process(s) ((s).semtype == SEM_TYPE_PROCESS)
14 #define is_structure(s) ((s).semtype == SEM_TYPE_STRUCTURE)
15 #define is_protocol(s) ((s).semtype == SEM_TYPE_PROTOCOL)
16 #define is_receptor(s) ((s).semtype == SEM_TYPE_RECEPTOR)
18 typedef uint32_t Context;
19 typedef uint16_t SemanticType;
20 typedef uint16_t SemanticAddr;
38 typedef uint16_t Mlevel;
39 typedef uint32_t Mindex;
40 typedef uint32_t Mmagic;
64 #define SERIALIZED_NODE_SIZE (sizeof(N)-sizeof(void *)+sizeof(size_t))
65 #define SERIALIZED_LEVEL_SIZE(l) (sizeof(Mindex)+SERIALIZED_NODE_SIZE*l->nodes)
66 #define SERIALIZED_HEADER_SIZE(levels) (sizeof(S)+sizeof(uint32_t)*(levels))
73 uint32_t level_offsets[];
88 enum treeImplementations {ptrImpl=0xfffffffe,matrixImpl=0xffffffff};
89 #define FIRST_TREE_IMPL_TYPE ptrImpl
90 #define LAST_TREE_IMPL_TYPE matrixImpl
120 #define RUN_TREE_NOT_EVAULATED 0
121 #define RUN_TREE_EVALUATED 0xffffffff
137 #define rt_cur_child(tP) (((rT *)tP)->cur_child)
139 typedef uint32_t TreeHash;
142 typedef uint32_t Label;
185 uint64_t elapsed_time;
189 typedef struct Qe Qe;
212 pthread_mutex_t mutex;
222 #define MAX_CONTEXTS 100
230 enum ReceptorStates {Alive=0,Dead};
245 T *pending_responses;
247 pthread_mutex_t pending_signals_mutex;
248 pthread_mutex_t pending_responses_mutex;
261 enum AspectType {EXTERNAL_ASPECT=0,INTERNAL_ASPECT};
Receptor * r
back-pointer to receptor in which this Q is running (for defs and more)
T * edge
data store for edge receptors
int state
state information about the receptor that the vmhost manages
T * parent
node_pointer's parent (cached here for efficiency)
Context parent
the context this receptor's definition lives in
TreeHash key
has of the key tree that maps to a given data value
T * converse_pointer
pointer to the CONVERSE instruction in the run tree
R * caller
a pointer to the context that invoked this run-tree/context
T * sem_map
semantic map in effect for this context
UT_hash_handle hh
makes this structure hashable using the uthash library
ScapeData data
the scape data store (hash table)
int state
process state machine state
int path_s
first int of the path to the labeled item in the Receptor tree
UT_hash_handle hh
makes this structure hashable using the uthash library
int err
process error value
T * cid
pointer to CONVERSATION_IDENT in receptors CONVERSATIONS tree
Context context
the context this receptor's definition creates
Xaddr value
instance of data_source pointed to by the key
ReceptorAddress addr
the address by which to get messages to this receptor instance
Instances instances
the instances store
T * flux
pointer for quick access to the flux
Qe * active
active processes
int id
the process id this context exists in
R * callee
a pointer to the context we've invoked
int contexts_count
number of active processes
T * node_pointer
pointer to the tree node to execute next
T * root
RECEPTOR_INSTANCE semantic tree.
Qe * blocked
blocked processes
SemTable * sem
pointer back to the genotype table for this receptor's vmhost instance
ConversationState * conversation
record of the conversation state active in this context frame
int idx
node pointers child index (cached here for efficiency)
Qe * completed
completed processes (pending cleanup)
T * run_tree
pointer to the root of the run_tree