jaseci 1.4.2.5__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jaseci might be problematic. Click here for more details.
- jaseci/__init__.py +3 -37
- jaseci-2.0.0.dist-info/METADATA +65 -0
- jaseci-2.0.0.dist-info/RECORD +4 -0
- {jaseci-1.4.2.5.dist-info → jaseci-2.0.0.dist-info}/WHEEL +1 -2
- jaseci/VERSION +0 -1
- jaseci/cli_tools/__init__.py +0 -0
- jaseci/cli_tools/book_tools.py +0 -457
- jaseci/cli_tools/jsctl.py +0 -500
- jaseci/cli_tools/tests/__init__.py +0 -0
- jaseci/cli_tools/tests/test_jsctl.py +0 -556
- jaseci/extens/__init__.py +0 -0
- jaseci/extens/act_lib/__init__.py +0 -0
- jaseci/extens/act_lib/date.py +0 -117
- jaseci/extens/act_lib/elastic.py +0 -87
- jaseci/extens/act_lib/file.py +0 -76
- jaseci/extens/act_lib/file_handler.py +0 -189
- jaseci/extens/act_lib/internal.py +0 -18
- jaseci/extens/act_lib/jaseci.py +0 -61
- jaseci/extens/act_lib/mail.py +0 -10
- jaseci/extens/act_lib/maths.py +0 -168
- jaseci/extens/act_lib/net.py +0 -191
- jaseci/extens/act_lib/rand.py +0 -82
- jaseci/extens/act_lib/regex.py +0 -85
- jaseci/extens/act_lib/request.py +0 -169
- jaseci/extens/act_lib/std.py +0 -235
- jaseci/extens/act_lib/storage.py +0 -53
- jaseci/extens/act_lib/stripe.py +0 -337
- jaseci/extens/act_lib/task.py +0 -13
- jaseci/extens/act_lib/tests/__init__.py +0 -0
- jaseci/extens/act_lib/tests/std_test_code.py +0 -37
- jaseci/extens/act_lib/tests/test_date.py +0 -26
- jaseci/extens/act_lib/tests/test_elastic.py +0 -159
- jaseci/extens/act_lib/tests/test_file.py +0 -116
- jaseci/extens/act_lib/tests/test_file_lib.py +0 -40
- jaseci/extens/act_lib/tests/test_mail_lib.py +0 -33
- jaseci/extens/act_lib/tests/test_maths.py +0 -147
- jaseci/extens/act_lib/tests/test_net_lib.py +0 -62
- jaseci/extens/act_lib/tests/test_regex.py +0 -61
- jaseci/extens/act_lib/tests/test_std.py +0 -51
- jaseci/extens/act_lib/tests/test_std_lib.py +0 -36
- jaseci/extens/act_lib/tests/test_url.py +0 -32
- jaseci/extens/act_lib/tests/test_vector.py +0 -36
- jaseci/extens/act_lib/tests/test_webtool.py +0 -44
- jaseci/extens/act_lib/tests/test_zlib.py +0 -24
- jaseci/extens/act_lib/url.py +0 -79
- jaseci/extens/act_lib/vector.py +0 -157
- jaseci/extens/act_lib/webtool.py +0 -28
- jaseci/extens/act_lib/zip.py +0 -33
- jaseci/extens/api/__init__.py +0 -0
- jaseci/extens/api/actions_api.py +0 -170
- jaseci/extens/api/alias_api.py +0 -139
- jaseci/extens/api/architype_api.py +0 -196
- jaseci/extens/api/config_api.py +0 -129
- jaseci/extens/api/global_api.py +0 -84
- jaseci/extens/api/graph_api.py +0 -167
- jaseci/extens/api/health_api.py +0 -20
- jaseci/extens/api/interface.py +0 -268
- jaseci/extens/api/jac_api.py +0 -171
- jaseci/extens/api/jsorc_api.py +0 -316
- jaseci/extens/api/logger_api.py +0 -89
- jaseci/extens/api/master_api.py +0 -133
- jaseci/extens/api/object_api.py +0 -101
- jaseci/extens/api/prometheus_api.py +0 -74
- jaseci/extens/api/queue_api.py +0 -140
- jaseci/extens/api/sentinel_api.py +0 -270
- jaseci/extens/api/super_api.py +0 -64
- jaseci/extens/api/tests/__init__.py +0 -0
- jaseci/extens/api/tests/test_architype_api.py +0 -66
- jaseci/extens/api/tests/test_global_api.py +0 -179
- jaseci/extens/api/tests/test_graph_api.py +0 -64
- jaseci/extens/api/tests/test_logger_api.py +0 -43
- jaseci/extens/api/tests/test_object_api.py +0 -20
- jaseci/extens/api/tests/test_sentinel_api.py +0 -66
- jaseci/extens/api/tests/test_uncommon.py +0 -107
- jaseci/extens/api/tests/test_user_api.py +0 -32
- jaseci/extens/api/tests/test_walker_api.py +0 -316
- jaseci/extens/api/user_api.py +0 -144
- jaseci/extens/api/walker_api.py +0 -298
- jaseci/extens/api/webhook_api.py +0 -74
- jaseci/extens/svc/__init__.py +0 -0
- jaseci/extens/svc/elastic_svc.py +0 -366
- jaseci/extens/svc/kube_svc.py +0 -432
- jaseci/extens/svc/mail_svc.py +0 -156
- jaseci/extens/svc/prome_svc.py +0 -378
- jaseci/extens/svc/redis_svc.py +0 -63
- jaseci/extens/svc/storage_svc.py +0 -193
- jaseci/extens/svc/stripe_svc.py +0 -51
- jaseci/extens/svc/task_svc.py +0 -155
- jaseci/extens/svc/tasks.py +0 -302
- jaseci/jac/__init__.py +0 -0
- jaseci/jac/interpreter/__init__.py +0 -0
- jaseci/jac/interpreter/architype_interp.py +0 -214
- jaseci/jac/interpreter/interp.py +0 -1783
- jaseci/jac/interpreter/sentinel_interp.py +0 -257
- jaseci/jac/interpreter/tests/__init__.py +0 -0
- jaseci/jac/interpreter/tests/test_interp.py +0 -42
- jaseci/jac/interpreter/walker_interp.py +0 -248
- jaseci/jac/ir/__init__.py +0 -0
- jaseci/jac/ir/ast.py +0 -73
- jaseci/jac/ir/ast_builder.py +0 -249
- jaseci/jac/ir/jac_code.py +0 -152
- jaseci/jac/ir/passes/__init__.py +0 -6
- jaseci/jac/ir/passes/ast_prune_pass.py +0 -9
- jaseci/jac/ir/passes/codegen_pass.py +0 -244
- jaseci/jac/ir/passes/ir_pass.py +0 -29
- jaseci/jac/ir/passes/printer_pass.py +0 -23
- jaseci/jac/ir/passes/pt_prune_pass.py +0 -29
- jaseci/jac/ir/passes/schedule.py +0 -23
- jaseci/jac/ir/passes/stats_pass.py +0 -16
- jaseci/jac/jac.g4 +0 -450
- jaseci/jac/jac_parse/__init__.py +0 -0
- jaseci/jac/jac_parse/jacLexer.py +0 -809
- jaseci/jac/jac_parse/jacListener.py +0 -853
- jaseci/jac/jac_parse/jacParser.py +0 -9192
- jaseci/jac/jac_set.py +0 -119
- jaseci/jac/jsci_vm/__init__.py +0 -0
- jaseci/jac/jsci_vm/disasm.py +0 -94
- jaseci/jac/jsci_vm/inst_ptr.py +0 -31
- jaseci/jac/jsci_vm/machine.py +0 -188
- jaseci/jac/jsci_vm/op_codes.py +0 -82
- jaseci/jac/jsci_vm/tests/__init__.py +0 -0
- jaseci/jac/jsci_vm/tests/test_codegen.py +0 -31
- jaseci/jac/machine/__init__.py +0 -0
- jaseci/jac/machine/jac_scope.py +0 -85
- jaseci/jac/machine/jac_value.py +0 -226
- jaseci/jac/machine/machine_state.py +0 -383
- jaseci/jac/tests/__init__.py +0 -0
- jaseci/jac/tests/book_code.py +0 -624
- jaseci/jac/tests/test_book.py +0 -380
- jaseci/jac/tests/test_lang_14.py +0 -49
- jaseci/jsorc/__init__.py +0 -7
- jaseci/jsorc/jsorc.py +0 -642
- jaseci/jsorc/jsorc_settings.py +0 -211
- jaseci/jsorc/jsorc_utils.py +0 -298
- jaseci/jsorc/live_actions.py +0 -364
- jaseci/jsorc/manifests/__init__.py +0 -0
- jaseci/jsorc/manifests/database.yaml +0 -109
- jaseci/jsorc/manifests/elastic.yaml +0 -6024
- jaseci/jsorc/manifests/prometheus.yaml +0 -1383
- jaseci/jsorc/manifests/redis.yaml +0 -64
- jaseci/jsorc/memory.py +0 -258
- jaseci/jsorc/redis.py +0 -139
- jaseci/jsorc/remote_actions.py +0 -157
- jaseci/jsorc/tests/__init__.py +0 -0
- jaseci/jsorc/tests/test_actions.py +0 -542
- jaseci/jsorc/tests/test_jsorc.py +0 -112
- jaseci/prim/__init__.py +0 -0
- jaseci/prim/ability.py +0 -93
- jaseci/prim/architype.py +0 -89
- jaseci/prim/edge.py +0 -172
- jaseci/prim/element.py +0 -233
- jaseci/prim/graph.py +0 -26
- jaseci/prim/master.py +0 -64
- jaseci/prim/node.py +0 -532
- jaseci/prim/obj_mixins.py +0 -235
- jaseci/prim/sentinel.py +0 -281
- jaseci/prim/super_master.py +0 -31
- jaseci/prim/walker.py +0 -261
- jaseci/svc/__init__.py +0 -0
- jaseci/tests/__init__.py +0 -0
- jaseci/tests/infer.py +0 -39
- jaseci/tests/jac_test_code.py +0 -1293
- jaseci/tests/jac_test_progs.py +0 -774
- jaseci/tests/test_core.py +0 -153
- jaseci/tests/test_jac.py +0 -824
- jaseci/tests/test_node.py +0 -89
- jaseci/tests/test_progs.py +0 -702
- jaseci/tests/test_stack.py +0 -220
- jaseci/tests/test_stripe.py +0 -225
- jaseci/utils/__init__.py +0 -0
- jaseci/utils/actions/__init__.py +0 -0
- jaseci/utils/actions/actions_manager.py +0 -254
- jaseci/utils/actions/actions_optimizer.py +0 -516
- jaseci/utils/actions/actions_state.py +0 -95
- jaseci/utils/file_handler.py +0 -171
- jaseci/utils/gprof2dot.py +0 -3786
- jaseci/utils/id_list.py +0 -168
- jaseci/utils/json_handler.py +0 -70
- jaseci/utils/log_utils.py +0 -57
- jaseci/utils/test_core.py +0 -62
- jaseci/utils/utils.py +0 -387
- jaseci-1.4.2.5.dist-info/LICENSE +0 -21
- jaseci-1.4.2.5.dist-info/METADATA +0 -39
- jaseci-1.4.2.5.dist-info/RECORD +0 -184
- jaseci-1.4.2.5.dist-info/entry_points.txt +0 -3
- jaseci-1.4.2.5.dist-info/top_level.txt +0 -1
jaseci/tests/jac_test_progs.py
DELETED
|
@@ -1,774 +0,0 @@
|
|
|
1
|
-
bug_check1 = """
|
|
2
|
-
node state {
|
|
3
|
-
has cand_intents = [];
|
|
4
|
-
# Collect possible intents from a given conversation state
|
|
5
|
-
can collect_intents {
|
|
6
|
-
for i in -[transition]->.edge {
|
|
7
|
-
here.cand_intents += [i.intent_label];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
edge transition {has intent_label;}
|
|
12
|
-
walker test_walker {
|
|
13
|
-
state {
|
|
14
|
-
here::collect_intents;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
graph test_graph {
|
|
18
|
-
has anchor state_node;
|
|
19
|
-
spawn {
|
|
20
|
-
state_node = spawn node::state;
|
|
21
|
-
state_2 = spawn node::state;
|
|
22
|
-
state_node +[transition(intent_label =
|
|
23
|
-
"THIS IS AN INTENT_LABEL")]+> state_2;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
walker init {
|
|
28
|
-
spawn here ++> graph::test_graph;
|
|
29
|
-
spawn --> walker::test_walker;
|
|
30
|
-
report -->[0].cand_intents;
|
|
31
|
-
report -->;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
test "Test"
|
|
35
|
-
with graph::test_graph by walker::test_walker {
|
|
36
|
-
assert(here.cand_intents == ['THIS IS AN INTENT_LABEL']);
|
|
37
|
-
}
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
action_load_std_lib = """
|
|
42
|
-
walker aload {
|
|
43
|
-
report std.actload_local('jaseci/tests/infer.py');
|
|
44
|
-
}
|
|
45
|
-
"""
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
globals = """
|
|
49
|
-
global a = "testing";
|
|
50
|
-
|
|
51
|
-
walker init {
|
|
52
|
-
report global.a;
|
|
53
|
-
global.a = 56;
|
|
54
|
-
report global.a;
|
|
55
|
-
}
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
|
-
net_root_std_lib = """
|
|
59
|
-
walker init {
|
|
60
|
-
root {
|
|
61
|
-
report [here.info['jid'], net.root().info['jid']];
|
|
62
|
-
spawn here ++> node::generic;
|
|
63
|
-
take -->;
|
|
64
|
-
}
|
|
65
|
-
generic {
|
|
66
|
-
report [here.info['jid'], net.root().info['jid']];
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
"""
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
or_stmt = """
|
|
73
|
-
walker init {
|
|
74
|
-
x = 3.4;
|
|
75
|
-
y = "Hello";
|
|
76
|
-
if(x == 3.45 or y == "Hello"):
|
|
77
|
-
report [x, y];
|
|
78
|
-
}
|
|
79
|
-
"""
|
|
80
|
-
|
|
81
|
-
nd_equals_error_correct_line = """
|
|
82
|
-
node plain{ has name="joe", noname;
|
|
83
|
-
can stuff with entry {std.out(name + noname); }}
|
|
84
|
-
|
|
85
|
-
walker init {
|
|
86
|
-
root {
|
|
87
|
-
spawn here ++> node::plain;
|
|
88
|
-
take -->;
|
|
89
|
-
}
|
|
90
|
-
plain {
|
|
91
|
-
if(here.details['name'] == 'joe'):
|
|
92
|
-
report here.info;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
"""
|
|
96
|
-
|
|
97
|
-
strange_ability_bug = """
|
|
98
|
-
node plain {
|
|
99
|
-
can show with entry {
|
|
100
|
-
report "Showing";
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
walker init {
|
|
105
|
-
root {
|
|
106
|
-
spawn here ++> node::plain;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
walker travel {
|
|
111
|
-
take -->;
|
|
112
|
-
}
|
|
113
|
-
"""
|
|
114
|
-
|
|
115
|
-
node_inheritance = """
|
|
116
|
-
node plain {
|
|
117
|
-
has a=5, b=7, c=7, d=8;
|
|
118
|
-
can x with entry {
|
|
119
|
-
report "plain.x";
|
|
120
|
-
}
|
|
121
|
-
can y {
|
|
122
|
-
report "plain.y";
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
node plain2 {
|
|
127
|
-
has c=70, d=80;
|
|
128
|
-
can x with entry {
|
|
129
|
-
report "plain2.x";
|
|
130
|
-
}
|
|
131
|
-
can y {
|
|
132
|
-
report "plain2.y";
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
node super:plain:plain2 {
|
|
137
|
-
has a=55, c=7;
|
|
138
|
-
can x with entry {
|
|
139
|
-
::plain:x;
|
|
140
|
-
report here.context;
|
|
141
|
-
report "super.x";
|
|
142
|
-
}
|
|
143
|
-
can y {
|
|
144
|
-
::plain2:y;
|
|
145
|
-
report "super.y";
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
walker init {
|
|
150
|
-
root {
|
|
151
|
-
a=spawn here ++> node::super;
|
|
152
|
-
}
|
|
153
|
-
take -->;
|
|
154
|
-
super {
|
|
155
|
-
here::y;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
"""
|
|
159
|
-
|
|
160
|
-
inherited_ref = """
|
|
161
|
-
node plain {
|
|
162
|
-
has a=5, b=7, c=7, d=8;
|
|
163
|
-
can x with entry {
|
|
164
|
-
report "plain.x";
|
|
165
|
-
}
|
|
166
|
-
can y {
|
|
167
|
-
report "plain.y";
|
|
168
|
-
}
|
|
169
|
-
can z with entry {
|
|
170
|
-
report "Z triggered";
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
node plain2:plain {
|
|
175
|
-
has c=70, d=80;
|
|
176
|
-
can x with entry {
|
|
177
|
-
report "plain2.x";
|
|
178
|
-
}
|
|
179
|
-
can y {
|
|
180
|
-
report "plain2.y";
|
|
181
|
-
}
|
|
182
|
-
can z with entry {
|
|
183
|
-
report "New Z triggered";
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
node super:plain2 {
|
|
188
|
-
has a=55, c=7;
|
|
189
|
-
can x with entry {
|
|
190
|
-
::plain:x;
|
|
191
|
-
report here.context;
|
|
192
|
-
report "super.x";
|
|
193
|
-
::z;
|
|
194
|
-
}
|
|
195
|
-
can y {
|
|
196
|
-
::plain2:y;
|
|
197
|
-
report "super.y";
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
walker init {
|
|
202
|
-
root {
|
|
203
|
-
spawn here ++> node::super;
|
|
204
|
-
spawn here ++> node::plain;
|
|
205
|
-
spawn here ++> node::plain2;
|
|
206
|
-
}
|
|
207
|
-
take --> node::plain;
|
|
208
|
-
plain {
|
|
209
|
-
report here;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
"""
|
|
213
|
-
|
|
214
|
-
node_inheritance_chain_check = """
|
|
215
|
-
node plain {
|
|
216
|
-
has a=5, b=7, c=7, d=8;
|
|
217
|
-
can x with entry {
|
|
218
|
-
report "plain.x";
|
|
219
|
-
}
|
|
220
|
-
can y {
|
|
221
|
-
report "plain.y";
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
node plain2 {
|
|
226
|
-
has c=70, d=80;
|
|
227
|
-
can x with entry {
|
|
228
|
-
report "plain2.x";
|
|
229
|
-
}
|
|
230
|
-
can y {
|
|
231
|
-
report "plain2.y";
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
node super:plain {
|
|
236
|
-
has a=55, c=7;
|
|
237
|
-
can x with entry {
|
|
238
|
-
::plain:x;
|
|
239
|
-
report here.context;
|
|
240
|
-
report "super.x";
|
|
241
|
-
}
|
|
242
|
-
can y {
|
|
243
|
-
::plain2:y;
|
|
244
|
-
report "super.y";
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
walker init {
|
|
249
|
-
root {
|
|
250
|
-
a=spawn here ++> node::super;
|
|
251
|
-
}
|
|
252
|
-
take -->;
|
|
253
|
-
super {
|
|
254
|
-
here::y;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
"""
|
|
258
|
-
|
|
259
|
-
global_reregistering = """
|
|
260
|
-
node plain;
|
|
261
|
-
|
|
262
|
-
global a = '556';
|
|
263
|
-
|
|
264
|
-
walker init {
|
|
265
|
-
root {
|
|
266
|
-
spawn here ++> node::plain;
|
|
267
|
-
spawn here ++> node::plain;
|
|
268
|
-
spawn here ++> node::plain;
|
|
269
|
-
}
|
|
270
|
-
report global.a;
|
|
271
|
-
take -->;
|
|
272
|
-
}
|
|
273
|
-
"""
|
|
274
|
-
|
|
275
|
-
vector_cos_sim_check = """
|
|
276
|
-
node plain;
|
|
277
|
-
|
|
278
|
-
walker init {
|
|
279
|
-
a=[1,2,3];
|
|
280
|
-
b=[4,5,6];
|
|
281
|
-
report vector.cosine_sim(a,b);
|
|
282
|
-
}
|
|
283
|
-
"""
|
|
284
|
-
|
|
285
|
-
multi_breaks = """
|
|
286
|
-
node plain {
|
|
287
|
-
has anchor val=0;
|
|
288
|
-
can breakdance {
|
|
289
|
-
for i=0 to i<10 by i+=1 {
|
|
290
|
-
for j=0 to j<20 by j+=1:
|
|
291
|
-
if(j==12) {
|
|
292
|
-
val+=j;
|
|
293
|
-
break;
|
|
294
|
-
}
|
|
295
|
-
report "here";
|
|
296
|
-
if(i==6){
|
|
297
|
-
val+=i;
|
|
298
|
-
break;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
break;
|
|
302
|
-
val+=100;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
walker init {
|
|
307
|
-
nd=spawn here ++> node::plain;
|
|
308
|
-
nd::breakdance;
|
|
309
|
-
nd::breakdance;
|
|
310
|
-
report nd.val;
|
|
311
|
-
}
|
|
312
|
-
"""
|
|
313
|
-
|
|
314
|
-
reffy_deref_check = """
|
|
315
|
-
node plain{has expected_answer;}
|
|
316
|
-
|
|
317
|
-
walker init {
|
|
318
|
-
nd = spawn here ++> node::plain;
|
|
319
|
-
spawn here ++> node::plain;
|
|
320
|
-
|
|
321
|
-
report *&-->[0] == *&-->[1];
|
|
322
|
-
|
|
323
|
-
actual_answer = -->[1];
|
|
324
|
-
nd.expected_answer = &-->[1];
|
|
325
|
-
report *&actual_answer == *nd.expected_answer;
|
|
326
|
-
}
|
|
327
|
-
"""
|
|
328
|
-
|
|
329
|
-
vanishing_can_check = """
|
|
330
|
-
node plain {
|
|
331
|
-
has name;
|
|
332
|
-
can infer.year_from_date;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
walker init {
|
|
336
|
-
root {
|
|
337
|
-
take --> node::plain else {
|
|
338
|
-
nd=spawn here ++> node::plain;
|
|
339
|
-
report nd.info['jid'];
|
|
340
|
-
disengage;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
plain {
|
|
344
|
-
report infer.year_from_date("2022-05-05");
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
"""
|
|
348
|
-
|
|
349
|
-
jasecilib_alias_list = """
|
|
350
|
-
walker init {
|
|
351
|
-
report jaseci.alias_list();
|
|
352
|
-
}
|
|
353
|
-
"""
|
|
354
|
-
|
|
355
|
-
jasecilib_params = """
|
|
356
|
-
walker init {
|
|
357
|
-
report jaseci.graph_list(true);
|
|
358
|
-
}
|
|
359
|
-
"""
|
|
360
|
-
|
|
361
|
-
jasecilib_create_user = """
|
|
362
|
-
walker init {
|
|
363
|
-
report jaseci.master_create("daman@gmail.com");
|
|
364
|
-
}
|
|
365
|
-
"""
|
|
366
|
-
|
|
367
|
-
root_is_node_type = """
|
|
368
|
-
walker init {
|
|
369
|
-
report here.type;
|
|
370
|
-
}
|
|
371
|
-
"""
|
|
372
|
-
|
|
373
|
-
walker_with_exit_after_node = """
|
|
374
|
-
node echeck {
|
|
375
|
-
has a=3;
|
|
376
|
-
can dostuff with exit {
|
|
377
|
-
report a;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
walker init {
|
|
382
|
-
has a=0;
|
|
383
|
-
with entry {
|
|
384
|
-
a+=1;
|
|
385
|
-
}
|
|
386
|
-
root {
|
|
387
|
-
spawn here ++> node::echeck;
|
|
388
|
-
spawn here ++> node::echeck;
|
|
389
|
-
spawn here ++> node::echeck;
|
|
390
|
-
spawn here ++> node::echeck;
|
|
391
|
-
}
|
|
392
|
-
take -->;
|
|
393
|
-
report a;
|
|
394
|
-
with exit {
|
|
395
|
-
report 43;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
"""
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
depth_first_take = """
|
|
402
|
-
node a {
|
|
403
|
-
has num;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
walker init {
|
|
407
|
-
root {
|
|
408
|
-
n1=spawn node::a(num=1);
|
|
409
|
-
n2=spawn node::a(num=2);
|
|
410
|
-
n3=spawn node::a(num=3);
|
|
411
|
-
n4=spawn node::a(num=4);
|
|
412
|
-
n5=spawn node::a(num=5);
|
|
413
|
-
n6=spawn node::a(num=6);
|
|
414
|
-
n7=spawn node::a(num=7);
|
|
415
|
-
|
|
416
|
-
here ++> n1 ++> n2 ++> n3;
|
|
417
|
-
n2 ++> n4;
|
|
418
|
-
n1 ++> n5 ++> n6;
|
|
419
|
-
n5 ++> n7;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
a: report here.num;
|
|
423
|
-
take:dfs -->;
|
|
424
|
-
}
|
|
425
|
-
"""
|
|
426
|
-
|
|
427
|
-
breadth_first_take = """
|
|
428
|
-
node a {
|
|
429
|
-
has num;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
walker init {
|
|
433
|
-
root {
|
|
434
|
-
n1=spawn node::a(num=1);
|
|
435
|
-
n2=spawn node::a(num=2);
|
|
436
|
-
n3=spawn node::a(num=3);
|
|
437
|
-
n4=spawn node::a(num=4);
|
|
438
|
-
n5=spawn node::a(num=5);
|
|
439
|
-
n6=spawn node::a(num=6);
|
|
440
|
-
n7=spawn node::a(num=7);
|
|
441
|
-
|
|
442
|
-
here ++> n1 ++> n2 ++> n3;
|
|
443
|
-
n2 ++> n4;
|
|
444
|
-
n1 ++> n5 ++> n6;
|
|
445
|
-
n5 ++> n7;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
a: report here.num;
|
|
449
|
-
take:bfs -->;
|
|
450
|
-
}
|
|
451
|
-
"""
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
inheritance_override_here_check = """
|
|
455
|
-
node a {
|
|
456
|
-
has x=5, y=3, z=1;
|
|
457
|
-
can sum {
|
|
458
|
-
z = x+y+z;
|
|
459
|
-
report z;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
node b:a {
|
|
464
|
-
can sum {
|
|
465
|
-
z = x-y-z;
|
|
466
|
-
report x-y;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
node c:a {
|
|
471
|
-
can sum {
|
|
472
|
-
::a:sum;
|
|
473
|
-
z=z+1;
|
|
474
|
-
report here.z;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
walker init {
|
|
479
|
-
n1 = spawn here ++> node::a;
|
|
480
|
-
n2 = spawn here ++> node::c;
|
|
481
|
-
-->[0]::sum;
|
|
482
|
-
-->[1]::sum;
|
|
483
|
-
}
|
|
484
|
-
"""
|
|
485
|
-
|
|
486
|
-
dot_private_hidden = """
|
|
487
|
-
node a {
|
|
488
|
-
has x="56";
|
|
489
|
-
has private j="5566669";
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
walker init {
|
|
493
|
-
n1 = spawn here ++> node::a;
|
|
494
|
-
n2 = spawn here ++> node::a;
|
|
495
|
-
}
|
|
496
|
-
"""
|
|
497
|
-
|
|
498
|
-
check_destroy_node_has_var = """
|
|
499
|
-
node a {
|
|
500
|
-
has x;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
walker create {
|
|
504
|
-
n = spawn here ++> node::a;
|
|
505
|
-
n.x = spawn node::a;
|
|
506
|
-
report n.x.type;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
walker remove {
|
|
510
|
-
n=-->[0];
|
|
511
|
-
destroy n.x;
|
|
512
|
-
report n.x.type;
|
|
513
|
-
}
|
|
514
|
-
"""
|
|
515
|
-
|
|
516
|
-
check_dict_for_in_loop = """
|
|
517
|
-
walker for_loop_dict {
|
|
518
|
-
with entry {
|
|
519
|
-
testing = {
|
|
520
|
-
"test1": 1,
|
|
521
|
-
"test2": 2,
|
|
522
|
-
"test3": 3
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
for key in testing {
|
|
526
|
-
report key.str + " : " + testing[key].str;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
for key, val in testing {
|
|
530
|
-
report key.str + " : " + val.str;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
testing = [5,6,7];
|
|
534
|
-
|
|
535
|
-
for key in testing {
|
|
536
|
-
report key;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
for key, val in testing {
|
|
540
|
-
report key.str + " : " + val.str;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
walker var_as_key_for_dict {
|
|
546
|
-
with entry {
|
|
547
|
-
key = "key1";
|
|
548
|
-
testing = {
|
|
549
|
-
key: key,
|
|
550
|
-
"key2": 2
|
|
551
|
-
};
|
|
552
|
-
|
|
553
|
-
report testing;
|
|
554
|
-
|
|
555
|
-
not_str_key = 1;
|
|
556
|
-
testing = {
|
|
557
|
-
not_str_key: not_str_key
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
"""
|
|
562
|
-
|
|
563
|
-
list_pairwise = """
|
|
564
|
-
walker init{
|
|
565
|
-
with entry{
|
|
566
|
-
_list = [1,2,3,4];
|
|
567
|
-
p = _list.list::pairwise;
|
|
568
|
-
report p;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
"""
|
|
572
|
-
|
|
573
|
-
list_unique = """
|
|
574
|
-
walker init{
|
|
575
|
-
with entry{
|
|
576
|
-
_list = [1,2,3,4,2,3,4,5];
|
|
577
|
-
p = _list.list::unique;
|
|
578
|
-
report p;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
"""
|
|
582
|
-
|
|
583
|
-
check_new_builtin = """
|
|
584
|
-
walker init {
|
|
585
|
-
with entry {
|
|
586
|
-
a = {"test":"test"};
|
|
587
|
-
|
|
588
|
-
// dict get with default if not existing
|
|
589
|
-
b = a.dict::get("t", 1);
|
|
590
|
-
|
|
591
|
-
// string join single param array
|
|
592
|
-
c = " ".str::join([1,2,3,4]);
|
|
593
|
-
|
|
594
|
-
// string join multiparams
|
|
595
|
-
d = " ".str::join(1,2,3,4);
|
|
596
|
-
report a;
|
|
597
|
-
report b;
|
|
598
|
-
report c;
|
|
599
|
-
report d;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
"""
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
continue_issue = """
|
|
606
|
-
walker init {
|
|
607
|
-
root {
|
|
608
|
-
for i=0 to i<10 by i+=1 {
|
|
609
|
-
if(i==9):
|
|
610
|
-
continue;
|
|
611
|
-
if(i):
|
|
612
|
-
report i;
|
|
613
|
-
}
|
|
614
|
-
report "apple";
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
"""
|
|
618
|
-
|
|
619
|
-
async_syntax = """
|
|
620
|
-
async walker simple_async_second_layer {
|
|
621
|
-
has anchor val1, val2 = 2;
|
|
622
|
-
with entry {
|
|
623
|
-
report val1;
|
|
624
|
-
report val2;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
async walker simple_async {
|
|
629
|
-
has anchor test_anchor = "test";
|
|
630
|
-
can task.get_result;
|
|
631
|
-
with entry {
|
|
632
|
-
task1 = spawn here sync walker::simple_async_second_layer(val1 = 1);
|
|
633
|
-
task2 = spawn here walker::simple_async_second_layer(val1 = 2);
|
|
634
|
-
report task1;
|
|
635
|
-
report task2;
|
|
636
|
-
|
|
637
|
-
if task2["is_queued"]:
|
|
638
|
-
report task.get_result(task2["result"], true);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
async walker simple_async_with_sync {
|
|
643
|
-
has anchor test_anchor = "test";
|
|
644
|
-
can task.get_result;
|
|
645
|
-
with entry {
|
|
646
|
-
task1 = spawn here sync walker::simple_async_second_layer(val1 = 1);
|
|
647
|
-
task2 = spawn here walker::simple_async_second_layer(val1 = 2);
|
|
648
|
-
report task1;
|
|
649
|
-
report task2;
|
|
650
|
-
|
|
651
|
-
report sync task2;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
"""
|
|
655
|
-
|
|
656
|
-
async_syntax_with_update = """
|
|
657
|
-
node a {
|
|
658
|
-
has value = false;
|
|
659
|
-
}
|
|
660
|
-
walker init {
|
|
661
|
-
root {
|
|
662
|
-
spawn here ++> node::a;
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
async walker update_value {
|
|
667
|
-
root {
|
|
668
|
-
take --> node::a;
|
|
669
|
-
}
|
|
670
|
-
a {
|
|
671
|
-
here.value = true;
|
|
672
|
-
report here.context;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
walker get_value {
|
|
677
|
-
root {
|
|
678
|
-
take --> node::a;
|
|
679
|
-
}
|
|
680
|
-
a {
|
|
681
|
-
report here.context;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
"""
|
|
685
|
-
|
|
686
|
-
block_scope_check = """
|
|
687
|
-
walker init {
|
|
688
|
-
i=5;
|
|
689
|
-
for i=0 to i<10 by i+=1 {
|
|
690
|
-
report i;
|
|
691
|
-
}
|
|
692
|
-
report i;
|
|
693
|
-
}
|
|
694
|
-
"""
|
|
695
|
-
|
|
696
|
-
ignore_check = """
|
|
697
|
-
walker init {
|
|
698
|
-
has nds=[];
|
|
699
|
-
with entry{
|
|
700
|
-
for i=0 to i<10 by i+=1 {
|
|
701
|
-
nds.l::append(spawn here ++> node::generic);
|
|
702
|
-
}
|
|
703
|
-
ignore nds[0];
|
|
704
|
-
ignore nds[4];
|
|
705
|
-
take -->;
|
|
706
|
-
}
|
|
707
|
-
report "hi";
|
|
708
|
-
}
|
|
709
|
-
"""
|
|
710
|
-
|
|
711
|
-
async_module = """
|
|
712
|
-
walker a {
|
|
713
|
-
can sim1.tester, sim2.tester;
|
|
714
|
-
with entry {
|
|
715
|
-
report sim1.tester();
|
|
716
|
-
report sim2.tester();
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
async walker b {
|
|
721
|
-
can sim1.tester, sim2.tester;
|
|
722
|
-
with entry {
|
|
723
|
-
report sim1.tester();
|
|
724
|
-
report sim2.tester();
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
"""
|
|
728
|
-
|
|
729
|
-
walker_null_args = """
|
|
730
|
-
node c {
|
|
731
|
-
has c1, c2;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
walker b {
|
|
735
|
-
has anchor b1, b2;
|
|
736
|
-
with entry {
|
|
737
|
-
report b1;
|
|
738
|
-
report b2;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
walker a {
|
|
743
|
-
has a1;
|
|
744
|
-
|
|
745
|
-
with entry {
|
|
746
|
-
a2 = null;
|
|
747
|
-
te = spawn here walker::b(b1 = a1, b2 = a2);
|
|
748
|
-
te = spawn here ++> node::c(c1=a1, c2=a2);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
"""
|
|
752
|
-
|
|
753
|
-
json_casting = """
|
|
754
|
-
walker json_casting {
|
|
755
|
-
with entry {
|
|
756
|
-
report {"test": 1}.str;
|
|
757
|
-
report '{"test2": 2}'.dict;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
"""
|
|
761
|
-
|
|
762
|
-
edge_to_node_casting = """
|
|
763
|
-
node a {}
|
|
764
|
-
|
|
765
|
-
walker edge_to_node_casting {
|
|
766
|
-
root {
|
|
767
|
-
spawn here ++> node::a;
|
|
768
|
-
edges = --> node::a.edge;
|
|
769
|
-
report edges;
|
|
770
|
-
report edges.node;
|
|
771
|
-
report edges[0].node;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
"""
|