AERA
replicode_defs.h
1 //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
2 //_/_/
3 //_/_/ AERA
4 //_/_/ Autocatalytic Endogenous Reflective Architecture
5 //_/_/
6 //_/_/ Copyright (c) 2018-2025 Jeff Thompson
7 //_/_/ Copyright (c) 2018-2025 Kristinn R. Thorisson
8 //_/_/ Copyright (c) 2018-2025 Icelandic Institute for Intelligent Machines
9 //_/_/ http://www.iiim.is
10 //_/_/
11 //_/_/ Copyright (c) 2010-2012 Eric Nivel
12 //_/_/ Center for Analysis and Design of Intelligent Agents
13 //_/_/ Reykjavik University, Menntavegur 1, 102 Reykjavik, Iceland
14 //_/_/ http://cadia.ru.is
15 //_/_/
16 //_/_/ Part of this software was developed by Eric Nivel
17 //_/_/ in the HUMANOBS EU research project, which included
18 //_/_/ the following parties:
19 //_/_/
20 //_/_/ Autonomous Systems Laboratory
21 //_/_/ Technical University of Madrid, Spain
22 //_/_/ http://www.aslab.org/
23 //_/_/
24 //_/_/ Communicative Machines
25 //_/_/ Edinburgh, United Kingdom
26 //_/_/ http://www.cmlabs.com/
27 //_/_/
28 //_/_/ Istituto Dalle Molle di Studi sull'Intelligenza Artificiale
29 //_/_/ University of Lugano and SUPSI, Switzerland
30 //_/_/ http://www.idsia.ch/
31 //_/_/
32 //_/_/ Institute of Cognitive Sciences and Technologies
33 //_/_/ Consiglio Nazionale delle Ricerche, Italy
34 //_/_/ http://www.istc.cnr.it/
35 //_/_/
36 //_/_/ Dipartimento di Ingegneria Informatica
37 //_/_/ University of Palermo, Italy
38 //_/_/ http://diid.unipa.it/roboticslab/
39 //_/_/
40 //_/_/
41 //_/_/ --- HUMANOBS Open-Source BSD License, with CADIA Clause v 1.0 ---
42 //_/_/
43 //_/_/ Redistribution and use in source and binary forms, with or without
44 //_/_/ modification, is permitted provided that the following conditions
45 //_/_/ are met:
46 //_/_/ - Redistributions of source code must retain the above copyright
47 //_/_/ and collaboration notice, this list of conditions and the
48 //_/_/ following disclaimer.
49 //_/_/ - Redistributions in binary form must reproduce the above copyright
50 //_/_/ notice, this list of conditions and the following disclaimer
51 //_/_/ in the documentation and/or other materials provided with
52 //_/_/ the distribution.
53 //_/_/
54 //_/_/ - Neither the name of its copyright holders nor the names of its
55 //_/_/ contributors may be used to endorse or promote products
56 //_/_/ derived from this software without specific prior
57 //_/_/ written permission.
58 //_/_/
59 //_/_/ - CADIA Clause: The license granted in and to the software
60 //_/_/ under this agreement is a limited-use license.
61 //_/_/ The software may not be used in furtherance of:
62 //_/_/ (i) intentionally causing bodily injury or severe emotional
63 //_/_/ distress to any person;
64 //_/_/ (ii) invading the personal privacy or violating the human
65 //_/_/ rights of any person; or
66 //_/_/ (iii) committing or preparing for any act of war.
67 //_/_/
68 //_/_/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
69 //_/_/ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
70 //_/_/ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
71 //_/_/ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
72 //_/_/ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
73 //_/_/ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
74 //_/_/ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
75 //_/_/ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
76 //_/_/ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
77 //_/_/ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
78 //_/_/ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
79 //_/_/ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
80 //_/_/ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
81 //_/_/ OF SUCH DAMAGE.
82 //_/_/
83 //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
84 
85 #ifndef replicode_defs_h
86 #define replicode_defs_h
87 
88 
89 #define EXECUTIVE_DEVICE 0xA1000000
90 
91 
92 #define VIEW_CODE_MAX_SIZE 13 // size of the code of the largest view (grp view) + 1 (oid used by rMems); view set opcode's index is 0.
93 
94 #define VIEW_OPCODE 0
95 #define VIEW_SYNC 1
96 #define VIEW_IJT 2 // iptr to timestamp (+3 atoms)
97 #define VIEW_SLN 3
98 #define VIEW_RES 4
99 #define VIEW_HOST 5
100 #define VIEW_ORG 6
101 #define VIEW_ACT 7
102 #define GRP_VIEW_COV 7
103 #define GRP_VIEW_VIS 8
104 #define VIEW_CTRL_0 10 // for nong-group views, this uint32 (not atom) may hold control data (ex: cache status).
105 #define VIEW_CTRL_1 11 // idem.
106 #define VIEW_OID 12
107 
108 #define VIEW_ARITY 6
109 #define PGM_VIEW_ARITY 7
110 
111 
112 #define OBJECT_CLASS 0
113 
114 
115 #define GRP_UPR 1
116 #define GRP_SLN_THR 2
117 #define GRP_ACT_THR 3
118 #define GRP_VIS_THR 4
119 #define GRP_C_SLN 5
120 #define GRP_C_SLN_THR 6
121 #define GRP_C_ACT 7
122 #define GRP_C_ACT_THR 8
123 #define GRP_DCY_PER 9
124 #define GRP_DCY_TGT 10
125 #define GRP_DCY_PRD 11
126 #define GRP_DCY_AUTO 12
127 #define GRP_SLN_CHG_THR 13
128 #define GRP_SLN_CHG_PRD 14
129 #define GRP_ACT_CHG_THR 15
130 #define GRP_ACT_CHG_PRD 16
131 #define GRP_AVG_SLN 17
132 #define GRP_HIGH_SLN 18
133 #define GRP_LOW_SLN 19
134 #define GRP_AVG_ACT 20
135 #define GRP_HIGH_ACT 21
136 #define GRP_LOW_ACT 22
137 #define GRP_HIGH_SLN_THR 23
138 #define GRP_LOW_SLN_THR 24
139 #define GRP_SLN_NTF_PRD 25
140 #define GRP_HIGH_ACT_THR 26
141 #define GRP_LOW_ACT_THR 27
142 #define GRP_ACT_NTF_PRD 28
143 #define GRP_NTF_NEW 29
144 #define GRP_LOW_RES_THR 30
145 #define GRP_NTF_GRPS 31
146 #define GRP_ARITY 32
147 
148 
149 #define PGM_TPL_ARGS 1
150 #define PGM_INPUTS 2
151 #define PGM_GUARDS 3
152 #define PGM_PRODS 4
153 #define PGM_ARITY 5
154 
155 
156 #define IPGM_PGM 1
157 #define IPGM_ARGS 2
158 #define IPGM_RUN 3
159 #define IPGM_TSC 4
160 #define IPGM_RES 5
161 #define IPGM_NFR 6
162 #define IPGM_ARITY 7
163 
164 
165 #define ICPP_PGM_NAME 1
166 #define ICPP_PGM_ARGS 2
167 #define ICPP_PGM_RUN 3
168 #define ICPP_PGM_TSC 4
169 #define ICPP_PGM_RES 5
170 #define ICPP_PGM_NFR 6
171 #define ICPP_PGM_ARITY 7
172 
173 
174 #define MK_RDX_CODE 1
175 #define MK_RDX_INPUTS 2
176 #define MK_RDX_PRODS 3
177 #define MK_RDX_ARITY 4
178 
179 #define MK_RDX_IHLP_REF 0
180 
181 
182 #define CMD_FUNCTION 1
183 #define CMD_ARGS 2
184 #define CMD_ARITY 3
185 
186 
187 #define VAL_HLD_ARITY 2
188 
189 
190 #define MK_VAL_OBJ 1
191 #define MK_VAL_ATTR 2
192 #define MK_VAL_VALUE 3
193 #define MK_VAL_ARITY 4
194 
195 
196 #define CST_TPL_ARGS 1
197 #define CST_OBJS 2
198 #define CST_FWD_GUARDS 3
199 #define CST_BWD_GUARDS 4
200 #define CST_OUT_GRPS 5
201 #define CST_ARITY 6
202 
203 #define CST_HIDDEN_REFS 1
204 
205 
206 #define MDL_TPL_ARGS 1
207 #define MDL_OBJS 2
208 #define MDL_FWD_GUARDS 3
209 #define MDL_BWD_GUARDS 4
210 #define MDL_OUT_GRPS 5
211 #define MDL_STRENGTH 6
212 #define MDL_CNT 7
213 #define MDL_SR 8
214 #define MDL_DSR 9
215 #define MDL_ARITY 10
216 
217 #define MDL_HIDDEN_REFS 1
218 
219 #define HLP_HIDDEN_REFS 1
220 
221 
222 #define HLP_TPL_ARGS 1
223 #define HLP_OBJS 2
224 #define HLP_FWD_GUARDS 3
225 #define HLP_BWD_GUARDS 4
226 #define HLP_OUT_GRPS 5
227 
228 
229 #define I_HLP_OBJ 1
230 #define I_HLP_TPL_ARGS 2
231 #define I_HLP_EXPOSED_ARGS 3
232 #define I_HLP_WEAK_REQUIREMENT_ENABLED 4
233 #define I_HLP_ARITY 5
234 
235 
236 #define FACT_OBJ 1
237 #define FACT_AFTER 2
238 #define FACT_BEFORE 3
239 #define FACT_CFD 4
240 #define FACT_ARITY 5
241 
242 #define FACT_OBJ_REF 0
243 
244 
245 #define PRED_TARGET 1
246 #define PRED_SIMS 2
247 #define PRED_ARITY 3
248 
249 #define PRED_TARGET_REF 0
250 
251 
252 #define GOAL_TARGET 1
253 #define GOAL_ACTR 2
254 #define GOAL_SIM 3
255 #define GOAL_ARITY 4
256 
257 
258 #define SUCCESS_OBJ 1
259 #define SUCCESS_EVD 2
260 #define SUCCESS_OBJ_MK_RDX 3
261 #define SUCCESS_ARITY 4
262 
263 
264 #define GRP_PAIR_FIRST 1
265 #define GRP_PAIR_SECOND 2
266 #define GRP_PAIR_ARITY 3
267 
268 
269 #define PERF_RDX_LTCY 1
270 #define PERF_D_RDX_LTCY 2
271 #define PERF_TIME_LTCY 3
272 #define PERF_D_TIME_LTCY 4
273 #define PERF_ARITY 5
274 
275 #define SIM_MODE 1
276 #define SIM_THZ 2
277 #define SIM_F_SUPER_GOAL 3
278 #define SIM_OPPOSITE 4
279 #define SIM_ROOT_MODEL 5
280 #define SIM_SOLUTION_MODEL 6
281 #define SIM_SOLUTION_CFD 7
282 #define SIM_SOLUTION_BEFORE 8
283 #define SIM_ARITY 9
284 
285 #define UNDEFINED_OID 0xFFFFFFFF
286 
287 #endif