-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathssi_listrecursion4.pl
executable file
·490 lines (356 loc) · 20.9 KB
/
ssi_listrecursion4.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
/*
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_member],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
get_lang_word("member",Dbw_member1),Dbw_member1=Dbw_member,
%%writeln1(8),
ssi_interpretpart(member,Variable1,Variable2,Vars1,Vars2).
*/
interpretstatement1(ssi,_Functions0,_Functions,Query1,Vars1,Vars8,true,nocut,_) :-
%writeln1([*,_Functions0,_Functions]),
get_lang_word("v",Dbw_v1),Dbw_v1=Dbw_v,
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
get_lang_word("call",Dbw_call1),Dbw_call1=Dbw_call,
%%writeln1("h1/10"),
%trace,
%find_pred_sm(Reserved_words1),
((Query1=[[Dbw_n,Dbw_call],[[lang,Lang1],Debug1,[Function,Arguments],Functions%,Result
]],Tm=off%,
%not(member(Dbw_call,Reserved_words1))
)->true;
(Query1=[[Dbw_n,Dbw_call],[[lang,Lang1],Debug1,[Function,Arguments],Types,Modes,Functions%,Result
]],Tm=on)),
%trace,
lang(Lang2a),
types(Types2a),
(Types2a=on->(typestatements(TypeStatements2a),
modestatements(ModeStatements2a));true),
(Lang1=same->lang(Lang2);Lang2=Lang1),
(Debug1=same->debug(Debug2);Debug2=Debug1),
%%not(Function=[n,grammar]->true;Function=[n,grammar_part]), ****
%%writeln1(["Arguments",Arguments,"Vars1",Vars1]),
%%***writeln1(substitutevarsA1(Arguments,Vars1,[],Vars3,[],FirstArgs)),
((Function=[Dbw_v,Function2],
not(reserved_word2(Function2)))->
(append([Function],Arguments,Arguments1),
substitutevarsA1(Arguments1,Vars1,[],Vars3,[],FirstArgs),
Vars3=[Function1|Vars31],
Query2=[Function1,Vars31]);
(substitutevarsA1(Arguments,Vars1,[],Vars3,[],FirstArgs),
%simplify(Vars32,Vars3), %%% var to value, after updatevars: more vars to values, and select argument vars from latest vars
%%writeln1([substitutevarsA1,arguments,Arguments,vars1,Vars1,vars3,Vars3,firstargs,FirstArgs]),
Query2=[Function,Vars3])), %% Bodyvars2?
%% debug(on)->writeln1([call,[Function,[Vars3]]]),
%%writeln1(["Query2",Query2,"Functions0",Functions0]),
%interpret2(Query2,Functions0,Functions0,Result1),
remember_and_turn_off_debug(Debug),
%trace,
query_box(Query2,_Query3,Functions,Functions1),
convert_to_grammar_part1(Functions1,[],Functions2,_),
%insert_cuts(Functions2a,Functions2),
%Functions1=Functions2,
%writeln1(convert_to_grammar_part1(Functions1,[],Functions2,_)), %trace,
%writeln1(Functions2),
%%pp3(Functions2),
%%writeln1(lucianpl11(Debug,Query,Functions2,Functions2,Result)),
%findall(Result1,
%trace,
add_line_numbers_to_algorithm1(Functions2,Functions2a),
%Functions2=Functions2a,
%writeln1(add_line_numbers_to_algorithm1(Functions2,Functions2a)),
%writeln1(Functions2a),
%append(Functions2a,Functions1a,Functions2b),
pred_numbers(Pred_numbers0),
%find_pred_sm(Reserved_words),%,"en"),
find_pred_numbers(Functions2a,[],%Reserved_words,
Pred_numbers),
retractall(pred_numbers(_)),
assertz(pred_numbers(Pred_numbers)),
%trace,
find_state_machine1(Functions2a,Functions3a,Pred_numbers),
%trace,
((Tm=off->international_lucianpl1([lang,Lang2],%off,%
Debug2,
Query2,Functions3a,Result1a)
%international_interpret([lang,Lang2],off,%Debug2,
%Query2,Functions,Result1a)
;
international_lucianpl1([lang,Lang2],%off,%
Debug2,
Query2,Types,Modes,Functions3a,Result1a) %international_interpret([lang,Lang2],off,%Debug2
%Query2,Types,Modes,Functions,Result1a)
)->true;(turn_back_debug(Debug),false)),
turn_back_debug(Debug),
member(Result1,Result1a),
retractall(pred_numbers(_)),
assertz(pred_numbers(Pred_numbers0)),
retractall(lang(_)),
assertz(lang(Lang2a)),
retractall(types(_)),
assertz(types(Types2a)),
(Types2a=on->(
retractall(typestatements(_)),
%findall([A,C],(member([A,B],TypeStatements2a),expand_types(B,[],C)),TypeStatements2a1),
assertz(typestatements(TypeStatements2a)),
retractall(modestatements(_)),
assertz(modestatements(ModeStatements2a)));true),
updatevars2(FirstArgs,Result1,[],Vars5),
updatevars3(Vars1,Vars5,Vars6),
reverse(Vars6,[],Vars7),
((not(Vars7=[])->
%%Vars7=[Var71|Vars72],
(%trace,
unique1(Vars7,[],Vars8)%,notrace
)
);(
%%writeln1(here1),
Vars8=[])).
interpretstatement1(ssi,Functions0,_Functions,Query1,Vars1,Vars8,true,nocut,_) :-
%trace,
%writeln(interpretstatement1(ssi,Functions0,_Functions,Query1,Vars1,Vars8,true,nocut)),
get_lang_word("v",Dbw_v1),Dbw_v1=Dbw_v,
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
get_lang_word("call",Dbw_call1),Dbw_call1=Dbw_call,
%%writeln1("h1/10"),
%trace,
%writeln([Functions0,Functions0]),
%find_pred_sm(Reserved_words1),
%trace,
((Query1=[[Dbw_n,Dbw_call],[Function,Arguments]]%, not_reserved_word(Function,Reserved_words1)
)->true;
(Query1=[Function,Arguments],
Function=[Dbw_v,_Function2]
%not(reserved_word2(Function2))
))%,Function=[Dbw_n1,Function_a],atom_string(Function_a,Function_s),
%,not_reserved_word(Function,Reserved_words1))
%)
,
%trace,
%%not(Function=[n,grammar]->true;Function=[n,grammar_part]), ****
%%writeln1(["Arguments",Arguments,"Vars1",Vars1]),
%%***writeln1(substitutevarsA1(Arguments,Vars1,[],Vars3,[],FirstArgs)),
((Function=[Dbw_v,Function2],
not(reserved_word2(Function2)))->
(%trace,
append([Function],Arguments,Arguments1),
%trace,
substitutevarsA1(Arguments1,Vars1,[],Vars3,[],FirstArgs),
Vars3=[Function1|Vars31],
Query2=[Function1,Vars31]);
(%trace,
substitutevarsA1(Arguments,Vars1,[],Vars3,[],FirstArgs),
%simplify(Vars32,Vars3), %%% var to value, after updatevars: more vars to values, and select argument vars from latest vars
%writeln1([substitutevarsA1,arguments,Arguments,vars1,Vars1,vars3,Vars3,firstargs,FirstArgs]),
Query2=[Function,Vars3])), %% Bodyvars2?
%(Function=[n,compound213]->%true
%trace
%;true),
%trace,
%% debug(on)->writeln1([call,[Function,[Vars3]]]),
%%writeln1(["Query2",Query2,"Functions0",Functions0]),
%trace,
%writeln1(interpret2(Query2,Functions0,Functions0,Result1)),
remember_and_turn_off_debug(Debug),
turndebug(off), %trace,
(lucianpl1(off,%,off,%Debug,
Query2,Functions0,Result1a)%interpret2(Query2,Functions0,Functions0,Result1)
->true;(turn_back_debug(Debug),false)),
turn_back_debug(Debug),
%trace,
member(Result1,Result1a),
%writeln1(interpret2(Query2,Functions0,Functions0,Result1)),
%writeln1(updatevars2(FirstArgs,Result1,[],Vars5)),
updatevars2(FirstArgs,Result1,[],Vars5),
updatevars3(Vars1,Vars5,Vars6),
reverse(Vars6,[],Vars7),
((not(Vars7=[])->
%%Vars7=[Var71|Vars72],
(%trace,
unique1(Vars7,[],Vars8)%,notrace
)
);(
%%writeln1(here1),
Vars8=[])).
%%**** reverse and take first instance of each variable.
%%findresult3(Arguments,Vars6,[],Result2)
%%writeln1(["FirstArgs",FirstArgs,"Result1",Result1,"Vars5",Vars5,"Vars4",Vars4]),
%%writeln1(["Vars1:",Vars1,"Vars4:",Vars4]),
%% debug(on)->writeln1([exit,[Function,[Result2]]]).
/*
interpretstatement1(ssi,Functions0,_Functions,Query,Vars,Vars,true,nocut,_) :-
find_pred_sm(Reserved_words1),
Query=[Function],
%trace,
not_reserved_word(Function,Reserved_words1),
%debug_call(Skip,[Function]),
remember_and_turn_off_debug(Debug),
turndebug(off), %trace,
(lucianpl1(off,%Debug,
Query,Functions0,_Result1)%interpret2(Query,Functions0,Functions0,_Result1)
->true;(turn_back_debug(Debug),false)),
turn_back_debug(Debug)
,!.
*/
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_stringconcat],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,Vars2c) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
((get_lang_word("stringconcat",Dbw_stringconcat1),Dbw_stringconcat1=Dbw_stringconcat)->true;
Dbw_stringconcat=string_concat),
%%writeln1(8),
ssi_interpretpart(stringconcat,Variable1,Variable2,Variable3,Vars1,Vars2,Vars2c).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_append],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,Vars2c) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
get_lang_word("append",Dbw_append1),Dbw_append1=Dbw_append,
%%writeln1(8),
ssi_interpretpart(append,Variable1,Variable2,Variable3,Vars1,Vars2,Vars2c).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_member2],[Variable2,Variable1]],Vars1,Vars2,true,nocut,Vars2c) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
((get_lang_word("member2",Dbw_member21),
Dbw_member21=Dbw_member2)-> ssi_interpretpart(member2,Dbw_member2,Variable2,Variable1,Vars1,Vars2,Vars2c);
(get_lang_word("member",Dbw_member22),
Dbw_member22=Dbw_member2,
%%writeln1(8),
%trace,
ssi_interpretpart(member2,Dbw_member2,Variable1,Variable2,Vars1,Vars2,Vars2c))).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_member3],[Variable1,Variable2]],Vars1,Vars2,true,nocut,Vars2c) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
get_lang_word("member3",Dbw_member31),Dbw_member31=Dbw_member3,
%%writeln1(8),
ssi_interpretpart(member3,Variable1,Variable2,Vars1,Vars2,Vars2c).
/*
interpretstatement4(ssi,_F0,_Functions,[[Dbw_n,Dbw_member],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[],AC) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
get_lang_word("member",Dbw_member1),Dbw_member1=Dbw_member,
%%writeln1(8),
ssi_interpretpart(member,Variable1,Variable2,Vars1,Vars2,AC).
*/
interpretstatement4(ssi,_F0,_Functions,[[Dbw_n,Dbw_member2],[Variable1,Variable2]],Vars1,Vars2,true,nocut,Vars2c,AC) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
((get_lang_word("member2",Dbw_member21),
Dbw_member21=Dbw_member2)->true;
(get_lang_word("member",Dbw_member22),
Dbw_member22=Dbw_member2)),
%%writeln1(8),
ssi_interpretpart(member2,Dbw_member2,Variable1,Variable2,Vars1,Vars2,Vars2c,AC).
interpretstatement4(ssi,_F0,_Functions,[[Dbw_n,Dbw_stringconcat],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,Vars2c,AC) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
((get_lang_word("stringconcat",Dbw_stringconcat1),Dbw_stringconcat1=Dbw_stringconcat)->true;
Dbw_stringconcat=string_concat),
%%writeln1(8),
ssi_interpretpart(stringconcat,Variable1,Variable2,Variable3,Vars1,Vars2,Vars2c,AC).
interpretstatement4(ssi,_F0,_Functions,[[Dbw_n,Dbw_append],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,Vars2c,AC) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
get_lang_word("append",Dbw_append1),Dbw_append1=Dbw_append,
%%writeln1(8),
ssi_interpretpart(append,Variable1,Variable2,Variable3,Vars1,Vars2,Vars2c,AC).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_member3],[Variable1,Variable2]],Vars1,Vars2,true,nocut,Vars2c,AC) :-
get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%trace,
get_lang_word("member3",Dbw_member31),Dbw_member31=Dbw_member3,
%%writeln1(8),
ssi_interpretpart(member3,Variable1,Variable2,Vars1,Vars2,Vars2c,AC).
interpretstatement1(ssi,F0,Functions,[[Dbw_n,Dbw_name]|Args],Vars1,Vars2,T,C,[]) :- %writeln(here),
interpretstatement1(ssi,F0,Functions,[[Dbw_n,Dbw_name]|Args],Vars1,Vars2,T,C).
%%%%
/*
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_equals4_on]|_],Vars,Vars,true,nocut,[]) :- %writeln(here),
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_equals4_on]|_],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_equals4_off]|_],Vars,Vars,true,nocut,[]) :- %writeln(here),
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_equals4_off]|_],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[n,trace2]|_],Vars,Vars,true,nocut,[]) :- %writeln(here),
interpretstatement1(non-ssi,_F0,_Functions,[[n,trace2]|_],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_trace]|_],Vars,Vars,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_trace]|_],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_notrace]|_],Vars,Vars,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_notrace]|_],Vars,Vars,true,nocut).
% * Different in ssi
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_cut]|_],Vars,Vars,true,cut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_cut]|_],Vars,Vars,true,cut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_true]|_],Vars,Vars,_,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_true]|_],Vars,Vars,_,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_fail]|_],Vars,Vars,_,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_fail]|_],Vars,Vars,_,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_atom],[Variable]],Vars,Vars,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_atom],[Variable]],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_string],[Variable]],Vars,Vars,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_string],[Variable]],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_number],[Variable]],Vars,Vars,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_number],[Variable]],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_letters],[Variable]],Vars,Vars,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_letters],[Variable]],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_variable],[Variable]],Vars,Vars,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_variable],[Variable]],Vars,Vars,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Operator],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Operator],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Operator],[Variable2,Variable3,Variable1]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Operator],[Variable2,Variable3,Variable1]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Operator],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Operator],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_equals1],[Variable1,[Variable2,Variable3]]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_equals1],[Variable1,[Variable2,Variable3]]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_equals2],[Variable1,[Variable2,Variable3]]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_equals2],[Variable1,[Variable2,Variable3]]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_equals3],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_equals3],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_equals4],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_equals4],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_wrap],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_wrap],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_unwrap],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_unwrap],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_head],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_head],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_tail],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_tail],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_delete],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_delete],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut).
%%** all in form f,[1,1,etc], including + with 0,1
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_append],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_append],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut).
%get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%get_lang_word("append",Dbw_append1),Dbw_append1=Dbw_append,
%%writeln1(9),
%ssi_interpretpart(append,Variable1,Variable2,Variable3,Vars1,Vars2).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_stringconcat],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_stringconcat],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut).
%get_lang_word("n",Dbw_n1),Dbw_n1=Dbw_n,
%get_lang_word("stringconcat",Dbw_stringconcat1),Dbw_stringconcat1=Dbw_stringconcat,
%ssi_interpretpart(stringconcat,Variable1,Variable2,Variable3,Vars1,Vars2).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_stringtonumber],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_stringtonumber],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_random],[Variable1]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_random],[Variable1]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_length],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_length],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_ceiling],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_ceiling],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_date],[Year,Month,Day,Hour,Minute,Seconds]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_date],[Year,Month,Day,Hour,Minute,Seconds]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_round],[N1,N2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_round],[N1,N2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_Grammar,_Grammar2,[[Dbw_n,grammar_part],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_Grammar,_Grammar2,[[Dbw_n,grammar_part],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_Functions0,_Functions,[[Dbw_n,Dbw_string_from_file],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_Functions0,_Functions,[[Dbw_n,Dbw_string_from_file],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,Functions0,Functions,[[Dbw_n,Dbw_maplist],[Variable1,Variable2,Variable3,Variable4]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,Functions0,Functions,[[Dbw_n,Dbw_maplist],[Variable1,Variable2,Variable3,Variable4]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_string_length],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_string_length],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_sort],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_sort],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_intersection],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_intersection],[Variable1,Variable2,Variable3]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_read_string],[Variable1]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_read_string],[Variable1]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_writeln],[Variable1]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_writeln],[Variable1]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_atom_string],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_atom_string],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
interpretstatement1(ssi,_F0,_Functions,[[Dbw_n,Dbw_get_lang_word],[Variable1,Variable2]],Vars1,Vars2,true,nocut,[]) :-
interpretstatement1(non-ssi,_F0,_Functions,[[Dbw_n,Dbw_get_lang_word],[Variable1,Variable2]],Vars1,Vars2,true,nocut).
*/