24 enum {ReceptorInstanceInstOfIdx=1,ReceptorInstanceContextNumIdx,ReceptorInstanceParentContextIdx,ReceptorInstanceStateIdx};
25 enum {ReceptorDefinitionLabelIdx=1,ReceptorDefinitionDefsIdx};
26 enum {ReceptorFluxIdx=1,ReceptorPendingSignalsIdx,ReceptorPendingResponsesIdx,ReceptorConversationsIdx,ReceptorElapsedTimeIdx};
27 enum {SignalEnvelopeIdx=1,SignalMessageIdx};
28 enum {MessageHeadIdx=1,MessageBodyIdx};
29 enum {HeadFromIdx=1,HeadToIdx,HeadAspectIdx,HeadCarrierIdx,HeadOptionalsIdx};
30 enum {EnvelopeSignalUUIDIdx=1};
31 enum {PendingResponseUUIDIdx=1,PendingResponseCarrierIdx,PendingResponseWakeupIdx,PendingResponseEndCondsIdx,PendingResponseConversationIdentIdx};
32 enum {WakeupReferenceProcessIdentIdx=1,WakeupReferenceCodePathIdx};
33 enum {ExpectationCarrierIdx=1,ExpectationPatternIdx,ExpectationActionIdx,ExpectationParamsIdx,ExpectationEndCondsIdx,ExpectationOptionalsIdx};
34 enum DATEIndexes {dateYearIdx=1,dateMonthIdx,dateDayIdx};
35 enum TIMEIndexes {timeHourIdx=1,timeMinuteIdx,timeSecondIdx};
36 enum TIMESTAMPIndexes {timestampTodayIdx=1,timestampNowIdx};
37 enum ASPECTIndexes {aspectExpectationsIdx=1,aspectSignalsIdx};
38 enum {ExpectRoleIdx=1,ExpectSourceIdx,ExpectPatternIdx,ExpectActionIdx,ExpectParamsIdx};
39 enum {InitiateRoleIdx=1,InitiateDestinationIdx,InitiateActionIdx};
40 enum {SourceRoleIdx=1};
41 enum {DefLabelIdx=1,SymbolDefStructureIdx};
42 enum {StructureDefLabelIdx=1,StructureDefDefIdx};
43 enum {ProcessDefNameIdx=1,ProcessDefIntentionIdx,ProcessDefCodeIdx,ProcessDefSignatureIdx,ProcessDefLinkIdx};
44 enum {SignatureOutputSigIdx=1};
45 enum {InputSigLabelIdx=1,InputSigSemVariantsIdx,InputSigOptionalIdx};
46 enum {ProtocolDefNameIdx=1,ProtocolDefSemanticsIdx,ProtocolDefOptionalsIdx};
47 enum {RuntreeCodeIdx=1,RunTreeParamsIdx,RunTreeErrorCodeIdx,RunTreeErrorParamsIdx};
48 enum {ResolutionWhichIdx=1};
49 enum {ConnectionWhichIdx=1};
50 enum {SemtrexMatchSymbolIdx=1,SemtrexMatchPathIdx,SemtrexMatchSibsIdx};
51 enum {InclusionPnameIdx=1};
52 enum {SemanticMapSemanticRefIdx=1,SemanticMapReplacementValIdx};
53 enum {SlotSemanticRefIdx=1,SlotValueOfIdx};
54 enum {ParameterReferenceIdx=1,ParameterResultIdx=2};
55 enum {InstanceStoreInstancesIdx=1,InstanceStoreTokensIdx=2};
56 enum {InstanceTokensLastTokenIdx=1};
57 enum {ConversationIdentIdx=1,ConversationUntilIdx,ConversationConversationsIdx,ConversationWakeupIdx};
58 enum {ConversationIdentUUIDIdx=1,ConversationIdentOptionalsIdx};
62 #define ST(r,name,num,...) name = _r_define_structure(r,"" #name "",num,__VA_ARGS__)
63 #define SY(r,name,str) name = _r_define_symbol(r,str,"" #name "")
64 #define SP(r,code,name,intention,signature,link) name = _r_define_process(r,code,"" #name "",intention,signature,link)
71 SemanticAddr _d_get_def_addr(
T *def);
75 T * _d_make_vstruc_def(
SemTable *sem,
char *label,
int num_params,va_list params);
82 T *_d_make_protocol_def(
SemTable *sem,
char *label,...);
84 size_t _sys_structure_size(
int id,
void *surface);
89 enum{NO_INDENT=0,INDENT=-1};
90 #define t2s(t) _t2s(G_sem,t)
91 #define t2sp(t) __t2s(G_sem,t,INDENT)
92 #define _t2s(d,t) __t2s(d,t,NO_INDENT)
94 char *_indent_line(
int level,
char *buf);
95 char * __t_dump(
SemTable *sem,
T *t,
int level,
char *buf);
97 #define _d_get_def(defs,s) _t_child(defs,(s).id);
98 #define _d_get_process_code(processes,p) _d_get_def(processes,p)
99 #define _d_get_symbol_def(symbols,s) _d_get_def(symbols,s)
100 #define _d_get_structure_def(structures,s) _d_get_def(structures,s)
102 #define spec_is_sem_equal(got, expected) spec_total++; if (semeq(expected,got)){putchar('.');} else {putchar('F');sprintf(failures[spec_failures++],"%s:%d expected %s to be %d.%d.%d but was %d.%d.%d",__FUNCTION__,__LINE__,#got,(expected).context,(expected).semtype,(expected).id,(got).context,(got).semtype,(got).id);}
Process _d_define_process(SemTable *sem, T *code, char *name, char *intention, T *signature, T *link, Context c)
SemanticID _d_define_receptor(SemTable *sem, char *label, T *definitions, Context c)
semantic trees header file
T * _d_build_def_semtrex(SemTable *sem, Symbol s, T *parent)
Structure _d_define_structure(SemTable *sem, char *label, T *structure_def, Context c)
size_t _d_get_symbol_size(SemTable *sem, Symbol s, void *surface)
Structure __d_get_symbol_structure(T *symbols, Symbol s)
size_t _d_get_structure_size(SemTable *sem, Symbol s, void *surface)
Symbol _d_define_symbol(SemTable *sem, Structure s, char *label, Context c)
T * _d_make_process_def(T *code, char *name, char *intention, T *signature, T *link)
char * __t2s(SemTable *sem, T *t, int indent)
SemanticID __d_define_receptor(SemTable *sem, T *def, Context c)
Protocol _d_define_protocol(SemTable *sem, T *def, Context c)
Structure _d_define_structure_v(SemTable *sem, char *label, Context c, int num_params,...)