-
Notifications
You must be signed in to change notification settings - Fork 1
/
corebib.maude
525 lines (379 loc) · 21.5 KB
/
corebib.maude
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
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
***(
COREBIB.MAUDE
This file contains the functional module SEM_COREBIB that is part
of the equational theory and specifies the semantics of the most
important functions of Core-Erlang's standard library.
Note: Many of these functions yield a side-effect during evaluation!
As soon as a side-effect occurs, the corresponding process term
reaches normal form with respect to the equational theory.
Therefore, to fully capture the semantics, one has to consider
the corresponding rewrite rules (which can be found in the module
SEM_TRANSITIONS).
Additionally, a subset of the functions that are defined in the built-in
module lists is implemented in the SEM_LISTBIB module. The built-in
functions for appending lists and checking membership in a list are
specified there.
The third functional module contained in this file is called "SEM_IOBIB".
It encapsulated some of the output functions of Core-Erlang's IO library.
These functions always succeed and the output is discarded.
***)
fmod SEM_LIST_HELPER is
protecting INT .
protecting BOOL .
protecting SYNTAX .
protecting SEM_LIST_NORMALFORM .
*** the #listSubtract function takes two lists as arguments and removes the
*** first occurrence of the elements of the 2nd list from the first list
op #listSubtract : ListConst ListConst -> ListConst .
*** the overloaded function #listSubtractElement removes the first occurrence
*** of the constant value supplied as 2nd argument from the list. It is needed
*** to implement the above version dealing with two lists.
op #listSubtractElement : ListConst Const -> ListConst .
*** #listConcat takes two constant lists as arguments and returns the
*** list that results from concatenating them.
op #listConcat : ListConst ListConst -> ListConst .
*** the boolean function #listMember checks if the constant in the first
*** argument is a member of the list given in the 2nd argument.
op #listMember : Const ListConst -> Bool .
*** the boolean function #listMember checks if the constant in the first
*** argument is a member of the list given in the 2nd argument.
op #listLength : ListConst -> Int .
vars LIST LIST1 : ListConst .
vars C C1 : Const .
eq #listSubtractElement([], C) = [] .
eq #listSubtractElement([C | LIST], C) = LIST .
eq #listSubtractElement([C | LIST], C1) = [C | #listSubtractElement(LIST, C1)] [owise] .
eq #listSubtract([], LIST) = [] .
eq #listSubtract(LIST, []) = LIST .
eq #listSubtract(LIST, [C | LIST1]) = #listSubtract(#listSubtractElement(LIST, C), LIST1) .
eq #listConcat([], LIST) = LIST .
eq #listConcat(LIST, []) = LIST .
eq #listConcat(LIST, LIST1) = [#getListElements(LIST), #getListElements(LIST1)] .
eq #listMember(C, []) = false .
eq #listMember(C, [C | LIST]) = true .
eq #listMember(C, [C1 | LIST]) = #listMember(C, LIST) [owise] .
eq #listLength([]) = 0 .
eq #listLength([ C | LIST]) = 1 + #listLength(LIST) .
endfm
fmod SEM_COREBIB is
protecting BOOL .
protecting NAT .
protecting STRING .
protecting SEM_PROCESS .
protecting SEM_LIST_HELPER .
vars C1 C2 : Value .
vars INT INT1 : Int .
vars CLIST CLIST1 CLIST2 : NeConstList .
vars LIST LIST1 LIST2 : ListConst .
vars A A1 A2 : Atom .
var C : Const .
var PID : Pid .
var MBOX : Mailbox .
var LINKS : PidSequence .
var TRAP : Bool .
var ME : ModEnv .
var BOOL : Bool .
*** spawn statement
*** Evaluating the spawn statements yields a new process that instantly begins to
*** evaluate the function given in the arguments to the spawn statement.
*** Note: We cannot calculate the (new) process identifier for the process that is created
*** within the equational theory: The set of currently used process identifiers
*** belongs to the system level (rewrite rules from SEM_TRANSITION)!
*** Therefore we have a bidirectional communication: We indicate the occurrence of
*** a side-effect by changing the process's label first:
eq [core-spawn] :
< tau | #no-res | call atom("erlang") : atom("spawn") (A1,A2,LIST) | PID | MBOX | LINKS | TRAP | ME > =
< spawn(A1,A2,LIST) | #no-res | call atom("erlang") : atom("spawn") (A1,A2,LIST) | PID | MBOX | LINKS | TRAP | ME > .
*** On the system level (see the rewrite-rules labelled with "sys-spawn"), we look up a new (unused)
*** process identifier and propagate it back using the second communication channel (2nd component
*** of the process tuple). The new PID thus provided is the result of the evaluation of the
*** spawn function call.
eq [core-spawn] :
< tau | #res-spawn(INT) | call atom("erlang") : atom("spawn") (A1,A2,LIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | int(INT) | PID | MBOX | LINKS | TRAP | ME > .
*** spawn_link statement
*** The spawn_link function is an extension of the spawn system call: It creates a new process
*** and atomically links the "old" and "new" processes.
*** The "communication" between the level of the equational theory and the rewriting level
*** works as above.
eq [core-spawnlink] :
< tau | #no-res | call atom("erlang") : atom("spawn_link") (A1,A2,LIST) | PID | MBOX | LINKS | TRAP | ME > =
< spawn-link(A1,A2,LIST) | #no-res | call atom("erlang") : atom("spawn_link") (A1,A2,LIST) | PID | MBOX | LINKS | TRAP | ME > .
eq [core-spawnlink] :
< tau | #res-spawn(INT) | call atom("erlang") : atom("spawn_link") (A1,A2,LIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | int(INT) | PID | MBOX | LINKS | TRAP | ME > .
*** =:= operator
*** syntactic equality after evaluation of both arguments, cf. Concurrent Programming in ERLANG, pp. 29
ceq [core-syneq] :
< tau | #no-res | call atom("erlang") : atom("=:=") (C1, C2) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (C1 == C2)
then atom("true")
else atom("false")
fi .
*** built in "+" operator for integer numbers
eq [core-plus] :
< tau | #no-res | call atom("erlang") : atom("+") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | int(INT + INT1) | PID | MBOX | LINKS | TRAP | ME > .
*** built in "-" operator for integer numbers
eq [core-minus] :
< tau | #no-res | call atom("erlang") : atom("-") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | int(INT + (- INT1)) | PID | MBOX | LINKS | TRAP | ME > .
*** built in "*" operator for integer numbers
eq [core-mul] :
< tau | #no-res | call atom("erlang") : atom("*") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | int(INT * INT1) | PID | MBOX | LINKS | TRAP | ME > .
*** built in "==" operator for integer numbers
ceq [core-equal] :
< tau | #no-res | call atom("erlang") : atom("==") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (INT == INT1)
then atom("true")
else atom("false")
fi .
*** built in "<" operator for integer numbers
ceq [core-less] :
< tau | #no-res | call atom("erlang") : atom("<") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (INT < INT1)
then atom("true")
else atom("false")
fi .
*** built in "=<" operator for integer numbers
ceq [core-le] :
< tau | #no-res | call atom("erlang") : atom("=<") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (INT <= INT1)
then atom("true")
else atom("false")
fi .
*** built in ">" operator for integer numbers
ceq [core-greater] :
< tau | #no-res | call atom("erlang") : atom(">") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (INT > INT1)
then atom("true")
else atom("false")
fi .
*** built in ">=" operator for integer numbers
ceq [core-ge] :
< tau | #no-res | call atom("erlang") : atom(">=") (int(INT), int(INT1)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (INT >= INT1)
then atom("true")
else atom("false")
fi .
*** As we do not model floating point numbers, we do not deal with division here either.
*** built-in boolean operators
*** Note: We assume that the only arguments supplied to these boolean functions are
*** the atoms 'true' and 'false'. If other atoms were given, this would not
*** be detected.
ceq [core-and] :
< tau | #no-res | call atom("erlang") : atom("and") (A1, A2) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (A1 == atom("true") and A2 == atom("true"))
then atom("true")
else atom("false")
fi .
ceq [core-or] :
< tau | #no-res | call atom("erlang") : atom("or") (A1, A2) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (A1 == atom("true") or A2 == atom("true"))
then atom("true")
else atom("false")
fi .
ceq [core-not] :
< tau | #no-res | call atom("erlang") : atom("not") (A1) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if (A1 == atom("true"))
then atom("false")
else atom("true")
fi .
*** self statement
*** This function returns the process's identifier as an Core-Erlang integer.
eq [core-self] :
< tau | #no-res | call atom("erlang") : atom("self") () | pid(INT) | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | int(INT) | pid(INT) | MBOX | LINKS | TRAP | ME > .
*** send statement
*** Evaluating the standard-library function 'erlang':'!' results in passing the
*** specified constant (the message) to the mailbox of the process that is specified by the
*** PID in the first argument.
*** Note: Sending of messages to another process is obviously a side-effect. Therefore
*** we have to stop the normalisation within the equational theory and indicate the
*** side-effect to the rewrite-rules of the system level (see the rewrite rules
*** labelled "sys-send" in the module SEM_TRANSITION for the rewriting part of
*** the send semantics).
eq [core-send] :
< tau | #no-res | call atom("erlang") : atom("!") (int(INT), C) | PID | MBOX | LINKS | TRAP | ME > =
< pid(INT) ! C | #no-res | call atom("erlang") : atom("!") (int(INT), C) | PID | MBOX | LINKS | TRAP | ME > .
*** The send operation is "performed" on the system level (i.e. the message is appended to
*** the mailbox of the receiving process). If the receiving process exists, success is
*** signalled back in the second communication channel:
eq [core-send] :
< tau | #res-send(true) | call atom("erlang") : atom("!") (int(INT), C) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | C | PID | MBOX | LINKS | TRAP | ME > .
*** If the receiver specified in the send statement does not belong to an existing process,
*** the rewrite-rules indicate the failure by setting the returned flag to false.
*** This is when the evaluation of the send-function call aborts with an exception:
eq [core-send] :
< tau | #res-send(false) | call atom("erlang") : atom("!") (int(INT), C) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | primop atom("raise") (atom("error"), {atom("noproc"), [int(INT),C]}) | PID | MBOX | LINKS | TRAP | ME > .
*** exit-statement
*** Evaluating the exit-function stops the process. The supplied argument is the
*** reason-value that is propagated with the exit-signals.
*** Note: We use the raise primitive operation to create exceptions. It indicates
*** the error-condition and sets the process's expression to 'bottom' to
*** indicate that it is undefined.
eq [core-exit] :
< tau | #no-res | call atom("erlang") : atom("exit") (C) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | primop atom("raise") (atom("exit"), C) | PID | MBOX | LINKS | TRAP | ME > .
*** exit-statement (remote version)
*** Apart from the "local" exit function specified above, there is a "remote"-version that
*** allows sending of exit signals to other processes. It does not terminate the process
*** which is evaluating the exit-function, but yields a side-effect according to the
*** receiver's PID and exit-value.
*** Sending of signals to other processes is a side-effect; therefore we have to model
*** the "communication" between the equational theory and the system level here:
*** Note: In any case, evaluation of this exit-statement yields 'true' as the result value.
eq [core-exit] :
< tau | #no-res | call atom("erlang") : atom("exit") (int(INT), C) | PID | MBOX | LINKS | TRAP | ME > =
< send-signal(pid(INT), C) | #no-res | call atom("erlang") : atom("exit") (int(INT), C) | PID | MBOX | LINKS | TRAP | ME > .
eq [core-exit] :
< tau | #res-signal(BOOL) | call atom("erlang") : atom("exit") (int(INT), C) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("true") | PID | MBOX | LINKS | TRAP | ME > .
*** throw-statement
*** The throw-statement can be used to create user-defined exceptions. The argument
*** to the throw-function call is the exception-value.
eq [core-throw] :
< tau | #no-res | call atom("erlang") : atom("throw") (C) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | primop atom("raise") (atom("throw"), C) | PID | MBOX | LINKS | TRAP | ME > .
*** error-statement
*** The built-in function 'error' causes abnormal process termination.
eq [core-throw] :
< tau | #no-res | call atom("erlang") : atom("error") (C) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | primop atom("raise") (atom("error"), C) | PID | MBOX | LINKS | TRAP | ME > .
*** the link statement
*** Establishment of links between processes. Again, linking processes is a side-effect that
*** has to take place on the transition level. We provide the interface and communicate the
*** results as before:
eq [core-link] :
< tau | #no-res | call atom("erlang") : atom("link") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > =
< link(pid(INT)) | #no-res | call atom("erlang") : atom("link") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > .
*** If the link is established successfully by the corresponding rewrite-rules, this is indicated
*** by the positive flag #res-link(true):
eq [core-link] :
< tau | #res-link(true) | call atom("erlang") : atom("link") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("true") | PID | MBOX | LINKS | TRAP | ME > .
*** If the link-partner does not exist, we get a negative result and throw a corresponding exception.
eq [core-link] :
< tau | #res-link(false) | call atom("erlang") : atom("link") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | primop atom("raise") (atom("error"), {atom("noproc"), [int(INT)]}) | PID | MBOX | LINKS | TRAP | ME > .
*** the unlink statement
*** Deletion of a previously created link between the calling process and another process
eq [core-unlink] :
< tau | #no-res | call atom("erlang") : atom("unlink") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > =
< unlink(pid(INT)) | #no-res | call atom("erlang") : atom("unlink") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > .
*** The process id specified in the argument is invalid (i.e. no such process exists). Hence we ignore the
*** call and return true.
eq [core-unlink] :
< tau | #res-link(true) | call atom("erlang") : atom("unlink") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("true") | PID | MBOX | LINKS | TRAP | ME > .
*** If the process is not linked with the argument PID, we ignore the call
eq [core-unlink] :
< tau | #res-link(false) | call atom("erlang") : atom("unlink") (int(INT)) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("true") | PID | MBOX | LINKS | TRAP | ME > .
*** process flag
*** We only model the "trap_exit" process flag that indicates whether the process is terminated
*** if it receives an exit-signal or whether it receives a message containing a "description" of the signal:
*** Note: There are different approaches here: If one was interested in observing modifications of
*** the trap_exit flag, one could as well introduce a switch to the transition level here.
ceq [core-processflag] :
< tau | #no-res | call atom("erlang") : atom("process_flag") (atom("trap_exit"), A) | PID | MBOX | LINKS | TRAP | ME > =
< trapexit(A) | #no-res | atom("true") | PID | MBOX | LINKS | TRAP | ME >
if (A == atom("true") or A == atom("false")) .
eq [core-processflag] :
< tau | #no-res | call atom("erlang") : atom("process_flag") (atom("trap_exit"), A) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | primop atom("raise") (atom("error"), atom("badarg")) | PID | MBOX | LINKS | TRAP | ME > [owise] .
*** Some list processing functions that are currently implemented in the 'erlang' standard library.
*** tuple_to_list: This function converts a tuple to the corresponding list.
eq [core-tupletolist] :
< tau | #no-res | call atom("erlang") : atom("tuple_to_list") ({CLIST}) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | [CLIST] | PID | MBOX | LINKS | TRAP | ME > .
*** The 'erlang':'++' function concatenates the two lists given in the arguments.
eq [core-list++] :
< tau | #no-res | call atom("erlang") : atom("++") (LIST1, LIST2) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | #listConcat(LIST1, LIST2) | PID | MBOX | LINKS | TRAP | ME > .
*** The 'erlang':'--' function subtracts the elements of the 2nd list from the first list.
*** Only one occurrence (the first) is removed for each element of the 2nd list.
eq [core-list--] :
< tau | #no-res | call atom("erlang") : atom("--") (LIST1, LIST2) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | #listSubtract(LIST1,LIST2) | PID | MBOX | LINKS | TRAP | ME > .
*** The 'erlang':'hd' function returns the head element of the given list
eq [core-list-head] :
< tau | #no-res | call atom("erlang") : atom("hd") ([C | LIST1]) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | C | PID | MBOX | LINKS | TRAP | ME > .
*** The 'erlang':'tl' function returns the list that was specified in the argument with
*** the head element stripped off.
eq [core-list-tail] :
< tau | #no-res | call atom("erlang") : atom("tl") ([C | LIST1]) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | LIST1 | PID | MBOX | LINKS | TRAP | ME > .
*** The 'erlang':'length' function returns the length of the list
eq [core-list-length] :
< tau | #no-res | call atom("erlang") : atom("length") (LIST1) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | int(#listLength(LIST1)) | PID | MBOX | LINKS | TRAP | ME > .
endfm
fmod SEM_LISTBIB is
protecting SEM_PROCESS .
protecting SEM_LIST_HELPER .
var C : Const .
vars LIST LIST1 LIST2 : ListConst .
var CLIST : NeConstList .
var A : Atom .
var PID : Pid .
var MBOX : Mailbox .
var LINKS : PidSequence .
var TRAP : Bool .
var ME : ModEnv .
*** the append function appends the two lists given as its arguments.
eq [lists-append] :
< tau | #no-res | call atom("lists") : atom("append") (LIST1, LIST2) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | #listConcat(LIST1, LIST2) | PID | MBOX | LINKS | TRAP | ME > .
*** the delete function deletes the first occurrence of the value given in the 1st argument
*** from the list that is supplied in the 2nd argument.
eq [lists-delete] :
< tau | #no-res | call atom("lists") : atom("delete") (C, LIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | #listSubtractElement(LIST, C) | PID | MBOX | LINKS | TRAP | ME > .
*** the member function simply checks if the specified constant is an element of the
*** list that is given as the 2nd argument.
ceq [lists-member] :
< tau | #no-res | call atom("lists") : atom("member") (C, LIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | A | PID | MBOX | LINKS | TRAP | ME >
if A := if #listMember(C, LIST)
then atom("true")
else atom("false")
fi .
endfm
fmod SEM_IOBIB is
protecting SEM_PROCESS .
protecting SEM_LIST_HELPER .
var CLIST : NeConstList .
var PID : Pid .
var MBOX : Mailbox .
var LINKS : PidSequence .
var TRAP : Bool .
var ME : ModEnv .
*** Some output functions of the io-library:
*** They always succeed and their output is discarded.
eq [io-format] :
< tau | #no-res | call atom("io") : atom("format") (CLIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("ok") | PID | MBOX | LINKS | TRAP | ME > .
eq [io-write] :
< tau | #no-res | call atom("io") : atom("write") (CLIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("ok") | PID | MBOX | LINKS | TRAP | ME > .
eq [io-nl] :
< tau | #no-res | call atom("io") : atom("nl") (CLIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("ok") | PID | MBOX | LINKS | TRAP | ME > .
eq [io-putchars] :
< tau | #no-res | call atom("io") : atom("put_chars") (CLIST) | PID | MBOX | LINKS | TRAP | ME > =
< tau | #no-res | atom("ok") | PID | MBOX | LINKS | TRAP | ME > .
endfm