~ubuntu-branches/ubuntu/oneiric/clif/oneiric

« back to all changes in this revision

Viewing changes to doc/guide_programmers.tex

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bunk
  • Date: 2002-01-25 14:05:49 UTC
  • Revision ID: james.westby@ubuntu.com-20020125140549-v5mmddxqlcrgzhd2
Tags: upstream-0.93
ImportĀ upstreamĀ versionĀ 0.93

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\documentstyle[makeidx, psfig]{book}
 
2
%
 
3
\vsize     29.7cm 
 
4
\hsize     21.0cm
 
5
%%%%%%%%%%%%%%%%%%%%%%%%
 
6
\textheight       24.7cm
 
7
\textwidth        17cm
 
8
%
 
9
%
 
10
\oddsidemargin    -0.40cm
 
11
\topmargin       -1.90cm
 
12
 
 
13
\newcommand{\CiF}{\sf Clif}
 
14
\evensidemargin -.5in
 
15
\makeindex
 
16
\newcommand{\mybasel}{\baselineskip 9pt}
 
17
\newcommand{\myver}{0.93
 
18
}
 
19
%%
 
20
\title{The Interpreter \CiF \\ Programmer's Guide}
 
21
\author{\v{L}. Kore\v{n} and T. Hr\'{u}z%\thanks{
 
22
%\protect \input{adr0.tex}}
 
23
}
 
24
\date{For version \myver\\
 
25
Last updated June 25, 2000}
 
26
%%
 
27
\begin{document}
 
28
\maketitle
 
29
\begin{titlepage}
 
30
\vspace*{\fill}
 
31
 
 
32
\noindent
 
33
Copyright \copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 
34
2000
 
35
\v{L}. Kore\v{n}
 
36
 
 
37
\vspace*{0.5cm}
 
38
\noindent
 
39
Permission is granted to make and distribute verbatim copies of
 
40
this manual provided the copyright notice and this permission notice
 
41
are preserved on all copies.
 
42
 
 
43
\vspace*{0.5cm}
 
44
\noindent
 
45
Permission is granted to copy and distribute modified versions of this
 
46
manual under the conditions for verbatim copying, provided also that
 
47
the sections entitled ``GNU General Public License'' is included
 
48
exactly as in the original, and provided that the entire resulting
 
49
derived work is distributed under the terms of a permission notice
 
50
identical to this one.
 
51
 
 
52
\vspace*{0.5cm}
 
53
\noindent
 
54
Permission is granted to copy and distribute translations of this
 
55
manual into another language, under the above conditions for modified
 
56
versions, except that the section entitled ``GNU General Public
 
57
License,'' and this permission notice, may be included in translations
 
58
approved by the Free Software Foundation instead of in the original
 
59
English.
 
60
\end{titlepage}
 
61
 
 
62
\chapter*{GNU GENERAL PUBLIC LICENSE}
 
63
\addcontentsline{toc}{chapter}{GNU GENERAL PUBLIC LICENSE}
 
64
\begin{center}
 
65
                       Version 2, June 1991
 
66
\end{center}
 
67
\begin{center}
 
68
 Copyright \copyright 1989, 1991 Free Software Foundation, Inc.\\
 
69
                          675 Mass Ave, Cambridge, MA 02139, USA\\
 
70
\end{center}
 
71
\begin{center}
 
72
 Everyone is permitted to copy and distribute verbatim copies\\
 
73
 of this license document, but changing it is not allowed.\\
 
74
\end{center}
 
75
\section*{Preamble}
 
76
\addcontentsline{toc}{section}{Preamble}
 
77
 
 
78
  The licenses for most software are designed to take away your
 
79
freedom to share and change it.  By contrast, the GNU General Public
 
80
License is intended to guarantee your freedom to share and change free
 
81
software--to make sure the software is free for all its users.  This
 
82
General Public License applies to most of the Free Software
 
83
Foundation's software and to any other program whose authors commit to
 
84
using it.  (Some other Free Software Foundation software is covered by
 
85
the GNU Library General Public License instead.)  You can apply it to
 
86
your programs, too.
 
87
 
 
88
  When we speak of free software, we are referring to freedom, not
 
89
price.  Our General Public Licenses are designed to make sure that you
 
90
have the freedom to distribute copies of free software (and charge for
 
91
this service if you wish), that you receive source code or can get it
 
92
if you want it, that you can change the software or use pieces of it
 
93
in new free programs; and that you know you can do these things.
 
94
 
 
95
  To protect your rights, we need to make restrictions that forbid
 
96
anyone to deny you these rights or to ask you to surrender the rights.
 
97
These restrictions translate to certain responsibilities for you if you
 
98
distribute copies of the software, or if you modify it.
 
99
 
 
100
  For example, if you distribute copies of such a program, whether
 
101
gratis or for a fee, you must give the recipients all the rights that
 
102
you have.  You must make sure that they, too, receive or can get the
 
103
source code.  And you must show them these terms so they know their
 
104
rights.
 
105
 
 
106
  We protect your rights with two steps: (1) copyright the software, and
 
107
(2) offer you this license which gives you legal permission to copy,
 
108
distribute and/or modify the software.
 
109
 
 
110
  Also, for each author's protection and ours, we want to make certain
 
111
that everyone understands that there is no warranty for this free
 
112
software.  If the software is modified by someone else and passed on, we
 
113
want its recipients to know that what they have is not the original, so
 
114
that any problems introduced by others will not reflect on the original
 
115
authors' reputations.
 
116
 
 
117
  Finally, any free program is threatened constantly by software
 
118
patents.  We wish to avoid the danger that redistributors of a free
 
119
program will individually obtain patent licenses, in effect making the
 
120
program proprietary.  To prevent this, we have made it clear that any
 
121
patent must be licensed for everyone's free use or not licensed at all.
 
122
 
 
123
  The precise terms and conditions for copying, distribution and
 
124
modification follow.
 
125
 
 
126
\section*{
 
127
                    GNU GENERAL PUBLIC LICENSE\\
 
128
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\\
 
129
}
 
130
\addcontentsline{toc}{section}{GNU GENERAL PUBLIC LICENSE
 
131
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION}
 
132
 
 
133
\begin{enumerate}
 
134
\setcounter{enumi}{-1}
 
135
 
 
136
 
 
137
\item This License applies to any program or other work which contains
 
138
a notice placed by the copyright holder saying it may be distributed
 
139
under the terms of this General Public License.  The "Program", below,
 
140
refers to any such program or work, and a "work based on the Program"
 
141
means either the Program or any derivative work under copyright law:
 
142
that is to say, a work containing the Program or a portion of it,
 
143
either verbatim or with modifications and/or translated into another
 
144
language.  (Hereinafter, translation is included without limitation in
 
145
the term "modification".)  Each licensee is addressed as "you".
 
146
 
 
147
Activities other than copying, distribution and modification are not
 
148
covered by this License; they are outside its scope.  The act of
 
149
running the Program is not restricted, and the output from the Program
 
150
is covered only if its contents constitute a work based on the
 
151
Program (independent of having been made by running the Program).
 
152
Whether that is true depends on what the Program does.
 
153
 
 
154
 
 
155
  \item You may copy and distribute verbatim copies of the Program's
 
156
source code as you receive it, in any medium, provided that you
 
157
conspicuously and appropriately publish on each copy an appropriate
 
158
copyright notice and disclaimer of warranty; keep intact all the
 
159
notices that refer to this License and to the absence of any warranty;
 
160
and give any other recipients of the Program a copy of this License
 
161
along with the Program.
 
162
 
 
163
You may charge a fee for the physical act of transferring a copy, and
 
164
you may at your option offer warranty protection in exchange for a fee.
 
165
 
 
166
 
 
167
  \item You may modify your copy or copies of the Program or any portion
 
168
of it, thus forming a work based on the Program, and copy and
 
169
distribute such modifications or work under the terms of Section 1
 
170
above, provided that you also meet all of these conditions:
 
171
 
 
172
\begin{enumerate}
 
173
\item    You must cause the modified files to carry prominent notices
 
174
    stating that you changed the files and the date of any change.
 
175
 
 
176
\item    You must cause any work that you distribute or publish, that in
 
177
    whole or in part contains or is derived from the Program or any
 
178
    part thereof, to be licensed as a whole at no charge to all third
 
179
    parties under the terms of this License.
 
180
 
 
181
\item    If the modified program normally reads commands interactively
 
182
    when run, you must cause it, when started running for such
 
183
    interactive use in the most ordinary way, to print or display an
 
184
    announcement including an appropriate copyright notice and a
 
185
    notice that there is no warranty (or else, saying that you provide
 
186
    a warranty) and that users may redistribute the program under
 
187
    these conditions, and telling the user how to view a copy of this
 
188
    License.  (Exception: if the Program itself is interactive but
 
189
    does not normally print such an announcement, your work based on
 
190
    the Program is not required to print an announcement.)
 
191
\end{enumerate}
 
192
 
 
193
These requirements apply to the modified work as a whole.  If
 
194
identifiable sections of that work are not derived from the Program,
 
195
and can be reasonably considered independent and separate works in
 
196
themselves, then this License, and its terms, do not apply to those
 
197
sections when you distribute them as separate works.  But when you
 
198
distribute the same sections as part of a whole which is a work based
 
199
on the Program, the distribution of the whole must be on the terms of
 
200
this License, whose permissions for other licensees extend to the
 
201
entire whole, and thus to each and every part regardless of who wrote it.
 
202
 
 
203
Thus, it is not the intent of this section to claim rights or contest
 
204
your rights to work written entirely by you; rather, the intent is to
 
205
exercise the right to control the distribution of derivative or
 
206
collective works based on the Program.
 
207
 
 
208
In addition, mere aggregation of another work not based on the Program
 
209
with the Program (or with a work based on the Program) on a volume of
 
210
a storage or distribution medium does not bring the other work under
 
211
the scope of this License.
 
212
 
 
213
  \item You may copy and distribute the Program (or a work based on it,
 
214
under Section 2) in object code or executable form under the terms of
 
215
Sections 1 and 2 above provided that you also do one of the following:
 
216
 
 
217
\begin{enumerate}
 
218
\item    Accompany it with the complete corresponding machine-readable
 
219
    source code, which must be distributed under the terms of Sections
 
220
    1 and 2 above on a medium customarily used for software interchange; or,
 
221
 
 
222
\item    Accompany it with a written offer, valid for at least three
 
223
    years, to give any third party, for a charge no more than your
 
224
    cost of physically performing source distribution, a complete
 
225
    machine-readable copy of the corresponding source code, to be
 
226
    distributed under the terms of Sections 1 and 2 above on a medium
 
227
    customarily used for software interchange; or,
 
228
 
 
229
\item    Accompany it with the information you received as to the offer
 
230
    to distribute corresponding source code.  (This alternative is
 
231
    allowed only for noncommercial distribution and only if you
 
232
    received the program in object code or executable form with such
 
233
    an offer, in accord with Subsection b above.)
 
234
\end{enumerate}
 
235
 
 
236
The source code for a work means the preferred form of the work for
 
237
making modifications to it.  For an executable work, complete source
 
238
code means all the source code for all modules it contains, plus any
 
239
associated interface definition files, plus the scripts used to
 
240
control compilation and installation of the executable.  However, as a
 
241
special exception, the source code distributed need not include
 
242
anything that is normally distributed (in either source or binary
 
243
form) with the major components (compiler, kernel, and so on) of the
 
244
operating system on which the executable runs, unless that component
 
245
itself accompanies the executable.
 
246
 
 
247
If distribution of executable or object code is made by offering
 
248
access to copy from a designated place, then offering equivalent
 
249
access to copy the source code from the same place counts as
 
250
distribution of the source code, even though third parties are not
 
251
compelled to copy the source along with the object code.
 
252
 
 
253
\item   You may not copy, modify, sublicense, or distribute the Program
 
254
except as expressly provided under this License.  Any attempt
 
255
otherwise to copy, modify, sublicense or distribute the Program is
 
256
void, and will automatically terminate your rights under this License.
 
257
However, parties who have received copies, or rights, from you under
 
258
this License will not have their licenses terminated so long as such
 
259
parties remain in full compliance.
 
260
 
 
261
  \item You are not required to accept this License, since you have not
 
262
signed it.  However, nothing else grants you permission to modify or
 
263
distribute the Program or its derivative works.  These actions are
 
264
prohibited by law if you do not accept this License.  Therefore, by
 
265
modifying or distributing the Program (or any work based on the
 
266
Program), you indicate your acceptance of this License to do so, and
 
267
all its terms and conditions for copying, distributing or modifying
 
268
the Program or works based on it.
 
269
 
 
270
  \item Each time you redistribute the Program (or any work based on the
 
271
Program), the recipient automatically receives a license from the
 
272
original licensor to copy, distribute or modify the Program subject to
 
273
these terms and conditions.  You may not impose any further
 
274
restrictions on the recipients' exercise of the rights granted herein.
 
275
You are not responsible for enforcing compliance by third parties to
 
276
this License.
 
277
 
 
278
  \item If, as a consequence of a court judgment or allegation of patent
 
279
infringement or for any other reason (not limited to patent issues),
 
280
conditions are imposed on you (whether by court order, agreement or
 
281
otherwise) that contradict the conditions of this License, they do not
 
282
excuse you from the conditions of this License.  If you cannot
 
283
distribute so as to satisfy simultaneously your obligations under this
 
284
License and any other pertinent obligations, then as a consequence you
 
285
may not distribute the Program at all.  For example, if a patent
 
286
license would not permit royalty-free redistribution of the Program by
 
287
all those who receive copies directly or indirectly through you, then
 
288
the only way you could satisfy both it and this License would be to
 
289
refrain entirely from distribution of the Program.
 
290
 
 
291
If any portion of this section is held invalid or unenforceable under
 
292
any particular circumstance, the balance of the section is intended to
 
293
apply and the section as a whole is intended to apply in other
 
294
circumstances.
 
295
 
 
296
It is not the purpose of this section to induce you to infringe any
 
297
patents or other property right claims or to contest validity of any
 
298
such claims; this section has the sole purpose of protecting the
 
299
integrity of the free software distribution system, which is
 
300
implemented by public license practices.  Many people have made
 
301
generous contributions to the wide range of software distributed
 
302
through that system in reliance on consistent application of that
 
303
system; it is up to the author/donor to decide if he or she is willing
 
304
to distribute software through any other system and a licensee cannot
 
305
impose that choice.
 
306
 
 
307
This section is intended to make thoroughly clear what is believed to
 
308
be a consequence of the rest of this License.
 
309
 
 
310
  \item If the distribution and/or use of the Program is restricted in
 
311
certain countries either by patents or by copyrighted interfaces, the
 
312
original copyright holder who places the Program under this License
 
313
may add an explicit geographical distribution limitation excluding
 
314
those countries, so that distribution is permitted only in or among
 
315
countries not thus excluded.  In such case, this License incorporates
 
316
the limitation as if written in the body of this License.
 
317
 
 
318
  \item The Free Software Foundation may publish revised and/or new versions
 
319
of the General Public License from time to time.  Such new versions will
 
320
be similar in spirit to the present version, but may differ in detail to
 
321
address new problems or concerns.
 
322
 
 
323
Each version is given a distinguishing version number.  If the Program
 
324
specifies a version number of this License which applies to it and "any
 
325
later version", you have the option of following the terms and conditions
 
326
either of that version or of any later version published by the Free
 
327
Software Foundation.  If the Program does not specify a version number of
 
328
this License, you may choose any version ever published by the Free Software
 
329
Foundation.
 
330
 
 
331
  \item If you wish to incorporate parts of the Program into other free
 
332
programs whose distribution conditions are different, write to the author
 
333
to ask for permission.  For software which is copyrighted by the Free
 
334
Software Foundation, write to the Free Software Foundation; we sometimes
 
335
make exceptions for this.  Our decision will be guided by the two goals
 
336
of preserving the free status of all derivatives of our free software and
 
337
of promoting the sharing and reuse of software generally.
 
338
 
 
339
 
 
340
\begin{center}
 
341
{\bf \Large
 
342
                            NO WARRANTY
 
343
}
 
344
\end{center}
 
345
 
 
346
  \item BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 
347
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
 
348
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
 
349
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
 
350
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 
351
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
 
352
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
 
353
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
 
354
REPAIR OR CORRECTION.
 
355
 
 
356
  \item IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
 
357
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
 
358
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
 
359
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
 
360
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
 
361
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
 
362
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
 
363
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 
364
POSSIBILITY OF SUCH DAMAGES.
 
365
 
 
366
\begin{center}
 
367
{\bf \Large
 
368
                     END OF TERMS AND CONDITIONS
 
369
}
 
370
\end{center}
 
371
\newpage
 
372
\section*{         How to Apply These Terms to Your New Programs}
 
373
\addcontentsline{toc}{section}{How to Apply These Terms to Your New
 
374
  Programs}
 
375
 
 
376
  If you develop a new program, and you want it to be of the greatest
 
377
possible use to the public, the best way to achieve this is to make it
 
378
free software which everyone can redistribute and change under these terms.
 
379
 
 
380
  To do so, attach the following notices to the program.  It is safest
 
381
to attach them to the start of each source file to most effectively
 
382
convey the exclusion of warranty; and each file should have at least
 
383
the "copyright" line and a pointer to where the full notice is found.
 
384
 
 
385
\begin{verbatim}
 
386
    <one line to give the program's name and a brief idea of what it does.>
 
387
    Copyright (C) 19yy  <name of author>
 
388
 
 
389
    This program is free software; you can redistribute it and/or modify
 
390
    it under the terms of the GNU General Public License as published by
 
391
    the Free Software Foundation; either version 2 of the License, or
 
392
    (at your option) any later version.
 
393
 
 
394
    This program is distributed in the hope that it will be useful,
 
395
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
396
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
397
    GNU General Public License for more details.
 
398
 
 
399
    You should have received a copy of the GNU General Public License
 
400
    along with this program; if not, write to the Free Software
 
401
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
402
\end{verbatim}
 
403
Also add information on how to contact you by electronic and paper mail.
 
404
 
 
405
If the program is interactive, make it output a short notice like this
 
406
when it starts in an interactive mode:
 
407
\begin{verbatim}
 
408
    Gnomovision version 69, Copyright (C) 19yy name of author
 
409
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
 
410
    This is free software, and you are welcome to redistribute it
 
411
    under certain conditions; type `show c' for details.
 
412
\end{verbatim}
 
413
The hypothetical commands `show w' and `show c' should show the appropriate
 
414
parts of the General Public License.  Of course, the commands you use may
 
415
be called something other than `show w' and `show c'; they could even be
 
416
mouse-clicks or menu items--whatever suits your program.
 
417
 
 
418
You should also get your employer (if you work as a programmer) or your
 
419
school, if any, to sign a "copyright disclaimer" for the program, if
 
420
necessary.  Here is a sample; alter the names:
 
421
\begin{verbatim}
 
422
  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
 
423
  `Gnomovision' (which makes passes at compilers) written by James Hacker.
 
424
 
 
425
  <signature of Ty Coon>, 1 April 1989
 
426
  Ty Coon, President of Vice
 
427
\end{verbatim}
 
428
This General Public License does not permit incorporating your program into
 
429
proprietary programs.  If your program is a subroutine library, you may
 
430
consider it more useful to permit linking proprietary applications with the
 
431
library.  If this is what you want to do, use the GNU Library General
 
432
Public License instead of this License.
 
433
 
 
434
\end{enumerate}
 
435
\newpage
 
436
 
 
437
\vspace*{\fill}
 
438
The document explains, comments and shows some decisions, programming
 
439
techniques and solutions in \CiF. Its purpose is to highlight some
 
440
important parts of the implementation and to help with possible
 
441
extensions for new users.
 
442
 
 
443
The document also helps authors to have the latest form of the
 
444
implementation details in comprehensible form, as a commented manual.
 
445
 
 
446
The document consists of the \CiF\ grammar in BNF form, description of
 
447
the main interpreter organization, possibilities for including new
 
448
library functions and conditions for extending the language of \CiF.
 
449
 
 
450
Interrupt services as an option for debugging are also described.
 
451
Optional graphical interface with graphic primitives is a part of the
 
452
document as well. 
 
453
 
 
454
The substantial part of the document is devoted to the internal
 
455
representation of types in \CiF. The chapter will be interesting for
 
456
users, who want to extend the \CiF\ with new non atomary data types.
 
457
 
 
458
%The appendix is substantial part of the parser source code of the
 
459
%\CiF. It is provided with comments to help the reader in better
 
460
%orientation in the environment.
 
461
\chapter*{Contributors to the \CiF}
 
462
\addcontentsline{toc}{chapter}{Contributors to the \CiF}
 
463
 
 
464
In addition to \v{L}udov\'{\i}t Kore\v{n} several people contributed
 
465
to the \CiF.
 
466
 
 
467
\begin{itemize}
 
468
\item Tom\'{a}\v{s} Hr\'{u}z principal planning decisions, overall
 
469
  design and many ideas for implementation
 
470
\item Jozef Repisk\'{y} first basic (and very restricted)
 
471
  implementation
 
472
\end{itemize}
 
473
 
 
474
\chapter{Compiling options}\label{compiling_options}
 
475
 
 
476
There are several additional options, that are supported during a run
 
477
of {\sf configure}\index{configure@{\sf configure}} script. They are
 
478
described in the following sections.
 
479
 
 
480
\section{Option --enable-CONTROL}
 
481
If a command line option {\sf --enable-CONTROL} was specified, the
 
482
synchronous and asynchronous interrupts are enabled
 
483
(see~\ref{int_service}).
 
484
 
 
485
\section{Option --enable-CODE}
 
486
If a command line option {\sf --enable-CODE} was specified, the output
 
487
of the virtual machine code is enabled. The output file name is {\sf
 
488
  code}.
 
489
 
 
490
\section{Option --enable-DEBUG}
 
491
If a command line option {\sf --enable-DEBUG} was specified, the debug
 
492
output is enabled on the {\sf stderr}.
 
493
 
 
494
\section{Option --enable-CHKSTACK}
 
495
If a command line option {\sf --enable-CHKSTACK} was specified, the
 
496
run-time check of stack and code area is done. I.e. each instruction
 
497
which grows the stack, assures that the stack does not interfere with
 
498
generated code.
 
499
 
 
500
 
 
501
\chapter{Invoking \CiF}\index{Clif@{\CiF}!invoking}
 
502
 
 
503
\section{Options summary}
 
504
 
 
505
\begin{description}
 
506
\item[-bc] Size of the memory in 512-Byte pages.
 
507
\item[-c] Compile only. (Not fully supported yet.)
 
508
\item[-copying] Show copying.
 
509
\item[Options controlling \CiF\ behavior.]
 
510
 
 
511
  -fcall-by-reference, -fno-call-by-reference, -fcall-by-value,
 
512
  -fno-call-by-value, -fhandle-main
 
513
 
 
514
\item[Debugging options.]
 
515
 
 
516
  -g, -dy
 
517
 
 
518
\item[-help] Show short help.
 
519
\item[-v] Show version.
 
520
\item[-version] Show version.
 
521
\item[-verbose] Verbose.
 
522
\item[-warranty] Show warranty.
 
523
\item[Warning options.]
 
524
  
 
525
  -w, -Wcomment, -Wformat, -Wimplicit, -Wreturn-type, -Wtrigraphs,
 
526
  -Wuninitialized, -Wall All of the above warnings.
 
527
 
 
528
  -W, -Waggregate-return, -Wunused
 
529
 
 
530
\end{description}
 
531
 
 
532
\section{Memory size options}
 
533
 
 
534
\begin{verbatim}
 
535
-bc=<number>
 
536
\end{verbatim}
 
537
option specifies number of 512-Byte pages for the \CiF\ environment
 
538
main memory. The arithmetical and temporary stack is multiple of this
 
539
option as well.
 
540
 
 
541
\section{Options controlling \CiF\ behavior}
 
542
 
 
543
\begin{description}
 
544
\item[-fcall-by-reference] call by reference parameter passing
 
545
  mechanism.
 
546
\item[-fno-call-by-reference] do not pass parameters by reference.
 
547
\item[-fcall-by-value] call by value parameter passing mechanism.
 
548
\item[-fno-call-by-value] do not pass parameters by value.
 
549
 
 
550
From the above mentioned options, only one should be specified in
 
551
positive form and one in negative form.
 
552
 
 
553
\item[-fhandle-main] simulate compiler-like behavior. The files on
 
554
  the command line and included files are compiled. The `main'
 
555
  function must be defined. After parsing pass, the generated code is
 
556
  executed. The main function is the beginning of execution.
 
557
\end{description}
 
558
 
 
559
\section{Debugging options}
 
560
 
 
561
\begin{description}
 
562
\item[-g] produce debugging information. The source lines are output
 
563
  during virtual machine code execution.\index{virtual machine}
 
564
\item[-dy] dump debugging information during parsing to standard
 
565
  error.
 
566
\end{description}
 
567
 
 
568
 
 
569
\section{Warning options}
 
570
 
 
571
\begin{description}
 
572
\item[-w] Inhibit all warning messages.
 
573
\item[-Wcomment] Warn when a comment-start sequence `/*' appears in a
 
574
  comment.
 
575
\item[-Wformat] Check calls to `printf' and `scanf', etc., to make
 
576
  sure that the arguments supplied have types appropriate to the
 
577
  specified format string.
 
578
\item[-Wimplicit] Warn if a function or parameter is implicitly
 
579
  declared.
 
580
\item[-Wreturn-type] Warn if the return statement is without return
 
581
  value in non-void function, or with a value in `void' function.
 
582
\item[-Wtrigraphs] Warn about trigraphs usage.
 
583
\item[-Wuninitialized] An automatic variable is used without first
 
584
  being initialized.
 
585
\item[-Wall] All of the above warnings.
 
586
\item[-W] Print extra warning messages.
 
587
\item[-Waggregate-return] Warn if any functions that return structures
 
588
  or unions are defined or called.
 
589
\item[-Wunused] Warn whenever a variable is unused aside from its
 
590
  declaration.
 
591
\end{description}
 
592
 
 
593
\chapter{Errors}
 
594
 
 
595
\section{\CiF\ error messages}
 
596
 
 
597
In this chapter is a list of \CiF\ error messages. 
 
598
 
 
599
\subsection{Syntax error messages}
 
600
 
 
601
{\mybasel
 
602
\begin{verbatim}
 
603
 
 
604
 
 
605
    case 1000:
 
606
      ERROR_FULL_INFO(line_counter);
 
607
      fprintfx (stderr,
 
608
                "variable `%s' isn't declared\n", 
 
609
                text);
 
610
      break;
 
611
    case 1001:
 
612
      ERROR_FULL_INFO(line_counter);
 
613
      fprintfx (stderr,
 
614
                "variable `%s' was already declared\n", 
 
615
                text);
 
616
      break;
 
617
    case 1002:
 
618
      ERROR_FULL_INFO(line_counter);
 
619
      fprintfx (stderr,
 
620
                "remote procedure %s is not declared\n", 
 
621
                proc_name_text[proc]);
 
622
      break;
 
623
    case 1003:
 
624
      ERROR_INFO;
 
625
      fprintfx (stderr,
 
626
                "local variable `%s' was already declared\n", 
 
627
                text);
 
628
      break;
 
629
    case 1004:
 
630
      print_source_line ();
 
631
      ERROR_FULL_INFO(line_counter);
 
632
      fprintfx (stderr,
 
633
                "at the %d-th char, near the `%s'\n",
 
634
                char_counter, yytext);
 
635
      break;
 
636
    case 1005:
 
637
      print_source_line ();
 
638
      ERROR_FULL_INFO(line_counter);
 
639
      fprintfx (stderr,
 
640
                "invalid type of the operand, %d-th character\n",
 
641
                char_counter);
 
642
      break;
 
643
    case 1006:
 
644
      ERROR_INFO;
 
645
      fprintfx (stderr,
 
646
                "remote function `%s' already declared\n",
 
647
                text);
 
648
      break;
 
649
    case 1007:
 
650
      ERROR_FULL_INFO(line_counter);
 
651
      fprintfx (stderr,
 
652
                "remote function isn't declared\n");
 
653
      break;
 
654
    case 1008:
 
655
      ERROR_FULL_INFO(line_counter);
 
656
      fprintfx (stderr,
 
657
                "remote functions are not in the load table\n");
 
658
      break;
 
659
    case 1009:
 
660
      ERROR_FULL_INFO(line_counter);
 
661
      fprintfx (stderr,
 
662
                "`void' type in expression\n");
 
663
      break;
 
664
    case 1010:
 
665
      ERROR_FULL_INFO(line_counter);
 
666
      fprintfx (stderr,
 
667
                "`void' type assigned to l_value\n");
 
668
      break;
 
669
    case 1011:
 
670
      ERROR_FULL_INFO(line_counter);
 
671
      fprintfx (stderr,
 
672
                "load can't open file `%s'\n",
 
673
                yytext);
 
674
      break;
 
675
    case 1012:
 
676
      ERROR_FULL_INFO(line_counter);
 
677
      fprintfx (stderr,
 
678
                "variable or field `%s' declared void\n",
 
679
                text);
 
680
      break;
 
681
    case 1013:
 
682
      ERROR_FULL_INFO(line_counter);
 
683
      fprintfx (stderr,
 
684
                "switch quantity not an integer\n");
 
685
      break;
 
686
    case 1014:
 
687
      ERROR_FULL_INFO(line_counter);
 
688
      fprintfx (stderr,
 
689
                "case label does not reduce to an integer constant\n");
 
690
      break;
 
691
    case 1015:
 
692
      ERROR_FULL_INFO(tmp_c->line_number);
 
693
      fprintfx (stderr,
 
694
                "duplicate case value\n");
 
695
      ERROR_FULL_INFO(tmp_m->line_number);
 
696
      fprintfx (stderr,
 
697
                "this is the first entry for that value\n");
 
698
      break;
 
699
    case 1016:
 
700
      ERROR_FULL_INFO(line_counter);
 
701
      fprintfx (stderr,
 
702
                "case label not within a switch statement\n");
 
703
      break;
 
704
    case 1017:
 
705
      ERROR_FULL_INFO(line_counter);
 
706
      fprintfx (stderr,
 
707
                "struct tag `%s' was already declared\n", 
 
708
                text);
 
709
      break;
 
710
    case 1018:
 
711
      ERROR_FULL_INFO(line_counter);
 
712
      fprintfx (stderr,
 
713
                "union tag `%s' was already declared\n", 
 
714
                text);
 
715
      break;
 
716
    case 1019:
 
717
      ERROR_FULL_INFO(line_counter);
 
718
      fprintfx (stderr,
 
719
                "enum tag `%s' was already declared\n", 
 
720
                text);
 
721
      break;
 
722
    case 1020:
 
723
      ERROR_FULL_INFO(line_counter);
 
724
      fprintfx (stderr,
 
725
                "conversion to non-scalar type requested\n");
 
726
      break;
 
727
    case 1021:
 
728
      ERROR_FULL_INFO(line_counter);
 
729
      fprintfx (stderr,
 
730
                "invalid type argument of `->'\n");
 
731
      break;
 
732
    case 1022:
 
733
      ERROR_FULL_INFO(line_counter);
 
734
      fprintfx (stderr,
 
735
                "invalid lvalue in unary `&'\n");
 
736
      break;
 
737
    case 1023:
 
738
      ERROR_FULL_INFO(line_counter);
 
739
      fprintfx (stderr,
 
740
                "storage size of `%s' isn't known\n",
 
741
                text);
 
742
      break;
 
743
    case 1024:
 
744
      ERROR_FULL_INFO(line_counter);
 
745
      fprintfx (stderr,
 
746
                "parameter `%s' has incomplete type\n",
 
747
                text);
 
748
      break;
 
749
      
 
750
      
 
751
\end{verbatim}
 
752
}
 
753
 
 
754
\subsection{\CiF\ compilation error messages}
 
755
 
 
756
{\mybasel
 
757
\begin{verbatim}
 
758
 
 
759
    case 2000:
 
760
      print_source_line ();
 
761
      ERROR_FULL_INFO(line_counter);
 
762
      fprintfx (stderr,
 
763
                "invalid number of subscripts\n");
 
764
      break;
 
765
    case 2001:
 
766
      ERROR_FULL_INFO(line_counter);
 
767
      fprintfx (stderr,
 
768
                "`%s' is not an array variable\n",
 
769
                text);
 
770
      break;
 
771
    case 2002:
 
772
      print_source_line ();
 
773
      ERROR_FULL_INFO(line_counter);
 
774
      fprintfx (stderr,
 
775
                "invalid type of array subscript\n");
 
776
      break;
 
777
    case 2003:
 
778
      print_source_line ();
 
779
      ERROR_FULL_INFO(line_counter);
 
780
      fprintfx (stderr,
 
781
                "type of formal parameter does not match previous declaration\n");
 
782
      break;
 
783
    case 2004:
 
784
      ERROR_FULL_INFO(line_counter);
 
785
      fprintfx (stderr,
 
786
                "number of formal parameters does not match previous declaration\n");
 
787
      break;
 
788
    case 2005:
 
789
      print_source_line ();
 
790
      ERROR_FULL_INFO(line_counter);
 
791
      fprintfx (stderr,
 
792
                "name of formal paramter does not match previous declaration\n");
 
793
      break;
 
794
    case 2006:
 
795
      print_source_line ();
 
796
      ERROR_FULL_INFO(line_counter);
 
797
      fprintfx (stderr,
 
798
                "size of array subscript of formal parameter does not match previous declaration\n");
 
799
      break;
 
800
    case 2007:
 
801
      print_source_line ();
 
802
      ERROR_FULL_INFO(line_counter);
 
803
      fprintfx (stderr,
 
804
                "number of array subscripts of formal parameter does not match previous declaration\n");
 
805
      break;
 
806
    case 2008 :
 
807
      ERROR_FULL_INFO(line_counter);
 
808
      fprintfx (stderr,
 
809
                "structure has no member named `%s'\n", 
 
810
                text);
 
811
      break;
 
812
    case 2009:
 
813
      ERROR_FULL_INFO(line_counter);
 
814
      fprintfx (stderr,
 
815
                "request for member `%s' in something not a structure or union\n",
 
816
                text);
 
817
      break;
 
818
      
 
819
      
 
820
\end{verbatim}
 
821
}
 
822
 
 
823
\subsection{\CiF\ control statement error messages}
 
824
 
 
825
{\mybasel
 
826
\begin{verbatim}
 
827
 
 
828
    case 3000:
 
829
      ERROR_FULL_INFO(line_counter);
 
830
      fprintfx (stderr,
 
831
                "`break' outside loop or switch\n");
 
832
      break;
 
833
    case 3001:
 
834
      ERROR_FULL_INFO(line_counter);
 
835
      fprintfx (stderr,
 
836
                "bad used `continue'\n");
 
837
      break;
 
838
    case 3002:
 
839
      ERROR_FULL_INFO(line_counter);
 
840
      fprintfx (stderr,
 
841
                "default label not within a switch statement\n");
 
842
      break;
 
843
    case 3003:
 
844
      ERROR_FULL_INFO(line_counter);
 
845
      fprintfx (stderr,
 
846
                "multiple default labels in one switch\n");
 
847
      ERROR_FULL_INFO(fixp->switch1.def_use.line_number);
 
848
      fprintfx (stderr,
 
849
                "this is the first default label\n");
 
850
      break;
 
851
    case 3004:
 
852
      ERROR_FULL_INFO(line_counter);
 
853
      fprintfx (stderr,
 
854
                "duplicate label `%s'\n",
 
855
                text);
 
856
      break;
 
857
    case 3005:
 
858
      ERROR_FULL_INFO(error_line_number);
 
859
      fprintfx (stderr,
 
860
                "label `%s' used but not defined\n", 
 
861
                text);
 
862
      break;
 
863
    case 3006:
 
864
      ERROR_FULL_INFO(error_line_number);
 
865
      fprintfx (stderr,
 
866
                "invalid lvalue in assignment\n");
 
867
      break;
 
868
      
 
869
      
 
870
\end{verbatim}
 
871
}
 
872
 
 
873
\subsection{\CiF\ run-time error messages}
 
874
 
 
875
{\mybasel
 
876
\begin{verbatim}
 
877
 
 
878
 
 
879
    case 4000:
 
880
      ERR_NO_INFO;
 
881
      fprintfx (stderr,
 
882
                "interpreter: full memory\n");
 
883
      break;
 
884
    case 4001:
 
885
      ERR_NO_INFO;
 
886
      fprintfx (stderr,
 
887
                "interpreter: stack overflow\n");
 
888
      break;
 
889
    case 4002:
 
890
      ERR_NO_INFO;
 
891
      fprintfx (stderr,
 
892
                "operating system out of memory\n");
 
893
      break;
 
894
      
 
895
\end{verbatim}
 
896
}
 
897
 
 
898
\subsection{\CiF\ fatal error messages}
 
899
 
 
900
{\mybasel
 
901
\begin{verbatim}
 
902
 
 
903
 
 
904
    case 5000:
 
905
      fprintfx (stderr,
 
906
                "Compile Fatal ");
 
907
      ERR_NO_INFO;
 
908
      fprintfx (stderr,
 
909
                "Interpreter Internal Error (unknown operand type) in line %d e-mail: %s\n",
 
910
                line_counter, EMAIL);
 
911
      print_source_line ();
 
912
      break;
 
913
    case 5001:
 
914
      fprintfx (stderr,
 
915
                "Run-time Fatal ");
 
916
      ERR_NO_INFO;
 
917
      fprintfx (stderr,
 
918
                " Internal Interpreter Error (unknown instruction) e-mail: %s\n", 
 
919
                EMAIL);
 
920
      print_source_line ();
 
921
      break;
 
922
    case 5002:
 
923
      fprintfx (stderr,
 
924
                "Compile Fatal ");
 
925
      ERR_NO_INFO;
 
926
      fprintfx (stderr,
 
927
                " Interpreter Internal Error (error in book-keeping) in line %d e-mail: %s\n",
 
928
                line_counter, EMAIL);
 
929
      print_source_line ();
 
930
      break;
 
931
    case 5003:
 
932
      fprintfx (stderr,
 
933
                "Compile Fatal ");
 
934
      ERR_NO_INFO;
 
935
      fprintfx (stderr,
 
936
                " Internal Interpreter Error (error in operand type) in line %d e-mail: %s\n",
 
937
                line_counter, EMAIL);
 
938
      print_source_line ();
 
939
      break;
 
940
      
 
941
      
 
942
\end{verbatim}
 
943
}
 
944
 
 
945
\subsection{\CiF\ warning messages}
 
946
 
 
947
{\mybasel
 
948
\begin{verbatim}
 
949
 
 
950
 
 
951
    case 6000:
 
952
      if (warning_yes)
 
953
        {
 
954
          ERROR_FULL_INFO(line_counter);
 
955
          fprintfx (stderr,
 
956
                    "remote function %s already declared\n",
 
957
                    text);
 
958
        }
 
959
      return;
 
960
    case 6001:
 
961
      if (warning_yes)
 
962
        {
 
963
          ERROR_FULL_INFO(line_counter);
 
964
          fprintfx (stderr,
 
965
                    "`return' with no value, in function returning non-void\n");
 
966
        }
 
967
      return;
 
968
    case 6002:
 
969
      if (warning_yes)
 
970
        {
 
971
          ERROR_FULL_INFO(line_counter);
 
972
          fprintfx (stderr,
 
973
                    "`return' with a value, in function returning void\n");
 
974
        }
 
975
      return;
 
976
    case 6003:
 
977
      if (warning_yes)
 
978
        {
 
979
          if (proc)
 
980
            {
 
981
              print_file_name ();
 
982
              fprintfx (stderr, 
 
983
                        " In function `%s':",
 
984
                        proc_name_text[proc]);
 
985
              ERROR_INFO;
 
986
              fprintfx (stderr,
 
987
                        "unused variable `%s'\n",
 
988
                        text);
 
989
            }
 
990
          else
 
991
            {
 
992
              print_file_name ();
 
993
              fprintfx (stderr, 
 
994
                        " In block finishing at line %d:\n",
 
995
                        line_counter);
 
996
              ERROR_INFO;
 
997
              fprintfx (stderr,
 
998
                        "unused variable `%s'\n",
 
999
                        text);
 
1000
            }
 
1001
        }
 
1002
      return;
 
1003
    case 6004:
 
1004
      if (warning_yes)
 
1005
        {
 
1006
          ERROR_FULL_INFO(error_line_number);
 
1007
          fprintfx (stderr,
 
1008
                    "label `%s' defined but not used\n", 
 
1009
                    text);
 
1010
        }
 
1011
      return;
 
1012
    case 6005:
 
1013
      if (warning_yes)
 
1014
        {
 
1015
          ERROR_INFO;
 
1016
          fprintfx (stderr,
 
1017
                    " `/*' within comment\n");
 
1018
        }
 
1019
      return;
 
1020
    case 6006:
 
1021
      if (warning_yes)
 
1022
        {
 
1023
          if (proc)
 
1024
            {
 
1025
              print_file_name ();             
 
1026
              fprintfx (stderr, 
 
1027
                        " In function `%s':",
 
1028
                        proc_name_text[proc]);
 
1029
              ERROR_INFO;
 
1030
              fprintfx (stderr,
 
1031
                        "`%s' might be used uninitialized in this function\n",
 
1032
                        text);
 
1033
            }
 
1034
          else
 
1035
            {
 
1036
              print_file_name ();
 
1037
              fprintfx (stderr, 
 
1038
                        " In block finishing at line %d:",
 
1039
                        line_counter);
 
1040
              ERROR_INFO;
 
1041
              fprintfx (stderr,
 
1042
                        "`%s' might be used uninitialized in the block\n",
 
1043
                        text);
 
1044
            }
 
1045
        }
 
1046
      return;
 
1047
    case 6007:
 
1048
      if (warning_yes)
 
1049
        {
 
1050
          print_file_name ();
 
1051
          fprintfx (stderr,
 
1052
                    " In function `%s':",
 
1053
                    proc_name_text[proc]);
 
1054
          ERROR_INFO;
 
1055
          fprintfx (stderr,
 
1056
                    "number of locals is greater than the ANSI allows\n");
 
1057
        }
 
1058
      return;
 
1059
    case 6008:
 
1060
      if (warning_yes)
 
1061
        {
 
1062
          print_file_name ();
 
1063
          fprintfx (stderr,
 
1064
                    " In function `%s':\n",
 
1065
                    proc_name_text[proc]);
 
1066
          ERROR_INFO;
 
1067
          fprintfx (stderr,
 
1068
                    "number of params is greater than the ANSI allows\n");
 
1069
        }
 
1070
      return;
 
1071
    case 6009:
 
1072
      if (warning_yes)
 
1073
        {
 
1074
          char *tmp_line, *beg, *end, *com;
 
1075
          int n;
 
1076
          n = strlen(line_buf);
 
1077
          tmp_line = malloc(n+1);
 
1078
          if (NULL == tmp_line)
 
1079
            {
 
1080
              perror ("");
 
1081
              abort ();
 
1082
            }
 
1083
          
 
1084
          strcpy (tmp_line, line_buf);
 
1085
          beg = strrchr (tmp_line, '(');
 
1086
          if (NULL == beg)
 
1087
            {
 
1088
              perror ("");
 
1089
              abort ();
 
1090
            }
 
1091
          
 
1092
          beg++;
 
1093
          com = strrchr (beg, ',');
 
1094
          if (NULL != com)
 
1095
            beg = com + 1;
 
1096
          for (; *beg == ' ' || *beg == '\t'; beg++);
 
1097
            
 
1098
          end = strrchr (beg, ' ');
 
1099
          com = strchr (beg, ' ');
 
1100
          if (end != com)
 
1101
            *end = '\0';
 
1102
          else
 
1103
            tmp_line[n - 1] = '\0';
 
1104
 
 
1105
          ERROR_INFO;
 
1106
          fprintfx (stderr,
 
1107
                    "`%s' declared inside parameter list its scope is only this definition or declaration, which is probably not what you want.\n",
 
1108
                    beg);
 
1109
          free (tmp_line);
 
1110
        }
 
1111
      return;
 
1112
      
 
1113
      
 
1114
\end{verbatim}
 
1115
}
 
1116
 
 
1117
\subsection{\CiF\ initialization error messages}
 
1118
 
 
1119
{\mybasel
 
1120
\begin{verbatim}
 
1121
 
 
1122
 
 
1123
    case 7000:
 
1124
      print_error_number (err_no);
 
1125
      fprintfx (stderr,
 
1126
                "in run-string and/or in `clif.ini' file\n");
 
1127
      break;
 
1128
    case 7001:
 
1129
      print_error_number (err_no);
 
1130
      fprintfx (stderr,
 
1131
                "interpreter: can't open file %s\n",
 
1132
                argvv[argc_counter]);
 
1133
      break;
 
1134
    default:
 
1135
      fprintfx (stderr, "Fatal error invalid error number (%d) e-mail: %s\n", err_no, EMAIL);
 
1136
      break;
 
1137
 
 
1138
      
 
1139
\end{verbatim}
 
1140
}
 
1141
 
 
1142
\chapter{Syntax of the language} \label{syntax}
 
1143
 
 
1144
\newcommand{\s}{\mbox{$\longrightarrow$}}
 
1145
\newcommand{\cs}{\mbox{$\mid$}}
 
1146
\newcommand{\cl}{\mbox{$<$}}
 
1147
\newcommand{\r}{\mbox{$>$}}
 
1148
\newcommand{\h}{\hspace{.7in}}
 
1149
 
 
1150
\begin{flushleft}
 
1151
\cl list\_stat\_0 \r  ::=   \cl list\_stat\_0 \r   \cl stat\_0 \r \\
 
1152
                        \h \cs\\
 
1153
        ;\\
 
1154
\end{flushleft}
 
1155
\par
 
1156
\par
 
1157
\begin{flushleft}
 
1158
\cl list\_stat \r    ::=  \cl list\_stat \r     \cl stat\_1 \r  \\
 
1159
        \h \cs  \\
 
1160
        ;\\
 
1161
\end{flushleft}
 
1162
\par
 
1163
\par
 
1164
\begin{flushleft}
 
1165
\cl stat\_0 \r  ::= \cl declarations \r\\
 
1166
        \h \cs \cl statement \r\\
 
1167
                        \h \cs RESUME ';'\\
 
1168
                        \h \cs ';'\\
 
1169
        \h \cs \cl error \r ';'\\
 
1170
                        ;\\
 
1171
\end{flushleft}
 
1172
\par
 
1173
\par
 
1174
\begin{flushleft}
 
1175
\cl stat\_1 \r  ::= \cl statement \r\\
 
1176
        \h \cs GOTO IDENT ';' \\
 
1177
                        \h \cs  ';'\\
 
1178
        \h \cs  \cl error \r  '\}'\\
 
1179
                        \h \cs  \cl error \r  ';'\\
 
1180
                        ;\\
 
1181
\newpage
 
1182
\end{flushleft}
 
1183
\par
 
1184
\par
 
1185
\begin{flushleft}
 
1186
\cl jump\_statement \r\\
 
1187
        ::= BREAK ';'\\
 
1188
                
 
1189
        \h \cs CONTINUE ';'\\
 
1190
                
 
1191
        \h \cs RETURN \cl expression \r ';'\\
 
1192
                
 
1193
        \h \cs RETURN ';'\\
 
1194
                        ;\\
 
1195
\newpage
 
1196
\end{flushleft}
 
1197
\par
 
1198
\par
 
1199
\begin{flushleft}
 
1200
\cl declaration\_specifiers \r\\
 
1201
        ::= \cl storage\_class\_specifier \r\\
 
1202
        \h \cs \cl storage\_class\_specifier \r \cl declaration\_specifiers \r\\
 
1203
        \h \cs \cl type\_specifier \r\\
 
1204
        \h \cs \cl type\_specifier \r \cl declaration\_specifiers \r\\
 
1205
        \h \cs \cl type\_qualifier \r\\
 
1206
        \h \cs \cl type\_qualifier \r \cl declaration\_specifiers \r\\
 
1207
        ;\\
 
1208
M ::=\\
 
1209
                        ;\\
 
1210
\end{flushleft}
 
1211
\par
 
1212
\par
 
1213
\begin{flushleft}
 
1214
\cl declarations \r ::=\\
 
1215
          M \cl declaration\_specifiers \r \cl first\_dekl \r\\
 
1216
        \h \cs REMOTE '\{' INTRINSIC ',' STRINGC '\}' IDENT ';' \\
 
1217
                
 
1218
        \h \cs REMOTE '\{' RPC ',' STRINGC '\}' IDENT ';'\\
 
1219
                        \h \cs UNLOAD IDENT ';'\\
 
1220
                        ;\\
 
1221
\newpage
 
1222
\end{flushleft}
 
1223
\par
 
1224
\par
 
1225
\begin{flushleft}
 
1226
\cl statement \r ::= \cl labeled\_statement \r\\
 
1227
        \h \cs \cl compound\_statement \r\\
 
1228
                
 
1229
        \h \cs          \\
 
1230
          \cl expression \r ';'\\
 
1231
                
 
1232
        \h \cs \cl selection\_statement \r\\
 
1233
        \h \cs \cl iteration\_statement \r\\
 
1234
        \h \cs \cl jump\_statement \r\\
 
1235
        \h \cs EXIT ';' \\
 
1236
        \h \cs CSUSPEND ';'\\
 
1237
                        ;\\
 
1238
\newpage
 
1239
\end{flushleft}
 
1240
\par
 
1241
\par
 
1242
\begin{flushleft}
 
1243
\cl selection\_statement \r\\
 
1244
        ::= IF '(' \cl expression \r ')'\\
 
1245
                           \cl then \r\\
 
1246
        \h \cs SWITCH '(' \cl expression \r ')' \\
 
1247
                          \cl switch\_body \r\\
 
1248
                        ;\\
 
1249
\newpage
 
1250
\end{flushleft}
 
1251
\par
 
1252
\par
 
1253
\begin{flushleft}
 
1254
\cl iteration\_statement \r\\
 
1255
        ::= WHILE\\
 
1256
                          '(' \cl expression \r ')'\\
 
1257
                          \cl while\_stat \r\\
 
1258
        \h \cs DO\\
 
1259
                          \cl do\_while\_stat \r\\
 
1260
          WHILE '(' \cl expression \r ')' ';'\\
 
1261
                
 
1262
        \h \cs FOR \cl for \r \cl for\_stat \r\\
 
1263
                        ;\\
 
1264
\end{flushleft}
 
1265
\par
 
1266
\par
 
1267
\begin{flushleft}
 
1268
\cl while\_stat \r ::= \cl stat\_1 \r\\
 
1269
                        ;\\
 
1270
\end{flushleft}
 
1271
\par
 
1272
\par
 
1273
\begin{flushleft}
 
1274
\cl do\_while\_stat \r \\
 
1275
        ::= \cl stat\_1 \r\\
 
1276
        ;\\
 
1277
\end{flushleft}
 
1278
\par
 
1279
\par
 
1280
\begin{flushleft}
 
1281
\cl for\_stat \r ::= \cl stat\_1 \r\\
 
1282
        ;\\
 
1283
\end{flushleft}
 
1284
\par
 
1285
\par
 
1286
\begin{flushleft}
 
1287
\cl for \r ::= '(' \cl expression \r  ';'\\
 
1288
                          \cl for\_expr1 \r\\
 
1289
        \h \cs '(' ';' \\
 
1290
                          \cl for\_expr1 \r\\
 
1291
        ;\\
 
1292
\end{flushleft}
 
1293
\par
 
1294
\par
 
1295
\begin{flushleft}
 
1296
\cl for\_expr1 \r::= \cl expression \r  ';'\\
 
1297
                          \cl for\_expr2 \r\\
 
1298
        \h \cs ';'\\
 
1299
                          \cl for\_expr2 \r\\
 
1300
        ;\\
 
1301
 
 
1302
\end{flushleft}
 
1303
\par
 
1304
\par
 
1305
\begin{flushleft}
 
1306
\cl for\_expr2 \r::= \cl expression \r ')'\\
 
1307
                
 
1308
        \h \cs ')'\\
 
1309
                        ;\\
 
1310
\newpage
 
1311
\end{flushleft}
 
1312
\par
 
1313
\par
 
1314
\begin{flushleft}
 
1315
\cl type\_specifier \r ::= INT \\
 
1316
                
 
1317
        \h \cs DOUBLE \\
 
1318
                
 
1319
        \h \cs FLOAT \\
 
1320
                
 
1321
        \h \cs CHAR \\
 
1322
                
 
1323
        \h \cs VOID \\
 
1324
                        \h \cs LONG\\
 
1325
                        \h \cs SHORT\\
 
1326
                        \h \cs SIGNED\\
 
1327
                        \h \cs UNSIGNED\\
 
1328
                        \h \cs \cl struct\_or\_union\_specifier \r\\
 
1329
        \h \cs \cl enum\_specifier \r\\
 
1330
        \h \cs TYPENAME\\
 
1331
                        ;\\
 
1332
\end{flushleft}
 
1333
\par
 
1334
\par
 
1335
\begin{flushleft}
 
1336
\cl type\_qualifier \r\\
 
1337
        ::= CONST\\
 
1338
                
 
1339
        \h \cs VOLATILE\\
 
1340
                        ;\\
 
1341
\end{flushleft}
 
1342
\par
 
1343
\par
 
1344
\begin{flushleft}
 
1345
\cl pointer \r\\
 
1346
        ::= '$\ast$'\\
 
1347
                        \h \cs '$\ast$' \cl type\_qualifier\_list \r\\
 
1348
        \h \cs '$\ast$' \cl pointer \r\\
 
1349
        \h \cs '$\ast$' \cl type\_qualifier\_list \r \cl pointer \r\\
 
1350
        ;\\
 
1351
\end{flushleft}
 
1352
\par
 
1353
\par
 
1354
\begin{flushleft}
 
1355
\cl type\_qualifier\_list \r\\
 
1356
        ::= \cl type\_qualifier \r\\
 
1357
        \h \cs \cl type\_qualifier\_list \r \cl type\_qualifier \r\\
 
1358
        ;\\
 
1359
\end{flushleft}
 
1360
\par
 
1361
\par
 
1362
\begin{flushleft}
 
1363
\cl struct\_or\_union\_specifier \r\\
 
1364
        ::= \cl struct\_or\_union \r IDENT \\
 
1365
                          '\{' \cl struct\_declaration\_list \r '\}' \\
 
1366
                        \h \cs \cl struct\_or\_union \r \\
 
1367
                          '\{' \cl struct\_declaration\_list \r '\}'\\
 
1368
                        \h \cs \cl struct\_or\_union \r IDENT\\
 
1369
                        ;\\
 
1370
\end{flushleft}
 
1371
\par
 
1372
\par
 
1373
\begin{flushleft}
 
1374
\cl struct\_or\_union \r\\
 
1375
        ::= STRUCT\\
 
1376
                
 
1377
        \h \cs UNION\\
 
1378
                        ;\\
 
1379
\end{flushleft}
 
1380
\par
 
1381
\par
 
1382
\begin{flushleft}
 
1383
\cl struct\_declaration\_list \r\\
 
1384
        ::= \cl struct\_declaration \r \\
 
1385
                        \h \cs \cl struct\_declaration\_list \r \cl struct\_declaration \r\\
 
1386
                        ;\\
 
1387
\end{flushleft}
 
1388
\par
 
1389
\par
 
1390
\begin{flushleft}
 
1391
\cl struct\_declaration \r\\
 
1392
        ::= M \cl specifier\_qualifier\_list \r \cl struct\_declarator\_list \r ';'\\
 
1393
                        ;\\
 
1394
\end{flushleft}
 
1395
\par
 
1396
\par
 
1397
\begin{flushleft}
 
1398
\cl specifier\_qualifier\_list \r\\
 
1399
        ::= \cl type\_specifier \r\\
 
1400
        \h \cs \cl type\_specifier \r \cl specifier\_qualifier\_list \r\\
 
1401
        \h \cs \cl type\_qualifier \r \\
 
1402
        \h \cs \cl type\_qualifier \r \cl specifier\_qualifier\_list \r\\
 
1403
        ;\\
 
1404
\end{flushleft}
 
1405
\par
 
1406
\par
 
1407
\begin{flushleft}
 
1408
\cl struct\_declarator\_list \r\\
 
1409
        ::= \cl struct\_declarator \r\\
 
1410
        \h \cs \cl struct\_declarator\_list \r ',' \cl struct\_declarator \r\\
 
1411
        ;\\
 
1412
\end{flushleft}
 
1413
\par
 
1414
\par
 
1415
\begin{flushleft}
 
1416
\cl struct\_declarator \r\\
 
1417
        ::= \cl declarator \r\\
 
1418
        \h \cs ':' \cl constant\_expression \r\\
 
1419
        \h \cs \cl declarator \r ':' \cl constant\_expression \r\\
 
1420
        ;\\
 
1421
\end{flushleft}
 
1422
\par
 
1423
\par
 
1424
\begin{flushleft}
 
1425
\cl enum\_specifier \r\\
 
1426
        ::= ENUM '\{' \\
 
1427
                          \cl enumerator\_list \r '\}'\\
 
1428
                
 
1429
        \h \cs ENUM IDENT '\{' \\
 
1430
                                        \cl enumerator\_list \r '\}'\\
 
1431
                
 
1432
        \h \cs ENUM IDENT \\
 
1433
                        ;\\
 
1434
\end{flushleft}
 
1435
\par
 
1436
\par
 
1437
\begin{flushleft}
 
1438
\cl enumerator\_list \r\\
 
1439
        ::= \cl enumerator \r\\
 
1440
        \h \cs \cl enumerator\_list \r ',' \cl enumerator \r\\
 
1441
        ;\\
 
1442
\end{flushleft}
 
1443
\par
 
1444
\par
 
1445
\begin{flushleft}
 
1446
\cl enumerator \r\\
 
1447
        ::= IDENT\\
 
1448
                        \h \cs IDENT '=' \cl constant\_expression \r\\
 
1449
                        ;\\
 
1450
\end{flushleft}
 
1451
\par
 
1452
\par
 
1453
\begin{flushleft}
 
1454
\cl declarator \r\\
 
1455
        ::= \cl pointer \r \cl direct\_declarator \r\\
 
1456
                        \h \cs \cl direct\_declarator \r\\
 
1457
        ;\\
 
1458
\end{flushleft}
 
1459
\par
 
1460
\par
 
1461
\begin{flushleft}
 
1462
\cl direct\_declarator \r\\
 
1463
        ::= IDENT\\
 
1464
                        \h \cs IDENT \cl list\_dim \r\\
 
1465
                        ;\\
 
1466
\end{flushleft}
 
1467
\par
 
1468
\par
 
1469
\begin{flushleft}
 
1470
\cl initializer \r\\
 
1471
        ::= \cl assignment\_expression \r\\
 
1472
        \h \cs '\{' \\
 
1473
                          \cl initializer\_list\_complete \r\\
 
1474
        ;\\
 
1475
\end{flushleft}
 
1476
\par
 
1477
\par
 
1478
\begin{flushleft}
 
1479
\cl initializer\_list\_complete \r\\
 
1480
        ::= \cl initializer\_list \r '\}'\\
 
1481
                
 
1482
        \h \cs \cl initializer\_list \r ',' '\}'\\
 
1483
                        ;\\
 
1484
\end{flushleft}
 
1485
\par
 
1486
\par
 
1487
\begin{flushleft}
 
1488
\cl initializer\_list \r\\
 
1489
        ::= \cl initializer \r\\
 
1490
                        \h \cs \cl initializer\_list \r ','\\
 
1491
                          \cl initializer \r\\
 
1492
                        ;\\
 
1493
\end{flushleft}
 
1494
\par
 
1495
\par
 
1496
\begin{flushleft}
 
1497
\cl type\_name \r\\
 
1498
        ::= M \cl specifier\_qualifier\_list \r\\
 
1499
        \h \cs M \cl specifier\_qualifier\_list \r \cl abstract\_declarator \r\\
 
1500
        ;\\
 
1501
\end{flushleft}
 
1502
\par
 
1503
\par
 
1504
\begin{flushleft}
 
1505
\cl abstract\_declarator \r\\
 
1506
        ::= \cl pointer \r\\
 
1507
        \h \cs \cl direct\_abstract\_declarator \r\\
 
1508
        \h \cs \cl pointer \r \cl direct\_abstract\_declarator \r\\
 
1509
        ;\\
 
1510
\end{flushleft}
 
1511
\par
 
1512
\par
 
1513
\begin{flushleft}
 
1514
\cl direct\_abstract\_declarator \r\\
 
1515
        ::= '(' \cl abstract\_declarator \r ')'\\
 
1516
        \h \cs '$[$' '$]$'\\
 
1517
        \h \cs \cl direct\_abstract\_declarator \r '$[$' '$]$'\\
 
1518
        \h \cs '$[$' \cl constant\_expression \r '$]$'\\
 
1519
        \h \cs \cl direct\_abstract\_declarator \r '$[$' \cl constant\_expression \r '$]$'\\
 
1520
        \h \cs '(' ')'\\
 
1521
        \h \cs \cl direct\_abstract\_declarator \r '(' ')'\\
 
1522
        \h \cs '(' \cl list\_type\_spec \r ')'\\
 
1523
        \h \cs \cl direct\_abstract\_declarator \r '(' \cl list\_type\_spec \r ')'\\
 
1524
        ;\\
 
1525
\end{flushleft}
 
1526
\par
 
1527
\par
 
1528
\begin{flushleft}
 
1529
\cl storage\_class\_specifier \r\\
 
1530
        ::= TYPEDEF\\
 
1531
                        \h \cs EXTERN\\
 
1532
                
 
1533
        \h \cs EXPORT\_T\\
 
1534
                
 
1535
        \h \cs STATIC\\
 
1536
                        \h \cs AUTO\\
 
1537
                        \h \cs REGISTER\\
 
1538
                        ;\\
 
1539
\newpage
 
1540
\end{flushleft}
 
1541
\par
 
1542
\par
 
1543
\begin{flushleft}
 
1544
\cl list\_type\_spec \r ::= M \cl declaration\_specifiers \r\\
 
1545
                
 
1546
               \h \cs M \cl declaration\_specifiers \r ','\\
 
1547
                          \cl list\_type\_spec \r\\
 
1548
        \h \cs M \cl declaration\_specifiers \r \cl list\_dim\_or\_pointer \r\\
 
1549
        \h \cs M \cl declaration\_specifiers \r \cl list\_dim\_or\_pointer \r ',' \\
 
1550
          \cl list\_type\_spec \r\\
 
1551
        ;\\
 
1552
\end{flushleft}
 
1553
\par
 
1554
\par
 
1555
\begin{flushleft}
 
1556
\cl list\_dim\_or\_pointer \r ::= \cl list\_dim \r\\
 
1557
                
 
1558
        \h \cs \cl pointer \r\\
 
1559
                
 
1560
        \h \cs '(' \cl pointer \r ')' '(' ')'\\
 
1561
                
 
1562
        \h \cs '(' \cl pointer \r ')' '(' \cl list\_type\_spec \r ')'\\
 
1563
                
 
1564
        \h \cs '(' \cl pointer \r ')' \cl list\_dim \r\\
 
1565
                        ;\\
 
1566
\newpage
 
1567
\end{flushleft}
 
1568
\par
 
1569
\par
 
1570
\begin{flushleft}
 
1571
\cl first\_dekl \r ::= IDENT \\
 
1572
                          \cl initializer\_optional \r \\
 
1573
        \h \cs IDENT  \cl list\_dim \r\\
 
1574
                          \cl initializer\_optional \r\\
 
1575
        \h \cs \cl pointer \r IDENT\\
 
1576
                          \cl initializer\_optional \r\\
 
1577
        \h \cs \cl pointer \r IDENT  \cl list\_dim \r\\
 
1578
                          \cl initializer\_optional \r\\
 
1579
        \h \cs IDENT '('\\
 
1580
                          \cl func\_first \r\\
 
1581
        \h \cs \cl pointer \r IDENT '('\\
 
1582
                          \cl func\_first \r\\
 
1583
        \h \cs ';'\\
 
1584
                        ;\\
 
1585
\end{flushleft}
 
1586
\par
 
1587
\par
 
1588
\begin{flushleft}
 
1589
\cl func\_first \r ::= ')' \\
 
1590
                          \cl initializer\_optional \r\\
 
1591
        \h \cs \cl list\_type\_spec \r ')'\\
 
1592
                          \cl initializer\_optional \r\\
 
1593
        \h \cs \cl list\_form\_param \r ')'\\
 
1594
                          \cl initializer\_optional \r\\
 
1595
        \h \cs \cl list\_form\_param \r ')'\\
 
1596
                          \cl compound\_statement \r\\
 
1597
                
 
1598
        \h \cs ')'\\
 
1599
                          \cl compound\_statement \r\\
 
1600
                        ;\\
 
1601
\end{flushleft}
 
1602
\par
 
1603
\par
 
1604
\begin{flushleft}
 
1605
\cl func\_rest \r ::= ')'\\
 
1606
                          \cl initializer\_optional \r\\
 
1607
        \h \cs \cl list\_type\_spec \r ')'\\
 
1608
                          \cl initializer\_optional \r\\
 
1609
        \h \cs \cl list\_form\_param \r ')'\\
 
1610
                          \cl initializer\_optional \r\\
 
1611
        \h \cs \cl error \r '\{'\\
 
1612
                        ;\\
 
1613
\newpage
 
1614
\end{flushleft}
 
1615
\par
 
1616
\par
 
1617
\begin{flushleft}
 
1618
\cl list\_dekl \r ::= IDENT\\
 
1619
                          \cl initializer\_optional \r\\
 
1620
        \h \cs IDENT  \cl list\_dim \r\\
 
1621
                          \cl initializer\_optional \r\\
 
1622
        \h \cs IDENT '('\\
 
1623
                          \cl func\_rest \r\\
 
1624
        \h \cs \cl pointer \r IDENT\\
 
1625
                          \cl initializer\_optional \r\\
 
1626
        \h \cs \cl pointer \r IDENT  \cl list\_dim \r\\
 
1627
                          \cl initializer\_optional \r\\
 
1628
        \h \cs \cl pointer \r IDENT '('\\
 
1629
                          \cl func\_rest \r\\
 
1630
        ;\\
 
1631
\end{flushleft}
 
1632
\par
 
1633
\par
 
1634
\begin{flushleft}
 
1635
\cl initializer\_optional \r\\
 
1636
        ::= ';' R\\
 
1637
                        \h \cs \cl initialization \r ';'\\
 
1638
                        \h \cs ',' R \cl list\_dekl \r\\
 
1639
        \h \cs \cl initialization \r\\
 
1640
                          ',' \cl list\_dekl \r\\
 
1641
        ;\\
 
1642
R       ::=\\
 
1643
                        ;\\
 
1644
\end{flushleft}
 
1645
\par
 
1646
\par
 
1647
\begin{flushleft}
 
1648
\cl initialization \r\\
 
1649
        ::= '=' \cl initializer \r\\
 
1650
                
 
1651
        ;\\
 
1652
\newpage
 
1653
\end{flushleft}
 
1654
\par
 
1655
\par
 
1656
\begin{flushleft}
 
1657
\cl then \r     ::= \cl stat\_1 \r\\
 
1658
                          ELSE \cl stat\_1 \r\\
 
1659
                
 
1660
        \h \cs \cl stat\_1 \r\\
 
1661
                        ;\\
 
1662
\end{flushleft}
 
1663
\par
 
1664
\par
 
1665
\begin{flushleft}
 
1666
\cl switch\_body \r ::= \cl stat\_1 \r\\
 
1667
        ;\\
 
1668
\newpage
 
1669
\end{flushleft}
 
1670
\par
 
1671
\par
 
1672
\begin{flushleft}
 
1673
\cl labeled\_statement \r \\
 
1674
        ::= IDENT ':' \\
 
1675
          \cl stat\_1 \r\\
 
1676
        \h \cs CASE \\
 
1677
                          \cl constant\_expression \r \\
 
1678
                          ':' \cl stat\_1 \r\\
 
1679
        \h \cs DEFAULT ':' \\
 
1680
                          \cl stat\_1 \r\\
 
1681
        ;\\
 
1682
\newpage
 
1683
\end{flushleft}
 
1684
\par
 
1685
\par
 
1686
\begin{flushleft}
 
1687
\cl compound\_statement \r\\
 
1688
        ::= '\{' N \cl list\_stat \r '\}'\\
 
1689
        \h \cs '\{' N \cl list\_loc\_dekl \r \\
 
1690
                          \cl list\_stat \r '\}'\\
 
1691
        ;\\
 
1692
N\\
 
1693
        ::=\\
 
1694
                        ;\\
 
1695
\end{flushleft}
 
1696
\par
 
1697
\par
 
1698
\begin{flushleft}
 
1699
\cl list\_form\_param \r        \\
 
1700
        ::= M \cl declaration\_specifiers \r IDENT\\
 
1701
                
 
1702
        \h \cs M \cl declaration\_specifiers \r IDENT ','\\
 
1703
                          \cl list\_form\_param \r\\
 
1704
        \h \cs M \cl declaration\_specifiers \r IDENT \cl list\_dim \r\\
 
1705
                
 
1706
        \h \cs M \cl declaration\_specifiers \r IDENT \cl list\_dim \r ',' \\
 
1707
                          \cl list\_form\_param \r\\
 
1708
        \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT\\
 
1709
                
 
1710
        \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT ','\\
 
1711
                          \cl list\_form\_param \r\\
 
1712
        \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT \cl list\_dim \r\\
 
1713
                
 
1714
        \h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT \cl list\_dim \r ',' \\
 
1715
                          \cl list\_form\_param \r\\
 
1716
        ;\\
 
1717
\end{flushleft}
 
1718
\par
 
1719
\par
 
1720
\begin{flushleft}
 
1721
\cl list\_dim \r ::=  '$[$' '$]$'\\
 
1722
                
 
1723
        \h \cs '$[$' NUMBERI '$]$'\\
 
1724
                
 
1725
        \h \cs \cl list\_dim \r '$[$' NUMBERI '$]$'\\
 
1726
                        ;\\
 
1727
\end{flushleft}
 
1728
\par
 
1729
\par
 
1730
\begin{flushleft}
 
1731
\cl list\_loc\_dekl \r\\
 
1732
        ::= M \cl declaration\_specifiers \r \cl list\_loc\_dekl\_1 \r\\
 
1733
        \h \cs M \cl declaration\_specifiers \r ';'\\
 
1734
                        \h \cs M \cl declaration\_specifiers \r ';' \\
 
1735
                          \cl list\_loc\_dekl \r\\
 
1736
        ;\\
 
1737
\end{flushleft}
 
1738
\par
 
1739
\par
 
1740
\begin{flushleft}
 
1741
\cl list\_loc\_dekl\_1 \r\\
 
1742
        ::= IDENT\\
 
1743
                          \cl initializer\_optional\_loc \r\\
 
1744
        \h \cs IDENT \cl list\_dim \r\\
 
1745
                          \cl initializer\_optional\_loc \r\\
 
1746
        \h \cs IDENT '(' ')'\\
 
1747
                          \cl initializer\_optional\_loc \r\\
 
1748
        \h \cs IDENT '(' \cl list\_type\_spec \r ')'\\
 
1749
                          \cl initializer\_optional\_loc \r\\
 
1750
        \h \cs IDENT '(' \cl list\_form\_param \r ')'\\
 
1751
                          \cl initializer\_optional\_loc \r\\
 
1752
        \h \cs \cl pointer \r IDENT\\
 
1753
                          \cl initializer\_optional\_loc \r\\
 
1754
        \h \cs \cl pointer \r IDENT \cl list\_dim \r\\
 
1755
                          \cl initializer\_optional\_loc \r\\
 
1756
        \h \cs \cl pointer \r IDENT '(' ')'\\
 
1757
                          \cl initializer\_optional\_loc \r\\
 
1758
        \h \cs \cl pointer \r IDENT '(' \cl list\_type\_spec \r ')'\\
 
1759
                          \cl initializer\_optional\_loc \r\\
 
1760
        \h \cs \cl pointer \r IDENT '(' \cl list\_form\_param \r ')'\\
 
1761
                          \cl initializer\_optional\_loc \r\\
 
1762
        ;\\
 
1763
\end{flushleft}
 
1764
\par
 
1765
\par
 
1766
\begin{flushleft}
 
1767
\cl initializer\_optional\_loc \r\\
 
1768
        ::= ';' P\\
 
1769
                        \h \cs ';' P \\
 
1770
                          \cl list\_loc\_dekl \r\\
 
1771
        \h \cs \cl local\_initialization \r ';'\\
 
1772
                        \h \cs \cl local\_initialization \r ';'\\
 
1773
                          \cl list\_loc\_dekl \r\\
 
1774
        \h \cs ',' P \cl list\_loc\_dekl\_1 \r\\
 
1775
        \h \cs \cl local\_initialization \r ',' \cl list\_loc\_dekl\_1 \r\\
 
1776
        ; \\
 
1777
P       ::=\\
 
1778
                        ;\\
 
1779
\end{flushleft}
 
1780
\par
 
1781
\par
 
1782
\begin{flushleft}
 
1783
\cl local\_initialization \r\\
 
1784
        ::= '=' \cl initializer \r\\
 
1785
                
 
1786
        ;\\
 
1787
\end{flushleft}
 
1788
\par
 
1789
\par
 
1790
\begin{flushleft}
 
1791
\cl call \r ::= \cl list\_param \r\\
 
1792
        \h \cs  ')' \\
 
1793
                        ;\\
 
1794
\end{flushleft}
 
1795
\par
 
1796
\par
 
1797
\begin{flushleft}
 
1798
\cl list\_param \r ::= \cl assignment\_expression \r ')' \\
 
1799
                
 
1800
        \h \cs \cl assignment\_expression \r ','\\
 
1801
                          \cl list\_param \r\\
 
1802
        ;\\
 
1803
\newpage
 
1804
\end{flushleft}
 
1805
\par
 
1806
\par
 
1807
\begin{flushleft}
 
1808
\cl primary\_expression \r\\
 
1809
        ::= \cl ident \r\\
 
1810
                
 
1811
        \h \cs NUMBERI\\
 
1812
                
 
1813
        \h \cs NUMBERUI\\
 
1814
                
 
1815
        \h \cs NUMBERLI\\
 
1816
                
 
1817
        \h \cs NUMBERLUI\\
 
1818
                
 
1819
        \h \cs NUMBERD\\
 
1820
                
 
1821
        \h \cs NUMBERLD\\
 
1822
                
 
1823
        \h \cs NUMBERF\\
 
1824
                
 
1825
        \h \cs STRINGC\\
 
1826
                
 
1827
        \h \cs WSTRINGC\\
 
1828
                
 
1829
        \h \cs NUMBERC\\
 
1830
                
 
1831
        \h \cs '('  \cl expression \r  ')'\\
 
1832
        ;\\
 
1833
\end{flushleft}
 
1834
\par
 
1835
\par
 
1836
\begin{flushleft}
 
1837
\cl ident \r ::=        IDENT\\
 
1838
                        ;\\
 
1839
\end{flushleft}
 
1840
\par
 
1841
\par
 
1842
\begin{flushleft}
 
1843
\cl postfix\_expression \r\\
 
1844
        ::= \cl primary\_expression \r\\
 
1845
        \h \cs \cl postfix\_expression \r\\
 
1846
                          '$[$' \cl expression \r '$]$'\\
 
1847
                
 
1848
        \h \cs \cl postfix\_expression \r '.' IDENT\\
 
1849
                
 
1850
        \h \cs \cl postfix\_expression \r PTR IDENT\\
 
1851
                
 
1852
 
 
1853
        \h \cs \cl postfix\_expression \r PP\\
 
1854
                
 
1855
        \h \cs \cl postfix\_expression \r MM\\
 
1856
                
 
1857
        \h \cs \cl postfix\_expression \r '('\\
 
1858
                          \cl call \r\\
 
1859
                        ;\\
 
1860
 
 
1861
\end{flushleft}
 
1862
\par
 
1863
\par
 
1864
\begin{flushleft}
 
1865
\cl unary\_expression \r\\
 
1866
        ::= \cl postfix\_expression \r\\
 
1867
                
 
1868
        \h \cs '\&' \cl unary\_expression \r\\
 
1869
                
 
1870
        \h \cs '$\ast$' \cl unary\_expression \r\\
 
1871
                
 
1872
        \h \cs NEG\_T \cl unary\_expression \r \\
 
1873
                
 
1874
        \h \cs NEG\_B \cl unary\_expression \r\\
 
1875
                
 
1876
        \h \cs '+' \cl unary\_expression \r\\
 
1877
                        \h \cs '-'\\
 
1878
                          \cl unary\_expression \r\\
 
1879
                
 
1880
        \h \cs  PP \cl unary\_expression \r \cl ae\_empty \r\\
 
1881
                
 
1882
        \h \cs MM \cl unary\_expression \r \cl ae\_empty \r\\
 
1883
                
 
1884
        \h \cs SIZEOF \cl unary\_expression \r\\
 
1885
                
 
1886
        \h \cs SIZEOF '(' \cl type\_name \r ')'\\
 
1887
                        ;\\
 
1888
\end{flushleft}
 
1889
\par
 
1890
\par
 
1891
\begin{flushleft}
 
1892
\cl cast\_expression \r\\
 
1893
        ::= \cl unary\_expression \r\\
 
1894
        \h \cs '(' \cl type\_name \r ')' \cl cast\_expression \r\\
 
1895
                        ;\\
 
1896
\end{flushleft}
 
1897
\par
 
1898
\par
 
1899
\begin{flushleft}
 
1900
\cl multiplicative\_expression \r\\
 
1901
        ::= \cl cast\_expression \r\\
 
1902
        \h \cs \cl multiplicative\_expression \r '$\ast$' \cl cast\_expression \r\\
 
1903
                
 
1904
        \h \cs \cl multiplicative\_expression \r '/' \cl cast\_expression \r\\
 
1905
                
 
1906
        \h \cs \cl multiplicative\_expression \r '\' \cl cast\_expression \r\\
 
1907
                        ;\\
 
1908
\end{flushleft}
 
1909
\par
 
1910
\par
 
1911
\begin{flushleft}
 
1912
\cl additive\_expression \r\\
 
1913
        ::= \cl multiplicative\_expression \r\\
 
1914
        \h \cs \cl additive\_expression \r '+' \cl multiplicative\_expression \r\\
 
1915
                
 
1916
        \h \cs \cl additive\_expression \r '-' \cl multiplicative\_expression \r\\
 
1917
                        ;\\
 
1918
\end{flushleft}
 
1919
\par
 
1920
\par
 
1921
\begin{flushleft}
 
1922
\cl shift\_expression \r\\
 
1923
        ::= \cl additive\_expression \r\\
 
1924
        \h \cs \cl shift\_expression \r SHIL \cl additive\_expression \r\\
 
1925
                
 
1926
        \h \cs \cl shift\_expression \r SHIR \cl additive\_expression \r\\
 
1927
                        ;\\
 
1928
\end{flushleft}
 
1929
\par
 
1930
\par
 
1931
\begin{flushleft}
 
1932
\cl relational\_expression \r\\
 
1933
        ::= \cl shift\_expression \r\\
 
1934
        \h \cs \cl relational\_expression \r '$<$' \cl shift\_expression \r\\
 
1935
                
 
1936
        \h \cs \cl relational\_expression \r '$>$' \cl shift\_expression \r\\
 
1937
                
 
1938
        \h \cs \cl relational\_expression \r LQ \cl shift\_expression \r\\
 
1939
                
 
1940
        \h \cs \cl relational\_expression \r GQ \cl shift\_expression \r\\
 
1941
                        ;\\
 
1942
\end{flushleft}
 
1943
\par
 
1944
\par
 
1945
\begin{flushleft}
 
1946
\cl equality\_expression \r\\
 
1947
        ::= \cl relational\_expression \r\\
 
1948
        \h \cs \cl equality\_expression \r EQ\_A \cl relational\_expression \r\\
 
1949
                
 
1950
        \h \cs \cl equality\_expression \r NE\_A \cl relational\_expression \r\\
 
1951
                        ;\\
 
1952
\end{flushleft}
 
1953
\par
 
1954
\par
 
1955
\begin{flushleft}
 
1956
\cl bit\_AND\_expression \r\\
 
1957
        ::= \cl equality\_expression \r\\
 
1958
        \h \cs \cl bit\_AND\_expression \r '\&' \cl equality\_expression \r\\
 
1959
                        ;\\
 
1960
\end{flushleft}
 
1961
\par
 
1962
\par
 
1963
\begin{flushleft}
 
1964
\cl exclusive\_OR\_expression \r\\
 
1965
        ::= \cl bit\_AND\_expression \r\\
 
1966
        \h \cs \cl exclusive\_OR\_expression \r ' $\hat{}$ ' \cl bit\_AND\_expression \r\\
 
1967
                        ;\\
 
1968
\end{flushleft}
 
1969
\par
 
1970
\par
 
1971
\begin{flushleft}
 
1972
\cl inclusive\_OR\_expression \r\\
 
1973
        ::= \cl exclusive\_OR\_expression \r\\
 
1974
        \h \cs \cl inclusive\_OR\_expression \r '\cs' \cl exclusive\_OR\_expression \r\\
 
1975
                        ;\\
 
1976
\end{flushleft}
 
1977
\par
 
1978
\par
 
1979
\begin{flushleft}
 
1980
\cl logical\_AND\_expression \r\\
 
1981
        ::= \cl inclusive\_OR\_expression \r\\
 
1982
        \h \cs \cl logical\_AND\_expression \r AND\_A \\
 
1983
                          \cl inclusive\_OR\_expression \r\\
 
1984
                        ;\\
 
1985
\end{flushleft}
 
1986
\par
 
1987
\par
 
1988
\begin{flushleft}
 
1989
\cl logical\_OR\_expression \r\\
 
1990
        ::= \cl logical\_AND\_expression \r\\
 
1991
        \h \cs \cl logical\_OR\_expression \r OR\_A \\
 
1992
                          \cl logical\_AND\_expression \r\\
 
1993
                        ;\\
 
1994
\end{flushleft}
 
1995
\par
 
1996
\par
 
1997
\begin{flushleft}
 
1998
\cl conditional\_expression \r\\
 
1999
        ::= \cl logical\_OR\_expression \r\\
 
2000
        \h \cs \cl logical\_OR\_expression \r '?' \\
 
2001
                          \cl expression \r ':' \\
 
2002
                          \cl conditional\_expression \r\\
 
2003
                        ;\\
 
2004
\newpage
 
2005
\end{flushleft}
 
2006
\par
 
2007
\par
 
2008
\begin{flushleft}
 
2009
\cl assignment\_expression \r\\
 
2010
        ::= \cl conditional\_expression \r\\
 
2011
        \h \cs \cl unary\_expression \r\\
 
2012
                          '='  \cl assignment\_expression \r \\
 
2013
                
 
2014
        \h \cs \cl unary\_expression \r \cl assignment\_operator \r\\
 
2015
        ;\\
 
2016
\end{flushleft}
 
2017
\par
 
2018
\par
 
2019
\begin{flushleft}
 
2020
\cl ae\_empty \r::=\\
 
2021
                
 
2022
        ;\\
 
2023
\end{flushleft}
 
2024
\par
 
2025
\par
 
2026
\begin{flushleft}
 
2027
\cl assignment\_operator \r\\
 
2028
        ::= MUL\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2029
                
 
2030
        \h \cs DIV\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2031
                
 
2032
        \h \cs MOD\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2033
                
 
2034
        \h \cs ADD\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2035
                
 
2036
        \h \cs SUB\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2037
                
 
2038
        \h \cs LEFT\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2039
                
 
2040
        \h \cs RIGHT\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2041
                
 
2042
        \h \cs AND\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2043
                
 
2044
        \h \cs XOR\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2045
                
 
2046
        \h \cs OR\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
 
2047
                        ;\\
 
2048
\newpage
 
2049
\end{flushleft}
 
2050
\par
 
2051
\par
 
2052
\begin{flushleft}
 
2053
\cl expression \r\\
 
2054
        ::= \cl assignment\_expression \r\\
 
2055
        \h \cs \cl expression \r ',' \\
 
2056
                          \cl assignment\_expression \r\\
 
2057
        ;\\
 
2058
\end{flushleft}
 
2059
\par
 
2060
\par
 
2061
\begin{flushleft}
 
2062
\cl constant\_expression \r\\
 
2063
        ::= \cl conditional\_expression \r\\
 
2064
        ;\\
 
2065
\end{flushleft}
 
2066
 
 
2067
\par
 
2068
\par 
 
2069
\begin{flushleft}
 
2070
 
 
2071
\cl  operator \r  ::= any character from the set: \cs \verb| + - / \% < > & &&  == <= >= != * |  $<<$ $>>$ $\hat{}$ $\tilde{}$ $!$ \cs \cs \\
 
2072
 
 
2073
\end{flushleft}
 
2074
\par
 
2075
\par
 
2076
\begin{flushleft}
 
2077
 
 
2078
\cl numberi \r ::= \cl number \r \\
 
2079
\h \cs numberi \r \cl number \r \\
 
2080
 
 
2081
\end{flushleft}
 
2082
\par
 
2083
\par
 
2084
\begin{flushleft}
 
2085
 
 
2086
\cl numberc \r ::= any single character \\
 
2087
 
 
2088
\end{flushleft}
 
2089
\par
 
2090
\par
 
2091
\begin{flushleft}
 
2092
 
 
2093
\cl numberd \r ::= \cl numberi \r . \cl numberi \r \\
 
2094
\h \cs . \cl numberi \r \\
 
2095
\h \cs \cl numberi \r . \\
 
2096
 
 
2097
\end{flushleft}
 
2098
\par
 
2099
\par
 
2100
\begin{flushleft}
 
2101
 
 
2102
\cl number \r  ::= digit from the set: 0,1,2,3,4,5,6,7,8,9\\
 
2103
 
 
2104
\end{flushleft}
 
2105
\par
 
2106
\par
 
2107
\begin{flushleft}
 
2108
 
 
2109
\cl stringc \r ::= Sequence one or more characters, first
 
2110
character is a letter followed by letters or digits\\
 
2111
 
 
2112
\end{flushleft}
 
2113
\par
 
2114
\par
 
2115
\begin{flushleft}
 
2116
 
 
2117
\cl  ident \r  ::= Sequence one or more characters, first
 
2118
character is a letter followed by letters or digits\\
 
2119
 
 
2120
\end{flushleft}
 
2121
The statement
 
2122
LOAD\nolinebreak[4](\nolinebreak[4]file\_name\nolinebreak[4]);
 
2123
is only processed by lexical analyzer - yylex which opens file
 
2124
{\em file\_name} and redirects input to the input from that
 
2125
file.
 
2126
 
 
2127
 
 
2128
 
 
2129
 
 
2130
\section{Syntax of the graphical subsystem language}
 
2131
 
 
2132
 
 
2133
\begin{flushleft}
 
2134
\cl list\_stat\_0 \r ::= \cl list\_stat\_0 \r  \cl stat\_0 \r\\
 
2135
            \h \cs\\
 
2136
            ;\\
 
2137
\end{flushleft}
 
2138
\par
 
2139
\par
 
2140
\begin{flushleft}
 
2141
\cl stat\_0 \r ::= FIELDS '=' NUMBERI\\
 
2142
                
 
2143
        \h \cs TYPE '=' STRING\\
 
2144
                
 
2145
        \h \cs PRINT\_FORMAT '=' STRING\\
 
2146
                
 
2147
        \h \cs ON\_LEAVE\_WINDOW '=' STRING\\
 
2148
                
 
2149
        \h \cs DIRECTION '=' STRING\\
 
2150
                
 
2151
        \h \cs START\_TIME '=' \cl s\_time \r\\
 
2152
        \h \cs DURATION\_TIME '=' \cl d\_time \r\\
 
2153
        \h \cs W\_RESOLUTION '=' NUMBERI NUMBERI\\
 
2154
                
 
2155
        \h \cs LOWER '(' NUMBERI ')' '=' NUMBERD\\
 
2156
                
 
2157
        \h \cs UPPER '(' NUMBERI ')' '=' NUMBERD\\
 
2158
                
 
2159
        \h \cs STYLE '(' NUMBERI ')' '=' NUMBERI\\
 
2160
                
 
2161
        \h \cs \cl error \r\\
 
2162
                
 
2163
        ;\\
 
2164
\end{flushleft}
 
2165
\par
 
2166
\par
 
2167
\begin{flushleft}
 
2168
\cl d\_time \r ::= NUMBERD \\
 
2169
                
 
2170
        \h \cs AUTOMATIC\\
 
2171
                
 
2172
        ;\\
 
2173
\end{flushleft}
 
2174
\par
 
2175
\par
 
2176
\begin{flushleft}
 
2177
\cl s\_time \r ::= NUMBERD\\
 
2178
                
 
2179
        \h \cs AUTOMATIC\\
 
2180
                
 
2181
        ;\\
 
2182
\end{flushleft}
 
2183
 
 
2184
\par
 
2185
\par
 
2186
\begin{flushleft}
 
2187
 
 
2188
\cl numberi \r ::= \cl number \r \\
 
2189
\h \cs \cl numberi \r \cl number \r \\
 
2190
 
 
2191
\end{flushleft}
 
2192
\par
 
2193
\par
 
2194
\begin{flushleft}
 
2195
 
 
2196
\cl numberd \r ::= \cl numberi \r . \cl numberi \r \\
 
2197
\h \cs . \cl numberi \r \\
 
2198
\h \cs \cl numberi \r . \\
 
2199
 
 
2200
\end{flushleft}
 
2201
\par
 
2202
\par
 
2203
\begin{flushleft}
 
2204
 
 
2205
\cl number \r  ::= digit from the set: 0,1,2,3,4,5,6,7,8,9\\
 
2206
 
 
2207
\end{flushleft}
 
2208
 
 
2209
 
 
2210
\newcommand{\med}{\hspace{2cm}}
 
2211
\chapter{Interpreter organization}
 
2212
\section{Instruction set of the virtual
 
2213
machine}\label{stroj}\index{instruction!set}
 
2214
 
 
2215
Notation:\index{notation}\\
 
2216
$ADR$- address of the memory cell\\
 
2217
%$ADR\_STACK$- the address stack register\\
 
2218
$AST$- the arithmetic stack register\\
 
2219
$BP$-  the base pointer, it is used in relative address
 
2220
mode\index{BP@{\bf BP}}\\ 
 
2221
$TMP$- the temporary stack register, it is used in
 
2222
addressing of temporary variables\\
 
2223
$TMPH$- the temporary stack register, it is used in
 
2224
resetting of the temporary stack\\
 
2225
$NUM$- offset in address or value\\
 
2226
$STRING$- a string\\
 
2227
%$INDEX$- offset in arrays\\
 
2228
$STACK$- the stack register\\ 
 
2229
$FRAME$- the stack register used in parameter passing to the intrinsic
 
2230
functions\\
 
2231
$[x]$- a value to which x points to\\ 
 
2232
%$[[$ $]]$- content of content of a cell\\
 
2233
\cl $integer$ \r- an integer literal\\
 
2234
\cl $double$ \r- a double precision floating point literal\\
 
2235
\cl $float$ \r- a single precision floating point literal\\
 
2236
\cl $char$ \r- a byte\\
 
2237
 
 
2238
Instructions have a variable length. The structure of the
 
2239
instructions is the following: major, minor, immediately.
 
2240
Immediately can be either address or value. In the
 
2241
following table is the summary of instruction types.
 
2242
 
 
2243
\begin{center}\label{instructions}
 
2244
\index{structure!OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}}
 
2245
\index{OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}} 
 
2246
\index{structure!OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}}
 
2247
\index{OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}}
 
2248
\index{structure!OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}}
 
2249
\index{OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}}
 
2250
\index{structure!OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}}
 
2251
\index{OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}}
 
2252
\index{structure!OPERAND\_1\_i@{\bf OPERAND\_1\_i}}
 
2253
\index{OPERAND\_1\_i@{\bf OPERAND\_1\_i}}
 
2254
\index{structure!OPERAND\_1\_id@{\bf OPERAND\_1\_id}}
 
2255
\index{OPERAND\_1\_id@{\bf OPERAND\_1\_id}}
 
2256
\index{structure!OPERAND\_1\_if@{\bf OPERAND\_1\_if}}
 
2257
\index{OPERAND\_1\_if@{\bf OPERAND\_1\_if}}
 
2258
\index{structure!OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}}
 
2259
\index{OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}}
 
2260
\begin{tabular}{|c|c|c|}
 
2261
\hline
 
2262
type & parameters & size \\ \hline \hline
 
2263
OP\_0\_ma & major & 1\\ \hline
 
2264
OP\_0\_mi & major & 2\\
 
2265
 & minor & \\ \hline
 
2266
OP\_1\_ma & major & 2\\
 
2267
 & address & \\ \hline
 
2268
OP\_1\_mi & major & 3\\
 
2269
 & minor & \\
 
2270
 & address & \\ \hline
 
2271
OP\_1\_i & major & 3\\
 
2272
 & minor & \\
 
2273
 & value & \\ \hline
 
2274
\end{tabular}
 
2275
\end{center}
 
2276
 
 
2277
\subsection{Address instructions and instructions on the
 
2278
arithmetic stack}\index{instruction!address}\index{instruction!on
 
2279
arithmetic stack}
 
2280
 
 
2281
Instruction {\bf MOV}\index{instruction!MOV@{\bf MOV}}.\\
 
2282
Description: move data from the specified address to another specified
 
2283
address. The addresses are specified either as 2 consecutive addresses
 
2284
on the arithmetical stack, or one address is on the arithmetical stack
 
2285
and the second is created in the temporary stack. \\
 
2286
Options:\\
 
2287
$[ADR] \longleftarrow [[AST]]$ \med type OP\_0\_mi\\
 
2288
The instruction is specific for each data type. We mean that the each
 
2289
instruction option represents a class of instructions. The
 
2290
instructions in each class differ by minor.  For example the very
 
2291
first option is specific for type of operand double, float, integer,
 
2292
char, etc.
 
2293
\newline 
 
2294
$BP \longleftarrow STACK$ \med type OP\_0\_mi\\ $STACK \longleftarrow
 
2295
BP$ \med type OP\_0\_mi\\ $TMPH \longleftarrow TMP$ \med type
 
2296
OP\_0\_mi\\ $FRAME \longleftarrow STACK$ \med type OP\_0\_mi\\
 
2297
$STACK \longleftarrow FRAME$ \med type OP\_0\_mi\\
 
2298
$[AST+1] \longleftarrow [AST]$ \med type OP\_0\_mi\\
 
2299
$[AST] \longleftarrow [[AST]]$ \med type OP\_0\_mi\\
 
2300
$[AST] \longleftarrow [AST]$ \med type OP\_0\_mi\\
 
2301
$[AST] \longleftarrow [(AST - 1) + [AST]]$ \med type OP\_0\_mi
 
2302
$[(AST - 2) + [AST]] \longleftarrow [(AST - 1) + [AST]]$ \med type
 
2303
OP\_0\_mi
 
2304
\newline 
 
2305
Instruction {\bf PUSHA}\index{instruction!PUSHA@{\bf PUSHA}}\\ 
 
2306
Description: PUSH in to the
 
2307
arithmetic stack.\\ Options:\\ $[AST] \longleftarrow [ADR]$ \med type
 
2308
OP\_1\_mi\\ $[AST] \longleftarrow [BP+NUM]$ \med type OP\_1\_i\\
 
2309
$[AST] \longleftarrow [[BP+NUM]]$ \med type OP\_1\_i\\ 
 
2310
instructions are specific for each data type. \\ \newline 
 
2311
Instruction {\bf PUSHAI}\index{instruction!PUSHAI@{\bf PUSHAI}}.\\
 
2312
Description: push onto the arithmetic stack
 
2313
immediately\\ Options:\\ $[[AST]] \longleftarrow NUM$ \med type
 
2314
OP\_1\_i\\ The instruction is specific for each data type. \\ $[[AST]]
 
2315
\longleftarrow STRING$ \med type OP\_1\_mi\\ \newline Instruction {\bf
 
2316
POPA}\index{instruction!POPA@{\bf POPA}}.\\ Description: POP from the arithmetic stack.\\ Options:\\ The
 
2317
arithmetic stack is cleared. \med type OP\_1\_mi\\ 
 
2318
The arithmetic stack is popped to the stack. \med type OP\_1\_i\\
 
2319
The instruction is implemented for each basic data type.
 
2320
\newline
 
2321
Instruction {\bf XCHG}\index{instruction!XCHG@{\bf XCHG}}\\
 
2322
Description: Exchange two addresses on the top of the arithmetic
 
2323
stack.\\
 
2324
Options:\\
 
2325
$[AST - 1] \longleftrightarrow [AST]$ \med type OP\_0\_ma\\
 
2326
%\newline 
 
2327
%$[STACK] \longleftarrow [AST]$ \med type OP\_0\_mi\\
 
2328
 
 
2329
\subsubsection{Arithmetic-logical
 
2330
instructions}\index{instruction!arithmetic-logical}
 
2331
 
 
2332
Address of the result is placed on the top of the
 
2333
arithmetic stack. Evaluation is placed into the temporary
 
2334
stack. Arithmetic-logical instructions are specific for
 
2335
each data type, if it is not stated otherwise in
 
2336
description of an instruction. 
 
2337
\newline
 
2338
Instruction {\bf ADD}\index{instruction!ADD@{\bf ADD}}.\\
 
2339
Description: perform arithmetic addition on the top of arithmetic
 
2340
stack or to the stack pointer. On the stack can be only processed an
 
2341
instruction mentioned below (to the stack pointer can be only added
 
2342
an integer number).\\Options:\\
 
2343
$[[AST-1]] \longleftarrow [[AST]]+[[AST-1]]$ \med type OP\_0\_mi\\
 
2344
$STACK \longleftarrow (STACK+NUM)$ \med type OP\_1\_i\\
 
2345
\newline
 
2346
Instruction {\bf SUB}\index{instruction!SUB@{\bf SUB}}.\\
 
2347
Description: perform arithmetic
 
2348
subtraction on the top of arithmetic stack or from the stack
 
2349
pointer. On the stack can be only processed an instruction
 
2350
mentioned below (from the stack pointer can be only subtracted
 
2351
an integer number).\\Options:\\ 
 
2352
$[[AST-1]] \longleftarrow [[AST-1]]-[[AST]]$ \med type OP\_0\_mi\\
 
2353
$STACK \longleftarrow (STACK-NUM)$ \med type OP\_1\_i\\
 
2354
\newline
 
2355
Instruction {\bf MULT}\index{instruction!MULT@{\bf MULT}}.\\
 
2356
Description: perform arithmetic
 
2357
multiplication.\\Options:\\
 
2358
$[[AST-1]] \longleftarrow [[AST]]*[[AST-1]]$ \med type OP\_0\_mi\\
 
2359
\newline
 
2360
Instruction {\bf MOD}\index{instruction!MOD@{\bf MOD}}.\\
 
2361
Description: perform arithmetic
 
2362
modulo operation on integers.\\Options:\\
 
2363
$[[AST-1]] \longleftarrow [[AST-1]]\%[[AST]]$ \med type OP\_0\_ma\\
 
2364
\newline
 
2365
Instruction {\bf DIV}\index{instruction!DIV@{\bf DIV}}.\\
 
2366
Description: perform arithmetic
 
2367
division.\\Options:\\ 
 
2368
$[[AST-1]] \longleftarrow [[AST-1]]/[[AST]]$ \med type OP\_0\_mi\\
 
2369
\newline
 
2370
Instruction {\bf OR}\index{instruction!OR@{\bf OR}}.\\
 
2371
Description: perform logical
 
2372
inclusive OR.\\Options:\\
 
2373
$[[AST-1]] \longleftarrow [[AST-1]] \quad || \quad [[AST]]$ \med type OP\_0\_mi\\
 
2374
\newline
 
2375
Instruction {\bf AND}\index{instruction!AND@{\bf AND}}.\\
 
2376
Description: perform logical
 
2377
AND.\\Options:\\
 
2378
$[[AST-1]] \longleftarrow [[AST-1]]\&\&[[AST]]$ \med type OP\_0\_mi\\
 
2379
\newline
 
2380
Instruction {\bf ORB}\index{instruction!ORB@{\bf ORB}}.\\
 
2381
Description: perform bitwise OR of
 
2382
integers.\\Options:\\ 
 
2383
$[[AST-1]] \longleftarrow [[AST-1]] \quad | \quad [[AST]]$ \med type OP\_0\_ma\\
 
2384
\newline
 
2385
Instruction {\bf ANDB}\index{instruction!ANDB@{\bf ANDB}}.\\
 
2386
Description: perform bitwise AND of
 
2387
integers.\\Options:\\
 
2388
$[[AST-1]] \longleftarrow [[AST-1]]\&[[AST]]$ \med type OP\_0\_ma\\
 
2389
\newline
 
2390
Instruction {\bf EQ}\index{instruction!EQ@{\bf EQ}}.\\
 
2391
Description: perform logical test
 
2392
for equality.\\Options:\\
 
2393
$[[AST-1]] \longleftarrow [[AST-1]]==[[AST]]$ \med type OP\_0\_mi\\
 
2394
\newline
 
2395
Instruction {\bf GR}\index{instruction!GR@{\bf GR}}.\\
 
2396
Description: perform logical test
 
2397
for greater than.\\Options:\\
 
2398
$[[AST-1]] \longleftarrow [[AST-1]]>[[AST]]$ \med type OP\_0\_mi\\
 
2399
\newline
 
2400
Instruction {\bf LO}\index{instruction!LO@{\bf LO}}.\\
 
2401
Description: perform logical test
 
2402
for lower than.\\Options:\\
 
2403
$[[AST-1]] \longleftarrow [[AST-1]]<[[AST]]$ \med type OP\_0\_mi\\
 
2404
\newline
 
2405
Instruction {\bf LE}\index{instruction!LE@{\bf LE}}.\\
 
2406
Description: perform logical test
 
2407
for lower or equal.\\Options:\\
 
2408
$[[AST-1]] \longleftarrow [[AST-1]]<=[[AST]]$ \med type OP\_0\_mi\\
 
2409
\newline
 
2410
Instruction {\bf GE}\index{instruction!GE@{\bf GE}}.\\
 
2411
Description: perform logical test
 
2412
for greater or equal.\\Options:\\
 
2413
$[[AST-1]] \longleftarrow [[AST-1]]>=[[AST]]$ \med type OP\_0\_mi\\
 
2414
\newline
 
2415
Instruction {\bf NE}\index{instruction!NE@{\bf NE}}.\\
 
2416
Description: perform logical test
 
2417
for non equal.\\Options:\\
 
2418
$[[AST-1]] \longleftarrow [[AST-1]]!=[[AST]]$ \med type OP\_0\_mi\\
 
2419
\newline
 
2420
Instruction {\bf NEG}\index{instruction!NEG@{\bf NEG}}.\\
 
2421
Description: perform logical
 
2422
negation.\\Options:\\
 
2423
$[[AST]] \longleftarrow ! \quad [[AST]]$ \med type OP\_0\_mi\\
 
2424
\newline
 
2425
Instruction {\bf NOT}\index{instruction!NOT@{\bf NOT}}.\\
 
2426
Description: perform one's
 
2427
complement operation of integers.\\Options:\\
 
2428
$[[AST]] \longleftarrow \tilde{} \quad [[AST]]$ \med OP\_0\_ma\\
 
2429
\newline
 
2430
Instruction {\bf SAL}\index{instruction!SAL@{\bf SAL}}.\\
 
2431
Description: perform arithmetic
 
2432
left shift of integers.\\Options:\\
 
2433
$[[AST-1]] \longleftarrow [[AST-1]] << [[AST]]$ \med OP\_0\_ma\\
 
2434
\newline
 
2435
Instruction {\bf SAR}\index{instruction!SAR@{\bf SAR}}.\\
 
2436
Description: perform arithmetic
 
2437
right shift of integers.\\Options:\\
 
2438
$[[AST-1]] \longleftarrow [[AST-1]] >> [[AST]]$ \med OP\_0\_ma\\
 
2439
\newline
 
2440
Instruction {\bf XOR}\index{instruction!XOR@{\bf XOR}}.\\
 
2441
Description: perform logical
 
2442
exclusive OR of two integers.\\Options:\\
 
2443
$[[AST-1]] \longleftarrow [[AST-1]] \quad \hat{} \quad [[AST]]$ \med OP\_0\_ma\\
 
2444
 
 
2445
\subsubsection{Integer and floating point
 
2446
instructions}\index{instruction!integer and floating point}
 
2447
 
 
2448
Instruction {\bf CVT}\index{instruction!CVT@{\bf CVT}}.\\
 
2449
Description: Convert a signed
 
2450
quantity to a different signed data type.\\Options:\\
 
2451
\cl $integer$ \r $\longrightarrow$ \cl $double$ \r\\
 
2452
\cl $double$ \r $\longrightarrow$ \cl $integer$ \r\\
 
2453
\cl $integer$ \r $\longrightarrow$ \cl $float$ \r\\
 
2454
\cl $float$ \r $\longrightarrow$ \cl $integer$ \r\\
 
2455
\cl $float$ \r $\longrightarrow$ \cl $double$ \r\\
 
2456
\cl $double$ \r $\longrightarrow$ \cl $float$ \r\\
 
2457
\cl $char$ \r $\longrightarrow$ \cl $integer$ \r\\
 
2458
\cl $integer$ \r $\longrightarrow$ \cl $char$ \r\\
 
2459
\cl $double$ \r $\longrightarrow$ \cl $char$ \r\\
 
2460
\cl $char$ \r $\longrightarrow$ \cl $double$ \r\\
 
2461
\cl $char$ \r $\longrightarrow$ \cl $float$ \r\\
 
2462
\cl $float$ \r $\longrightarrow$ \cl $char$ \r\\
 
2463
%\cl $void$ \r $\longrightarrow$ \cl $integer$ \r\\
 
2464
%\cl $void$ \r $\longrightarrow$ \cl $double$ \r\\
 
2465
%\cl $void$ \r $\longrightarrow$ \cl $float$ \r\\
 
2466
%\cl $void$ \r $\longrightarrow$ \cl $char$ \r\\
 
2467
The conversion to the wider type (more bits) can be executed either on
 
2468
the top of the arithmetical stack or one operand under the top
 
2469
of the arithmetical stack. Above instructions are of the type
 
2470
OP\_0\_mi. 
 
2471
 
 
2472
There are not listed all possibilities. Basically, there is an
 
2473
instruction from each type to every type.
 
2474
 
 
2475
\subsection{Stack instructions}\index{instruction!on stack}
 
2476
 
 
2477
Instruction {\bf PUSH}\index{instruction!PUSH@{\bf PUSH}}.\\
 
2478
Description: Push value onto the
 
2479
stack.\\Options:\\
 
2480
%$[STACK] \longleftarrow [AST]$ \med type OP\_0\_mi\\
 
2481
%\newline
 
2482
$[STACK] \longleftarrow BP$ \med type OP\_0\_mi\\
 
2483
\newline
 
2484
%$[STACK] \longleftarrow ADR$ \med type OP\_1\_mi\\
 
2485
%\newline
 
2486
$[STACK] \longleftarrow TMPH$ \med type OP\_0\_mi\\
 
2487
\newline
 
2488
$[STACK] \longleftarrow FRAME$ \med type OP\_0\_mi\\
 
2489
\newline
 
2490
Instruction {\bf POP}\index{instruction!POP@{\bf POP}}.\\
 
2491
Description: Pop value from the top
 
2492
of the stack.\\Options:\\
 
2493
$BP \longleftarrow [STACK]$ \med type OP\_0\_mi\\
 
2494
$TMPH \longleftarrow [STACK]$ \med type OP\_0\_mi\\
 
2495
$FRAME \longleftarrow [STACK]$ \med type OP\_0\_mi\\
 
2496
 
 
2497
%\subsection{Address stack instruction}
 
2498
 
 
2499
%Instruction {\bf PUSHAD}.\\Description: PUSH address into
 
2500
%the address stack.\\Options:\\
 
2501
%$[ADR\_STACK] \longleftarrow [AST]$ \med type OP\_0\_ma\\
 
2502
%\newline
 
2503
%$[ADR\_STACK] \longleftarrow (BP+NUM)$ \med type OP\_1\_i\\
 
2504
%\newline
 
2505
%$[ADR\_STACK] \longleftarrow [BP+NUM]$ \med type OP\_1\_i\\
 
2506
%\newline
 
2507
%$[ADR\_STACK] \longleftarrow STACK$ \med type OP\_0\_mi\\
 
2508
%\newline
 
2509
%Instruction {\bf POPAD}.\\Description: POP address from the
 
2510
%address stack.\\Options:\\
 
2511
%$[STACK] \longleftarrow [ADR\_STACK]$ \med type OP\_0\_ma\\
 
2512
 
 
2513
\subsection{Temporary stack instructions}\index{instruction!temporary stack}
 
2514
Instruction {\bf CLRT}\index{instruction!CLRT@{\bf CLRT}}.\\
 
2515
Description: Clear temporary
 
2516
stack.\\Options:\\ 
 
2517
$TMP \longleftarrow TMPH$ \med type OP\_0\_ma\\
 
2518
 
 
2519
\subsection{Input and output instructions}\index{instruction!input and
 
2520
output}\index{input!instruction}\index{output!instruction}
 
2521
 
 
2522
Instruction {\bf IN}\index{instruction!IN@{\bf IN}}.\\
 
2523
Description: input of the value into
 
2524
address; the address is specified absolutely or
 
2525
relatively.\\Options:\\
 
2526
$IN [ADR]$ \med type OP\_1\_mi\\
 
2527
$IN [BP+NUM]$ \med type OP\_1\_i\\
 
2528
$IN [[BP+NUM]]$ \med type OP\_1\_i\\
 
2529
$IN [ADR+[[AST - 1]]]$ \med type OP\_1\_mi\\
 
2530
$IN [BP+NUM+[[AST - 1]]]$ \med type OP\_1\_i\\
 
2531
$IN [[BP+NUM+[[AST - 1]]]]$ \med type OP\_1\_i\\
 
2532
\newline
 
2533
Instruction {\bf OUT}\index{instruction!OUT@{\bf OUT}}.\\
 
2534
Description: output of the content of the
 
2535
address; the address is specified absolutely or
 
2536
relatively.\\Options:\\
 
2537
$OUT [ADR]$ \med type OP\_1\_mi\\
 
2538
$OUT [BP+NUM]$ \med type OP\_1\_i\\
 
2539
$OUT [[BP+NUM]]$ \med type OP\_1\_i\\
 
2540
$OUT [ADR+[[AST - 1]]]$ \med type OP\_1\_mi\\
 
2541
$OUT [BP+NUM+[[AST - 1]]]$ \med type OP\_1\_i\\
 
2542
$OUT [[BP+NUM+[[AST - 1]]]]$ \med type OP\_1\_i\\
 
2543
\newline 
 
2544
Instruction {\bf MESS}\index{instruction!MESS@{\bf MESS}}.\\
 
2545
Description: put string message to
 
2546
the standard output.\\Options: type OP\_1\_ma\\
 
2547
 
 
2548
\subsection{Control instructions}\index{instruction!control}
 
2549
 
 
2550
Instruction {\bf STOP}\index{instruction!STOP@{\bf STOP}}.\\
 
2551
Description: signalization of
 
2552
end of the virtual machine run.\\Options: type
 
2553
OP\_0\_ma\\
 
2554
\newline
 
2555
Instruction {\bf INTER}\index{instruction!INTER@{\bf INTER}}.\\
 
2556
Description: indicating of
 
2557
synchronous interrupt.\\Options: type OP\_0\_ma\\
 
2558
\newline
 
2559
Instruction {\bf IRET}\index{instruction!IRET@{\bf IRET}}.\\
 
2560
Description: return from
 
2561
synchronous or asynchronous interrupt.\\Options: type
 
2562
OP\_0\_ma\\
 
2563
\newline
 
2564
Instruction {\bf JMP}\index{instruction!JMP@{\bf JMP}}.\\
 
2565
Description: jump to the address.\\
 
2566
Options: type OP\_1\_ma\\
 
2567
\newline
 
2568
Instruction {\bf JZ}\index{instruction!JZ@{\bf JZ}}.\\
 
2569
Description: If last operation is
 
2570
equal zero, jump to the address.\\Options: type OP\_1\_ma\\
 
2571
\newline
 
2572
Instruction {\bf JNZ}\index{instruction!JNZ@{\bf JNZ}}.\\
 
2573
Description: If last operation is
 
2574
not equal zero, jump to the address.\\Options: type
 
2575
OP\_1\_ma\\ 
 
2576
\newline
 
2577
Instruction {\bf HALT}\index{instruction!HALT@{\bf HALT}}.\\
 
2578
Description: system
 
2579
halt.\\Options: type OP\_0\_ma\\
 
2580
\newline
 
2581
Instruction {\bf CALL}\index{instruction!CALL@{\bf CALL}}.\\
 
2582
Description: call of a function. The function can be either user
 
2583
supplied one or intrinsic one. The intrinsic functions are either call
 
2584
by value or call by reference. \\Options: type OP\_1\_ma\\
 
2585
\newline
 
2586
Instruction {\bf RET}\index{instruction!RET@{\bf RET}}.\\
 
2587
Description: return from a
 
2588
function.\\Options: type OP\_0\_ma\\
 
2589
 
 
2590
 
 
2591
\section{Storage of variables, hash tables}\label{storage_and_hash}\index{variable!storage}
 
2592
 
 
2593
Local and global variable\index{variable!name} names and addresses are
 
2594
stored in hash\index{table!hashing}\index{hash!table} tables
 
2595
\cite{gries}. Structure record of the hash table for global variables
 
2596
is:
 
2597
 
 
2598
\begin{verbatim}
 
2599
 
 
2600
 
 
2601
struct tab                     /* Hash table structure. */
 
2602
{
 
2603
  char *name;
 
2604
  int def;                      /* Position in the hash table. */
 
2605
  int count;                    /* Is the variable used at all? */
 
2606
  int use_line_number;          /* The first use of the variable. */
 
2607
  int l_value_flag;             /* Is the variable initialized before
 
2608
                                   the use? */
 
2609
  int declaration_line;         /* Variable declaration line number. */
 
2610
  struct tab *next;
 
2611
}; 
 
2612
 
 
2613
 
 
2614
\end{verbatim}
 
2615
 
 
2616
\begin{verbatim}
 
2617
 
 
2618
 
 
2619
static struct tab *hastab;      /* Pointer to the hash table. */
 
2620
 
 
2621
 
 
2622
\end{verbatim}
 
2623
 
 
2624
 
 
2625
Another table is for global identifiers. Its structure is as
 
2626
follows:\\
 
2627
 
 
2628
\begin{verbatim}
 
2629
 
 
2630
 
 
2631
struct ident_tab              /* Table of identifiers. */
 
2632
{
 
2633
  struct internal_type *type;
 
2634
  int body;
 
2635
  struct ident_list_str *list_formal_param;
 
2636
  struct FIX *next;
 
2637
  char *adr;
 
2638
};
 
2639
 
 
2640
 
 
2641
\end{verbatim}
 
2642
 
 
2643
\begin{verbatim}
 
2644
 
 
2645
 
 
2646
static struct ident_tab *identtab;   /* Pointer to the table of identifiers. */
 
2647
 
 
2648
 
 
2649
\end{verbatim}
 
2650
 
 
2651
 
 
2652
The structure {\sf internal\_type}\index{variable!internal\_type} is
 
2653
used for type of a variable, e.g.  array\index{type!array},
 
2654
function\index{type!function} etc. The field {\sf body} flags if the
 
2655
variable is declared or defined.  The {\sf DIM} structure is for
 
2656
storing of dimensions of arrays\index{array!dimension} and has the
 
2657
following content:
 
2658
 
 
2659
\begin{verbatim}
 
2660
 
 
2661
 
 
2662
struct range
 
2663
{
 
2664
  int lower;
 
2665
  int upper;
 
2666
};
 
2667
 
 
2668
 
 
2669
 
 
2670
\end{verbatim}
 
2671
 
 
2672
 
 
2673
The structure\index{structure!fixing} {\sf FIX} is used for fixing of
 
2674
calls of the function and looks as follows:
 
2675
 
 
2676
\begin{verbatim}
 
2677
 
 
2678
 
 
2679
struct FIX                    /* List of addresses where to backpatch
 
2680
                               * undefined function.
 
2681
                               */
 
2682
{
 
2683
  char *address;
 
2684
  struct FIX *next;
 
2685
};
 
2686
 
 
2687
 
 
2688
\end{verbatim}
 
2689
 
 
2690
 
 
2691
It is a linked list. {\sf address} point to the virtual
 
2692
machine\index{virtual machine} code where the call address should be
 
2693
fixed.
 
2694
 
 
2695
The table\index{table!of local variables} of local variables is
 
2696
allocated when local variables are defined for the first time. Then,
 
2697
for each new block new table is allocated. After return to
 
2698
scope\index{scope!of variables} \index{scope!level} level zero the
 
2699
tables are deallocated. The table looks like:
 
2700
 
 
2701
\begin{verbatim}
 
2702
 
 
2703
 
 
2704
struct ident_tab_header
 
2705
{
 
2706
  int scope_level;
 
2707
  int pi_loc;
 
2708
  int offset;
 
2709
  char *file_scope;
 
2710
  struct ident_tab_header *previous_level;
 
2711
  struct ident_tab_loc *all;
 
2712
  struct tab *hastab_loc;
 
2713
  struct ident_tab_loc *table;
 
2714
};
 
2715
 
 
2716
struct ident_tab_loc          /* Table of local identifiers. */
 
2717
{
 
2718
  struct internal_type *type;
 
2719
  int body;
 
2720
  int offset;
 
2721
  char *adr;
 
2722
  struct ident_list_str *list_formal_param;
 
2723
  struct ident_tab_loc *previous;
 
2724
};
 
2725
 
 
2726
 
 
2727
\end{verbatim}
 
2728
 
 
2729
 
 
2730
The {\sf struct ident\_tab\_header} is header for the list of tables
 
2731
for local identifiers. {\sf scope\_level} is nesting level of the
 
2732
block. The zero level is the prime level. The {\sf offset} is size in
 
2733
bytes that has to be added to the offset of the local variable in
 
2734
nested scope (i.e. in the {\sf scope\_level} + 1, if the current level
 
2735
is {\sf scope\_level}). The {\sf previous\_level} points to the block
 
2736
{\sf scope\_level} - 1. The {\sf all} is a pointer to the list of all
 
2737
local variables. This list can be traversed and additional information
 
2738
can be found. The {\sf hastab\_loc} and {\sf table} point to the hash
 
2739
table and identifier table, respectively of the current level.
 
2740
 
 
2741
The {\sf struct ident\_tab\_loc} consists of:
 
2742
\begin{description}
 
2743
\item[type] - internal representation of type
 
2744
\item[offset] - offset of the variable in the current level
 
2745
\item[previous] - points to the previous declared variable
 
2746
\end{description}
 
2747
Pointer to the table is:
 
2748
 
 
2749
\begin{verbatim}
 
2750
 
 
2751
 
 
2752
static struct ident_tab_header
 
2753
*identtab_loc;                /* Pointer to the table of local identifiers. */
 
2754
 
 
2755
 
 
2756
\end{verbatim}
 
2757
 
 
2758
 
 
2759
The interpreter is always searching for variables in the table of the
 
2760
local identifiers. If the names do not match with searched name, the
 
2761
interpreter proceeds in the table\index{table!of global identifiers}
 
2762
of the global identifiers. If the interpreter does not find the name
 
2763
of the variable in the hash
 
2764
table\index{table!hashing}\index{hash!table}, it\index{interpreter}
 
2765
announces an error\index{error}.
 
2766
 
 
2767
Structures of the hash tables\index{table!hashing}\index{hash!table}
 
2768
of intrinsic functions\index{function!intrinsic} are the following:
 
2769
 
 
2770
\begin{verbatim}
 
2771
 
 
2772
 
 
2773
struct remote_tab             /* Hash table structure for intrinsic 
 
2774
                               * functions.
 
2775
                               */
 
2776
{
 
2777
  char *name;
 
2778
  void (*adr) PROTO((char **));
 
2779
  struct remote_tab *next;
 
2780
};
 
2781
 
 
2782
 
 
2783
\end{verbatim}
 
2784
 
 
2785
\begin{verbatim}
 
2786
 
 
2787
 
 
2788
struct remote_has_tab         /* Hash table structure for intrinsic
 
2789
                               * functions.
 
2790
                               */
 
2791
{
 
2792
  char *name;
 
2793
  int offset;
 
2794
  struct remote_has_tab *next;
 
2795
};
 
2796
 
 
2797
 
 
2798
\end{verbatim}
 
2799
 
 
2800
 
 
2801
Intrinsic functions are initially stored in the list\index{list} {\sf
 
2802
remote\_tab}. The functions are loaded from this list into the hash
 
2803
table\index{table!hashing}\index{hash!table} of the {\sf
 
2804
remote\_has\_tab} structure. Pointers to these structures are:
 
2805
 
 
2806
\begin{verbatim}
 
2807
 
 
2808
 
 
2809
struct remote_has_tab *hastab_remote;
 
2810
 
 
2811
 
 
2812
\end{verbatim}
 
2813
 
 
2814
\begin{verbatim}
 
2815
 
 
2816
 
 
2817
struct remote_tab 
 
2818
*remote_ptr_C;                /* Pointer to the structure of remote 
 
2819
                               * function table.
 
2820
                               */
 
2821
 
 
2822
 
 
2823
\end{verbatim}
 
2824
 
 
2825
 
 
2826
Hash function\index{function!hashing}\index{hash!function}
 
2827
\index{hash!code} is as follows:
 
2828
 
 
2829
\begin{verbatim}
 
2830
 
 
2831
 
 
2832
/*
 
2833
 * Hash function.
 
2834
 */
 
2835
static unsigned int
 
2836
hash_code (s, size)
 
2837
  char           *s;
 
2838
  unsigned int size;
 
2839
{
 
2840
  int             c = 0;
 
2841
 
 
2842
  while (*s)
 
2843
    {
 
2844
      c = c << 1 ^ (*s);
 
2845
      s++;
 
2846
    }
 
2847
  if (0 > c)
 
2848
    c = (-c);
 
2849
  return (c % size);
 
2850
}
 
2851
 
 
2852
 
 
2853
\end{verbatim}
 
2854
 
 
2855
 
 
2856
\noindent
 
2857
$MAX\_HAS$ is size of the hash
 
2858
table\index{table!hashing}\index{hash!table}.
 
2859
 
 
2860
In addition, there is a table of defined types\index{type}:
 
2861
 
 
2862
\begin{verbatim}
 
2863
 
 
2864
 
 
2865
static struct ident_tab_header 
 
2866
*tagtab;                        /* Pointer to the table of tags. */
 
2867
 
 
2868
 
 
2869
\end{verbatim}
 
2870
 
 
2871
%\input{tables_c_hastab_type.tex}
 
2872
 
 
2873
In this table are stored new types and structure tags, etc. For
 
2874
types, the lazy allocation is used, i.e. table is allocated only when
 
2875
first type is declared or defined.
 
2876
 
 
2877
\section{F\/ixation and f\/ixative
 
2878
structures}\index{structure!fixing}\index{fixation} \label{fixation}
 
2879
\index{file!control.h}
 
2880
 
 
2881
We use f\/ixation in the statements \index{statement!if@{\sf if}}
 
2882
\index{statement!while@{\sf while}} \index{statement!for@{\sf for}}
 
2883
\index{statement!continue@{\sf continue}} \index{statement!break@{\sf
 
2884
break}} \index{statement!return@{\sf return}}
 
2885
\index{statement!switch@{\sf switch}}{\sf if, while, for,
 
2886
  continue, break}, {\sf return} and {\sf switch}. The f\/ixation are
 
2887
used in the loop statements\index{loop!statement} because of nested
 
2888
loops\index{loop!nested} or unknown length of the, loop respectively.
 
2889
 
 
2890
Fixative structures are following:
 
2891
 
 
2892
\begin{verbatim}
 
2893
 
 
2894
 
 
2895
/* 
 
2896
 * control.h
 
2897
 * 
 
2898
 * Header of fixative structures.
 
2899
 */
 
2900
 
 
2901
#ifndef _CONTROL_H
 
2902
#define _CONTROL_H
 
2903
 
 
2904
typedef struct
 
2905
        {
 
2906
         int major;
 
2907
         char *jmp;
 
2908
         char *jz;
 
2909
         struct cont1 *cnext; 
 
2910
         struct break1 *bnext;
 
2911
        } WHILE1;
 
2912
 
 
2913
typedef struct
 
2914
        {
 
2915
         int major;
 
2916
         char *jn;              /* Label of the JZ */
 
2917
         char *jmp2;            /* Label of the JMP. The first JMP */
 
2918
                                /* instruction. It is between expr2 */
 
2919
                                /* and expr3. */
 
2920
         char *jmp3;            /* Address where to jump if all */
 
2921
                                /* statements of the loop are */
 
2922
                                /* done. (See manual) */
 
2923
         struct break1 *bnext;
 
2924
         struct cont1 *cnext;
 
2925
        } FOR1;
 
2926
 
 
2927
struct break1 
 
2928
        {
 
2929
         char *adr;
 
2930
         struct break1 *next;
 
2931
        };
 
2932
 
 
2933
struct cont1 
 
2934
        {
 
2935
         char *adr;
 
2936
         struct cont1 *next;
 
2937
        };
 
2938
 
 
2939
typedef struct
 
2940
        {
 
2941
         int major;
 
2942
         char *jz;
 
2943
         char *jmp;
 
2944
        } IF1;
 
2945
 
 
2946
struct default_usage
 
2947
        {
 
2948
          int line_number;      /* Line number where the default label
 
2949
                                   was used. */
 
2950
          int def_flag;         /* Flag if the default label was used.
 
2951
                                   It can be used only once per switch
 
2952
                                   statement. (ANSI) */
 
2953
          char *adr;            /* Address where to jump to in the
 
2954
                                   virtual machine code. */
 
2955
        };
 
2956
 
 
2957
typedef struct
 
2958
        {
 
2959
          int major;
 
2960
          char *jz;
 
2961
          char *jmp;
 
2962
          struct default_usage def_use;
 
2963
          struct break1 *bnext;
 
2964
          struct list_const1 *next;
 
2965
        } SWITCH1;
 
2966
 
 
2967
struct list_const1              /* The list of labels in switch
 
2968
                                   statement is created. The list is
 
2969
                                   at the end of switch statement
 
2970
                                   checked if labels in this list are
 
2971
                                   not duplicit. If there are duplicit
 
2972
                                   error message is issued. */
 
2973
        {
 
2974
          int line_number;      /* Line number where the label was
 
2975
                                   used in the switch statement. */
 
2976
          int constant;         /* Label in switch statement. */
 
2977
          struct list_const1 *next;
 
2978
        };
 
2979
 
 
2980
union fix
 
2981
        {
 
2982
         WHILE1 while1;
 
2983
         FOR1 for1;
 
2984
         IF1 if1;
 
2985
         SWITCH1 switch1;
 
2986
        };
 
2987
 
 
2988
 
 
2989
\end{verbatim}
 
2990
 
 
2991
\begin{verbatim}
 
2992
 
 
2993
 
 
2994
union fix *fixp;              /* Pointer to the fixative stack. */
 
2995
 
 
2996
 
 
2997
\end{verbatim}
 
2998
 
 
2999
 
 
3000
The fixation of {\sf for} statement is fully optimized, i.e. there are
 
3001
no jumps on jumps. It is tested if all parts, i.e. expr2 and expr3 are
 
3002
in the {\sf for} statement. 
 
3003
 
 
3004
The statement\index{statement!break@{\sf
 
3005
break}}\index{statement!continue@{\sf continue}} {\sf break, continue}
 
3006
are fixed to the end of the most inner loop.
 
3007
 
 
3008
Another case is the statement {\sf return}\index{statement!return@{\sf
 
3009
return}}. The f\/ixation is made another way as it is mentioned
 
3010
above. The f\/ixative structure is:
 
3011
 
 
3012
\begin{verbatim}
 
3013
 
 
3014
 
 
3015
struct return1                /* List of addresses where to backpatch 
 
3016
                               * returns from a function.
 
3017
                               */
 
3018
{
 
3019
  char *adr;
 
3020
  struct return1 *next;
 
3021
};
 
3022
 
 
3023
 
 
3024
\end{verbatim}
 
3025
 
 
3026
\begin{verbatim}
 
3027
 
 
3028
 
 
3029
struct return1 *rp;             /* Pointer for backpatch address of */
 
3030
                                /* return in a function. */
 
3031
 
 
3032
 
 
3033
\end{verbatim}
 
3034
 
 
3035
 
 
3036
The epilogue of the procedure is fixed in this case (i.e. the epilogue
 
3037
is always executed, before the control flow reaches caller).
 
3038
 
 
3039
The statement {\sf switch}\index{statement!switch@{\sf switch}} has
 
3040
complicated fixative structure. You can follow it in the comments
 
3041
attached to the fixative structure. It can be be clearer from the
 
3042
fig.~\ref{obr8} as well.
 
3043
 
 
3044
See figures \ref{obr2}, \ref{obr3}, \ref{obr4}, \ref{obr5},
 
3045
\ref{obr6}, \ref{obr7}, \ref{obr8} for the all cases of the
 
3046
f\/ixations.
 
3047
 
 
3048
\begin{figure} 
 
3049
\begin{center}
 
3050
\unitlength=1.00mm
 
3051
%\special{em:linewidth 0.4pt}
 
3052
\linethickness{0.4pt}
 
3053
\begin{picture}(65.00,48.00)
 
3054
\put(25.00,39.20){\makebox(0,0)[cc]{while ( expr )}}
 
3055
\put(25.00,31.20){\makebox(0,0)[cc]{\{}}
 
3056
\put(25.00,23.20){\makebox(0,0)[cc]{stat}}
 
3057
\put(25.00,15.20){\makebox(0,0)[cc]{\}}}
 
3058
\put(25.00,4.80){\makebox(0,0)[cc]{....}}
 
3059
\put(25.00,44.80){\vector(0,1){3.20}}
 
3060
\put(25.00,48.00){\vector(1,0){36.00}}
 
3061
\put(65.00,32.00){\makebox(0,0)[cc]{jz}}
 
3062
\put(61.00,48.00){\vector(0,-1){37.60}}
 
3063
\put(61.00,10.40){\vector(-1,0){30.00}}
 
3064
\put(19.00,15.00){\vector(-1,0){9.00}}
 
3065
\put(10.00,15.00){\vector(0,1){24.00}}
 
3066
\put(5.00,28.00){\makebox(0,0)[cc]{jmp}}
 
3067
\put(10.00,39.00){\vector(1,0){2.00}}
 
3068
\end{picture}
 
3069
 
 
3070
\unitlength=1.00mm
 
3071
%\special{em:linewidth 0.4pt}
 
3072
\linethickness{0.4pt}
 
3073
\begin{picture}(47.00,44.00)
 
3074
\put(20.00,34.00){\framebox(20.00,5.00)[cc]{expr}}
 
3075
\put(30.00,29.00){\makebox(0,0)[cc]{jz JZ}}
 
3076
\put(20.00,19.00){\framebox(20.00,5.00)[cc]{stat}}
 
3077
\put(30.00,14.00){\makebox(0,0)[cc]{jmp JMP}}
 
3078
\put(30.00,44.00){\vector(0,-1){5.00}}
 
3079
\put(30.00,34.00){\vector(0,-1){2.00}}
 
3080
\put(30.00,26.00){\vector(0,-1){2.00}}
 
3081
\put(30.00,19.00){\vector(0,-1){2.00}}
 
3082
\put(30.00,11.00){\vector(0,-1){6.00}}
 
3083
\put(30.00,10.00){\vector(-1,0){15.00}}
 
3084
\put(15.00,10.00){\vector(0,1){32.00}}
 
3085
\put(15.00,42.00){\vector(1,0){15.00}}
 
3086
\put(35.00,29.00){\vector(1,0){12.00}}
 
3087
\put(47.00,29.00){\vector(0,-1){21.00}}
 
3088
\put(47.00,8.00){\vector(-1,0){17.00}}
 
3089
\end{picture}
 
3090
 
 
3091
\caption[F\/ixation in {\sf while}]{F\/ixation in {\sf while}} \label{obr2}
 
3092
\end{center}
 
3093
\end{figure}
 
3094
\begin{figure}
 
3095
\begin{center}
 
3096
\unitlength=1.00mm
 
3097
%\special{em:linewidth 0.4pt}
 
3098
\linethickness{0.4pt}
 
3099
\begin{picture}(91.00,56.80)
 
3100
\put(45.00,37.60){\makebox(0,0)[cc]{for ( expr1; expr2; expr3 )}}
 
3101
\put(45.00,29.60){\makebox(0,0)[cc]{\{}}
 
3102
\put(45.00,21.60){\makebox(0,0)[cc]{stat}}
 
3103
\put(45.00,13.60){\makebox(0,0)[cc]{\}}}
 
3104
\put(45.00,4.80){\makebox(0,0)[cc]{....}}
 
3105
\put(45.00,44.80){\vector(0,1){5.60}}
 
3106
\put(45.00,50.40){\vector(0,1){6.40}}
 
3107
\put(45.00,56.80){\vector(1,0){43.00}}
 
3108
\put(88.00,56.80){\vector(0,-1){47.20}}
 
3109
\put(88.00,9.60){\vector(-1,0){37.00}}
 
3110
\put(91.00,33.60){\makebox(0,0)[cc]{jn}}
 
3111
\put(41.00,14.40){\vector(-1,0){21.00}}
 
3112
\put(20.00,14.40){\vector(0,1){32.00}}
 
3113
\put(20.00,46.40){\vector(1,0){23.00}}
 
3114
\put(43.00,46.40){\vector(0,-1){2.40}}
 
3115
\put(45.00,50.40){\vector(1,0){24.00}}
 
3116
\put(69.00,50.40){\vector(0,-1){20.80}}
 
3117
\put(69.00,29.60){\vector(-1,0){18.00}}
 
3118
\put(76.00,40.00){\makebox(0,0)[cc]{jmp1}}
 
3119
\put(14.00,20.00){\makebox(0,0)[cc]{jmp3}}
 
3120
\put(41.00,34.40){\vector(-1,0){21.00}}
 
3121
\put(29.00,30.40){\makebox(0,0)[cc]{jmp2}}
 
3122
\end{picture}
 
3123
 
 
3124
\hspace{0.5cm}
 
3125
{\setlength{\unitlength}{0.00937500in}%
 
3126
%
 
3127
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
3128
% extract first six characters in \fmtname
 
3129
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
3130
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
3131
\ifx\x\y   % LaTeX or SliTeX?
 
3132
\gdef\SetFigFont#1#2#3{%
 
3133
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
3134
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
3135
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
3136
     \huge\fi\fi\fi\fi\fi\fi
 
3137
  \csname #3\endcsname}%
 
3138
\else
 
3139
\gdef\SetFigFont#1#2#3{\begingroup
 
3140
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
3141
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
3142
  \expandafter\x
 
3143
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
3144
    \csname @\romannumeral\the\count@ pt\endcsname
 
3145
  \csname #3\endcsname}%
 
3146
\fi
 
3147
\fi\endgroup
 
3148
\begin{picture}(137,334)(31,478)
 
3149
\thinlines
 
3150
\put( 60,780){\framebox(60,30){}}
 
3151
\put( 60,720){\framebox(60,30){}}
 
3152
\put( 60,630){\framebox(60,30){}}
 
3153
\put( 60,540){\framebox(60,30){}}
 
3154
\put( 90,780){\line( 0,-1){ 30}}
 
3155
\put( 90,720){\line( 0,-1){  9}}
 
3156
\put( 90,675){\line( 0,-1){ 15}}
 
3157
\put( 90,606){\line( 0,-1){ 36}}
 
3158
\put( 90,513){\vector( 0,-1){ 33}}
 
3159
\put( 72,702){\line(-1, 0){ 30}}
 
3160
\put( 42,702){\line( 0,-1){198}}
 
3161
\put( 42,504){\vector( 1, 0){ 48}}
 
3162
\put(117,681){\line( 1, 0){ 18}}
 
3163
\put(135,681){\line( 0,-1){ 93}}
 
3164
\put(135,588){\vector(-1, 0){ 45}}
 
3165
\put(108,525){\line( 1, 0){ 48}}
 
3166
\put(156,525){\line( 0, 1){144}}
 
3167
\put(156,669){\vector(-1, 0){ 66}}
 
3168
\put( 72,618){\line(-1, 0){ 39}}
 
3169
\put( 33,618){\line( 0, 1){141}}
 
3170
\put( 33,759){\vector( 1, 0){ 57}}
 
3171
\put( 90,792){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3172
  \smash{%
 
3173
    expr1}%
 
3174
  }}
 
3175
\put( 90,732){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3176
  \smash{%
 
3177
    expr2}%
 
3178
  }}
 
3179
\put( 90,696){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3180
  \smash{%
 
3181
    jn JZ}%
 
3182
  }}
 
3183
\put( 90,678){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3184
  \smash{%
 
3185
    jmp2 JMP}%
 
3186
  }}
 
3187
\put( 90,642){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3188
  \smash{%
 
3189
    expr3}%
 
3190
  }}
 
3191
\put( 90,612){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3192
  \smash{%
 
3193
    JMP}%
 
3194
  }}
 
3195
\put( 90,552){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3196
  \smash{%
 
3197
    stat}%
 
3198
  }}
 
3199
\put( 90,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3200
  \smash{%
 
3201
    JMP}%
 
3202
  }}
 
3203
\put( 60,762){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3204
  \smash{%
 
3205
    jmp1}%
 
3206
  }}
 
3207
\put(156,672){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
3208
  \smash{%
 
3209
    jmp3}%
 
3210
  }}
 
3211
\end{picture}}%
 
3212
 
 
3213
 
 
3214
\caption[F\/ixation in {\sf for}]{F\/ixation in {\sf for}} \label{obr3}
 
3215
\end{center}
 
3216
\end{figure}
 
3217
\begin{figure}
 
3218
\begin{center}
 
3219
\unitlength=1.00mm
 
3220
%\special{em:linewidth 0.4pt}
 
3221
\linethickness{0.4pt}
 
3222
\begin{picture}(33.00,85.59)
 
3223
\put(5.00,71.19){\makebox(0,0)[cc]{if ( expr )}}
 
3224
\put(5.00,63.19){\makebox(0,0)[cc]{\{}}
 
3225
\put(5.00,55.19){\makebox(0,0)[cc]{stat1}}
 
3226
\put(5.00,47.19){\makebox(0,0)[cc]{\}}}
 
3227
\put(5.00,39.19){\makebox(0,0)[cc]{else}}
 
3228
\put(5.00,31.19){\makebox(0,0)[cc]{\{}}
 
3229
\put(5.00,23.20){\makebox(0,0)[cc]{stat2}}
 
3230
\put(5.00,15.20){\makebox(0,0)[cc]{\}}}
 
3231
\put(5.00,4.80){\makebox(0,0)[cc]{....}}
 
3232
\put(5.00,76.79){\vector(0,1){8.80}}
 
3233
\put(5.00,85.59){\vector(1,0){25.00}}
 
3234
\put(30.00,85.59){\vector(0,-1){46.40}}
 
3235
\put(30.00,39.19){\vector(-1,0){19.00}}
 
3236
\put(33.00,61.59){\makebox(0,0)[cc]{jz}}
 
3237
\put(11.00,48.00){\vector(1,0){10.00}}
 
3238
\put(21.00,48.00){\vector(0,-1){37.00}}
 
3239
\put(21.00,11.00){\vector(-1,0){10.00}}
 
3240
\put(26.00,26.00){\makebox(0,0)[cc]{jmp}}
 
3241
\end{picture}
 
3242
 
 
3243
\unitlength=1.00mm
 
3244
%\special{em:linewidth 0.4pt}
 
3245
\linethickness{0.4pt}
 
3246
\begin{picture}(50.00,50.00)
 
3247
\put(25.00,40.00){\framebox(20.00,5.00)[cc]{expr}}
 
3248
\put(35.00,35.00){\makebox(0,0)[cc]{jz JZ}}
 
3249
\put(25.00,25.00){\framebox(20.00,5.00)[cc]{stat1}}
 
3250
\put(35.00,20.00){\makebox(0,0)[cc]{jmp JMP}}
 
3251
\put(25.00,10.00){\framebox(20.00,5.00)[cc]{stat2}}
 
3252
\put(35.00,50.00){\vector(0,-1){5.00}}
 
3253
\put(35.00,40.00){\vector(0,-1){2.00}}
 
3254
\put(35.00,32.00){\vector(0,-1){2.00}}
 
3255
\put(35.00,25.00){\vector(0,-1){2.00}}
 
3256
\put(35.00,17.00){\vector(0,-1){2.00}}
 
3257
\put(35.00,10.00){\vector(0,-1){5.00}}
 
3258
\put(42.00,35.00){\vector(1,0){8.00}}
 
3259
\put(50.00,35.00){\vector(0,-1){18.00}}
 
3260
\put(50.00,17.00){\vector(-1,0){15.00}}
 
3261
\put(20.00,20.00){\vector(0,-1){13.00}}
 
3262
\put(20.00,7.00){\vector(1,0){15.00}}
 
3263
\put(24.00,20.00){\vector(-1,0){4.00}}
 
3264
\end{picture}
 
3265
 
 
3266
\caption[F\/ixation in {\sf if}]{F\/ixation in {\sf if}} \label{obr4}
 
3267
\end{center}
 
3268
\end{figure}
 
3269
\begin{figure}
 
3270
\begin{center}
 
3271
\unitlength=1.00mm
 
3272
%\special{em:linewidth 0.4pt}
 
3273
\linethickness{0.4pt}
 
3274
\begin{picture}(29.00,38.40)
 
3275
\put(5.00,38.40){\makebox(0,0)[cc]{\{}}
 
3276
\put(5.00,30.40){\makebox(0,0)[cc]{....}}
 
3277
\put(5.00,22.40){\makebox(0,0)[cc]{continue;}}
 
3278
\put(5.00,14.40){\makebox(0,0)[cc]{....}}
 
3279
\put(5.00,6.40){\makebox(0,0)[cc]{\}}}
 
3280
\put(24.00,23.20){\vector(0,-1){16.00}}
 
3281
\put(24.00,7.20){\vector(-1,0){13.00}}
 
3282
\put(29.00,16.00){\makebox(0,0)[cc]{jmp}}
 
3283
\put(16.00,23.20){\vector(1,0){8.00}}
 
3284
\end{picture}
 
3285
 
 
3286
\caption[F\/ixation of {\sf continue}]{F\/ixation of {\sf continue}} \label{obr5}
 
3287
\end{center}
 
3288
\end{figure}
 
3289
\begin{figure}
 
3290
\begin{center}
 
3291
\unitlength=1.00mm
 
3292
%\special{em:linewidth 0.4pt}
 
3293
\linethickness{0.4pt}
 
3294
\begin{picture}(31.00,47.20)
 
3295
\put(5.00,47.20){\makebox(0,0)[cc]{\{}}
 
3296
\put(5.00,39.20){\makebox(0,0)[cc]{....}}
 
3297
\put(5.00,31.20){\makebox(0,0)[cc]{break;}}
 
3298
\put(5.00,23.20){\makebox(0,0)[cc]{....}}
 
3299
\put(5.00,15.20){\makebox(0,0)[cc]{\}}}
 
3300
\put(5.00,5.60){\makebox(0,0)[cc]{....}}
 
3301
\put(11.00,32.00){\vector(1,0){15.00}}
 
3302
\put(26.00,32.00){\vector(0,-1){20.80}}
 
3303
\put(26.00,11.20){\vector(-1,0){15.00}}
 
3304
\put(31.00,21.60){\makebox(0,0)[cc]{jmp}}
 
3305
\end{picture}
 
3306
 
 
3307
\caption[F\/ixation of {\sf break}]{F\/ixation of {\sf break}} \label{obr6}
 
3308
\end{center}
 
3309
\end{figure}
 
3310
\begin{figure}
 
3311
\begin{center}
 
3312
\unitlength=1.00mm
 
3313
%\special{em:linewidth 0.4pt}
 
3314
\linethickness{0.4pt}
 
3315
\begin{picture}(34.00,47.99)
 
3316
\put(5.00,47.99){\makebox(0,0)[cc]{\{}}
 
3317
\put(5.00,39.99){\makebox(0,0)[cc]{....}}
 
3318
\put(5.00,31.99){\makebox(0,0)[cc]{return ( expr );}}
 
3319
\put(5.00,23.99){\makebox(0,0)[cc]{....}}
 
3320
\put(5.00,15.99){\makebox(0,0)[cc]{\}}}
 
3321
\put(5.00,6.39){\makebox(0,0)[cc]{....}}
 
3322
\put(29.00,32.79){\vector(0,-1){16.00}}
 
3323
\put(29.00,16.79){\vector(-1,0){19.00}}
 
3324
\put(34.00,24.80){\makebox(0,0)[cc]{jmp}}
 
3325
\put(19.00,32.80){\vector(1,0){10.00}}
 
3326
\end{picture}
 
3327
 
 
3328
\caption[F\/ixation of {\sf return}]{F\/ixation of {\sf return}} \label{obr7}
 
3329
\end{center}
 
3330
\end{figure}
 
3331
\begin{figure}
 
3332
\begin{center}
 
3333
{\setlength{\unitlength}{0.01250000in}%
 
3334
%
 
3335
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
3336
% extract first six characters in \fmtname
 
3337
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
3338
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
3339
\ifx\x\y   % LaTeX or SliTeX?
 
3340
\gdef\SetFigFont#1#2#3{%
 
3341
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
3342
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
3343
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
3344
     \huge\fi\fi\fi\fi\fi\fi
 
3345
  \csname #3\endcsname}%
 
3346
\else
 
3347
\gdef\SetFigFont#1#2#3{\begingroup
 
3348
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
3349
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
3350
  \expandafter\x
 
3351
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
3352
    \csname @\romannumeral\the\count@ pt\endcsname
 
3353
  \csname #3\endcsname}%
 
3354
\fi
 
3355
\fi\endgroup
 
3356
\begin{picture}(132,147)(60,673)
 
3357
\put( 60,810){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3358
  \smash{%
 
3359
    switch (expr)}%
 
3360
  }}
 
3361
\put( 90,795){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3362
  \smash{%
 
3363
    $\{$}%
 
3364
  }}
 
3365
\put( 90,780){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3366
  \smash{%
 
3367
    case const\_expr\_1 : stat\_1 ;}%
 
3368
  }}
 
3369
\put(192,765){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3370
  \smash{%
 
3371
    break;}%
 
3372
  }}
 
3373
\put( 90,750){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3374
  \smash{%
 
3375
    case const\_expr\_2 : stat\_2 ;}%
 
3376
  }}
 
3377
\put( 90,735){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3378
  \smash{%
 
3379
    case const\_expr\_3 : stat\_3 ;}%
 
3380
  }}
 
3381
\put(192,720){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3382
  \smash{%
 
3383
    break ;}%
 
3384
  }}
 
3385
\put( 90,705){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3386
  \smash{%
 
3387
    default : stat\_4 ;}%
 
3388
  }}
 
3389
\put(135,690){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3390
  \smash{%
 
3391
    break;}%
 
3392
  }}
 
3393
\put( 90,675){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
3394
  \smash{%
 
3395
    $\}$}%
 
3396
  }}
 
3397
\end{picture}}%
 
3398
 
 
3399
 
 
3400
\hspace{2.5cm}
 
3401
{\setlength{\unitlength}{0.00750000in}%
 
3402
%
 
3403
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
3404
% extract first six characters in \fmtname
 
3405
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
3406
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
3407
\ifx\x\y   % LaTeX or SliTeX?
 
3408
\gdef\SetFigFont#1#2#3{%
 
3409
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
3410
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
3411
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
3412
     \huge\fi\fi\fi\fi\fi\fi
 
3413
  \csname #3\endcsname}%
 
3414
\else
 
3415
\gdef\SetFigFont#1#2#3{\begingroup
 
3416
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
3417
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
3418
  \expandafter\x
 
3419
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
3420
    \csname @\romannumeral\the\count@ pt\endcsname
 
3421
  \csname #3\endcsname}%
 
3422
\fi
 
3423
\fi\endgroup
 
3424
\begin{picture}(103,637)(40,199)
 
3425
\thinlines
 
3426
\put( 90,636){\line( 0,-1){  6}}
 
3427
\put( 90,630){\line(-1, 0){ 48}}
 
3428
\put( 42,630){\line( 0,-1){417}}
 
3429
\put( 42,213){\vector( 1, 0){ 48}}
 
3430
\put( 90,318){\line( 0,-1){ 12}}
 
3431
\put( 90,306){\vector(-1, 0){ 48}}
 
3432
\put( 90,402){\vector( 0,-1){ 12}}
 
3433
\put( 90,216){\vector( 0,-1){ 15}}
 
3434
\put( 90,258){\vector( 0,-1){ 12}}
 
3435
\put(120,735){\line( 1, 0){ 21}}
 
3436
\put(141,735){\line( 0,-1){111}}
 
3437
\put(141,624){\line(-1, 0){ 51}}
 
3438
\put( 90,624){\vector( 0,-1){ 24}}
 
3439
\put( 60,360){\framebox(60,30){}}
 
3440
\put( 60,258){\framebox(60,30){}}
 
3441
\put(120,417){\line( 1, 0){ 18}}
 
3442
\put(138,417){\line( 0,-1){117}}
 
3443
\put(138,300){\line(-1, 0){ 48}}
 
3444
\put( 90,300){\vector( 0,-1){ 12}}
 
3445
\put( 90,360){\vector( 0,-1){ 12}}
 
3446
\put( 60,570){\framebox(60,30){}}
 
3447
\put( 60,528){\framebox(60,30){}}
 
3448
\put( 60,486){\framebox(60,30){}}
 
3449
\put( 60,444){\framebox(60,30){}}
 
3450
\put( 60,402){\framebox(60,30){}}
 
3451
\put( 90,570){\vector( 0,-1){ 12}}
 
3452
\put( 90,528){\vector( 0,-1){ 12}}
 
3453
\put( 90,444){\vector( 0,-1){ 12}}
 
3454
\put( 60,804){\framebox(60,30){}}
 
3455
\put( 60,762){\framebox(60,30){}}
 
3456
\put( 60,720){\framebox(60,30){}}
 
3457
\put( 60,678){\framebox(60,30){}}
 
3458
\put( 60,636){\framebox(60,30){}}
 
3459
\put( 90,804){\vector( 0,-1){ 12}}
 
3460
\put( 90,762){\vector( 0,-1){ 12}}
 
3461
\put( 90,720){\vector( 0,-1){ 12}}
 
3462
\put( 90,678){\vector( 0,-1){ 12}}
 
3463
\put( 60,216){\framebox(60,30){}}
 
3464
\put( 60,318){\framebox(60,30){}}
 
3465
\put(120,543){\line( 1, 0){ 18}}
 
3466
\put(138,543){\line( 0,-1){ 63}}
 
3467
\put(138,480){\line(-1, 0){ 48}}
 
3468
\put( 90,480){\vector( 0,-1){  6}}
 
3469
\put( 60,501){\line(-1, 0){  9}}
 
3470
\put( 51,501){\line( 0,-1){105}}
 
3471
\put( 51,396){\vector( 1, 0){ 39}}
 
3472
\put(132,426){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3473
  \smash{%
 
3474
    -}%
 
3475
  }}
 
3476
\put(132,741){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3477
  \smash{%
 
3478
    -}%
 
3479
  }}
 
3480
\put(129,552){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3481
  \smash{%
 
3482
    -}%
 
3483
  }}
 
3484
\put( 90,813){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3485
  \smash{%
 
3486
    expr}%
 
3487
  }}
 
3488
\put( 90,732){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3489
  \smash{%
 
3490
    ==}%
 
3491
  }}
 
3492
\put( 90,648){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3493
  \smash{%
 
3494
    break}%
 
3495
  }}
 
3496
\put( 90,690){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3497
  \smash{%
 
3498
    stat\_1}%
 
3499
  }}
 
3500
\put( 90,540){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3501
  \smash{%
 
3502
    ==}%
 
3503
  }}
 
3504
\put( 90,498){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3505
  \smash{%
 
3506
    stat\_2}%
 
3507
  }}
 
3508
\put( 90,414){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3509
  \smash{%
 
3510
    ==}%
 
3511
  }}
 
3512
\put( 90,369){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3513
  \smash{%
 
3514
    stat\_3}%
 
3515
  }}
 
3516
\put( 90,267){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3517
  \smash{%
 
3518
    stat\_4}%
 
3519
  }}
 
3520
\put( 90,228){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3521
  \smash{%
 
3522
    break}%
 
3523
  }}
 
3524
\put( 90,330){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
 
3525
  \smash{%
 
3526
    break}%
 
3527
  }}
 
3528
\put( 90,774){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
3529
  \smash{%
 
3530
    const\_expr\_1}%
 
3531
  }}
 
3532
\put( 90,582){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
3533
  \smash{%
 
3534
    const\_expr\_2}%
 
3535
  }}
 
3536
\put( 90,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
3537
  \smash{%
 
3538
    const\_expr\_3}%
 
3539
  }}
 
3540
\end{picture}}%
 
3541
 
 
3542
 
 
3543
\caption[F\/ixation of {\sf switch}]{F\/ixation of {\sf switch}} \label{obr8}
 
3544
\end{center}
 
3545
\end{figure}
 
3546
 
 
3547
Unconditional program branching is supported by a {\sf goto}
 
3548
\index{statement!goto@{\sf goto}} statement. The {\sf goto} statement
 
3549
has the following fixative structure:
 
3550
 
 
3551
\begin{verbatim}
 
3552
 
 
3553
 
 
3554
struct goto_adr                 /* List of addresses with goto
 
3555
                                   statements for the current label. */
 
3556
{
 
3557
  char *adr;                    /* Address of the goto statement. */
 
3558
  int line_number;              /* Line number of the goto statement. */
 
3559
  struct goto_adr *gnext;
 
3560
};
 
3561
 
 
3562
 
 
3563
struct goto_tab                 /* Hash table structure for goto
 
3564
                                   labels. */
 
3565
{
 
3566
  char *name;                   /* Name of the label. */
 
3567
  char *label_adr;              /* Address of the label in the
 
3568
                                   generated code. */
 
3569
  int line_number;              /* Line number of the label in the
 
3570
                                   source file. */
 
3571
  struct goto_adr *gnext;       /* List of goto's to the label. */
 
3572
  struct goto_tab *next;
 
3573
};
 
3574
 
 
3575
 
 
3576
\end{verbatim}
 
3577
 
 
3578
\begin{verbatim}
 
3579
 
 
3580
 
 
3581
static struct goto_tab *hastab_goto;    /* Pointer to the hash
 
3582
                                           table. */
 
3583
 
 
3584
 
 
3585
\end{verbatim}
 
3586
 
 
3587
 
 
3588
If labels\index{label} or goto's \index{statement!goto@{\sf goto}} are
 
3589
encountered during parsing, the addresses of code are put into the
 
3590
fixative structure. After successful compilation, addresses of goto's
 
3591
are fixed to the corresponding labels. Then the code is executed. 
 
3592
 
 
3593
The {\sf goto} \index{statement!goto@{\sf goto}} statement can appear
 
3594
only in the level one (all statements that are compiled) statements.
 
3595
The {\sf goto} cannot jump to a label across functions.
 
3596
 
 
3597
 
 
3598
\section{Parameter passing mechanism} \index{parameter!passing}
 
3599
\label{parameter_passing}
 
3600
 
 
3601
Parameters are passed by reference \cite{gries}. The parameters are
 
3602
over the pointer BP ($BP+offset$), i.e. toward greater addresses.
 
3603
Local variables are below the BP ($BP-offset$), i.e. toward lesser
 
3604
addresses. The parameters are pushed onto the stack in the reverse
 
3605
order as they appear in the function call. The first parameter has
 
3606
{\sf offset} less than the last parameter (the first parameter is
 
3607
closer to the BP). The last parameter is the deepest parameter on the
 
3608
stack.
 
3609
 
 
3610
Addresses of the parameters\index{parameter!address} are stored in the
 
3611
stack\index{stack}. During compilation of the list of formal
 
3612
parameters\index{parameter!formal} it is leaving out the place for
 
3613
them in the stack. It causes different accesses to the parameters and
 
3614
the local variables\index{variable!local}, because local variables are
 
3615
stored by value (only one indirection, parameters need two
 
3616
indirections). Different virtual machine 
 
3617
instructions\index{virtual machine} must be generated for parameters
 
3618
and local variables.
 
3619
 
 
3620
%The addresses of the parameters are temporary stored in address
 
3621
%stack. It is necessary if we should use the recursive function call.
 
3622
 
 
3623
 
 
3624
%\subsection{Address stack}
 
3625
%Address stack is used only for temporary storage of the
 
3626
%addresses of the parameters of the function. The number of
 
3627
%the parameters is restricted by a size of the address
 
3628
%stack. The size of the address stack is 255 addresses. See
 
3629
%structure of the address stack in cooperation with the
 
3630
%stack in fig. \ref{obr1}.
 
3631
 
 
3632
\section{Stack}\index{stack} \label{stack}
 
3633
 
 
3634
The stack is used for storing of the addresses of
 
3635
parameters\index{parameter!address} and for the local
 
3636
variables\index{variable!local} as it was mentioned in
 
3637
section~\ref{parameter_passing}. The location of parameters and local
 
3638
variables is depending on the level in which the function is called.
 
3639
The parameters and the local variables are destroyed after a
 
3640
return\index{function!return} from the procedure.
 
3641
 
 
3642
%\begin{figure} 
 
3643
%\begin{center}
 
3644
%\input{stack.pic}
 
3645
%\caption[The structure of the stack. Cooperation between
 
3646
%the stack and the address stack in the recursive function
 
3647
%call]{The structure of the stack. Cooperation between the
 
3648
%stack and the address stack in the recursive function call}
 
3649
%\label{obr1}
 
3650
%\end{center}
 
3651
%\end{figure}
 
3652
 
 
3653
 
 
3654
 
 
3655
 
 
3656
\section{Compiled statement}
 
3657
 
 
3658
The statements mentioned on the level 1 (\cl list\_stat \r (see
 
3659
appendix \ref{syntax})) are compiled. Procedures are also compiled.
 
3660
The procedures must be processed when they are called. The procedures
 
3661
usually consist of prologue, epilogue and body. The following
 
3662
instructions are in the prologue:
 
3663
 
 
3664
\begin{verbatim}
 
3665
   GEN_PUSHb;
 
3666
   GEN_PUSHt;
 
3667
   GEN_MOVt;
 
3668
   GEN_MOVbs;
 
3669
   GEN_SUBss(count);
 
3670
\end{verbatim}
 
3671
 
 
3672
It is namely: {\bf PUSH} $[STACK] \longleftarrow BP$, {\bf PUSH}
 
3673
$[STACK] \longleftarrow TMPH$, {\bf MOV} $TMPH \longleftarrow TMP$,
 
3674
{\bf MOV} $STACK \longrightarrow BP$ and {\bf SUB}
 
3675
$STACK\longleftarrow(STACK - count)$
 
3676
(see~\ref{stroj})\index{instruction!PUSH@{\bf PUSH}}\index{instruction!SUB@{\bf SUB}}\index{instruction!MOV@{\bf MOV}}. The epilogue of the procedure is generated:
 
3677
 
 
3678
\begin{verbatim}
 
3679
   GEN_MOVsb;
 
3680
   GEN_POPt;
 
3681
   GEN_POPb;
 
3682
   GEN_RET;
 
3683
\end{verbatim}
 
3684
 
 
3685
These instructions are: {\bf MOV} $STACK \longleftarrow BP$, {\bf POP}
 
3686
$TMPH \longleftarrow [STACK]$, {\bf POP} $BP \longleftarrow
 
3687
[STACK]$\index{instruction!MOV@{\bf MOV}}\index{instruction!POP@{\bf
 
3688
POP}}\index{instruction!RET@{\bf RET}} and {\bf RET} return to the
 
3689
caller (i.e. the instruction {\bf
 
3690
CALL}\index{instruction!CALL@{\bf CALL}}).
 
3691
 
 
3692
The procedure call is also compiled. The reason is that the
 
3693
list\index{list} of the parameters can contain
 
3694
expressions\index{expression}.
 
3695
 
 
3696
\chapter{Different level of user interfaces to the
 
3697
interpreter \CiF}\index{interface}
 
3698
 
 
3699
\section{Intrinsic functions}\index{function!intrinsic}
 
3700
 
 
3701
Intrinsic functions are linked to the compiler. The user should update
 
3702
two tables and write an intrinsic function in C or FORTRAN then to
 
3703
link the object code of the compiler with the tables and with the code
 
3704
of the intrinsic function. This way is enriched the compiler with a
 
3705
new intrinsic function. The structures of the tables are as follows:
 
3706
 
 
3707
\begin{verbatim}
 
3708
 
 
3709
 
 
3710
/*
 
3711
 * intrinsic.h
 
3712
 *
 
3713
 * List of intrinsic functions.
 
3714
 */
 
3715
 
 
3716
#ifndef _INTRINSIC_H
 
3717
#define _INTRINSIC_H
 
3718
 
 
3719
#include <math.h>
 
3720
#include "myintrinsic.c"
 
3721
 
 
3722
#ifdef CONTROL
 
3723
#include "example/apl.c"
 
3724
#endif
 
3725
 
 
3726
typedef void (*INTRINSIC_FUNCTION) PROTO((char **));
 
3727
 
 
3728
struct INTR
 
3729
        {
 
3730
        char *name;
 
3731
        INTRINSIC_FUNCTION adr;
 
3732
        } intr_name[]=
 
3733
                {{"cclose", (INTRINSIC_FUNCTION)cclose},
 
3734
                 {"cgetc", (INTRINSIC_FUNCTION)cgetc},
 
3735
                 {"chclose", (INTRINSIC_FUNCTION)chclose},
 
3736
                 {"chflush", (INTRINSIC_FUNCTION)chflush},
 
3737
                 {"chopen", (INTRINSIC_FUNCTION)chopen},  
 
3738
                 {"chwrite", (INTRINSIC_FUNCTION)chwrite},
 
3739
                 {"copen", (INTRINSIC_FUNCTION)copen},
 
3740
                 {"cputc", (INTRINSIC_FUNCTION)cputc},
 
3741
                 {"exp", (INTRINSIC_FUNCTION)exp_},
 
3742
                 {"fflush", (INTRINSIC_FUNCTION)cfflush},
 
3743
                 {"fprintf", (INTRINSIC_FUNCTION)cfprintf},
 
3744
                 {"fscanf", (INTRINSIC_FUNCTION)cfscanf},
 
3745
                 {"printf", (INTRINSIC_FUNCTION)cprintf},
 
3746
                 {"scanf", (INTRINSIC_FUNCTION)cscanf},
 
3747
                 {"sin", (INTRINSIC_FUNCTION)sin_}
 
3748
#ifdef CONTROL
 
3749
                 ,
 
3750
                 {"green_func", (INTRINSIC_FUNCTION)green_func},
 
3751
                 {"csigpause", (INTRINSIC_FUNCTION)csigpause},
 
3752
                 {"open_termo", (INTRINSIC_FUNCTION)open_termo},
 
3753
                 {"read_termo", (INTRINSIC_FUNCTION)read_termo},
 
3754
                 {"write_termo", (INTRINSIC_FUNCTION)write_termo},
 
3755
                 {"close_termo", (INTRINSIC_FUNCTION)close_termo},
 
3756
                 {"init_wait", (INTRINSIC_FUNCTION)init_wait}
 
3757
#endif
 
3758
};
 
3759
 
 
3760
 
 
3761
 
 
3762
/* 
 
3763
 * Number of intrinsic functions.
 
3764
 */
 
3765
#define SIZE_REM sizeof(intr_name)/sizeof(intr_name[0]) 
 
3766
 
 
3767
 
 
3768
 
 
3769
/* 
 
3770
 * Size of an array of intrinsic functions.
 
3771
 */
 
3772
void (*(f[SIZE_REM])) PROTO((char **));
 
3773
 
 
3774
 
 
3775
\end{verbatim}
 
3776
 
 
3777
 
 
3778
The names of the intrinsic functions\index{function!intrinsic} are
 
3779
stored in hash table\index{table!hashing}\index{hash!table} (mentioned
 
3780
earlier). The compiler knows about the names of the intrinsic
 
3781
function\index{function!intrinsic} from its initializing part.  When
 
3782
the {\sf remote}\index{statement!remote@{\sf remote}} keyword is
 
3783
parsed, remote functions are loaded into the hash
 
3784
table\index{table!hashing}\index{hash!table} of remote functions.
 
3785
Only remote functions previously declared are known to the
 
3786
environment. If there are any declaration after {\sf remote} statement
 
3787
the names are known but have no corresponding code. The example of the
 
3788
{\sf remote} statement usage can be found in the
 
3789
`io.ci'\index{file!io.ci}.
 
3790
 
 
3791
The body of remote function or declaration of the header respectively
 
3792
must be in the file `myintrinsic.c'.\index{file!myintrinsic.c}
 
3793
Continuing in the above example the file `myintrinsic.c' should look
 
3794
like:
 
3795
 
 
3796
\begin{verbatim}
 
3797
double plus(double *a,double *b)
 
3798
{
 
3799
printf("a=%g\n",*a);
 
3800
printf("b=%g\n",*b);
 
3801
return(*a+*b);
 
3802
}
 
3803
 
 
3804
\end{verbatim}
 
3805
 
 
3806
\begin{verbatim}
 
3807
 
 
3808
 
 
3809
double sin_(a)char **a;{return(sin(*(double *) a[0]));}
 
3810
 
 
3811
 
 
3812
\end{verbatim}
 
3813
 
 
3814
 
 
3815
For the proper function of the compiler user should keep
 
3816
the following steps\index{function!intrinsic}:
 
3817
 
 
3818
\begin{itemize}
 
3819
  
 
3820
\item Update the variable {\sf intr\_name}. The first field is a name
 
3821
  of the intrinsic function; the second field is the name of the user
 
3822
  supplied function.
 
3823
\item Write the code of a new intrinsic function in the file
 
3824
  `myintrinsic.c'.
 
3825
\item Compile remote call subsystem. Link new version of
 
3826
the compiler.
 
3827
 
 
3828
\end{itemize}
 
3829
 
 
3830
\section{Main areas of allocated memory}\index{memory}\label{memory}
 
3831
 
 
3832
The allocated memory of the interpreter is split to two parts. The
 
3833
first part is static. The user can not change the size of these memory
 
3834
areas at run-time, only by recompiling the interpreter. The size is as
 
3835
follows:
 
3836
 
 
3837
\begin{verbatim}
 
3838
 
 
3839
 
 
3840
#define PAGE        512       /* Size of a page. */
 
3841
#define SIZE_HAS   1999       /* Size of hash table. */
 
3842
#define SIZE_HAS_LOC 401      /* Size of hash table for locals. */
 
3843
#define SIZE_HAS_GOTO 257     /* Size of hash table for goto
 
3844
                                 labels. */
 
3845
#define MAX_IDENT    1999     /* Max number of variables */
 
3846
#define MAX_IDENT_LOC  401    /* Max number of local variables. */
 
3847
#define SIZE_ADR_STACK 256    /* Size of address stack (obsolete). */
 
3848
#define SIZE_STRUCT_FIX 256   /* Size of the stack of fixative structures. */ 
 
3849
#define SIZE_REMOTE 1999      /* Size of hash table for remote function 
 
3850
                                 names. */
 
3851
 
 
3852
 
 
3853
\end{verbatim}
 
3854
 
 
3855
\index{macro!PAGE@{\bf PAGE}} \index{PAGE@{\bf PAGE}}
 
3856
\index{macro!SIZE\_HAS@{\bf SIZE\_HAS}} \index{SIZE\_HAS@{\bf SIZE\_HAS}}
 
3857
\index{macro!SIZE\_HAS\_LOC@{\bf SIZE\_HAS\_LOC}}
 
3858
\index{SIZE\_HAS\_LOC@{\bf SIZE\_HAS\_LOC}}
 
3859
\index{macro!SIZE\_HAS\_GOTO@{\bf SIZE\_HAS\_GOTO}}
 
3860
\index{SIZE\_HAS\_GOTO@{\bf SIZE\_HAS\_GOTO}}
 
3861
\index{macro!MAX\_IDENT@{\bf MAX\_IDENT}}
 
3862
\index{MAX\_IDENT@{\bf MAX\_IDENT}} 
 
3863
\index{macro!MAX\_IDENT\_LOC@{\bf MAX\_IDENT\_LOC}}
 
3864
\index{MAX\_IDENT\_LOC@{\bf MAX\_IDENT\_LOC}} 
 
3865
\index{macro!SIZE\_ADR\_STACK@{\bf SIZE\_ADR\_STACK}}
 
3866
\index{SIZE\_ADR\_STACK@{\bf SIZE\_ADR\_STACK}}
 
3867
\index{macro!SIZE\_STRUCT\_FIX@{\bf SIZE\_STRUCT\_FIX}}
 
3868
\index{SIZE\_STRUCT\_FIX@{\bf SIZE\_STRUCT\_FIX}}
 
3869
\index{macro!SIZE\_REMOTE@{\bf SIZE\_REMOTE}}
 
3870
\index{SIZE\_REMOTE@{\bf SIZE\_REMOTE}}
 
3871
 
 
3872
Macros {\bf SIZE\_HAS, SIZE\_HAS\_LOC, SIZE\_HAS\_GOTO, MAX\_IDENT,
 
3873
  MAX\_IDENT\_LOC, SIZE\_REMOTE} are primes according to~\cite{wirth}.
 
3874
If you want to change these macros you should change them to primes
 
3875
again for better performance of hash functions\index{hash!function}.
 
3876
 
 
3877
The second part is 
 
3878
 
 
3879
\begin{verbatim}
 
3880
 
 
3881
 
 
3882
#define SIZE_SPACE  210       /* Memory size in pages. */
 
3883
#define SIZE_ARIT_STACK 7     /* Size of the arithmetical stack in pages. */
 
3884
#define SIZE_TMP_STACK 52     /* Size of stack of temporaries in pages. */
 
3885
 
 
3886
 
 
3887
\end{verbatim}
 
3888
 
 
3889
\index{macro!SIZE\_SPACE@{\bf SIZE\_SPACE}}
 
3890
\index{SIZE\_SPACE@{\bf SIZE\_SPACE}}
 
3891
\index{macro!SIZE\_ARIT\_STACK@{\bf SIZE\_ARIT\_STACK}}
 
3892
\index{SIZE\_ARIT\_STACK@{\bf SIZE\_ARIT\_STACK}}
 
3893
\index{macro!SIZE\_TMP\_STACK@{\bf SIZE\_TMP\_STACK}}
 
3894
\index{SIZE\_TMP\_STACK@{\bf SIZE\_TMP\_STACK}}
 
3895
 
 
3896
Each size is specified by number of pages (PAGE 512 B). The user can
 
3897
change these sizes. The easiest way is to run the interpreter with the
 
3898
parameter\index{parameter!run-string} {\sf /bc=$<$number$>$}.  E.g.
 
3899
 
 
3900
\begin{verbatim}
 
3901
clif /bc=5
 
3902
\end{verbatim}
 
3903
 
 
3904
Starting the interpreter with argument 5 caused that the size of the
 
3905
memory, size of the arithmetical stack and size of the temporary stack
 
3906
are lowered to half compared to the default set (default is constant
 
3907
equal 10). The user can extend the size of the three memory parts if
 
3908
the interpreter is ran with the argument greater than 10.
 
3909
 
 
3910
\section{Hash tables and hash
 
3911
function}\index{table!hashing}\index{hash!table}
 
3912
 
 
3913
The most important is that the size of the hash table must
 
3914
be a prime. We chose the primes 1999 for the size of the
 
3915
global hash table and 401 for the size of the local hash
 
3916
table.
 
3917
 
 
3918
We chose the following hash
 
3919
function:\index{function!hashing}\index{hash!table}
 
3920
 
 
3921
\begin{verbatim}
 
3922
 
 
3923
 
 
3924
/*
 
3925
 * Hash function.
 
3926
 */
 
3927
static unsigned int
 
3928
hash_code (s, size)
 
3929
  char           *s;
 
3930
  unsigned int size;
 
3931
{
 
3932
  int             c = 0;
 
3933
 
 
3934
  while (*s)
 
3935
    {
 
3936
      c = c << 1 ^ (*s);
 
3937
      s++;
 
3938
    }
 
3939
  if (0 > c)
 
3940
    c = (-c);
 
3941
  return (c % size);
 
3942
}
 
3943
 
 
3944
 
 
3945
\end{verbatim}
 
3946
 
 
3947
 
 
3948
The core of the hash
 
3949
function\index{hash!function}\index{function!hashing} is one bit
 
3950
shifting and then the result is XOR-ed with the ASCII value of the
 
3951
character. The problems may arise when the variable's identifier is
 
3952
longer than the size of the integer\index{integer!size of} on the
 
3953
computer.
 
3954
 
 
3955
\section{Adding new data type}
 
3956
The user has to follow these steps:\\
 
3957
\begin{itemize}
 
3958
\item Update the file `cast.h'\index{file!cast.h} with cast operators
 
3959
  for the new data type.
 
3960
\item Update the file `geninstr.h'\index{file!geninstr.h} with
 
3961
  appropriate instructions for the virtual machine. User can be
 
3962
  inspired by previous types.
 
3963
\item Update the file `type.h'\index{file!type.h}. To define the
 
3964
  constant of new data type.
 
3965
\item Enrich the file `instr.h'\index{file!instr.h} with a new
 
3966
  structure for a new instruction of the virtual processor if it is
 
3967
  needed.
 
3968
\item Update the scanner in file `ls.l'\index{file!ls.l} with the
 
3969
  pattern matching of the new data type constant.
 
3970
\item Enrich the list in file
 
3971
  `keyword.gperf'\index{file!keyword.gperf} with needed tokens name.
 
3972
\item Update the grammar of the language in file
 
3973
  `ys.y'\index{file!ys.y}. An user should be searching for previously
 
3974
  defined data type (i.e. INT) and he/she has to take inspiration
 
3975
  from the surrounding structures. Namely the following functions
 
3976
  should be rearranged:\\
 
3977
\begin{itemize}
 
3978
\item The function `exe'\index{function!exe@{\sf exe}} \index{exe@{\sf exe}}
 
3979
  (`virtual\_machine.c'\index{file!virtual\_machine.c}). Instructions
 
3980
  of the virtual machine are executed in the function.
 
3981
\item The function `init'\index{function!init@{\sf init}}
 
3982
  \index{init@{\sf init}} (`comp\_maint.c'\index{file!comp\_maint.c}).
 
3983
  Update the array `pri'\index{array!pri@{\sf pri}} with the new data
 
3984
  type.
 
3985
\item The function `implicit\_cast'
 
3986
  \index{function!implicit\_cast@{\sf implicit\_cast}}
 
3987
  \index{implicit\_cast@{\sf implicit\_cast}}
 
3988
  (comp\_maint.c\index{file!comp\_maint.c}) contents all possible
 
3989
  options of implicit cast instructions.
 
3990
\item The function `l\_value\_cast'
 
3991
  \index{function!l\_value\_cast@{\sf l\_value\_cast}}
 
3992
  \index{l\_value\_cast@{\sf l\_value\_cast}}
 
3993
  (comp\_maint.c\index{file!comp\_maint.c}) is casting to the \cl
 
3994
  l\_value \r
 
3995
\end{itemize} 
 
3996
\end{itemize}
 
3997
 
 
3998
\chapter{Interrupt services}\label{int_service}
 
3999
 
 
4000
As it was mentioned earlier two types of
 
4001
interrupts\index{interrupt!synchronous and asynchronous} are
 
4002
implemented synchronous and asynchronous
 
4003
(see~\ref{compiling_options}). Each of them call a specific service
 
4004
function. The interpreter is interrupted only if the virtual machine
 
4005
is running. Interrupt handling functions are system dependent.
 
4006
Therefore these functions should be specific for each platform.
 
4007
Current ports are on CD 4680 (file
 
4008
`inter\_handl\_svr3.c'\index{file!inter\_handl\_svr3.c}), DEC 5000/240
 
4009
(file `inter\_handl\_bsd.c'\index{file!inter\_handl\_bsd.c}). There is
 
4010
a port for Linux (using BSD-like signals), SVR4 port (file
 
4011
`inter\_handl\_svr4.c'\index{file!inter\_handl\_svr4.c}) and generic
 
4012
POSIX port (file
 
4013
`inter\_handl\_posix.c'\index{file!inter\_handl\_posix.c})\cite{steve}.
 
4014
The configuration of ours CD 4680 is rather confusing, that is why we
 
4015
need specific interrupt handler for it. To further complicate things,
 
4016
the new terminal setting is added to these files as well. Because each
 
4017
platform to which we ported \CiF\ has a specific terminal handling,
 
4018
this part is specially designed for them as well. Most of currently
 
4019
ported platforms can use the generic POSIX implementation as well.
 
4020
However, it arises two problems:
 
4021
\begin{itemize}
 
4022
\item For the file `inter\_handl\_svr3.c', it cannot be compiled
 
4023
  afterwards, because it knows the functions but only in SVR4 mode and
 
4024
  the default is SVR3 (CD4680). If we switch to the default SVR4 some
 
4025
  other functions are not known.
 
4026
\item Some of platforms need to push newline into the input stream and
 
4027
  some do not. We use interrupt ({\sf DC4}) to break the run of the
 
4028
  virtual machine\index{virtual machine} as well as to resume the run
 
4029
  if it is pressed again. After pressing {\sf DC 4} for the second
 
4030
  time, the {\sf resume}   
 
4031
  statement\index{statement!resume@{\sf resume}} is internally
 
4032
  generated.
 
4033
  
 
4034
  In interrupt handler, on some platforms, there must not be a newline
 
4035
  character (or is generated automatically by the terminal line
 
4036
  discipline), on others, it must be pushed by interrupt handler
 
4037
  function. See sections~\ref{sync_interrupt},~\ref{async_interrupt}.
 
4038
\end{itemize}
 
4039
 
 
4040
Generally, user may use `inter\_handl\_posix.c' whenever
 
4041
appropriate. If the interrupt does not function, the user should
 
4042
consider to add the following line to the {\sf
 
4043
  interrupt\_service}\index{function!interrupt\_service@{\sf interrupt\_service}} 
 
4044
\index{interrupt\_service@{\sf interrupt\_service}} just after
 
4045
assignment to {\sf handler}\index{handler@{\sf handler}}
 
4046
\index{variable!handler@{\sf handler}} variable
 
4047
 
 
4048
\begin{verbatim}
 
4049
      ioctl (handle_fd, TIOCSTI, "\n");
 
4050
\end{verbatim}
 
4051
 
 
4052
The following function registers interrupt
 
4053
handler\index{interrupt!handler}:
 
4054
 
 
4055
\begin{verbatim}
 
4056
 
 
4057
 
 
4058
#include <signal.h>
 
4059
#include <termio.h>
 
4060
#include <fcntl.h>
 
4061
#include <setjmp.h>
 
4062
 
 
4063
#define OFF(x, y) (x) & (~(y))
 
4064
#define ON(x, y) (x) | (y)
 
4065
#define SPACE 0x20
 
4066
#define NL '\n'
 
4067
 
 
4068
int handler = 0;
 
4069
int handle_fd;
 
4070
struct termio term,term_initial;
 
4071
 
 
4072
RETSIGTYPE (*interrupt_handler) (void);
 
4073
RETSIGTYPE interrupt_service PROTO((void));
 
4074
void interrupt_register PROTO((void));
 
4075
void term_restore PROTO((void));
 
4076
 
 
4077
RETSIGTYPE fatal_handler PROTO((void));
 
4078
void fatal_handler_register PROTO((void));
 
4079
extern jmp_buf jmpbuf;
 
4080
extern int error_count;
 
4081
 
 
4082
/*
 
4083
 * Registers interrupt handler.
 
4084
 */
 
4085
void
 
4086
interrupt_register ()
 
4087
{
 
4088
  interrupt_handler = interrupt_service;
 
4089
  handle_fd = fileno (stdin);
 
4090
  ioctl (handle_fd, TCGETA, &term);
 
4091
  term_initial = term;
 
4092
  term.c_cc[0] = 0x14;          /* DC4 */
 
4093
  term.c_cc[5] = 0x12;          /* DC2 */
 
4094
  term.c_lflag = OFF(term.c_lflag, LNEW_CTLECH); /* dalsi flag ktory ma pre nas vyznam je : term.c_lflag=ON(term.c_lflag,NOFLSH);*/ 
 
4095
  ioctl (handle_fd, TCSETA, &term);
 
4096
  sigset (SIGINT, interrupt_handler);
 
4097
}
 
4098
 
 
4099
 
 
4100
\end{verbatim}
 
4101
 
 
4102
 
 
4103
on the CD 4680. Via {\sf ioctl}\index{ioctl@{\sf ioctl}} system call
 
4104
is reset interrupt signal\index{interrupt!signal} to {\sf
 
4105
DC4}\index{DC4@{\sf DC4}}. Via {\sf sigset}\index{sigset@{\sf sigset}}
 
4106
system call is set the interrupt handler. On the DEC 5000/240 looks
 
4107
the function as follows:
 
4108
 
 
4109
\begin{verbatim}
 
4110
 
 
4111
 
 
4112
/*
 
4113
 * Registers interrupt handler.
 
4114
 */
 
4115
void
 
4116
interrupt_register ()
 
4117
{
 
4118
  interrupt_handler = interrupt_service;
 
4119
  handle_fd = fileno (stdin);
 
4120
  ioctl (handle_fd, TCGETA, &term);
 
4121
  term_initial = term;
 
4122
  term.c_cc[0] = 0x14;          /* DC4 */
 
4123
  term.c_cc[5] = 0x12;          /* DC2 */
 
4124
  ioctl (handle_fd, TCSETA, &term);
 
4125
  vec.sv_handler = interrupt_handler;
 
4126
  sigvec (SIGINT, &vec, &ovec);
 
4127
}
 
4128
 
 
4129
 
 
4130
\end{verbatim}
 
4131
 
 
4132
 
 
4133
The interrupt handler is set here through the system call
 
4134
{\sf sigvec}\index{sigvec@{\sf sigvec}}. 
 
4135
 
 
4136
When the interpreter session terminates, the terminal is
 
4137
reset to the initial values:
 
4138
 
 
4139
\begin{verbatim}
 
4140
 
 
4141
 
 
4142
/*
 
4143
 * Restores setting of the terminal at the termination of Clif session.
 
4144
 */
 
4145
void
 
4146
term_restore ()
 
4147
{
 
4148
  ioctl (handle_fd, TCSETA, &term_initial);
 
4149
}
 
4150
 
 
4151
 
 
4152
\end{verbatim}
 
4153
 
 
4154
 
 
4155
\section{Synchronous interrupt service
 
4156
function}\index{function!synchronous interrupt service}\label{sync_interrupt}
 
4157
 
 
4158
The function is as follows:
 
4159
 
 
4160
\begin{verbatim}
 
4161
 
 
4162
 
 
4163
/*
 
4164
 * Synchronous interrupt service.
 
4165
 */
 
4166
void
 
4167
interrupt_service_sync ()
 
4168
{
 
4169
  handler = 1;
 
4170
}
 
4171
 
 
4172
 
 
4173
\end{verbatim}
 
4174
 
 
4175
 
 
4176
The virtual machine instruction\index{instruction!INTER@{\bf INTER}}
 
4177
{\bf INTER} is calling the function {\sf interrupt\_service\_sync} in
 
4178
which the handler is set to 1. Before the next instruction is
 
4179
executed, the handler is checked. If it is set the virtual machine
 
4180
switches its context\index{context!switching}. The context of the
 
4181
virtual machine is stored in the following
 
4182
structure:\index{structure!context}
 
4183
 
 
4184
\begin{verbatim}
 
4185
 
 
4186
 
 
4187
struct CONTEXT
 
4188
{
 
4189
  char *bp;
 
4190
  char *frame;
 
4191
  char *kodp;
 
4192
  char *kodp1;
 
4193
  char *kodp2;
 
4194
  char *kodp3;
 
4195
  char *kodp4;
 
4196
  char *pc;
 
4197
  char *stack;
 
4198
  char *tmp;
 
4199
  char *tmph;
 
4200
#ifdef FLEX_SCANNER
 
4201
  void *state;
 
4202
#else
 
4203
  int (*input) PROTO((void));
 
4204
#endif
 
4205
  struct CONTEXT *previous;
 
4206
};
 
4207
 
 
4208
 
 
4209
\end{verbatim}
 
4210
 
 
4211
 
 
4212
There are no restriction on the use of the statements. The statement
 
4213
{\sf resume}\index{statement!resume@{\sf resume}} resumes after an
 
4214
interrupt.
 
4215
 
 
4216
\section{Asynchronous interrupt service
 
4217
function}\index{function!asynchronous interrupt service}\label{async_interrupt}
 
4218
 
 
4219
Not only synchronous interrupt is provided by the interpreter, but
 
4220
also asynchronous interrupt. Only the virtual machine\index{virtual machine} 
 
4221
can be interrupted.  The user interrupts the virtual
 
4222
machine\index{virtual machine} by pressing the {\sf
 
4223
  DC4}\index{DC4@{\sf DC4}} key. As it is mentioned above there are no
 
4224
restrictions on the use of the statements. The user can interrupt more
 
4225
than once.  The interpreter interrupt level can rise. To return to
 
4226
resume initially interrupted program, the user should specify equal
 
4227
number of the {\sf resume} 
 
4228
statements\index{statement!resume@{\sf resume}} to the interrupts. If
 
4229
the interrupt level is again zero initially interrupted program
 
4230
continues.
 
4231
 
 
4232
The context\index{context} of the virtual machine\index{virtual
 
4233
machine} is stored in the same structure as for the synchronous
 
4234
interrupt. The asynchronous interrupt service function is the
 
4235
following:\index{interrupt!accepted}
 
4236
 
 
4237
\begin{verbatim}
 
4238
 
 
4239
 
 
4240
/*
 
4241
 * Asynchronous interrupt handler.
 
4242
 */
 
4243
void
 
4244
interrupt_service ()
 
4245
{
 
4246
#ifdef DEBUG_INTER 
 
4247
  printfx ("interrupt\n");
 
4248
#endif
 
4249
  if ((clif_interrupt_level > 0) || (!virtual_machine_suspended))
 
4250
 
 
4251
/* 
 
4252
 * Test of the virtual machine running and the level of interrupt.
 
4253
 * Interrupt is only accepted if the virtual machine is running.
 
4254
 */
 
4255
 
 
4256
    {
 
4257
#ifdef DEBUG_INTER 
 
4258
      printfx ("virtual machine is running, interrupt accepted\n");
 
4259
#endif
 
4260
      handler = 1;
 
4261
    }
 
4262
  return;
 
4263
}
 
4264
 
 
4265
 
 
4266
\end{verbatim}
 
4267
 
 
4268
 
 
4269
The function is valid for CDC. The asynchronous interrupt
 
4270
service function for DEC is as follows:
 
4271
 
 
4272
\begin{verbatim}
 
4273
 
 
4274
 
 
4275
/*
 
4276
 * Asynchronous interrupt service.
 
4277
 */
 
4278
RETSIGTYPE
 
4279
interrupt_service ()
 
4280
{
 
4281
#ifdef DEBUG_INTER 
 
4282
  printfx ("interrupt\n");
 
4283
#endif
 
4284
  if ((clif_interrupt_level > 0) || (!virtual_machine_suspended))
 
4285
 
 
4286
/* 
 
4287
 * Test of the virtual machine running and the level of interrupt.
 
4288
 * An interrupt is only accepted if the virtual machine is running.
 
4289
 */
 
4290
 
 
4291
    {
 
4292
#ifdef DEBUG_INTER 
 
4293
      printfx ("virtual machine is running, interrupt accepted\n");
 
4294
#endif
 
4295
      handler = 1;
 
4296
#ifdef HAVE_TIOCSTI
 
4297
      ioctl (handle_fd, TIOCSTI, "\n");
 
4298
#endif
 
4299
    }
 
4300
  return;
 
4301
}
 
4302
 
 
4303
\end{verbatim}
 
4304
 
 
4305
 
 
4306
Switching of the virtual machine\index{virtual machine} to a new
 
4307
context\index{context!switching} is connected with switching of the
 
4308
interpreter input\index{interpreter!input}. The different function for
 
4309
each platform exists because of features of the stream on those
 
4310
platforms. The CDC stream contents interrupt character as well as
 
4311
newline character. The DEC stream only contents interrupt
 
4312
character. Therefore we must put into the DEC stream any character
 
4313
before the interpreter input is switched.
 
4314
 
 
4315
The interpreter input is switched to the standard input.
 
4316
Returning from the interrupt the interpreter input is
 
4317
switched to the initially set input. 
 
4318
 
 
4319
\section{Interpreter input functions}\index{function!input}
 
4320
 
 
4321
There are three interpreter input functions. The first function is
 
4322
initialized at the beginning of the interpreter session. Depending on
 
4323
the number of parameters of the run-string the interpreter input is
 
4324
either in run-string specified program or the standard input (function
 
4325
used in this case is
 
4326
{\sf input\_komp}\index{function!input\_komp@{\sf input\_komp}}). When
 
4327
the virtual machine process the instruction of synchronous
 
4328
interrupt\index{interrupt!synchronous} or if the asynchronous
 
4329
interrupt happened the input is switched to the standard input
 
4330
(function 
 
4331
{\sf input\_std}\index{function!input\_std@{\sf input\_std}}). If the
 
4332
virtual machine\index{virtual machine} is interrupted by the user the
 
4333
input is switched to the input from the buffer (function {\sf
 
4334
  input\_buf}\index{function!input\_buf@{\sf input\_buf}}). The input
 
4335
from the buffer is the same as it is by synchronous interrupt. After
 
4336
processing it the input is switched\index{input!switching} to the
 
4337
standard input\index{input!standard}. The mentioned input
 
4338
functions\index{function!input} follow:
 
4339
 
 
4340
\begin{verbatim}
 
4341
 
 
4342
 
 
4343
/*
 
4344
 * input.c
 
4345
 *
 
4346
 * Initialization of the main compiler
 
4347
 * and redefinition of its input functions.
 
4348
 * Different input function are used during
 
4349
 * synchronous and asynchronous interrupt
 
4350
 * handling.
 
4351
 */
 
4352
 
 
4353
#include <stdio.h>
 
4354
#include <fcntl.h>
 
4355
#include "global.h"
 
4356
#include "lex_t.h"
 
4357
#include "input.h"
 
4358
 
 
4359
extern FILEATTR pf, spf[];
 
4360
#ifndef FLEX_SCANNER
 
4361
extern int yylineno;
 
4362
extern int yytchar;
 
4363
extern char *yysptr, yysbuf[];
 
4364
 
 
4365
extern int getcx PROTO((FILE *));
 
4366
static int buf_pointer = 0;
 
4367
#else
 
4368
extern FILE *yyin;
 
4369
#endif
 
4370
 
 
4371
#define U(x) x
 
4372
 
 
4373
int (*input) PROTO((void));
 
4374
 
 
4375
char string_resume[]="resume;"; /* Buffer for input by return 
 
4376
                                 * from asynchronous interrupt.
 
4377
                                 */
 
4378
extern int no_compile_only;     /* Flag in the case of errors or */
 
4379
                                /* compile only. */
 
4380
extern int handle_main;         /* If set, compiler like behavior. */
 
4381
extern int source_line_number;
 
4382
                                /* Source line number. Detecting if */
 
4383
                                /* the current line was already */
 
4384
                                /* printed. Using in error messages. */
 
4385
extern void exit_file_scope PROTO((void));
 
4386
 
 
4387
#ifndef FLEX_SCANNER
 
4388
/*
 
4389
 * Redefinition of the input for the main compiler.
 
4390
 */
 
4391
int 
 
4392
input_komp ()
 
4393
{
 
4394
#ifdef DEBUG_INTER 
 
4395
  printfx("in front of getc in input\n");
 
4396
#endif
 
4397
  yytchar=yysptr>yysbuf?U(*--yysptr):getcx(pf.fp);
 
4398
#ifdef DEBUG_INTER 
 
4399
  printfx("behind of getc in input, read character %c - %x\n",
 
4400
          yytchar, yytchar);
 
4401
#endif
 
4402
  if(yytchar == '\n')           /* LF */
 
4403
    {
 
4404
      yylineno++;
 
4405
      spf[s].line_counter++;
 
4406
      char_counter = 0;
 
4407
      line_buf[0] = 0;
 
4408
    }
 
4409
  if(yytchar == EOF)            /* Is current char EOF? */
 
4410
    { 
 
4411
      if (s > 0)
 
4412
        {
 
4413
          spf[s].line_counter = 1; /* Counting lines from beginning. */
 
4414
          source_line_number = 0; /* Resetting line number in the */
 
4415
                                  /* presence of errors. */
 
4416
          fclose (spf[s].fp); 
 
4417
          exit_file_scope ();
 
4418
          s = s - 1;
 
4419
          if (! s && ! no_compile_only)
 
4420
            return 0;
 
4421
 
 
4422
          /* If we want compiler-like behavior, don't switch to
 
4423
             stdin. */
 
4424
          if (! s && handle_main)
 
4425
            return 0;
 
4426
          
 
4427
          pf = spf[s];          /* Move to the next opened file. */
 
4428
        }
 
4429
#ifdef DEBUG_INTER 
 
4430
      printfx ("in front of the second getc in input\n");
 
4431
#endif
 
4432
      yytchar = yysptr>yysbuf?U(*--yysptr):getcx(pf.fp); /* The first char */
 
4433
#ifdef DEBUG_INTER 
 
4434
      printfx ("behind of the second getc in input, read character %c - %x\n",
 
4435
               yytchar, yytchar);
 
4436
#endif
 
4437
    }
 
4438
  return (yytchar);
 
4439
}
 
4440
 
 
4441
/*
 
4442
 * Redefinition of the input for the main compiler.
 
4443
 * It is used during an interrupt.
 
4444
 */
 
4445
int
 
4446
input_std ()
 
4447
{
 
4448
#ifdef DEBUG_INTER 
 
4449
  printfx ("in front of the third getc in input\n");
 
4450
#endif
 
4451
  yytchar = yysptr>yysbuf?U(*--yysptr):getcx(stdin);
 
4452
#ifdef DEBUG_INTER 
 
4453
  printfx ("behind of the third getc in input, read character %c - %x\n",
 
4454
           yytchar, yytchar);
 
4455
#endif
 
4456
  if (yytchar == '\n')          /* LF */
 
4457
    {
 
4458
      yylineno++;
 
4459
      spf[s].line_counter++;
 
4460
      char_counter = 0;
 
4461
      line_buf[0] = 0;
 
4462
    }
 
4463
  
 
4464
#ifndef NOT_MSWIN_AND_YES_DOS
 
4465
  if (HANDLER_TEST)
 
4466
    {
 
4467
      HANDLER_SET;
 
4468
      input = input_buf;
 
4469
      buf_pointer = 0;
 
4470
      return (input_buf());
 
4471
    }
 
4472
#endif
 
4473
  return (yytchar);
 
4474
}
 
4475
        
 
4476
/*
 
4477
 * Redefinition of the input for the main compiler.
 
4478
 * It is used by return from an interrupt.
 
4479
 */
 
4480
int
 
4481
input_buf ()   
 
4482
{
 
4483
  yytchar = yysptr>yysbuf?U(*--yysptr):string_resume[buf_pointer++];
 
4484
  if (yytchar == '\n')          /* LF */
 
4485
    {
 
4486
      yylineno++;
 
4487
      spf[s].line_counter++;
 
4488
      char_counter = 0;
 
4489
      line_buf[0] = 0;
 
4490
    }
 
4491
  return (yytchar);
 
4492
}
 
4493
 
 
4494
#else
 
4495
 
 
4496
 
 
4497
int
 
4498
terminate_buffer ()
 
4499
{
 
4500
  fclose (spf[s].fp);
 
4501
  spf[s].fp = NULL;
 
4502
  spf[s].name = NULL;
 
4503
  spf[s--].line_counter = 1;
 
4504
  source_line_number = 0;
 
4505
  exit_file_scope ();
 
4506
 
 
4507
  /*  Do not switch to stdin, if the user wants compiler-like
 
4508
      behavior.  */
 
4509
  if (! s && handle_main)
 
4510
    return 1;
 
4511
 
 
4512
  return (! s && ! no_compile_only);
 
4513
}
 
4514
 
 
4515
#endif /* FLEX_SCANNER */
 
4516
 
 
4517
/*
 
4518
 * Initialization of the main compiler input.
 
4519
 */
 
4520
int
 
4521
init_input (argc1, argv1)
 
4522
  int argc1;
 
4523
  char *argv1[];
 
4524
{
 
4525
  int b;
 
4526
 
 
4527
#ifndef FLEX_SCANNER
 
4528
  input = input_komp;
 
4529
#endif
 
4530
  s = argc1 - 1;
 
4531
  spf[0].fp = stdin;
 
4532
  spf[0].name = "stdin";
 
4533
  spf[0].line_counter = 1;
 
4534
  for (b = 1; b < argc1; b++)                       
 
4535
 
 
4536
                                /* File opening and storing their pointer. */ 
 
4537
 
 
4538
    {
 
4539
      spf[argc1 - b].fp = fopen(argv1[b],"r");
 
4540
      spf[argc1 - b].name = argv1[b];
 
4541
      spf[argc1 - b].line_counter = 1;
 
4542
      if (spf[argc1-b].fp == NULL)
 
4543
        {
 
4544
          s = argc1 - b;
 
4545
          error_message (7001);
 
4546
          return (-1);
 
4547
        }       
 
4548
    }
 
4549
/* 
 
4550
 * Takes the first file pointer from the stack. 
 
4551
 */
 
4552
#ifdef FLEX_SCANNER
 
4553
  yyin = spf[s].fp;
 
4554
#else
 
4555
  pf.fp = spf[s].fp;
 
4556
#endif
 
4557
  return 0;
 
4558
}
 
4559
 
 
4560
 
 
4561
\end{verbatim}
 
4562
 
 
4563
 
 
4564
%Unfortunately, the input functions can be overridden only in ancient
 
4565
%versions of Lex generator (see~\cite{lesk}). The \CiF\ is not
 
4566
%compilable using {\sf flex}\index{flex@{\sf flex}}.
 
4567
 
 
4568
\chapter{Graphic interface}
 
4569
 
 
4570
As was mentioned earlier there are the four intrinsic
 
4571
functions\index{function!intrinsic} for programming graphics output
 
4572
channels. There are the following: {\sf
 
4573
  chopen()}\index{function!chopen@{\sf chopen()}}, {\sf
 
4574
  chwrite()}\index{function!chwrite@{\sf chwrite()}}, {\sf
 
4575
  chflush()}\index{function!chflush@{\sf chflush()}} and {\sf
 
4576
  chclose()}\index{function!chclose@{\sf chclose()}}. In addition,
 
4577
these functions are used as a graphical interface from user point of
 
4578
view. These functions are calling graphic primitives functions. The
 
4579
graphics primitives functions are the following: {\sf
 
4580
  window()}\index{function!window@{\sf window()}}, {\sf
 
4581
  move()}\index{function!move@{\sf move()}}, {\sf
 
4582
  draw()}\index{function!draw@{\sf draw()}} and {\sf
 
4583
  draw\_point()}\index{function!draw\_point@{\sf draw\_point()}}.
 
4584
 
 
4585
\section{Graphic primitives}
 
4586
 
 
4587
\subsection{Function {\sf window()}}
 
4588
 
 
4589
The function is used in creating the window that matches
 
4590
the scope of displayed variable as well as the size of the
 
4591
window in pixels. The function follows:
 
4592
 
 
4593
\begin{verbatim}
 
4594
 
 
4595
 
 
4596
/*
 
4597
 * Creates a window from user's coordinates.
 
4598
 * Counts world coordinates.
 
4599
 * handle - is handle of the window
 
4600
 * n - specifies line in the window (user can have more lines in the window)
 
4601
 * rest are coordinates
 
4602
 */
 
4603
static void
 
4604
window (handle, n, x_left, y_down, x_right, y_up)
 
4605
     int handle, n;
 
4606
     double x_left, y_down, x_right, y_up;
 
4607
{
 
4608
  channel[handle].member[n].ax = 
 
4609
    (channel[handle].w_resolution[0] - 1) / (fabs(x_left - x_right));
 
4610
  channel[handle].member[n].ay = 
 
4611
    (channel[handle].w_resolution[1] - 1) / (fabs(y_down - y_up));
 
4612
}
 
4613
 
 
4614
 
 
4615
\end{verbatim}
 
4616
 
 
4617
 
 
4618
The {\sf handle} is the handle\index{handle} of the channel, the {\sf
 
4619
n} specifies the displayed variable, the {\sf x\_left}, {\sf y\_down},
 
4620
{\sf x\_right} and {\sf y\_up} specify scope of the n-th displayed
 
4621
variable.
 
4622
 
 
4623
\subsection{Function {\sf move()}}
 
4624
 
 
4625
The function is used for moving cursor\index{cursor} to the specified
 
4626
position. It looks like follow:
 
4627
 
 
4628
\begin{verbatim}
 
4629
 
 
4630
 
 
4631
/*
 
4632
 * Moves cursor to the specified position.
 
4633
 * handle - is handle of the window
 
4634
 * n - specifies line in the window (user can have more lines in the window)
 
4635
 * x, y - coordinates
 
4636
 */
 
4637
static void
 
4638
move (handle, n, x, y)
 
4639
     int handle, n;
 
4640
     double x, y;
 
4641
{
 
4642
  d_move((int)floor ((x - channel[handle].start_time)
 
4643
                     * channel[handle].member[n].ax),
 
4644
         channel[handle].w_resolution[1] - 1
 
4645
         - (int)floor ((y - channel[handle].member[n].lower)
 
4646
                       * channel[handle].member[n].ay));
 
4647
}
 
4648
 
 
4649
 
 
4650
\end{verbatim}
 
4651
 
 
4652
 
 
4653
where {\sf handle} is the handle\index{handle} of the channel, {\sf n}
 
4654
specifies the displayed variable, {\sf x} and {\sf y} specify the
 
4655
position in the window to which cursor\index{cursor} is moved.
 
4656
 
 
4657
\subsection{Function {\sf draw()}}
 
4658
 
 
4659
The function {\sf draw()} is the following:
 
4660
 
 
4661
\begin{verbatim}
 
4662
 
 
4663
 
 
4664
/*
 
4665
 * Draws a line from the cursor position to the point of coordinates.
 
4666
 * handle - is handle of the window
 
4667
 * n - specifies line in the window (user can have more lines in the window)
 
4668
 * x, y - coordinates
 
4669
 */
 
4670
static void 
 
4671
draw (handle, n, x, y)
 
4672
  int handle, n;
 
4673
  double x, y;
 
4674
{
 
4675
  d_draw (handle, n,
 
4676
          (int)floor ((x - channel[handle].start_time)
 
4677
                      * channel[handle].member[n].ax),
 
4678
          channel[handle].w_resolution[1] - 1
 
4679
          - (int)floor ((y - channel[handle].member[n].lower)
 
4680
                        * channel[handle].member[n].ay));
 
4681
}
 
4682
 
 
4683
 
 
4684
\end{verbatim}
 
4685
 
 
4686
 
 
4687
\subsection{Function {\sf draw\_point()}}
 
4688
 
 
4689
\begin{verbatim}
 
4690
 
 
4691
 
 
4692
/*
 
4693
 * Draws a point from the coordinates.
 
4694
 * handle - is handle of the window
 
4695
 * n - specifies line in the window (user can have more lines in the window)
 
4696
 * x, y - coordinates
 
4697
 */
 
4698
static void
 
4699
draw_point (handle, n, x, y)
 
4700
  int handle, n;
 
4701
  double x, y;
 
4702
{
 
4703
  d_point (handle, n,
 
4704
           (int)floor ((x - channel[handle].start_time)
 
4705
                       * channel[handle].member[n].ax),
 
4706
           channel[handle].w_resolution[1] - 1
 
4707
           - (int)floor ((y - channel[handle].member[n].lower)
 
4708
                         * channel[handle].member[n].ay));
 
4709
}
 
4710
 
 
4711
 
 
4712
\end{verbatim}
 
4713
 
 
4714
 
 
4715
\chapter{Internal representation of types}
 
4716
 
 
4717
\section{Representation of a type}
 
4718
 
 
4719
The proper internal representation structure has to uniquely answer
 
4720
the following questions:
 
4721
 
 
4722
\begin{itemize}
 
4723
\item array, simple variable, function with or without exporting
 
4724
parameter types
 
4725
 
 
4726
\item function type (distance):
 
4727
 
 
4728
\begin{itemize}
 
4729
 
 
4730
\item global
 
4731
 
 
4732
\item local
 
4733
 
 
4734
\item intrinsic
 
4735
 
 
4736
\item remote
 
4737
 
 
4738
\item $\vdots$
 
4739
 
 
4740
\end{itemize}
 
4741
 
 
4742
\item arithmetic class:
 
4743
 
 
4744
\begin{itemize}
 
4745
 
 
4746
\item integer
 
4747
 
 
4748
\item double
 
4749
 
 
4750
\item $\vdots$
 
4751
 
 
4752
\end{itemize}
 
4753
 
 
4754
\item if it is an array - list of dimensions
 
4755
 
 
4756
\item if it is a function:
 
4757
 
 
4758
\begin{itemize}
 
4759
 
 
4760
\item list of parameter type specifiers (optional)
 
4761
 
 
4762
\item list of formal parameters (optional)
 
4763
 
 
4764
\end{itemize}
 
4765
 
 
4766
\item if it is a function - it is a definition or declaration (body
 
4767
flag)
 
4768
 
 
4769
\item address
 
4770
 
 
4771
\item if it is a function definition, it was already formally called
 
4772
(formal call backpatching)
 
4773
 
 
4774
\end{itemize}
 
4775
 
 
4776
We would like to have an internal structure that is much wider then
 
4777
the actual type possibilities in C. But the semantic actions are only
 
4778
defined for the subset of C-like type definitions and declarations.
 
4779
Therefore we chose the following structure:\label{internal_type}
 
4780
 
 
4781
\begin{verbatim}
 
4782
 
 
4783
                                /* Internal type structure. */
 
4784
struct internal_type
 
4785
{
 
4786
  struct internal_type *input;
 
4787
  struct internal_type *arity;
 
4788
  char *field_name;
 
4789
  int offset;
 
4790
  struct attr attribute;
 
4791
  struct internal_type *output;
 
4792
};
 
4793
 
 
4794
 
 
4795
\end{verbatim}
 
4796
\index{type!internal}
 
4797
\index{variable!internal\_type}
 
4798
 
 
4799
Representation of the type declaration:
 
4800
 
 
4801
\begin{verbatim}
 
4802
int a(int b, int c(.....), ....);
 
4803
\end{verbatim}
 
4804
 
 
4805
is in the figure~\ref{internal11}. The structure member {\sf attribute}
 
4806
is a substructure. The structure member {\sf output} is
 
4807
pointer to the structure {\sf internal\_type}. 
 
4808
 
 
4809
\begin{figure}
 
4810
\begin{center}
 
4811
{\setlength{\unitlength}{0.01250000in}%
 
4812
%
 
4813
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
4814
% extract first six characters in \fmtname
 
4815
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
4816
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
4817
\ifx\x\y   % LaTeX or SliTeX?
 
4818
\gdef\SetFigFont#1#2#3{%
 
4819
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
4820
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
4821
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
4822
     \huge\fi\fi\fi\fi\fi\fi
 
4823
  \csname #3\endcsname}%
 
4824
\else
 
4825
\gdef\SetFigFont#1#2#3{\begingroup
 
4826
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
4827
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
4828
  \expandafter\x
 
4829
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
4830
    \csname @\romannumeral\the\count@ pt\endcsname
 
4831
  \csname #3\endcsname}%
 
4832
\fi
 
4833
\fi\endgroup
 
4834
\begin{picture}(514,449)(28,388)
 
4835
\thinlines
 
4836
\put(464,580){\vector( 3, 4){ 24.360}}
 
4837
\put( 56,619){\vector( 0,-1){ 25}}
 
4838
\put( 81,810){\vector( 3, 1){ 26.400}}
 
4839
\put(107,797){\line( 1, 0){ 51}}
 
4840
\put(107,772){\line( 1, 0){ 51}}
 
4841
\put(107,645){\line( 1, 0){ 51}}
 
4842
\put(120,772){\line( 0,-1){127}}
 
4843
\put(120,746){\line( 1, 0){ 38}}
 
4844
\put(120,721){\line( 1, 0){ 38}}
 
4845
\put(120,696){\line( 1, 0){ 38}}
 
4846
\put(120,670){\line( 1, 0){ 38}}
 
4847
\put(158,784){\vector( 3, 4){ 23.400}}
 
4848
\put(234,784){\vector( 3, 4){ 23.760}}
 
4849
\put(311,784){\vector( 3, 4){ 23.400}}
 
4850
\put(209,823){\line( 0, 1){ 12}}
 
4851
\put(209,835){\line( 1, 0){229}}
 
4852
\put(438,835){\vector( 0,-1){216}}
 
4853
\put(107,619){\framebox(51,204){}}
 
4854
\put(183,797){\line( 1, 0){ 51}}
 
4855
\put(183,772){\line( 1, 0){ 51}}
 
4856
\put(183,645){\line( 1, 0){ 51}}
 
4857
\put(183,619){\framebox(51,204){}}
 
4858
\put(196,772){\line( 0,-1){127}}
 
4859
\put(196,746){\line( 1, 0){ 38}}
 
4860
\put(196,721){\line( 1, 0){ 38}}
 
4861
\put(196,696){\line( 1, 0){ 38}}
 
4862
\put(196,670){\line( 1, 0){ 38}}
 
4863
\put(209,619){\vector( 0,-1){ 25}}
 
4864
\put(260,797){\line( 1, 0){ 51}}
 
4865
\put(260,772){\line( 1, 0){ 51}}
 
4866
\put(260,645){\line( 1, 0){ 51}}
 
4867
\put(260,619){\framebox(51,204){}}
 
4868
\put(273,772){\line( 0,-1){127}}
 
4869
\put(273,746){\line( 1, 0){ 38}}
 
4870
\put(273,721){\line( 1, 0){ 38}}
 
4871
\put(273,696){\line( 1, 0){ 38}}
 
4872
\put(273,670){\line( 1, 0){ 38}}
 
4873
\put(336,797){\line( 1, 0){ 51}}
 
4874
\put(336,772){\line( 1, 0){ 51}}
 
4875
\put(336,645){\line( 1, 0){ 51}}
 
4876
\put(336,619){\framebox(51,204){}}
 
4877
\put(349,772){\line( 0,-1){127}}
 
4878
\put(349,746){\line( 1, 0){ 38}}
 
4879
\put(349,721){\line( 1, 0){ 38}}
 
4880
\put(349,696){\line( 1, 0){ 38}}
 
4881
\put(349,670){\line( 1, 0){ 38}}
 
4882
\put(413,594){\line( 1, 0){ 51}}
 
4883
\put(413,568){\line( 1, 0){ 51}}
 
4884
\put(413,441){\line( 1, 0){ 51}}
 
4885
\put(413,415){\framebox(51,204){}}
 
4886
\put(426,568){\line( 0,-1){127}}
 
4887
\put(426,543){\line( 1, 0){ 38}}
 
4888
\put(426,517){\line( 1, 0){ 38}}
 
4889
\put(426,492){\line( 1, 0){ 38}}
 
4890
\put(426,466){\line( 1, 0){ 38}}
 
4891
\put(489,594){\line( 1, 0){ 51}}
 
4892
\put(489,568){\line( 1, 0){ 51}}
 
4893
\put(489,441){\line( 1, 0){ 51}}
 
4894
\put(489,415){\framebox(51,204){}}
 
4895
\put(502,568){\line( 0,-1){127}}
 
4896
\put(502,543){\line( 1, 0){ 38}}
 
4897
\put(502,517){\line( 1, 0){ 38}}
 
4898
\put(502,492){\line( 1, 0){ 38}}
 
4899
\put(502,466){\line( 1, 0){ 38}}
 
4900
\put( 30,797){\line( 1, 0){ 51}}
 
4901
\put( 30,772){\line( 1, 0){ 51}}
 
4902
\put( 30,645){\line( 1, 0){ 51}}
 
4903
\put( 30,619){\framebox(51,204){}}
 
4904
\put( 43,772){\line( 0,-1){127}}
 
4905
\put( 43,746){\line( 1, 0){ 38}}
 
4906
\put( 43,721){\line( 1, 0){ 38}}
 
4907
\put( 43,696){\line( 1, 0){ 38}}
 
4908
\put( 43,670){\line( 1, 0){ 38}}
 
4909
\put( 30,568){\line( 1, 0){ 51}}
 
4910
\put( 30,543){\line( 1, 0){ 51}}
 
4911
\put( 30,415){\line( 1, 0){ 51}}
 
4912
\put( 30,390){\framebox(51,204){}}
 
4913
\put( 43,543){\line( 0,-1){128}}
 
4914
\put( 43,517){\line( 1, 0){ 38}}
 
4915
\put( 43,492){\line( 1, 0){ 38}}
 
4916
\put( 43,466){\line( 1, 0){ 38}}
 
4917
\put( 43,441){\line( 1, 0){ 38}}
 
4918
\put(183,568){\line( 1, 0){ 51}}
 
4919
\put(183,543){\line( 1, 0){ 51}}
 
4920
\put(183,415){\line( 1, 0){ 51}}
 
4921
\put(183,390){\framebox(51,204){}}
 
4922
\put(196,543){\line( 0,-1){128}}
 
4923
\put(196,517){\line( 1, 0){ 38}}
 
4924
\put(196,492){\line( 1, 0){ 38}}
 
4925
\put(196,466){\line( 1, 0){ 38}}
 
4926
\put(196,441){\line( 1, 0){ 38}}
 
4927
\put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4928
  \smash{%
 
4929
    A}%
 
4930
  }}
 
4931
\put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4932
  \smash{%
 
4933
    T}%
 
4934
  }}
 
4935
\put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4936
  \smash{%
 
4937
    T}%
 
4938
  }}
 
4939
\put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4940
  \smash{%
 
4941
    R}%
 
4942
  }}
 
4943
\put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4944
  \smash{%
 
4945
    I}%
 
4946
  }}
 
4947
\put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4948
  \smash{%
 
4949
    B}%
 
4950
  }}
 
4951
\put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4952
  \smash{%
 
4953
    U}%
 
4954
  }}
 
4955
\put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4956
  \smash{%
 
4957
    T}%
 
4958
  }}
 
4959
\put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4960
  \smash{%
 
4961
    E}%
 
4962
  }}
 
4963
\put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4964
  \smash{%
 
4965
    INPUT}%
 
4966
  }}
 
4967
\put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4968
  \smash{%
 
4969
    ARITY}%
 
4970
  }}
 
4971
\put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
4972
  \smash{%
 
4973
    Memory}%
 
4974
  }}
 
4975
\put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
4976
  \smash{%
 
4977
    Size}%
 
4978
  }}
 
4979
\put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
4980
  \smash{%
 
4981
    0}%
 
4982
  }}
 
4983
\put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
4984
  \smash{%
 
4985
    INT}%
 
4986
  }}
 
4987
\put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4988
  \smash{%
 
4989
    OUTPUT}%
 
4990
  }}
 
4991
\put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4992
  \smash{%
 
4993
    OUTPUT}%
 
4994
  }}
 
4995
\put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
4996
  \smash{%
 
4997
    A}%
 
4998
  }}
 
4999
\put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5000
  \smash{%
 
5001
    T}%
 
5002
  }}
 
5003
\put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5004
  \smash{%
 
5005
    T}%
 
5006
  }}
 
5007
\put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5008
  \smash{%
 
5009
    R}%
 
5010
  }}
 
5011
\put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5012
  \smash{%
 
5013
    I}%
 
5014
  }}
 
5015
\put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5016
  \smash{%
 
5017
    B}%
 
5018
  }}
 
5019
\put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5020
  \smash{%
 
5021
    U}%
 
5022
  }}
 
5023
\put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5024
  \smash{%
 
5025
    T}%
 
5026
  }}
 
5027
\put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5028
  \smash{%
 
5029
    E}%
 
5030
  }}
 
5031
\put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5032
  \smash{%
 
5033
    INPUT}%
 
5034
  }}
 
5035
\put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5036
  \smash{%
 
5037
    ARITY}%
 
5038
  }}
 
5039
\put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5040
  \smash{%
 
5041
    Memory}%
 
5042
  }}
 
5043
\put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5044
  \smash{%
 
5045
    Size}%
 
5046
  }}
 
5047
\put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5048
  \smash{%
 
5049
    DOMAIN}%
 
5050
  }}
 
5051
\put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5052
  \smash{%
 
5053
    Class}%
 
5054
  }}
 
5055
\put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5056
  \smash{%
 
5057
    Arit}%
 
5058
  }}
 
5059
\put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5060
  \smash{%
 
5061
    Export}%
 
5062
  }}
 
5063
\put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5064
  \smash{%
 
5065
    Type}%
 
5066
  }}
 
5067
\put(285,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5068
  \smash{%
 
5069
    OUTPUT}%
 
5070
  }}
 
5071
\put(267,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5072
  \smash{%
 
5073
    A}%
 
5074
  }}
 
5075
\put(267,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5076
  \smash{%
 
5077
    T}%
 
5078
  }}
 
5079
\put(267,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5080
  \smash{%
 
5081
    T}%
 
5082
  }}
 
5083
\put(267,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5084
  \smash{%
 
5085
    R}%
 
5086
  }}
 
5087
\put(267,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5088
  \smash{%
 
5089
    I}%
 
5090
  }}
 
5091
\put(267,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5092
  \smash{%
 
5093
    B}%
 
5094
  }}
 
5095
\put(267,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5096
  \smash{%
 
5097
    U}%
 
5098
  }}
 
5099
\put(267,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5100
  \smash{%
 
5101
    T}%
 
5102
  }}
 
5103
\put(267,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5104
  \smash{%
 
5105
    E}%
 
5106
  }}
 
5107
\put(285,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5108
  \smash{%
 
5109
    INPUT}%
 
5110
  }}
 
5111
\put(285,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5112
  \smash{%
 
5113
    ARITY}%
 
5114
  }}
 
5115
\put(293,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5116
  \smash{%
 
5117
    Memory}%
 
5118
  }}
 
5119
\put(293,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5120
  \smash{%
 
5121
    Size}%
 
5122
  }}
 
5123
\put(293,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5124
  \smash{%
 
5125
    DOMAIN}%
 
5126
  }}
 
5127
\put(293,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5128
  \smash{%
 
5129
    Class}%
 
5130
  }}
 
5131
\put(293,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5132
  \smash{%
 
5133
    Arit}%
 
5134
  }}
 
5135
\put(293,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5136
  \smash{%
 
5137
    Export}%
 
5138
  }}
 
5139
\put(293,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5140
  \smash{%
 
5141
    Type}%
 
5142
  }}
 
5143
\put(362,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5144
  \smash{%
 
5145
    OUTPUT}%
 
5146
  }}
 
5147
\put(344,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5148
  \smash{%
 
5149
    A}%
 
5150
  }}
 
5151
\put(344,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5152
  \smash{%
 
5153
    T}%
 
5154
  }}
 
5155
\put(344,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5156
  \smash{%
 
5157
    T}%
 
5158
  }}
 
5159
\put(344,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5160
  \smash{%
 
5161
    R}%
 
5162
  }}
 
5163
\put(344,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5164
  \smash{%
 
5165
    I}%
 
5166
  }}
 
5167
\put(344,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5168
  \smash{%
 
5169
    B}%
 
5170
  }}
 
5171
\put(344,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5172
  \smash{%
 
5173
    U}%
 
5174
  }}
 
5175
\put(344,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5176
  \smash{%
 
5177
    T}%
 
5178
  }}
 
5179
\put(344,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5180
  \smash{%
 
5181
    E}%
 
5182
  }}
 
5183
\put(362,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5184
  \smash{%
 
5185
    INPUT}%
 
5186
  }}
 
5187
\put(362,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5188
  \smash{%
 
5189
    ARITY}%
 
5190
  }}
 
5191
\put(369,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5192
  \smash{%
 
5193
    Memory}%
 
5194
  }}
 
5195
\put(369,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5196
  \smash{%
 
5197
    Size}%
 
5198
  }}
 
5199
\put(369,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5200
  \smash{%
 
5201
    DOMAIN}%
 
5202
  }}
 
5203
\put(369,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5204
  \smash{%
 
5205
    Class}%
 
5206
  }}
 
5207
\put(369,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5208
  \smash{%
 
5209
    Arit}%
 
5210
  }}
 
5211
\put(369,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5212
  \smash{%
 
5213
    Export}%
 
5214
  }}
 
5215
\put(369,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5216
  \smash{%
 
5217
    Type}%
 
5218
  }}
 
5219
\put(438,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5220
  \smash{%
 
5221
    OUTPUT}%
 
5222
  }}
 
5223
\put(420,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5224
  \smash{%
 
5225
    A}%
 
5226
  }}
 
5227
\put(420,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5228
  \smash{%
 
5229
    T}%
 
5230
  }}
 
5231
\put(420,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5232
  \smash{%
 
5233
    T}%
 
5234
  }}
 
5235
\put(420,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5236
  \smash{%
 
5237
    R}%
 
5238
  }}
 
5239
\put(420,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5240
  \smash{%
 
5241
    I}%
 
5242
  }}
 
5243
\put(420,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5244
  \smash{%
 
5245
    B}%
 
5246
  }}
 
5247
\put(420,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5248
  \smash{%
 
5249
    U}%
 
5250
  }}
 
5251
\put(420,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5252
  \smash{%
 
5253
    T}%
 
5254
  }}
 
5255
\put(420,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5256
  \smash{%
 
5257
    E}%
 
5258
  }}
 
5259
\put(438,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5260
  \smash{%
 
5261
    INPUT}%
 
5262
  }}
 
5263
\put(438,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5264
  \smash{%
 
5265
    ARITY}%
 
5266
  }}
 
5267
\put(446,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5268
  \smash{%
 
5269
    Memory}%
 
5270
  }}
 
5271
\put(446,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5272
  \smash{%
 
5273
    Size}%
 
5274
  }}
 
5275
\put(446,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5276
  \smash{%
 
5277
    DOMAIN}%
 
5278
  }}
 
5279
\put(446,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5280
  \smash{%
 
5281
    Class}%
 
5282
  }}
 
5283
\put(446,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5284
  \smash{%
 
5285
    Arit}%
 
5286
  }}
 
5287
\put(446,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5288
  \smash{%
 
5289
    Export}%
 
5290
  }}
 
5291
\put(446,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5292
  \smash{%
 
5293
    Type}%
 
5294
  }}
 
5295
\put(515,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5296
  \smash{%
 
5297
    OUTPUT}%
 
5298
  }}
 
5299
\put(497,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5300
  \smash{%
 
5301
    A}%
 
5302
  }}
 
5303
\put(497,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5304
  \smash{%
 
5305
    T}%
 
5306
  }}
 
5307
\put(497,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5308
  \smash{%
 
5309
    T}%
 
5310
  }}
 
5311
\put(497,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5312
  \smash{%
 
5313
    R}%
 
5314
  }}
 
5315
\put(497,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5316
  \smash{%
 
5317
    I}%
 
5318
  }}
 
5319
\put(497,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5320
  \smash{%
 
5321
    B}%
 
5322
  }}
 
5323
\put(497,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5324
  \smash{%
 
5325
    U}%
 
5326
  }}
 
5327
\put(497,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5328
  \smash{%
 
5329
    T}%
 
5330
  }}
 
5331
\put(497,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5332
  \smash{%
 
5333
    E}%
 
5334
  }}
 
5335
\put(515,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5336
  \smash{%
 
5337
    INPUT}%
 
5338
  }}
 
5339
\put(515,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5340
  \smash{%
 
5341
    ARITY}%
 
5342
  }}
 
5343
\put(522,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5344
  \smash{%
 
5345
    Memory}%
 
5346
  }}
 
5347
\put(522,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5348
  \smash{%
 
5349
    Size}%
 
5350
  }}
 
5351
\put(522,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5352
  \smash{%
 
5353
    DOMAIN}%
 
5354
  }}
 
5355
\put(522,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5356
  \smash{%
 
5357
    Class}%
 
5358
  }}
 
5359
\put(522,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5360
  \smash{%
 
5361
    Arit}%
 
5362
  }}
 
5363
\put(522,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5364
  \smash{%
 
5365
    Export}%
 
5366
  }}
 
5367
\put(522,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5368
  \smash{%
 
5369
    Type}%
 
5370
  }}
 
5371
\put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5372
  \smash{%
 
5373
    OUTPUT}%
 
5374
  }}
 
5375
\put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5376
  \smash{%
 
5377
    A}%
 
5378
  }}
 
5379
\put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5380
  \smash{%
 
5381
    T}%
 
5382
  }}
 
5383
\put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5384
  \smash{%
 
5385
    T}%
 
5386
  }}
 
5387
\put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5388
  \smash{%
 
5389
    R}%
 
5390
  }}
 
5391
\put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5392
  \smash{%
 
5393
    I}%
 
5394
  }}
 
5395
\put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5396
  \smash{%
 
5397
    B}%
 
5398
  }}
 
5399
\put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5400
  \smash{%
 
5401
    U}%
 
5402
  }}
 
5403
\put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5404
  \smash{%
 
5405
    T}%
 
5406
  }}
 
5407
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5408
  \smash{%
 
5409
    E}%
 
5410
  }}
 
5411
\put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5412
  \smash{%
 
5413
    INPUT}%
 
5414
  }}
 
5415
\put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5416
  \smash{%
 
5417
    ARITY}%
 
5418
  }}
 
5419
\put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5420
  \smash{%
 
5421
    Memory}%
 
5422
  }}
 
5423
\put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5424
  \smash{%
 
5425
    Size}%
 
5426
  }}
 
5427
\put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5428
  \smash{%
 
5429
    DOMAIN}%
 
5430
  }}
 
5431
\put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5432
  \smash{%
 
5433
    Class}%
 
5434
  }}
 
5435
\put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5436
  \smash{%
 
5437
    Arit}%
 
5438
  }}
 
5439
\put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5440
  \smash{%
 
5441
    Export}%
 
5442
  }}
 
5443
\put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5444
  \smash{%
 
5445
    Type}%
 
5446
  }}
 
5447
\put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5448
  \smash{%
 
5449
    Class}%
 
5450
  }}
 
5451
\put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5452
  \smash{%
 
5453
    Class}%
 
5454
  }}
 
5455
\put(293,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5456
  \smash{%
 
5457
    Class}%
 
5458
  }}
 
5459
\put(369,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5460
  \smash{%
 
5461
    Class}%
 
5462
  }}
 
5463
\put(446,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5464
  \smash{%
 
5465
    Class}%
 
5466
  }}
 
5467
\put(522,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5468
  \smash{%
 
5469
    Class}%
 
5470
  }}
 
5471
\put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5472
  \smash{%
 
5473
    Function}%
 
5474
  }}
 
5475
\put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5476
  \smash{%
 
5477
    Function}%
 
5478
  }}
 
5479
\put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5480
  \smash{%
 
5481
    Function}%
 
5482
  }}
 
5483
\put(294,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5484
  \smash{%
 
5485
    Function}%
 
5486
  }}
 
5487
\put(369,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5488
  \smash{%
 
5489
    Function}%
 
5490
  }}
 
5491
\put(447,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5492
  \smash{%
 
5493
    Function}%
 
5494
  }}
 
5495
\put(522,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5496
  \smash{%
 
5497
    Function}%
 
5498
  }}
 
5499
\put(140,649){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5500
  \smash{%
 
5501
    NULL}%
 
5502
  }}
 
5503
\put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5504
  \smash{%
 
5505
    OUTPUT}%
 
5506
  }}
 
5507
\put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5508
  \smash{%
 
5509
    T}%
 
5510
  }}
 
5511
\put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5512
  \smash{%
 
5513
    A}%
 
5514
  }}
 
5515
\put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5516
  \smash{%
 
5517
    T}%
 
5518
  }}
 
5519
\put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5520
  \smash{%
 
5521
    T}%
 
5522
  }}
 
5523
\put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5524
  \smash{%
 
5525
    R}%
 
5526
  }}
 
5527
\put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5528
  \smash{%
 
5529
    I}%
 
5530
  }}
 
5531
\put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5532
  \smash{%
 
5533
    B}%
 
5534
  }}
 
5535
\put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5536
  \smash{%
 
5537
    U}%
 
5538
  }}
 
5539
\put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5540
  \smash{%
 
5541
    E}%
 
5542
  }}
 
5543
\put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5544
  \smash{%
 
5545
    INPUT}%
 
5546
  }}
 
5547
\put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5548
  \smash{%
 
5549
    ARITY}%
 
5550
  }}
 
5551
\put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5552
  \smash{%
 
5553
    Memory}%
 
5554
  }}
 
5555
\put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5556
  \smash{%
 
5557
    Size}%
 
5558
  }}
 
5559
\put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5560
  \smash{%
 
5561
    0}%
 
5562
  }}
 
5563
\put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5564
  \smash{%
 
5565
    0}%
 
5566
  }}
 
5567
\put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5568
  \smash{%
 
5569
    INT}%
 
5570
  }}
 
5571
\put(209,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5572
  \smash{%
 
5573
    OUTPUT}%
 
5574
  }}
 
5575
\put(191,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5576
  \smash{%
 
5577
    T}%
 
5578
  }}
 
5579
\put(191,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5580
  \smash{%
 
5581
    A}%
 
5582
  }}
 
5583
\put(191,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5584
  \smash{%
 
5585
    T}%
 
5586
  }}
 
5587
\put(191,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5588
  \smash{%
 
5589
    T}%
 
5590
  }}
 
5591
\put(191,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5592
  \smash{%
 
5593
    R}%
 
5594
  }}
 
5595
\put(191,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5596
  \smash{%
 
5597
    I}%
 
5598
  }}
 
5599
\put(191,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5600
  \smash{%
 
5601
    B}%
 
5602
  }}
 
5603
\put(191,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5604
  \smash{%
 
5605
    U}%
 
5606
  }}
 
5607
\put(191,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5608
  \smash{%
 
5609
    E}%
 
5610
  }}
 
5611
\put(209,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5612
  \smash{%
 
5613
    INPUT}%
 
5614
  }}
 
5615
\put(209,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5616
  \smash{%
 
5617
    ARITY}%
 
5618
  }}
 
5619
\put(216,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5620
  \smash{%
 
5621
    Memory}%
 
5622
  }}
 
5623
\put(216,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5624
  \smash{%
 
5625
    Size}%
 
5626
  }}
 
5627
\put(216,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5628
  \smash{%
 
5629
    0}%
 
5630
  }}
 
5631
\put(216,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5632
  \smash{%
 
5633
    0}%
 
5634
  }}
 
5635
\put(216,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5636
  \smash{%
 
5637
    INT}%
 
5638
  }}
 
5639
\put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5640
  \smash{%
 
5641
    NULL}%
 
5642
  }}
 
5643
\put(216,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5644
  \smash{%
 
5645
    NULL}%
 
5646
  }}
 
5647
\put(140,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5648
  \smash{%
 
5649
    Class}%
 
5650
  }}
 
5651
\end{picture}}%
 
5652
 
 
5653
 
 
5654
\caption{Representation of the type declaration {\sf int a(int b, int
 
5655
c(.....), ....);}}\label{internal11}
 
5656
\end{center}
 
5657
\end{figure}
 
5658
 
 
5659
Structure {\sf attr} has the following form:
 
5660
 
 
5661
\begin{verbatim}
 
5662
 
 
5663
                                /* Type attribute. */
 
5664
struct attr
 
5665
{
 
5666
  enum intern_func_class function_class;
 
5667
  int export_type;
 
5668
  enum type_qual type_qualifier;
 
5669
  enum storage_class_specifier storage_class_specifier;
 
5670
  enum intern_arit_class arit_class;
 
5671
  int memory_size;
 
5672
  char *domain;
 
5673
};
 
5674
 
 
5675
 
 
5676
\end{verbatim}
 
5677
 
 
5678
 
 
5679
The {\sf function\_class} can be simple variable, matrix, intrinsic
 
5680
function, function, remote function, $\ldots$ (full listing of
 
5681
possibilities can be found in `type.h' file\index{file!type.h}). The
 
5682
{\sf domain} pointer has the type specific form. For example for the
 
5683
type declaration \verb|int a[10][20];|, the internal structure is in
 
5684
the figure~\ref{internal12}.
 
5685
 
 
5686
\begin{figure}
 
5687
\begin{center}
 
5688
{\setlength{\unitlength}{0.01250000in}%
 
5689
%
 
5690
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
5691
% extract first six characters in \fmtname
 
5692
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
5693
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
5694
\ifx\x\y   % LaTeX or SliTeX?
 
5695
\gdef\SetFigFont#1#2#3{%
 
5696
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
5697
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
5698
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
5699
     \huge\fi\fi\fi\fi\fi\fi
 
5700
  \csname #3\endcsname}%
 
5701
\else
 
5702
\gdef\SetFigFont#1#2#3{\begingroup
 
5703
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
5704
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
5705
  \expandafter\x
 
5706
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
5707
    \csname @\romannumeral\the\count@ pt\endcsname
 
5708
  \csname #3\endcsname}%
 
5709
\fi
 
5710
\fi\endgroup
 
5711
\begin{picture}(217,437)(28,388)
 
5712
\thinlines
 
5713
\put(108,543){\framebox(51,51){}}
 
5714
\put(108,570){\line( 1, 0){ 51}}
 
5715
\put(132,549){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5716
  \smash{%
 
5717
    10}%
 
5718
  }}
 
5719
\put(132,576){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5720
  \smash{%
 
5721
    0}%
 
5722
  }}
 
5723
\put(159,657){\line( 1, 0){  9}}
 
5724
\put(168,657){\line( 0,-1){ 51}}
 
5725
\put(168,606){\line(-1, 0){ 36}}
 
5726
\put(132,606){\vector( 0,-1){ 12}}
 
5727
\put( 56,619){\vector( 0,-1){ 25}}
 
5728
\put( 81,810){\vector( 3, 1){ 26.400}}
 
5729
\put(107,797){\line( 1, 0){ 51}}
 
5730
\put(107,772){\line( 1, 0){ 51}}
 
5731
\put(107,645){\line( 1, 0){ 51}}
 
5732
\put(120,772){\line( 0,-1){127}}
 
5733
\put(120,746){\line( 1, 0){ 38}}
 
5734
\put(120,721){\line( 1, 0){ 38}}
 
5735
\put(120,696){\line( 1, 0){ 38}}
 
5736
\put(120,670){\line( 1, 0){ 38}}
 
5737
\put(158,784){\vector( 3, 4){ 23.400}}
 
5738
\put(107,619){\framebox(51,204){}}
 
5739
\put(183,797){\line( 1, 0){ 51}}
 
5740
\put(183,772){\line( 1, 0){ 51}}
 
5741
\put(183,645){\line( 1, 0){ 51}}
 
5742
\put(196,772){\line( 0,-1){127}}
 
5743
\put(196,746){\line( 1, 0){ 38}}
 
5744
\put(196,721){\line( 1, 0){ 38}}
 
5745
\put(196,696){\line( 1, 0){ 38}}
 
5746
\put(196,670){\line( 1, 0){ 38}}
 
5747
\put( 30,797){\line( 1, 0){ 51}}
 
5748
\put( 30,772){\line( 1, 0){ 51}}
 
5749
\put( 30,645){\line( 1, 0){ 51}}
 
5750
\put( 30,619){\framebox(51,204){}}
 
5751
\put( 43,772){\line( 0,-1){127}}
 
5752
\put( 43,746){\line( 1, 0){ 38}}
 
5753
\put( 43,721){\line( 1, 0){ 38}}
 
5754
\put( 43,696){\line( 1, 0){ 38}}
 
5755
\put( 43,670){\line( 1, 0){ 38}}
 
5756
\put( 30,568){\line( 1, 0){ 51}}
 
5757
\put( 30,543){\line( 1, 0){ 51}}
 
5758
\put( 30,415){\line( 1, 0){ 51}}
 
5759
\put( 30,390){\framebox(51,204){}}
 
5760
\put( 43,543){\line( 0,-1){128}}
 
5761
\put( 43,517){\line( 1, 0){ 38}}
 
5762
\put( 43,492){\line( 1, 0){ 38}}
 
5763
\put( 43,466){\line( 1, 0){ 38}}
 
5764
\put( 43,441){\line( 1, 0){ 38}}
 
5765
\put(183,619){\framebox(51,204){}}
 
5766
\put(234,657){\line( 1, 0){  9}}
 
5767
\put(243,657){\line( 0,-1){ 51}}
 
5768
\put(243,606){\line(-1, 0){ 36}}
 
5769
\put(207,606){\vector( 0,-1){ 12}}
 
5770
\put(183,543){\framebox(51,51){}}
 
5771
\put(183,570){\line( 1, 0){ 51}}
 
5772
\put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5773
  \smash{%
 
5774
    A}%
 
5775
  }}
 
5776
\put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5777
  \smash{%
 
5778
    T}%
 
5779
  }}
 
5780
\put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5781
  \smash{%
 
5782
    T}%
 
5783
  }}
 
5784
\put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5785
  \smash{%
 
5786
    R}%
 
5787
  }}
 
5788
\put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5789
  \smash{%
 
5790
    I}%
 
5791
  }}
 
5792
\put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5793
  \smash{%
 
5794
    B}%
 
5795
  }}
 
5796
\put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5797
  \smash{%
 
5798
    U}%
 
5799
  }}
 
5800
\put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5801
  \smash{%
 
5802
    T}%
 
5803
  }}
 
5804
\put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5805
  \smash{%
 
5806
    E}%
 
5807
  }}
 
5808
\put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5809
  \smash{%
 
5810
    INPUT}%
 
5811
  }}
 
5812
\put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5813
  \smash{%
 
5814
    ARITY}%
 
5815
  }}
 
5816
\put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5817
  \smash{%
 
5818
    Memory}%
 
5819
  }}
 
5820
\put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5821
  \smash{%
 
5822
    Size}%
 
5823
  }}
 
5824
\put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5825
  \smash{%
 
5826
    0}%
 
5827
  }}
 
5828
\put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
5829
  \smash{%
 
5830
    INT}%
 
5831
  }}
 
5832
\put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5833
  \smash{%
 
5834
    OUTPUT}%
 
5835
  }}
 
5836
\put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5837
  \smash{%
 
5838
    OUTPUT}%
 
5839
  }}
 
5840
\put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5841
  \smash{%
 
5842
    A}%
 
5843
  }}
 
5844
\put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5845
  \smash{%
 
5846
    T}%
 
5847
  }}
 
5848
\put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5849
  \smash{%
 
5850
    T}%
 
5851
  }}
 
5852
\put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5853
  \smash{%
 
5854
    R}%
 
5855
  }}
 
5856
\put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5857
  \smash{%
 
5858
    I}%
 
5859
  }}
 
5860
\put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5861
  \smash{%
 
5862
    B}%
 
5863
  }}
 
5864
\put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5865
  \smash{%
 
5866
    U}%
 
5867
  }}
 
5868
\put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5869
  \smash{%
 
5870
    T}%
 
5871
  }}
 
5872
\put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5873
  \smash{%
 
5874
    E}%
 
5875
  }}
 
5876
\put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5877
  \smash{%
 
5878
    INPUT}%
 
5879
  }}
 
5880
\put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5881
  \smash{%
 
5882
    ARITY}%
 
5883
  }}
 
5884
\put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5885
  \smash{%
 
5886
    Memory}%
 
5887
  }}
 
5888
\put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5889
  \smash{%
 
5890
    Size}%
 
5891
  }}
 
5892
\put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5893
  \smash{%
 
5894
    DOMAIN}%
 
5895
  }}
 
5896
\put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5897
  \smash{%
 
5898
    Class}%
 
5899
  }}
 
5900
\put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5901
  \smash{%
 
5902
    Arit}%
 
5903
  }}
 
5904
\put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5905
  \smash{%
 
5906
    Export}%
 
5907
  }}
 
5908
\put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5909
  \smash{%
 
5910
    Type}%
 
5911
  }}
 
5912
\put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5913
  \smash{%
 
5914
    OUTPUT}%
 
5915
  }}
 
5916
\put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5917
  \smash{%
 
5918
    A}%
 
5919
  }}
 
5920
\put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5921
  \smash{%
 
5922
    T}%
 
5923
  }}
 
5924
\put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5925
  \smash{%
 
5926
    T}%
 
5927
  }}
 
5928
\put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5929
  \smash{%
 
5930
    R}%
 
5931
  }}
 
5932
\put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5933
  \smash{%
 
5934
    I}%
 
5935
  }}
 
5936
\put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5937
  \smash{%
 
5938
    B}%
 
5939
  }}
 
5940
\put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5941
  \smash{%
 
5942
    U}%
 
5943
  }}
 
5944
\put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5945
  \smash{%
 
5946
    T}%
 
5947
  }}
 
5948
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5949
  \smash{%
 
5950
    E}%
 
5951
  }}
 
5952
\put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5953
  \smash{%
 
5954
    INPUT}%
 
5955
  }}
 
5956
\put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
5957
  \smash{%
 
5958
    ARITY}%
 
5959
  }}
 
5960
\put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5961
  \smash{%
 
5962
    Memory}%
 
5963
  }}
 
5964
\put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5965
  \smash{%
 
5966
    Size}%
 
5967
  }}
 
5968
\put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5969
  \smash{%
 
5970
    DOMAIN}%
 
5971
  }}
 
5972
\put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5973
  \smash{%
 
5974
    Class}%
 
5975
  }}
 
5976
\put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5977
  \smash{%
 
5978
    Arit}%
 
5979
  }}
 
5980
\put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5981
  \smash{%
 
5982
    Export}%
 
5983
  }}
 
5984
\put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5985
  \smash{%
 
5986
    Type}%
 
5987
  }}
 
5988
\put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5989
  \smash{%
 
5990
    Class}%
 
5991
  }}
 
5992
\put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5993
  \smash{%
 
5994
    Class}%
 
5995
  }}
 
5996
\put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
5997
  \smash{%
 
5998
    Function}%
 
5999
  }}
 
6000
\put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6001
  \smash{%
 
6002
    Function}%
 
6003
  }}
 
6004
\put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6005
  \smash{%
 
6006
    Function}%
 
6007
  }}
 
6008
\put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6009
  \smash{%
 
6010
    OUTPUT}%
 
6011
  }}
 
6012
\put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6013
  \smash{%
 
6014
    T}%
 
6015
  }}
 
6016
\put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6017
  \smash{%
 
6018
    A}%
 
6019
  }}
 
6020
\put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6021
  \smash{%
 
6022
    T}%
 
6023
  }}
 
6024
\put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6025
  \smash{%
 
6026
    T}%
 
6027
  }}
 
6028
\put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6029
  \smash{%
 
6030
    R}%
 
6031
  }}
 
6032
\put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6033
  \smash{%
 
6034
    I}%
 
6035
  }}
 
6036
\put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6037
  \smash{%
 
6038
    B}%
 
6039
  }}
 
6040
\put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6041
  \smash{%
 
6042
    U}%
 
6043
  }}
 
6044
\put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6045
  \smash{%
 
6046
    E}%
 
6047
  }}
 
6048
\put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6049
  \smash{%
 
6050
    INPUT}%
 
6051
  }}
 
6052
\put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6053
  \smash{%
 
6054
    ARITY}%
 
6055
  }}
 
6056
\put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6057
  \smash{%
 
6058
    Memory}%
 
6059
  }}
 
6060
\put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6061
  \smash{%
 
6062
    Size}%
 
6063
  }}
 
6064
\put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6065
  \smash{%
 
6066
    0}%
 
6067
  }}
 
6068
\put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6069
  \smash{%
 
6070
    0}%
 
6071
  }}
 
6072
\put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6073
  \smash{%
 
6074
    INT}%
 
6075
  }}
 
6076
\put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6077
  \smash{%
 
6078
    NULL}%
 
6079
  }}
 
6080
\put(207,576){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6081
  \smash{%
 
6082
    0}%
 
6083
  }}
 
6084
\put(207,549){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6085
  \smash{%
 
6086
    20}%
 
6087
  }}
 
6088
\put(140,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6089
  \smash{%
 
6090
    DOMAIN}%
 
6091
  }}
 
6092
\put(140,751){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6093
  \smash{%
 
6094
    Class}%
 
6095
  }}
 
6096
\end{picture}}%
 
6097
 
 
6098
 
 
6099
\caption{Representation of the type declaration {\sf int
 
6100
a[10][20];}}\label{internal12}
 
6101
\end{center} 
 
6102
\end{figure}
 
6103
 
 
6104
In the figure~\ref{internal11}, there is a general form of
 
6105
representation of a type declaration. Typically, the C-like declarations
 
6106
and definitions have other forms, i.e. there are not declarations of
 
6107
functions in a function declaration. Therefore, the n-ary tree pointed
 
6108
out in the figure~\ref{internal11} is simplified to the list of
 
6109
identifiers or binary tree~\ref{internal13}, respectively.
 
6110
 
 
6111
\begin{figure}
 
6112
\begin{center}
 
6113
{\setlength{\unitlength}{0.01250000in}%
 
6114
%
 
6115
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
6116
% extract first six characters in \fmtname
 
6117
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
6118
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
6119
\ifx\x\y   % LaTeX or SliTeX?
 
6120
\gdef\SetFigFont#1#2#3{%
 
6121
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
6122
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
6123
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
6124
     \huge\fi\fi\fi\fi\fi\fi
 
6125
  \csname #3\endcsname}%
 
6126
\else
 
6127
\gdef\SetFigFont#1#2#3{\begingroup
 
6128
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
6129
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
6130
  \expandafter\x
 
6131
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
6132
    \csname @\romannumeral\the\count@ pt\endcsname
 
6133
  \csname #3\endcsname}%
 
6134
\fi
 
6135
\fi\endgroup
 
6136
\begin{picture}(247,463)(28,358)
 
6137
\thinlines
 
6138
\put( 57,603){\vector( 0,-1){ 27}}
 
6139
\put( 84,805){\vector( 3, 1){ 27.600}}
 
6140
\put( 30,792){\line( 1, 0){ 54}}
 
6141
\put( 30,765){\line( 1, 0){ 54}}
 
6142
\put( 30,630){\line( 1, 0){ 54}}
 
6143
\put( 30,603){\framebox(54,216){}}
 
6144
\put( 44,765){\line( 0,-1){135}}
 
6145
\put( 44,738){\line( 1, 0){ 40}}
 
6146
\put( 44,711){\line( 1, 0){ 40}}
 
6147
\put( 44,684){\line( 1, 0){ 40}}
 
6148
\put( 44,657){\line( 1, 0){ 40}}
 
6149
\put( 30,549){\line( 1, 0){ 54}}
 
6150
\put( 30,522){\line( 1, 0){ 54}}
 
6151
\put( 30,387){\line( 1, 0){ 54}}
 
6152
\put( 30,360){\framebox(54,216){}}
 
6153
\put( 44,522){\line( 0,-1){135}}
 
6154
\put( 44,495){\line( 1, 0){ 40}}
 
6155
\put( 44,468){\line( 1, 0){ 40}}
 
6156
\put( 44,441){\line( 1, 0){ 40}}
 
6157
\put( 44,414){\line( 1, 0){ 40}}
 
6158
\put(111,792){\line( 1, 0){ 54}}
 
6159
\put(111,765){\line( 1, 0){ 54}}
 
6160
\put(111,630){\line( 1, 0){ 54}}
 
6161
\put(125,765){\line( 0,-1){135}}
 
6162
\put(165,778){\vector( 3, 4){ 25.080}}
 
6163
\put(111,603){\framebox(54,216){}}
 
6164
\put(125,738){\line( 1, 0){ 40}}
 
6165
\put(125,711){\line( 1, 0){ 40}}
 
6166
\put(125,684){\line( 1, 0){ 40}}
 
6167
\put(125,657){\line( 1, 0){ 40}}
 
6168
\put(192,792){\line( 1, 0){ 54}}
 
6169
\put(192,765){\line( 1, 0){ 54}}
 
6170
\put(192,630){\line( 1, 0){ 54}}
 
6171
\put(206,765){\line( 0,-1){135}}
 
6172
\put(246,778){\vector( 3, 4){ 25.080}}
 
6173
\put(192,603){\framebox(54,216){}}
 
6174
\put(206,738){\line( 1, 0){ 40}}
 
6175
\put(206,711){\line( 1, 0){ 40}}
 
6176
\put(206,684){\line( 1, 0){ 40}}
 
6177
\put(206,657){\line( 1, 0){ 40}}
 
6178
\put( 57,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6179
  \smash{%
 
6180
    OUTPUT}%
 
6181
  }}
 
6182
\put( 38,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6183
  \smash{%
 
6184
    A}%
 
6185
  }}
 
6186
\put( 38,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6187
  \smash{%
 
6188
    T}%
 
6189
  }}
 
6190
\put( 38,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6191
  \smash{%
 
6192
    T}%
 
6193
  }}
 
6194
\put( 38,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6195
  \smash{%
 
6196
    R}%
 
6197
  }}
 
6198
\put( 38,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6199
  \smash{%
 
6200
    I}%
 
6201
  }}
 
6202
\put( 38,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6203
  \smash{%
 
6204
    B}%
 
6205
  }}
 
6206
\put( 38,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6207
  \smash{%
 
6208
    U}%
 
6209
  }}
 
6210
\put( 38,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6211
  \smash{%
 
6212
    T}%
 
6213
  }}
 
6214
\put( 38,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6215
  \smash{%
 
6216
    E}%
 
6217
  }}
 
6218
\put( 57,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6219
  \smash{%
 
6220
    INPUT}%
 
6221
  }}
 
6222
\put( 57,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6223
  \smash{%
 
6224
    ARITY}%
 
6225
  }}
 
6226
\put( 65,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6227
  \smash{%
 
6228
    Memory}%
 
6229
  }}
 
6230
\put( 65,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6231
  \smash{%
 
6232
    Size}%
 
6233
  }}
 
6234
\put( 65,635){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6235
  \smash{%
 
6236
    DOMAIN}%
 
6237
  }}
 
6238
\put( 65,689){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6239
  \smash{%
 
6240
    Class}%
 
6241
  }}
 
6242
\put( 65,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6243
  \smash{%
 
6244
    Arit}%
 
6245
  }}
 
6246
\put( 65,727){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6247
  \smash{%
 
6248
    Export}%
 
6249
  }}
 
6250
\put( 65,716){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6251
  \smash{%
 
6252
    Type}%
 
6253
  }}
 
6254
\put( 65,743){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6255
  \smash{%
 
6256
    Class}%
 
6257
  }}
 
6258
\put( 66,756){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6259
  \smash{%
 
6260
    Functional}%
 
6261
  }}
 
6262
\put( 57,365){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6263
  \smash{%
 
6264
    OUTPUT}%
 
6265
  }}
 
6266
\put( 38,398){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6267
  \smash{%
 
6268
    T}%
 
6269
  }}
 
6270
\put( 38,508){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6271
  \smash{%
 
6272
    A}%
 
6273
  }}
 
6274
\put( 38,492){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6275
  \smash{%
 
6276
    T}%
 
6277
  }}
 
6278
\put( 38,476){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6279
  \smash{%
 
6280
    T}%
 
6281
  }}
 
6282
\put( 38,460){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6283
  \smash{%
 
6284
    R}%
 
6285
  }}
 
6286
\put( 38,444){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6287
  \smash{%
 
6288
    I}%
 
6289
  }}
 
6290
\put( 38,427){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6291
  \smash{%
 
6292
    B}%
 
6293
  }}
 
6294
\put( 38,411){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6295
  \smash{%
 
6296
    U}%
 
6297
  }}
 
6298
\put( 38,387){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6299
  \smash{%
 
6300
    E}%
 
6301
  }}
 
6302
\put( 57,554){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6303
  \smash{%
 
6304
    INPUT}%
 
6305
  }}
 
6306
\put( 57,527){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6307
  \smash{%
 
6308
    ARITY}%
 
6309
  }}
 
6310
\put( 65,430){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6311
  \smash{%
 
6312
    Memory}%
 
6313
  }}
 
6314
\put( 65,419){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6315
  \smash{%
 
6316
    Size}%
 
6317
  }}
 
6318
\put( 65,500){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6319
  \smash{%
 
6320
    0}%
 
6321
  }}
 
6322
\put( 65,473){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6323
  \smash{%
 
6324
    0}%
 
6325
  }}
 
6326
\put( 65,446){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6327
  \smash{%
 
6328
    INT}%
 
6329
  }}
 
6330
\put( 65,392){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6331
  \smash{%
 
6332
    NULL}%
 
6333
  }}
 
6334
\put(119,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6335
  \smash{%
 
6336
    I}%
 
6337
  }}
 
6338
\put(119,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6339
  \smash{%
 
6340
    T}%
 
6341
  }}
 
6342
\put(138,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6343
  \smash{%
 
6344
    OUTPUT}%
 
6345
  }}
 
6346
\put(119,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6347
  \smash{%
 
6348
    A}%
 
6349
  }}
 
6350
\put(119,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6351
  \smash{%
 
6352
    T}%
 
6353
  }}
 
6354
\put(119,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6355
  \smash{%
 
6356
    T}%
 
6357
  }}
 
6358
\put(119,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6359
  \smash{%
 
6360
    R}%
 
6361
  }}
 
6362
\put(119,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6363
  \smash{%
 
6364
    B}%
 
6365
  }}
 
6366
\put(119,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6367
  \smash{%
 
6368
    U}%
 
6369
  }}
 
6370
\put(119,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6371
  \smash{%
 
6372
    E}%
 
6373
  }}
 
6374
\put(138,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6375
  \smash{%
 
6376
    INPUT}%
 
6377
  }}
 
6378
\put(138,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6379
  \smash{%
 
6380
    ARITY}%
 
6381
  }}
 
6382
\put(146,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6383
  \smash{%
 
6384
    Memory}%
 
6385
  }}
 
6386
\put(146,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6387
  \smash{%
 
6388
    Size}%
 
6389
  }}
 
6390
\put(146,743){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6391
  \smash{%
 
6392
    0}%
 
6393
  }}
 
6394
\put(146,716){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6395
  \smash{%
 
6396
    0}%
 
6397
  }}
 
6398
\put(146,689){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6399
  \smash{%
 
6400
    INT}%
 
6401
  }}
 
6402
\put(200,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6403
  \smash{%
 
6404
    I}%
 
6405
  }}
 
6406
\put(200,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6407
  \smash{%
 
6408
    T}%
 
6409
  }}
 
6410
\put(219,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6411
  \smash{%
 
6412
    OUTPUT}%
 
6413
  }}
 
6414
\put(200,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6415
  \smash{%
 
6416
    A}%
 
6417
  }}
 
6418
\put(200,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6419
  \smash{%
 
6420
    T}%
 
6421
  }}
 
6422
\put(200,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6423
  \smash{%
 
6424
    T}%
 
6425
  }}
 
6426
\put(200,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6427
  \smash{%
 
6428
    R}%
 
6429
  }}
 
6430
\put(200,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6431
  \smash{%
 
6432
    B}%
 
6433
  }}
 
6434
\put(200,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6435
  \smash{%
 
6436
    U}%
 
6437
  }}
 
6438
\put(200,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6439
  \smash{%
 
6440
    E}%
 
6441
  }}
 
6442
\put(219,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6443
  \smash{%
 
6444
    INPUT}%
 
6445
  }}
 
6446
\put(219,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6447
  \smash{%
 
6448
    ARITY}%
 
6449
  }}
 
6450
\put(227,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6451
  \smash{%
 
6452
    Memory}%
 
6453
  }}
 
6454
\put(227,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6455
  \smash{%
 
6456
    Size}%
 
6457
  }}
 
6458
\put(227,743){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6459
  \smash{%
 
6460
    0}%
 
6461
  }}
 
6462
\put(227,716){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6463
  \smash{%
 
6464
    0}%
 
6465
  }}
 
6466
\put(227,689){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6467
  \smash{%
 
6468
    INT}%
 
6469
  }}
 
6470
\put(146,635){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6471
  \smash{%
 
6472
    NULL}%
 
6473
  }}
 
6474
\put(227,635){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6475
  \smash{%
 
6476
    NULL}%
 
6477
  }}
 
6478
\end{picture}}%
 
6479
 
 
6480
 
 
6481
\caption{Representation of typical C-like function
 
6482
declaration.}\label{internal13}
 
6483
\end{center} 
 
6484
\end{figure}
 
6485
 
 
6486
\section{C-language subset of type}
 
6487
 
 
6488
%\subsection{Internal code representation}
 
6489
 
 
6490
Some typical patterns are in figures~\ref{kod01}, \ref{kod02},
 
6491
\ref{kod03}.
 
6492
 
 
6493
\begin{figure}
 
6494
\begin{center}
 
6495
{\setlength{\unitlength}{0.01250000in}%
 
6496
%
 
6497
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
6498
% extract first six characters in \fmtname
 
6499
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
6500
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
6501
\ifx\x\y   % LaTeX or SliTeX?
 
6502
\gdef\SetFigFont#1#2#3{%
 
6503
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
6504
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
6505
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
6506
     \huge\fi\fi\fi\fi\fi\fi
 
6507
  \csname #3\endcsname}%
 
6508
\else
 
6509
\gdef\SetFigFont#1#2#3{\begingroup
 
6510
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
6511
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
6512
  \expandafter\x
 
6513
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
6514
    \csname @\romannumeral\the\count@ pt\endcsname
 
6515
  \csname #3\endcsname}%
 
6516
\fi
 
6517
\fi\endgroup
 
6518
\begin{picture}(99,75)(263,749)
 
6519
\thinlines
 
6520
\put(300,810){\line(-2,-1){ 30}}
 
6521
\put(300,810){\line( 2,-1){ 30}}
 
6522
\put(330,780){\line(-2,-1){ 30}}
 
6523
\put(330,780){\line( 0,-1){ 18}}
 
6524
\put(330,780){\line( 2,-1){ 30}}
 
6525
\put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
6526
  \smash{%
 
6527
    b}%
 
6528
  }}
 
6529
\put(300,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6530
  \smash{%
 
6531
    int}%
 
6532
  }}
 
6533
\put(360,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6534
  \smash{%
 
6535
    c}%
 
6536
  }}
 
6537
\put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6538
  \smash{%
 
6539
    int}%
 
6540
  }}
 
6541
\put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6542
  \smash{%
 
6543
    a}%
 
6544
  }}
 
6545
\put(330,753){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6546
  \smash{%
 
6547
    [ ]}%
 
6548
  }}
 
6549
\end{picture}}%
 
6550
 
 
6551
 
 
6552
\caption{Tree pattern of the declaration {\sf int
 
6553
a(int b[ ],int c);}}\label{kod01}
 
6554
\end{center} 
 
6555
\end{figure}
 
6556
 
 
6557
 
 
6558
\begin{figure}
 
6559
\begin{center}
 
6560
{\setlength{\unitlength}{0.01250000in}%
 
6561
%
 
6562
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
6563
% extract first six characters in \fmtname
 
6564
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
6565
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
6566
\ifx\x\y   % LaTeX or SliTeX?
 
6567
\gdef\SetFigFont#1#2#3{%
 
6568
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
6569
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
6570
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
6571
     \huge\fi\fi\fi\fi\fi\fi
 
6572
  \csname #3\endcsname}%
 
6573
\else
 
6574
\gdef\SetFigFont#1#2#3{\begingroup
 
6575
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
6576
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
6577
  \expandafter\x
 
6578
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
6579
    \csname @\romannumeral\the\count@ pt\endcsname
 
6580
  \csname #3\endcsname}%
 
6581
\fi
 
6582
\fi\endgroup
 
6583
\begin{picture}(129,112)(263,712)
 
6584
\thinlines
 
6585
\put(285,747){\framebox(30,15){}}
 
6586
\put(285,756){\line( 1, 0){ 30}}
 
6587
\put(315,714){\framebox(30,15){}}
 
6588
\put(315,723){\line( 1, 0){ 30}}
 
6589
\put(300,810){\line(-2,-1){ 30}}
 
6590
\put(300,810){\line( 2,-1){ 30}}
 
6591
\put(330,780){\line(-2,-1){ 30}}
 
6592
\put(330,780){\line( 2,-1){ 30}}
 
6593
\put(360,744){\line(-5,-2){ 30}}
 
6594
\put(360,744){\line( 5,-2){ 30}}
 
6595
\put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6596
  \smash{%
 
6597
    int}%
 
6598
  }}
 
6599
\put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6600
  \smash{%
 
6601
    a}%
 
6602
  }}
 
6603
\put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
6604
  \smash{%
 
6605
    [ ]}%
 
6606
  }}
 
6607
\put(360,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6608
  \smash{%
 
6609
    [ ]}%
 
6610
  }}
 
6611
\end{picture}}%
 
6612
 
 
6613
 
 
6614
\caption{Tree pattern of the declaration {\sf int
 
6615
a[ ][ ][ ];}}\label{kod02}
 
6616
\end{center} 
 
6617
\end{figure}
 
6618
 
 
6619
\begin{figure}
 
6620
\begin{center}
 
6621
{\setlength{\unitlength}{0.01250000in}%
 
6622
%
 
6623
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
6624
% extract first six characters in \fmtname
 
6625
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
6626
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
6627
\ifx\x\y   % LaTeX or SliTeX?
 
6628
\gdef\SetFigFont#1#2#3{%
 
6629
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
6630
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
6631
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
6632
     \huge\fi\fi\fi\fi\fi\fi
 
6633
  \csname #3\endcsname}%
 
6634
\else
 
6635
\gdef\SetFigFont#1#2#3{\begingroup
 
6636
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
6637
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
6638
  \expandafter\x
 
6639
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
6640
    \csname @\romannumeral\the\count@ pt\endcsname
 
6641
  \csname #3\endcsname}%
 
6642
\fi
 
6643
\fi\endgroup
 
6644
\begin{picture}(429,190)(263,634)
 
6645
\thinlines
 
6646
\put(351,684){\framebox(30,15){}}
 
6647
\put(351,693){\line( 1, 0){ 30}}
 
6648
\put(315,720){\framebox(30,15){}}
 
6649
\put(315,729){\line( 1, 0){ 30}}
 
6650
\put(531,636){\framebox(30,15){}}
 
6651
\put(531,645){\line( 1, 0){ 30}}
 
6652
\put(495,672){\framebox(30,15){}}
 
6653
\put(495,681){\line( 1, 0){ 30}}
 
6654
\put(300,810){\line(-2,-1){ 30}}
 
6655
\put(300,810){\line( 2,-1){ 30}}
 
6656
\put(330,780){\line(-2,-1){ 30}}
 
6657
\put(330,780){\line( 2,-1){ 30}}
 
6658
\put(330,780){\line( 6,-1){180}}
 
6659
\put(396,714){\line(-2,-1){ 30}}
 
6660
\put(396,714){\line( 2,-1){ 30}}
 
6661
\put(360,750){\line(-2,-1){ 30}}
 
6662
\put(360,750){\line( 2,-1){ 30}}
 
6663
\put(510,732){\line(-2,-1){ 30}}
 
6664
\put(510,732){\line( 2,-1){ 30}}
 
6665
\put(510,732){\line( 6,-1){180}}
 
6666
\put(576,666){\line(-2,-1){ 30}}
 
6667
\put(576,666){\line( 2,-1){ 30}}
 
6668
\put(540,702){\line(-2,-1){ 30}}
 
6669
\put(540,702){\line( 2,-1){ 30}}
 
6670
\put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6671
  \smash{%
 
6672
    int}%
 
6673
  }}
 
6674
\put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6675
  \smash{%
 
6676
    a}%
 
6677
  }}
 
6678
\put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
6679
  \smash{%
 
6680
    b}%
 
6681
  }}
 
6682
\put(510,735){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6683
  \smash{%
 
6684
    c}%
 
6685
  }}
 
6686
\put(300,753){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6687
  \smash{%
 
6688
    int}%
 
6689
  }}
 
6690
\put(480,705){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6691
  \smash{%
 
6692
    int}%
 
6693
  }}
 
6694
\put(360,756){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6695
  \smash{%
 
6696
    [ ]}%
 
6697
  }}
 
6698
\put(396,720){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6699
  \smash{%
 
6700
    [ ]}%
 
6701
  }}
 
6702
\put(540,708){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6703
  \smash{%
 
6704
    []}%
 
6705
  }}
 
6706
\put(576,672){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
6707
  \smash{%
 
6708
    [ ]}%
 
6709
  }}
 
6710
\end{picture}}%
 
6711
 
 
6712
 
 
6713
\caption{Tree pattern of the declaration {\sf int a(int b[ ][ ]$\ldots$,
 
6714
int c[ ][ ]$\ldots$,$\ldots$);}}\label{kod03}
 
6715
\end{center} 
 
6716
\end{figure}
 
6717
 
 
6718
In the following figures, there are some internal representations of
 
6719
C-language types (fig.~\ref{internal14}, \ref{internal15},
 
6720
\ref{internal16}, \ref{internal17}, \ref{internal18}). The rest of
 
6721
this chapter describes considerations about different language
 
6722
constructions that are using {\sf internal\_type} structures, but are
 
6723
no necessary fully implemented.
 
6724
 
 
6725
 
 
6726
\subsection{Internal representation of {\sf typedef}}
 
6727
\label{sec:typedef}
 
6728
 
 
6729
The {\sf typedef} type has the {\sf function\_class} {\em typedef}.
 
6730
Where the {\sf typedef} is used typically only the part where the
 
6731
first output points is taken and this is the internal type definition
 
6732
of the {\sf typedef} (see fig.~\ref{internal14}).
 
6733
 
 
6734
\begin{figure}
 
6735
\begin{center}
 
6736
{\setlength{\unitlength}{0.01250000in}%
 
6737
%
 
6738
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
6739
% extract first six characters in \fmtname
 
6740
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
6741
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
6742
\ifx\x\y   % LaTeX or SliTeX?
 
6743
\gdef\SetFigFont#1#2#3{%
 
6744
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
6745
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
6746
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
6747
     \huge\fi\fi\fi\fi\fi\fi
 
6748
  \csname #3\endcsname}%
 
6749
\else
 
6750
\gdef\SetFigFont#1#2#3{\begingroup
 
6751
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
6752
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
6753
  \expandafter\x
 
6754
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
6755
    \csname @\romannumeral\the\count@ pt\endcsname
 
6756
  \csname #3\endcsname}%
 
6757
\fi
 
6758
\fi\endgroup
 
6759
\begin{picture}(232,703)(28,109)
 
6760
\thinlines
 
6761
\put( 30,300){\line( 1, 0){ 54}}
 
6762
\put( 30,273){\line( 1, 0){ 54}}
 
6763
\put( 30,138){\line( 1, 0){ 54}}
 
6764
\put( 30,111){\framebox(54,216){}}
 
6765
\put( 44,273){\line( 0,-1){135}}
 
6766
\put( 44,246){\line( 1, 0){ 40}}
 
6767
\put( 44,219){\line( 1, 0){ 40}}
 
6768
\put( 44,192){\line( 1, 0){ 40}}
 
6769
\put( 44,165){\line( 1, 0){ 40}}
 
6770
\put( 57,116){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6771
  \smash{%
 
6772
    OUTPUT}%
 
6773
  }}
 
6774
\put( 38,149){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6775
  \smash{%
 
6776
    T}%
 
6777
  }}
 
6778
\put( 38,259){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6779
  \smash{%
 
6780
    A}%
 
6781
  }}
 
6782
\put( 38,243){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6783
  \smash{%
 
6784
    T}%
 
6785
  }}
 
6786
\put( 38,227){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6787
  \smash{%
 
6788
    T}%
 
6789
  }}
 
6790
\put( 38,211){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6791
  \smash{%
 
6792
    R}%
 
6793
  }}
 
6794
\put( 38,195){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6795
  \smash{%
 
6796
    I}%
 
6797
  }}
 
6798
\put( 38,178){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6799
  \smash{%
 
6800
    B}%
 
6801
  }}
 
6802
\put( 38,162){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6803
  \smash{%
 
6804
    U}%
 
6805
  }}
 
6806
\put( 57,305){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6807
  \smash{%
 
6808
    INPUT}%
 
6809
  }}
 
6810
\put( 57,278){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6811
  \smash{%
 
6812
    ARITY}%
 
6813
  }}
 
6814
\put( 65,181){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6815
  \smash{%
 
6816
    Memory}%
 
6817
  }}
 
6818
\put( 65,170){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6819
  \smash{%
 
6820
    Size}%
 
6821
  }}
 
6822
\put( 65,251){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6823
  \smash{%
 
6824
    0}%
 
6825
  }}
 
6826
\put( 65,224){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6827
  \smash{%
 
6828
    0}%
 
6829
  }}
 
6830
\put( 65,197){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6831
  \smash{%
 
6832
    INT}%
 
6833
  }}
 
6834
\put( 65,143){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
6835
  \smash{%
 
6836
    NULL}%
 
6837
  }}
 
6838
\put(111,273){\framebox(54,54){}}
 
6839
\put(111,300){\line( 1, 0){ 54}}
 
6840
\put(165,396){\line( 1, 0){ 12}}
 
6841
\put(177,396){\line( 0,-1){ 51}}
 
6842
\put(177,345){\line(-1, 0){ 39}}
 
6843
\put(138,345){\vector( 0,-1){ 18}}
 
6844
\put(138,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6845
  \smash{%
 
6846
    0}%
 
6847
  }}
 
6848
\put(138,279){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6849
  \smash{%
 
6850
    3}%
 
6851
  }}
 
6852
\put(192,273){\framebox(54,54){}}
 
6853
\put(192,300){\line( 1, 0){ 54}}
 
6854
\put(246,396){\line( 1, 0){ 12}}
 
6855
\put(258,396){\line( 0,-1){ 51}}
 
6856
\put(258,345){\line(-1, 0){ 39}}
 
6857
\put(219,345){\vector( 0,-1){ 18}}
 
6858
\put(219,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6859
  \smash{%
 
6860
    0}%
 
6861
  }}
 
6862
\put(219,279){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6863
  \smash{%
 
6864
    3}%
 
6865
  }}
 
6866
\put(192,516){\line( 1, 0){ 54}}
 
6867
\put(192,381){\line( 1, 0){ 54}}
 
6868
\put(206,489){\line( 1, 0){ 40}}
 
6869
\put(206,462){\line( 1, 0){ 40}}
 
6870
\put(206,435){\line( 1, 0){ 40}}
 
6871
\put(165,529){\vector( 3, 4){ 25.080}}
 
6872
\put( 57,354){\vector( 0,-1){ 27}}
 
6873
\put( 84,556){\vector( 3, 1){ 27.600}}
 
6874
\put( 30,543){\line( 1, 0){ 54}}
 
6875
\put( 30,354){\framebox(54,216){}}
 
6876
\put(111,543){\line( 1, 0){ 54}}
 
6877
\put(111,516){\line( 1, 0){ 54}}
 
6878
\put(111,381){\line( 1, 0){ 54}}
 
6879
\put(125,489){\line( 1, 0){ 40}}
 
6880
\put(125,462){\line( 1, 0){ 40}}
 
6881
\put(125,435){\line( 1, 0){ 40}}
 
6882
\put(125,408){\line( 1, 0){ 40}}
 
6883
\put(192,543){\line( 1, 0){ 54}}
 
6884
\put(206,516){\line( 0,-1){135}}
 
6885
\put(192,354){\framebox(54,216){}}
 
6886
\put(206,408){\line( 1, 0){ 40}}
 
6887
\put( 30,516){\line( 1, 0){ 54}}
 
6888
\put( 30,381){\line( 1, 0){ 54}}
 
6889
\put( 44,516){\line( 0,-1){135}}
 
6890
\put( 44,489){\line( 1, 0){ 40}}
 
6891
\put( 44,462){\line( 1, 0){ 40}}
 
6892
\put( 44,435){\line( 1, 0){ 40}}
 
6893
\put( 44,408){\line( 1, 0){ 40}}
 
6894
\put(125,516){\line( 0,-1){135}}
 
6895
\put(111,354){\framebox(54,216){}}
 
6896
\put( 57,594){\vector( 0,-1){ 24}}
 
6897
\put( 30,783){\line( 1, 0){ 54}}
 
6898
\put( 30,756){\line( 1, 0){ 54}}
 
6899
\put( 30,621){\line( 1, 0){ 54}}
 
6900
\put( 30,594){\framebox(54,216){}}
 
6901
\put( 44,756){\line( 0,-1){135}}
 
6902
\put( 44,729){\line( 1, 0){ 40}}
 
6903
\put( 44,702){\line( 1, 0){ 40}}
 
6904
\put( 44,675){\line( 1, 0){ 40}}
 
6905
\put( 44,648){\line( 1, 0){ 40}}
 
6906
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6907
  \smash{%
 
6908
    I}%
 
6909
  }}
 
6910
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6911
  \smash{%
 
6912
    A}%
 
6913
  }}
 
6914
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6915
  \smash{%
 
6916
    T}%
 
6917
  }}
 
6918
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6919
  \smash{%
 
6920
    T}%
 
6921
  }}
 
6922
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6923
  \smash{%
 
6924
    R}%
 
6925
  }}
 
6926
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6927
  \smash{%
 
6928
    B}%
 
6929
  }}
 
6930
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6931
  \smash{%
 
6932
    OUTPUT}%
 
6933
  }}
 
6934
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6935
  \smash{%
 
6936
    INPUT}%
 
6937
  }}
 
6938
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6939
  \smash{%
 
6940
    ARITY}%
 
6941
  }}
 
6942
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6943
  \smash{%
 
6944
    Memory}%
 
6945
  }}
 
6946
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6947
  \smash{%
 
6948
    Size}%
 
6949
  }}
 
6950
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6951
  \smash{%
 
6952
    Class}%
 
6953
  }}
 
6954
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6955
  \smash{%
 
6956
    Arit}%
 
6957
  }}
 
6958
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6959
  \smash{%
 
6960
    Export}%
 
6961
  }}
 
6962
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6963
  \smash{%
 
6964
    Type}%
 
6965
  }}
 
6966
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6967
  \smash{%
 
6968
    Class}%
 
6969
  }}
 
6970
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
6971
  \smash{%
 
6972
    Functional}%
 
6973
  }}
 
6974
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6975
  \smash{%
 
6976
    U}%
 
6977
  }}
 
6978
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6979
  \smash{%
 
6980
    E}%
 
6981
  }}
 
6982
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
6983
  \smash{%
 
6984
    0}%
 
6985
  }}
 
6986
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6987
  \smash{%
 
6988
    T}%
 
6989
  }}
 
6990
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6991
  \smash{%
 
6992
    OUTPUT}%
 
6993
  }}
 
6994
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6995
  \smash{%
 
6996
    U}%
 
6997
  }}
 
6998
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
6999
  \smash{%
 
7000
    E}%
 
7001
  }}
 
7002
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7003
  \smash{%
 
7004
    INPUT}%
 
7005
  }}
 
7006
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7007
  \smash{%
 
7008
    ARITY}%
 
7009
  }}
 
7010
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7011
  \smash{%
 
7012
    Memory}%
 
7013
  }}
 
7014
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7015
  \smash{%
 
7016
    Size}%
 
7017
  }}
 
7018
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7019
  \smash{%
 
7020
    0}%
 
7021
  }}
 
7022
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7023
  \smash{%
 
7024
    0}%
 
7025
  }}
 
7026
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7027
  \smash{%
 
7028
    INT}%
 
7029
  }}
 
7030
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7031
  \smash{%
 
7032
    A}%
 
7033
  }}
 
7034
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7035
  \smash{%
 
7036
    T}%
 
7037
  }}
 
7038
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7039
  \smash{%
 
7040
    T}%
 
7041
  }}
 
7042
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7043
  \smash{%
 
7044
    R}%
 
7045
  }}
 
7046
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7047
  \smash{%
 
7048
    I}%
 
7049
  }}
 
7050
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7051
  \smash{%
 
7052
    B}%
 
7053
  }}
 
7054
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7055
  \smash{%
 
7056
    U}%
 
7057
  }}
 
7058
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7059
  \smash{%
 
7060
    T}%
 
7061
  }}
 
7062
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7063
  \smash{%
 
7064
    E}%
 
7065
  }}
 
7066
\put( 38,138){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7067
  \smash{%
 
7068
    E}%
 
7069
  }}
 
7070
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7071
  \smash{%
 
7072
    I}%
 
7073
  }}
 
7074
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7075
  \smash{%
 
7076
    T}%
 
7077
  }}
 
7078
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7079
  \smash{%
 
7080
    OUTPUT}%
 
7081
  }}
 
7082
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7083
  \smash{%
 
7084
    A}%
 
7085
  }}
 
7086
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7087
  \smash{%
 
7088
    T}%
 
7089
  }}
 
7090
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7091
  \smash{%
 
7092
    T}%
 
7093
  }}
 
7094
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7095
  \smash{%
 
7096
    R}%
 
7097
  }}
 
7098
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7099
  \smash{%
 
7100
    B}%
 
7101
  }}
 
7102
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7103
  \smash{%
 
7104
    INPUT}%
 
7105
  }}
 
7106
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7107
  \smash{%
 
7108
    ARITY}%
 
7109
  }}
 
7110
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7111
  \smash{%
 
7112
    Memory}%
 
7113
  }}
 
7114
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7115
  \smash{%
 
7116
    Size}%
 
7117
  }}
 
7118
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7119
  \smash{%
 
7120
    0}%
 
7121
  }}
 
7122
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7123
  \smash{%
 
7124
    INT}%
 
7125
  }}
 
7126
\put( 57,599){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7127
  \smash{%
 
7128
    OUTPUT}%
 
7129
  }}
 
7130
\put( 38,632){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7131
  \smash{%
 
7132
    T}%
 
7133
  }}
 
7134
\put( 38,742){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7135
  \smash{%
 
7136
    A}%
 
7137
  }}
 
7138
\put( 38,726){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7139
  \smash{%
 
7140
    T}%
 
7141
  }}
 
7142
\put( 38,710){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7143
  \smash{%
 
7144
    T}%
 
7145
  }}
 
7146
\put( 38,694){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7147
  \smash{%
 
7148
    R}%
 
7149
  }}
 
7150
\put( 38,678){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7151
  \smash{%
 
7152
    I}%
 
7153
  }}
 
7154
\put( 38,661){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7155
  \smash{%
 
7156
    B}%
 
7157
  }}
 
7158
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7159
  \smash{%
 
7160
    U}%
 
7161
  }}
 
7162
\put( 57,788){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7163
  \smash{%
 
7164
    INPUT}%
 
7165
  }}
 
7166
\put( 57,761){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7167
  \smash{%
 
7168
    ARITY}%
 
7169
  }}
 
7170
\put( 65,664){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7171
  \smash{%
 
7172
    Memory}%
 
7173
  }}
 
7174
\put( 65,653){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7175
  \smash{%
 
7176
    Size}%
 
7177
  }}
 
7178
\put( 65,626){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7179
  \smash{%
 
7180
    NULL}%
 
7181
  }}
 
7182
\put( 65,680){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7183
  \smash{%
 
7184
    Class}%
 
7185
  }}
 
7186
\put( 66,690){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7187
  \smash{%
 
7188
    Arit}%
 
7189
  }}
 
7190
\put( 65,707){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7191
  \smash{%
 
7192
    Type}%
 
7193
  }}
 
7194
\put( 66,717){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7195
  \smash{%
 
7196
    Export}%
 
7197
  }}
 
7198
\put( 65,734){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7199
  \smash{%
 
7200
    Class}%
 
7201
  }}
 
7202
\put( 66,744){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7203
  \smash{%
 
7204
    Functional}%
 
7205
  }}
 
7206
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7207
  \smash{%
 
7208
    Domain}%
 
7209
  }}
 
7210
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7211
  \smash{%
 
7212
    Domain}%
 
7213
  }}
 
7214
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7215
  \smash{%
 
7216
    Domain}%
 
7217
  }}
 
7218
\end{picture}}%
 
7219
 
 
7220
 
 
7221
\caption{Internal representation of {\sf typedef int c[3][3];}}\label{internal14}
 
7222
\end{center} 
 
7223
\end{figure}
 
7224
 
 
7225
 
 
7226
\subsection{Internal representation of pointer}
 
7227
\label{sec:pointer}
 
7228
 
 
7229
The pointer type has the {\sf function\_class} {\em pointer}. The
 
7230
level of indirection is equal to the number of the {\sf
 
7231
  internal\_type} structures (see fig.~\ref{internal15}).
 
7232
 
 
7233
\begin{figure}
 
7234
\begin{center}
 
7235
{\setlength{\unitlength}{0.01250000in}%
 
7236
%
 
7237
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
7238
% extract first six characters in \fmtname
 
7239
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
7240
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
7241
\ifx\x\y   % LaTeX or SliTeX?
 
7242
\gdef\SetFigFont#1#2#3{%
 
7243
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
7244
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
7245
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
7246
     \huge\fi\fi\fi\fi\fi\fi
 
7247
  \csname #3\endcsname}%
 
7248
\else
 
7249
\gdef\SetFigFont#1#2#3{\begingroup
 
7250
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
7251
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
7252
  \expandafter\x
 
7253
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
7254
    \csname @\romannumeral\the\count@ pt\endcsname
 
7255
  \csname #3\endcsname}%
 
7256
\fi
 
7257
\fi\endgroup
 
7258
\begin{picture}(58,703)(28,109)
 
7259
\thinlines
 
7260
\put( 57,354){\vector( 0,-1){ 27}}
 
7261
\put( 30,543){\line( 1, 0){ 54}}
 
7262
\put( 30,354){\framebox(54,216){}}
 
7263
\put( 30,516){\line( 1, 0){ 54}}
 
7264
\put( 30,381){\line( 1, 0){ 54}}
 
7265
\put( 44,516){\line( 0,-1){135}}
 
7266
\put( 44,489){\line( 1, 0){ 40}}
 
7267
\put( 44,462){\line( 1, 0){ 40}}
 
7268
\put( 44,435){\line( 1, 0){ 40}}
 
7269
\put( 44,408){\line( 1, 0){ 40}}
 
7270
\put( 57,594){\vector( 0,-1){ 24}}
 
7271
\put( 30,783){\line( 1, 0){ 54}}
 
7272
\put( 30,756){\line( 1, 0){ 54}}
 
7273
\put( 30,621){\line( 1, 0){ 54}}
 
7274
\put( 30,594){\framebox(54,216){}}
 
7275
\put( 44,756){\line( 0,-1){135}}
 
7276
\put( 44,729){\line( 1, 0){ 40}}
 
7277
\put( 44,702){\line( 1, 0){ 40}}
 
7278
\put( 44,675){\line( 1, 0){ 40}}
 
7279
\put( 44,648){\line( 1, 0){ 40}}
 
7280
\put( 30,300){\line( 1, 0){ 54}}
 
7281
\put( 30,273){\line( 1, 0){ 54}}
 
7282
\put( 30,138){\line( 1, 0){ 54}}
 
7283
\put( 30,111){\framebox(54,216){}}
 
7284
\put( 44,273){\line( 0,-1){135}}
 
7285
\put( 44,246){\line( 1, 0){ 40}}
 
7286
\put( 44,219){\line( 1, 0){ 40}}
 
7287
\put( 44,192){\line( 1, 0){ 40}}
 
7288
\put( 44,165){\line( 1, 0){ 40}}
 
7289
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7290
  \smash{%
 
7291
    OUTPUT}%
 
7292
  }}
 
7293
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7294
  \smash{%
 
7295
    INPUT}%
 
7296
  }}
 
7297
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7298
  \smash{%
 
7299
    ARITY}%
 
7300
  }}
 
7301
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7302
  \smash{%
 
7303
    Memory}%
 
7304
  }}
 
7305
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7306
  \smash{%
 
7307
    Size}%
 
7308
  }}
 
7309
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7310
  \smash{%
 
7311
    Class}%
 
7312
  }}
 
7313
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7314
  \smash{%
 
7315
    Arit}%
 
7316
  }}
 
7317
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7318
  \smash{%
 
7319
    Export}%
 
7320
  }}
 
7321
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7322
  \smash{%
 
7323
    Type}%
 
7324
  }}
 
7325
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7326
  \smash{%
 
7327
    Class}%
 
7328
  }}
 
7329
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7330
  \smash{%
 
7331
    Functional}%
 
7332
  }}
 
7333
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7334
  \smash{%
 
7335
    A}%
 
7336
  }}
 
7337
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7338
  \smash{%
 
7339
    T}%
 
7340
  }}
 
7341
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7342
  \smash{%
 
7343
    T}%
 
7344
  }}
 
7345
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7346
  \smash{%
 
7347
    R}%
 
7348
  }}
 
7349
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7350
  \smash{%
 
7351
    I}%
 
7352
  }}
 
7353
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7354
  \smash{%
 
7355
    B}%
 
7356
  }}
 
7357
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7358
  \smash{%
 
7359
    U}%
 
7360
  }}
 
7361
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7362
  \smash{%
 
7363
    T}%
 
7364
  }}
 
7365
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7366
  \smash{%
 
7367
    E}%
 
7368
  }}
 
7369
\put( 38,138){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7370
  \smash{%
 
7371
    E}%
 
7372
  }}
 
7373
\put( 57,599){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7374
  \smash{%
 
7375
    OUTPUT}%
 
7376
  }}
 
7377
\put( 38,632){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7378
  \smash{%
 
7379
    T}%
 
7380
  }}
 
7381
\put( 38,742){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7382
  \smash{%
 
7383
    A}%
 
7384
  }}
 
7385
\put( 38,726){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7386
  \smash{%
 
7387
    T}%
 
7388
  }}
 
7389
\put( 38,710){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7390
  \smash{%
 
7391
    T}%
 
7392
  }}
 
7393
\put( 38,694){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7394
  \smash{%
 
7395
    R}%
 
7396
  }}
 
7397
\put( 38,678){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7398
  \smash{%
 
7399
    I}%
 
7400
  }}
 
7401
\put( 38,661){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7402
  \smash{%
 
7403
    B}%
 
7404
  }}
 
7405
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7406
  \smash{%
 
7407
    U}%
 
7408
  }}
 
7409
\put( 57,788){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7410
  \smash{%
 
7411
    INPUT}%
 
7412
  }}
 
7413
\put( 57,761){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7414
  \smash{%
 
7415
    ARITY}%
 
7416
  }}
 
7417
\put( 65,664){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7418
  \smash{%
 
7419
    Memory}%
 
7420
  }}
 
7421
\put( 65,653){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7422
  \smash{%
 
7423
    Size}%
 
7424
  }}
 
7425
\put( 65,626){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7426
  \smash{%
 
7427
    NULL}%
 
7428
  }}
 
7429
\put( 65,680){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7430
  \smash{%
 
7431
    Class}%
 
7432
  }}
 
7433
\put( 66,690){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7434
  \smash{%
 
7435
    Arit}%
 
7436
  }}
 
7437
\put( 65,707){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7438
  \smash{%
 
7439
    Type}%
 
7440
  }}
 
7441
\put( 66,717){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7442
  \smash{%
 
7443
    Export}%
 
7444
  }}
 
7445
\put( 65,734){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7446
  \smash{%
 
7447
    Class}%
 
7448
  }}
 
7449
\put( 66,744){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
 
7450
  \smash{%
 
7451
    Functional}%
 
7452
  }}
 
7453
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7454
  \smash{%
 
7455
    Domain}%
 
7456
  }}
 
7457
\put( 57,116){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7458
  \smash{%
 
7459
    OUTPUT}%
 
7460
  }}
 
7461
\put( 38,149){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7462
  \smash{%
 
7463
    T}%
 
7464
  }}
 
7465
\put( 38,259){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7466
  \smash{%
 
7467
    A}%
 
7468
  }}
 
7469
\put( 38,243){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7470
  \smash{%
 
7471
    T}%
 
7472
  }}
 
7473
\put( 38,227){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7474
  \smash{%
 
7475
    T}%
 
7476
  }}
 
7477
\put( 38,211){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7478
  \smash{%
 
7479
    R}%
 
7480
  }}
 
7481
\put( 38,195){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7482
  \smash{%
 
7483
    I}%
 
7484
  }}
 
7485
\put( 38,178){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7486
  \smash{%
 
7487
    B}%
 
7488
  }}
 
7489
\put( 38,162){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7490
  \smash{%
 
7491
    U}%
 
7492
  }}
 
7493
\put( 57,305){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7494
  \smash{%
 
7495
    INPUT}%
 
7496
  }}
 
7497
\put( 57,278){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7498
  \smash{%
 
7499
    ARITY}%
 
7500
  }}
 
7501
\put( 65,181){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7502
  \smash{%
 
7503
    Memory}%
 
7504
  }}
 
7505
\put( 65,170){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7506
  \smash{%
 
7507
    Size}%
 
7508
  }}
 
7509
\put( 65,251){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7510
  \smash{%
 
7511
    0}%
 
7512
  }}
 
7513
\put( 65,224){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7514
  \smash{%
 
7515
    0}%
 
7516
  }}
 
7517
\put( 65,143){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7518
  \smash{%
 
7519
    NULL}%
 
7520
  }}
 
7521
\put( 65,197){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7522
  \smash{%
 
7523
    CHAR}%
 
7524
  }}
 
7525
\end{picture}}%
 
7526
 
 
7527
 
 
7528
\caption{Internal representation of {\sf char **a;}}\label{internal15}
 
7529
\end{center} 
 
7530
\end{figure}
 
7531
 
 
7532
 
 
7533
\subsection{Internal representation of enumeration}
 
7534
\label{sec:enumeration}
 
7535
 
 
7536
The enumeration type has the {\sf function\_class} {\em enumeration}.
 
7537
The type of enumeration members are integer (see
 
7538
fig.~\ref{internal16}).
 
7539
 
 
7540
\begin{figure}
 
7541
\begin{center}
 
7542
{\setlength{\unitlength}{0.01250000in}%
 
7543
%
 
7544
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
7545
% extract first six characters in \fmtname
 
7546
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
7547
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
7548
\ifx\x\y   % LaTeX or SliTeX?
 
7549
\gdef\SetFigFont#1#2#3{%
 
7550
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
7551
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
7552
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
7553
     \huge\fi\fi\fi\fi\fi\fi
 
7554
  \csname #3\endcsname}%
 
7555
\else
 
7556
\gdef\SetFigFont#1#2#3{\begingroup
 
7557
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
7558
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
7559
  \expandafter\x
 
7560
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
7561
    \csname @\romannumeral\the\count@ pt\endcsname
 
7562
  \csname #3\endcsname}%
 
7563
\fi
 
7564
\fi\endgroup
 
7565
\begin{picture}(313,274)(28,298)
 
7566
\thinlines
 
7567
\put(165,396){\line( 1, 0){ 12}}
 
7568
\put(177,396){\line( 0,-1){ 51}}
 
7569
\put(177,345){\line(-1, 0){ 39}}
 
7570
\put(138,345){\vector( 0,-1){ 18}}
 
7571
\put(111,300){\framebox(54,27){}}
 
7572
\put(138,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7573
  \smash{%
 
7574
    0}%
 
7575
  }}
 
7576
\put( 84,556){\vector( 3, 1){ 27.600}}
 
7577
\put( 30,543){\line( 1, 0){ 54}}
 
7578
\put( 30,354){\framebox(54,216){}}
 
7579
\put(111,543){\line( 1, 0){ 54}}
 
7580
\put(111,516){\line( 1, 0){ 54}}
 
7581
\put(111,381){\line( 1, 0){ 54}}
 
7582
\put(125,489){\line( 1, 0){ 40}}
 
7583
\put(125,462){\line( 1, 0){ 40}}
 
7584
\put(125,435){\line( 1, 0){ 40}}
 
7585
\put(125,408){\line( 1, 0){ 40}}
 
7586
\put( 30,516){\line( 1, 0){ 54}}
 
7587
\put( 30,381){\line( 1, 0){ 54}}
 
7588
\put( 44,516){\line( 0,-1){135}}
 
7589
\put( 44,489){\line( 1, 0){ 40}}
 
7590
\put( 44,462){\line( 1, 0){ 40}}
 
7591
\put( 44,435){\line( 1, 0){ 40}}
 
7592
\put( 44,408){\line( 1, 0){ 40}}
 
7593
\put(125,516){\line( 0,-1){135}}
 
7594
\put(111,354){\framebox(54,216){}}
 
7595
\put(273,516){\line( 1, 0){ 54}}
 
7596
\put(273,381){\line( 1, 0){ 54}}
 
7597
\put(287,489){\line( 1, 0){ 40}}
 
7598
\put(287,462){\line( 1, 0){ 40}}
 
7599
\put(287,435){\line( 1, 0){ 40}}
 
7600
\put(246,529){\vector( 3, 4){ 25.080}}
 
7601
\put(273,543){\line( 1, 0){ 54}}
 
7602
\put(287,516){\line( 0,-1){135}}
 
7603
\put(273,354){\framebox(54,216){}}
 
7604
\put(287,408){\line( 1, 0){ 40}}
 
7605
\put(192,516){\line( 1, 0){ 54}}
 
7606
\put(192,381){\line( 1, 0){ 54}}
 
7607
\put(206,489){\line( 1, 0){ 40}}
 
7608
\put(206,462){\line( 1, 0){ 40}}
 
7609
\put(206,435){\line( 1, 0){ 40}}
 
7610
\put(165,529){\vector( 3, 4){ 25.080}}
 
7611
\put(192,543){\line( 1, 0){ 54}}
 
7612
\put(206,516){\line( 0,-1){135}}
 
7613
\put(192,354){\framebox(54,216){}}
 
7614
\put(206,408){\line( 1, 0){ 40}}
 
7615
\put(246,396){\line( 1, 0){ 12}}
 
7616
\put(258,396){\line( 0,-1){ 51}}
 
7617
\put(258,345){\line(-1, 0){ 39}}
 
7618
\put(219,345){\vector( 0,-1){ 18}}
 
7619
\put(192,300){\framebox(54,27){}}
 
7620
\put(327,396){\line( 1, 0){ 12}}
 
7621
\put(339,396){\line( 0,-1){ 51}}
 
7622
\put(339,345){\line(-1, 0){ 39}}
 
7623
\put(300,345){\vector( 0,-1){ 18}}
 
7624
\put(273,300){\framebox(54,27){}}
 
7625
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7626
  \smash{%
 
7627
    OUTPUT}%
 
7628
  }}
 
7629
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7630
  \smash{%
 
7631
    INPUT}%
 
7632
  }}
 
7633
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7634
  \smash{%
 
7635
    ARITY}%
 
7636
  }}
 
7637
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7638
  \smash{%
 
7639
    Memory}%
 
7640
  }}
 
7641
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7642
  \smash{%
 
7643
    Size}%
 
7644
  }}
 
7645
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7646
  \smash{%
 
7647
    Class}%
 
7648
  }}
 
7649
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7650
  \smash{%
 
7651
    Arit}%
 
7652
  }}
 
7653
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7654
  \smash{%
 
7655
    Export}%
 
7656
  }}
 
7657
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7658
  \smash{%
 
7659
    Type}%
 
7660
  }}
 
7661
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7662
  \smash{%
 
7663
    Class}%
 
7664
  }}
 
7665
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7666
  \smash{%
 
7667
    Functional}%
 
7668
  }}
 
7669
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7670
  \smash{%
 
7671
    U}%
 
7672
  }}
 
7673
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7674
  \smash{%
 
7675
    E}%
 
7676
  }}
 
7677
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7678
  \smash{%
 
7679
    0}%
 
7680
  }}
 
7681
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7682
  \smash{%
 
7683
    A}%
 
7684
  }}
 
7685
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7686
  \smash{%
 
7687
    T}%
 
7688
  }}
 
7689
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7690
  \smash{%
 
7691
    T}%
 
7692
  }}
 
7693
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7694
  \smash{%
 
7695
    R}%
 
7696
  }}
 
7697
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7698
  \smash{%
 
7699
    I}%
 
7700
  }}
 
7701
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7702
  \smash{%
 
7703
    B}%
 
7704
  }}
 
7705
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7706
  \smash{%
 
7707
    U}%
 
7708
  }}
 
7709
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7710
  \smash{%
 
7711
    T}%
 
7712
  }}
 
7713
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7714
  \smash{%
 
7715
    E}%
 
7716
  }}
 
7717
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7718
  \smash{%
 
7719
    I}%
 
7720
  }}
 
7721
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7722
  \smash{%
 
7723
    T}%
 
7724
  }}
 
7725
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7726
  \smash{%
 
7727
    OUTPUT}%
 
7728
  }}
 
7729
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7730
  \smash{%
 
7731
    A}%
 
7732
  }}
 
7733
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7734
  \smash{%
 
7735
    T}%
 
7736
  }}
 
7737
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7738
  \smash{%
 
7739
    T}%
 
7740
  }}
 
7741
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7742
  \smash{%
 
7743
    R}%
 
7744
  }}
 
7745
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7746
  \smash{%
 
7747
    B}%
 
7748
  }}
 
7749
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7750
  \smash{%
 
7751
    INPUT}%
 
7752
  }}
 
7753
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7754
  \smash{%
 
7755
    ARITY}%
 
7756
  }}
 
7757
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7758
  \smash{%
 
7759
    Memory}%
 
7760
  }}
 
7761
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7762
  \smash{%
 
7763
    Size}%
 
7764
  }}
 
7765
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7766
  \smash{%
 
7767
    0}%
 
7768
  }}
 
7769
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7770
  \smash{%
 
7771
    INT}%
 
7772
  }}
 
7773
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7774
  \smash{%
 
7775
    Domain}%
 
7776
  }}
 
7777
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7778
  \smash{%
 
7779
    Domain}%
 
7780
  }}
 
7781
\put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7782
  \smash{%
 
7783
    E}%
 
7784
  }}
 
7785
\put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7786
  \smash{%
 
7787
    I}%
 
7788
  }}
 
7789
\put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7790
  \smash{%
 
7791
    A}%
 
7792
  }}
 
7793
\put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7794
  \smash{%
 
7795
    T}%
 
7796
  }}
 
7797
\put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7798
  \smash{%
 
7799
    T}%
 
7800
  }}
 
7801
\put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7802
  \smash{%
 
7803
    R}%
 
7804
  }}
 
7805
\put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7806
  \smash{%
 
7807
    B}%
 
7808
  }}
 
7809
\put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7810
  \smash{%
 
7811
    T}%
 
7812
  }}
 
7813
\put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7814
  \smash{%
 
7815
    OUTPUT}%
 
7816
  }}
 
7817
\put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7818
  \smash{%
 
7819
    U}%
 
7820
  }}
 
7821
\put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7822
  \smash{%
 
7823
    INPUT}%
 
7824
  }}
 
7825
\put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7826
  \smash{%
 
7827
    ARITY}%
 
7828
  }}
 
7829
\put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7830
  \smash{%
 
7831
    Memory}%
 
7832
  }}
 
7833
\put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7834
  \smash{%
 
7835
    Size}%
 
7836
  }}
 
7837
\put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7838
  \smash{%
 
7839
    0}%
 
7840
  }}
 
7841
\put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7842
  \smash{%
 
7843
    0}%
 
7844
  }}
 
7845
\put(308,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7846
  \smash{%
 
7847
    INT}%
 
7848
  }}
 
7849
\put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7850
  \smash{%
 
7851
    Domain}%
 
7852
  }}
 
7853
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7854
  \smash{%
 
7855
    E}%
 
7856
  }}
 
7857
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7858
  \smash{%
 
7859
    I}%
 
7860
  }}
 
7861
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7862
  \smash{%
 
7863
    A}%
 
7864
  }}
 
7865
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7866
  \smash{%
 
7867
    T}%
 
7868
  }}
 
7869
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7870
  \smash{%
 
7871
    T}%
 
7872
  }}
 
7873
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7874
  \smash{%
 
7875
    R}%
 
7876
  }}
 
7877
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7878
  \smash{%
 
7879
    B}%
 
7880
  }}
 
7881
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7882
  \smash{%
 
7883
    T}%
 
7884
  }}
 
7885
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7886
  \smash{%
 
7887
    OUTPUT}%
 
7888
  }}
 
7889
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7890
  \smash{%
 
7891
    U}%
 
7892
  }}
 
7893
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7894
  \smash{%
 
7895
    INPUT}%
 
7896
  }}
 
7897
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7898
  \smash{%
 
7899
    ARITY}%
 
7900
  }}
 
7901
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7902
  \smash{%
 
7903
    Memory}%
 
7904
  }}
 
7905
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
7906
  \smash{%
 
7907
    Size}%
 
7908
  }}
 
7909
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7910
  \smash{%
 
7911
    0}%
 
7912
  }}
 
7913
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7914
  \smash{%
 
7915
    0}%
 
7916
  }}
 
7917
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
7918
  \smash{%
 
7919
    INT}%
 
7920
  }}
 
7921
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
7922
  \smash{%
 
7923
    Domain}%
 
7924
  }}
 
7925
\put(219,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7926
  \smash{%
 
7927
    1}%
 
7928
  }}
 
7929
\put(300,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
7930
  \smash{%
 
7931
    2}%
 
7932
  }}
 
7933
\end{picture}}%
 
7934
 
 
7935
 
 
7936
\caption{Internal representation of {\sf enum num \{ one, two, three \};}}\label{internal16}
 
7937
\end{center} 
 
7938
\end{figure}
 
7939
 
 
7940
 
 
7941
\subsection{Internal representation of structure}
 
7942
\label{sec:structure}
 
7943
 
 
7944
The structure type has the {\sf function\_class} {\em structure}. The
 
7945
type of structure fields is the same as for simple variables or arrays
 
7946
(see fig.~\ref{internal17}).
 
7947
 
 
7948
\begin{figure}
 
7949
\begin{center}
 
7950
{\setlength{\unitlength}{0.01250000in}%
 
7951
%
 
7952
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
7953
% extract first six characters in \fmtname
 
7954
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
7955
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
7956
\ifx\x\y   % LaTeX or SliTeX?
 
7957
\gdef\SetFigFont#1#2#3{%
 
7958
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
7959
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
7960
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
7961
     \huge\fi\fi\fi\fi\fi\fi
 
7962
  \csname #3\endcsname}%
 
7963
\else
 
7964
\gdef\SetFigFont#1#2#3{\begingroup
 
7965
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
7966
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
7967
  \expandafter\x
 
7968
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
7969
    \csname @\romannumeral\the\count@ pt\endcsname
 
7970
  \csname #3\endcsname}%
 
7971
\fi
 
7972
\fi\endgroup
 
7973
\begin{picture}(301,220)(28,352)
 
7974
\thinlines
 
7975
\put( 84,556){\vector( 3, 1){ 27.600}}
 
7976
\put( 30,543){\line( 1, 0){ 54}}
 
7977
\put( 30,354){\framebox(54,216){}}
 
7978
\put(111,543){\line( 1, 0){ 54}}
 
7979
\put(111,516){\line( 1, 0){ 54}}
 
7980
\put(111,381){\line( 1, 0){ 54}}
 
7981
\put(125,489){\line( 1, 0){ 40}}
 
7982
\put(125,462){\line( 1, 0){ 40}}
 
7983
\put(125,435){\line( 1, 0){ 40}}
 
7984
\put(125,408){\line( 1, 0){ 40}}
 
7985
\put( 30,516){\line( 1, 0){ 54}}
 
7986
\put( 30,381){\line( 1, 0){ 54}}
 
7987
\put( 44,516){\line( 0,-1){135}}
 
7988
\put( 44,489){\line( 1, 0){ 40}}
 
7989
\put( 44,462){\line( 1, 0){ 40}}
 
7990
\put( 44,435){\line( 1, 0){ 40}}
 
7991
\put( 44,408){\line( 1, 0){ 40}}
 
7992
\put(125,516){\line( 0,-1){135}}
 
7993
\put(111,354){\framebox(54,216){}}
 
7994
\put(273,516){\line( 1, 0){ 54}}
 
7995
\put(273,381){\line( 1, 0){ 54}}
 
7996
\put(287,489){\line( 1, 0){ 40}}
 
7997
\put(287,462){\line( 1, 0){ 40}}
 
7998
\put(287,435){\line( 1, 0){ 40}}
 
7999
\put(246,529){\vector( 3, 4){ 25.080}}
 
8000
\put(273,543){\line( 1, 0){ 54}}
 
8001
\put(287,516){\line( 0,-1){135}}
 
8002
\put(273,354){\framebox(54,216){}}
 
8003
\put(287,408){\line( 1, 0){ 40}}
 
8004
\put(192,516){\line( 1, 0){ 54}}
 
8005
\put(192,381){\line( 1, 0){ 54}}
 
8006
\put(206,489){\line( 1, 0){ 40}}
 
8007
\put(206,462){\line( 1, 0){ 40}}
 
8008
\put(206,435){\line( 1, 0){ 40}}
 
8009
\put(165,529){\vector( 3, 4){ 25.080}}
 
8010
\put(192,543){\line( 1, 0){ 54}}
 
8011
\put(206,516){\line( 0,-1){135}}
 
8012
\put(192,354){\framebox(54,216){}}
 
8013
\put(206,408){\line( 1, 0){ 40}}
 
8014
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8015
  \smash{%
 
8016
    OUTPUT}%
 
8017
  }}
 
8018
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8019
  \smash{%
 
8020
    INPUT}%
 
8021
  }}
 
8022
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8023
  \smash{%
 
8024
    ARITY}%
 
8025
  }}
 
8026
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8027
  \smash{%
 
8028
    Memory}%
 
8029
  }}
 
8030
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8031
  \smash{%
 
8032
    Size}%
 
8033
  }}
 
8034
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8035
  \smash{%
 
8036
    Class}%
 
8037
  }}
 
8038
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8039
  \smash{%
 
8040
    Arit}%
 
8041
  }}
 
8042
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8043
  \smash{%
 
8044
    Export}%
 
8045
  }}
 
8046
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8047
  \smash{%
 
8048
    Type}%
 
8049
  }}
 
8050
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8051
  \smash{%
 
8052
    Class}%
 
8053
  }}
 
8054
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8055
  \smash{%
 
8056
    Functional}%
 
8057
  }}
 
8058
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8059
  \smash{%
 
8060
    U}%
 
8061
  }}
 
8062
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8063
  \smash{%
 
8064
    E}%
 
8065
  }}
 
8066
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8067
  \smash{%
 
8068
    0}%
 
8069
  }}
 
8070
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8071
  \smash{%
 
8072
    A}%
 
8073
  }}
 
8074
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8075
  \smash{%
 
8076
    T}%
 
8077
  }}
 
8078
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8079
  \smash{%
 
8080
    T}%
 
8081
  }}
 
8082
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8083
  \smash{%
 
8084
    R}%
 
8085
  }}
 
8086
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8087
  \smash{%
 
8088
    I}%
 
8089
  }}
 
8090
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8091
  \smash{%
 
8092
    B}%
 
8093
  }}
 
8094
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8095
  \smash{%
 
8096
    U}%
 
8097
  }}
 
8098
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8099
  \smash{%
 
8100
    T}%
 
8101
  }}
 
8102
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8103
  \smash{%
 
8104
    E}%
 
8105
  }}
 
8106
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8107
  \smash{%
 
8108
    I}%
 
8109
  }}
 
8110
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8111
  \smash{%
 
8112
    T}%
 
8113
  }}
 
8114
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8115
  \smash{%
 
8116
    OUTPUT}%
 
8117
  }}
 
8118
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8119
  \smash{%
 
8120
    A}%
 
8121
  }}
 
8122
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8123
  \smash{%
 
8124
    T}%
 
8125
  }}
 
8126
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8127
  \smash{%
 
8128
    T}%
 
8129
  }}
 
8130
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8131
  \smash{%
 
8132
    R}%
 
8133
  }}
 
8134
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8135
  \smash{%
 
8136
    B}%
 
8137
  }}
 
8138
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8139
  \smash{%
 
8140
    INPUT}%
 
8141
  }}
 
8142
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8143
  \smash{%
 
8144
    ARITY}%
 
8145
  }}
 
8146
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8147
  \smash{%
 
8148
    Memory}%
 
8149
  }}
 
8150
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8151
  \smash{%
 
8152
    Size}%
 
8153
  }}
 
8154
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8155
  \smash{%
 
8156
    0}%
 
8157
  }}
 
8158
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8159
  \smash{%
 
8160
    INT}%
 
8161
  }}
 
8162
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8163
  \smash{%
 
8164
    Domain}%
 
8165
  }}
 
8166
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8167
  \smash{%
 
8168
    Domain}%
 
8169
  }}
 
8170
\put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8171
  \smash{%
 
8172
    E}%
 
8173
  }}
 
8174
\put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8175
  \smash{%
 
8176
    I}%
 
8177
  }}
 
8178
\put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8179
  \smash{%
 
8180
    A}%
 
8181
  }}
 
8182
\put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8183
  \smash{%
 
8184
    T}%
 
8185
  }}
 
8186
\put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8187
  \smash{%
 
8188
    T}%
 
8189
  }}
 
8190
\put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8191
  \smash{%
 
8192
    R}%
 
8193
  }}
 
8194
\put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8195
  \smash{%
 
8196
    B}%
 
8197
  }}
 
8198
\put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8199
  \smash{%
 
8200
    T}%
 
8201
  }}
 
8202
\put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8203
  \smash{%
 
8204
    OUTPUT}%
 
8205
  }}
 
8206
\put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8207
  \smash{%
 
8208
    U}%
 
8209
  }}
 
8210
\put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8211
  \smash{%
 
8212
    INPUT}%
 
8213
  }}
 
8214
\put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8215
  \smash{%
 
8216
    ARITY}%
 
8217
  }}
 
8218
\put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8219
  \smash{%
 
8220
    Memory}%
 
8221
  }}
 
8222
\put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8223
  \smash{%
 
8224
    Size}%
 
8225
  }}
 
8226
\put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8227
  \smash{%
 
8228
    0}%
 
8229
  }}
 
8230
\put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8231
  \smash{%
 
8232
    0}%
 
8233
  }}
 
8234
\put(308,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8235
  \smash{%
 
8236
    INT}%
 
8237
  }}
 
8238
\put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8239
  \smash{%
 
8240
    Domain}%
 
8241
  }}
 
8242
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8243
  \smash{%
 
8244
    E}%
 
8245
  }}
 
8246
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8247
  \smash{%
 
8248
    I}%
 
8249
  }}
 
8250
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8251
  \smash{%
 
8252
    A}%
 
8253
  }}
 
8254
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8255
  \smash{%
 
8256
    T}%
 
8257
  }}
 
8258
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8259
  \smash{%
 
8260
    T}%
 
8261
  }}
 
8262
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8263
  \smash{%
 
8264
    R}%
 
8265
  }}
 
8266
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8267
  \smash{%
 
8268
    B}%
 
8269
  }}
 
8270
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8271
  \smash{%
 
8272
    T}%
 
8273
  }}
 
8274
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8275
  \smash{%
 
8276
    OUTPUT}%
 
8277
  }}
 
8278
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8279
  \smash{%
 
8280
    U}%
 
8281
  }}
 
8282
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8283
  \smash{%
 
8284
    INPUT}%
 
8285
  }}
 
8286
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8287
  \smash{%
 
8288
    ARITY}%
 
8289
  }}
 
8290
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8291
  \smash{%
 
8292
    Memory}%
 
8293
  }}
 
8294
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8295
  \smash{%
 
8296
    Size}%
 
8297
  }}
 
8298
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8299
  \smash{%
 
8300
    0}%
 
8301
  }}
 
8302
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8303
  \smash{%
 
8304
    0}%
 
8305
  }}
 
8306
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8307
  \smash{%
 
8308
    INT}%
 
8309
  }}
 
8310
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8311
  \smash{%
 
8312
    Domain}%
 
8313
  }}
 
8314
\end{picture}}%
 
8315
 
 
8316
 
 
8317
\caption{Internal representation of {\sf struct a \{ int a, int b, int
 
8318
c\};}}\label{internal17}
 
8319
\end{center} 
 
8320
\end{figure}
 
8321
 
 
8322
 
 
8323
\subsection{Internal representation of {\sf union}}
 
8324
\label{sec:union}
 
8325
 
 
8326
The union type has the {\sf function\_class} {\em union}. Each field
 
8327
of the has its own subtype (see fig.~\ref{internal18}).
 
8328
 
 
8329
\begin{figure}
 
8330
\begin{center}
 
8331
{\setlength{\unitlength}{0.01250000in}%
 
8332
%
 
8333
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
8334
% extract first six characters in \fmtname
 
8335
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
8336
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
8337
\ifx\x\y   % LaTeX or SliTeX?
 
8338
\gdef\SetFigFont#1#2#3{%
 
8339
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
8340
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
8341
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
8342
     \huge\fi\fi\fi\fi\fi\fi
 
8343
  \csname #3\endcsname}%
 
8344
\else
 
8345
\gdef\SetFigFont#1#2#3{\begingroup
 
8346
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
8347
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
8348
  \expandafter\x
 
8349
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
8350
    \csname @\romannumeral\the\count@ pt\endcsname
 
8351
  \csname #3\endcsname}%
 
8352
\fi
 
8353
\fi\endgroup
 
8354
\begin{picture}(301,220)(28,352)
 
8355
\thinlines
 
8356
\put( 84,556){\vector( 3, 1){ 27.600}}
 
8357
\put( 30,543){\line( 1, 0){ 54}}
 
8358
\put( 30,354){\framebox(54,216){}}
 
8359
\put(111,543){\line( 1, 0){ 54}}
 
8360
\put(111,516){\line( 1, 0){ 54}}
 
8361
\put(111,381){\line( 1, 0){ 54}}
 
8362
\put(125,489){\line( 1, 0){ 40}}
 
8363
\put(125,462){\line( 1, 0){ 40}}
 
8364
\put(125,435){\line( 1, 0){ 40}}
 
8365
\put(125,408){\line( 1, 0){ 40}}
 
8366
\put( 30,516){\line( 1, 0){ 54}}
 
8367
\put( 30,381){\line( 1, 0){ 54}}
 
8368
\put( 44,516){\line( 0,-1){135}}
 
8369
\put( 44,489){\line( 1, 0){ 40}}
 
8370
\put( 44,462){\line( 1, 0){ 40}}
 
8371
\put( 44,435){\line( 1, 0){ 40}}
 
8372
\put( 44,408){\line( 1, 0){ 40}}
 
8373
\put(125,516){\line( 0,-1){135}}
 
8374
\put(111,354){\framebox(54,216){}}
 
8375
\put(273,516){\line( 1, 0){ 54}}
 
8376
\put(273,381){\line( 1, 0){ 54}}
 
8377
\put(287,489){\line( 1, 0){ 40}}
 
8378
\put(287,462){\line( 1, 0){ 40}}
 
8379
\put(287,435){\line( 1, 0){ 40}}
 
8380
\put(246,529){\vector( 3, 4){ 25.080}}
 
8381
\put(273,543){\line( 1, 0){ 54}}
 
8382
\put(287,516){\line( 0,-1){135}}
 
8383
\put(273,354){\framebox(54,216){}}
 
8384
\put(287,408){\line( 1, 0){ 40}}
 
8385
\put(192,516){\line( 1, 0){ 54}}
 
8386
\put(192,381){\line( 1, 0){ 54}}
 
8387
\put(206,489){\line( 1, 0){ 40}}
 
8388
\put(206,462){\line( 1, 0){ 40}}
 
8389
\put(206,435){\line( 1, 0){ 40}}
 
8390
\put(165,529){\vector( 3, 4){ 25.080}}
 
8391
\put(192,543){\line( 1, 0){ 54}}
 
8392
\put(206,516){\line( 0,-1){135}}
 
8393
\put(192,354){\framebox(54,216){}}
 
8394
\put(206,408){\line( 1, 0){ 40}}
 
8395
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8396
  \smash{%
 
8397
    OUTPUT}%
 
8398
  }}
 
8399
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8400
  \smash{%
 
8401
    INPUT}%
 
8402
  }}
 
8403
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8404
  \smash{%
 
8405
    ARITY}%
 
8406
  }}
 
8407
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8408
  \smash{%
 
8409
    Memory}%
 
8410
  }}
 
8411
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8412
  \smash{%
 
8413
    Size}%
 
8414
  }}
 
8415
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8416
  \smash{%
 
8417
    Class}%
 
8418
  }}
 
8419
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8420
  \smash{%
 
8421
    Arit}%
 
8422
  }}
 
8423
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8424
  \smash{%
 
8425
    Export}%
 
8426
  }}
 
8427
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8428
  \smash{%
 
8429
    Type}%
 
8430
  }}
 
8431
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8432
  \smash{%
 
8433
    Class}%
 
8434
  }}
 
8435
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8436
  \smash{%
 
8437
    Functional}%
 
8438
  }}
 
8439
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8440
  \smash{%
 
8441
    U}%
 
8442
  }}
 
8443
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8444
  \smash{%
 
8445
    E}%
 
8446
  }}
 
8447
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8448
  \smash{%
 
8449
    0}%
 
8450
  }}
 
8451
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8452
  \smash{%
 
8453
    A}%
 
8454
  }}
 
8455
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8456
  \smash{%
 
8457
    T}%
 
8458
  }}
 
8459
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8460
  \smash{%
 
8461
    T}%
 
8462
  }}
 
8463
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8464
  \smash{%
 
8465
    R}%
 
8466
  }}
 
8467
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8468
  \smash{%
 
8469
    I}%
 
8470
  }}
 
8471
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8472
  \smash{%
 
8473
    B}%
 
8474
  }}
 
8475
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8476
  \smash{%
 
8477
    U}%
 
8478
  }}
 
8479
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8480
  \smash{%
 
8481
    T}%
 
8482
  }}
 
8483
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8484
  \smash{%
 
8485
    E}%
 
8486
  }}
 
8487
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8488
  \smash{%
 
8489
    I}%
 
8490
  }}
 
8491
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8492
  \smash{%
 
8493
    T}%
 
8494
  }}
 
8495
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8496
  \smash{%
 
8497
    OUTPUT}%
 
8498
  }}
 
8499
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8500
  \smash{%
 
8501
    A}%
 
8502
  }}
 
8503
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8504
  \smash{%
 
8505
    T}%
 
8506
  }}
 
8507
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8508
  \smash{%
 
8509
    T}%
 
8510
  }}
 
8511
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8512
  \smash{%
 
8513
    R}%
 
8514
  }}
 
8515
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8516
  \smash{%
 
8517
    B}%
 
8518
  }}
 
8519
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8520
  \smash{%
 
8521
    INPUT}%
 
8522
  }}
 
8523
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8524
  \smash{%
 
8525
    ARITY}%
 
8526
  }}
 
8527
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8528
  \smash{%
 
8529
    Memory}%
 
8530
  }}
 
8531
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8532
  \smash{%
 
8533
    Size}%
 
8534
  }}
 
8535
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8536
  \smash{%
 
8537
    0}%
 
8538
  }}
 
8539
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8540
  \smash{%
 
8541
    INT}%
 
8542
  }}
 
8543
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8544
  \smash{%
 
8545
    Domain}%
 
8546
  }}
 
8547
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8548
  \smash{%
 
8549
    Domain}%
 
8550
  }}
 
8551
\put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8552
  \smash{%
 
8553
    E}%
 
8554
  }}
 
8555
\put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8556
  \smash{%
 
8557
    I}%
 
8558
  }}
 
8559
\put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8560
  \smash{%
 
8561
    A}%
 
8562
  }}
 
8563
\put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8564
  \smash{%
 
8565
    T}%
 
8566
  }}
 
8567
\put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8568
  \smash{%
 
8569
    T}%
 
8570
  }}
 
8571
\put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8572
  \smash{%
 
8573
    R}%
 
8574
  }}
 
8575
\put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8576
  \smash{%
 
8577
    B}%
 
8578
  }}
 
8579
\put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8580
  \smash{%
 
8581
    T}%
 
8582
  }}
 
8583
\put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8584
  \smash{%
 
8585
    OUTPUT}%
 
8586
  }}
 
8587
\put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8588
  \smash{%
 
8589
    U}%
 
8590
  }}
 
8591
\put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8592
  \smash{%
 
8593
    INPUT}%
 
8594
  }}
 
8595
\put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8596
  \smash{%
 
8597
    ARITY}%
 
8598
  }}
 
8599
\put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8600
  \smash{%
 
8601
    Memory}%
 
8602
  }}
 
8603
\put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8604
  \smash{%
 
8605
    Size}%
 
8606
  }}
 
8607
\put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8608
  \smash{%
 
8609
    0}%
 
8610
  }}
 
8611
\put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8612
  \smash{%
 
8613
    0}%
 
8614
  }}
 
8615
\put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8616
  \smash{%
 
8617
    Domain}%
 
8618
  }}
 
8619
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8620
  \smash{%
 
8621
    E}%
 
8622
  }}
 
8623
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8624
  \smash{%
 
8625
    I}%
 
8626
  }}
 
8627
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8628
  \smash{%
 
8629
    A}%
 
8630
  }}
 
8631
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8632
  \smash{%
 
8633
    T}%
 
8634
  }}
 
8635
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8636
  \smash{%
 
8637
    T}%
 
8638
  }}
 
8639
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8640
  \smash{%
 
8641
    R}%
 
8642
  }}
 
8643
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8644
  \smash{%
 
8645
    B}%
 
8646
  }}
 
8647
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8648
  \smash{%
 
8649
    T}%
 
8650
  }}
 
8651
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8652
  \smash{%
 
8653
    OUTPUT}%
 
8654
  }}
 
8655
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8656
  \smash{%
 
8657
    U}%
 
8658
  }}
 
8659
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8660
  \smash{%
 
8661
    INPUT}%
 
8662
  }}
 
8663
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
 
8664
  \smash{%
 
8665
    ARITY}%
 
8666
  }}
 
8667
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8668
  \smash{%
 
8669
    Memory}%
 
8670
  }}
 
8671
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8672
  \smash{%
 
8673
    Size}%
 
8674
  }}
 
8675
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8676
  \smash{%
 
8677
    0}%
 
8678
  }}
 
8679
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8680
  \smash{%
 
8681
    0}%
 
8682
  }}
 
8683
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8684
  \smash{%
 
8685
    Domain}%
 
8686
  }}
 
8687
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8688
  \smash{%
 
8689
    FLOAT}%
 
8690
  }}
 
8691
\put(308,440){\makebox(0,0)[b]{\SetFigFont{8}{9.6}{rm}%
 
8692
  \smash{%
 
8693
    DOUBLE}%
 
8694
  }}
 
8695
\end{picture}}%
 
8696
 
 
8697
 
 
8698
\caption{Internal representation of {\sf union a \{ int a, float b,
 
8699
double c\};}}\label{internal18}
 
8700
\end{center} 
 
8701
\end{figure}
 
8702
 
 
8703
 
 
8704
\section{Coding of C-language subset of type and export type}
 
8705
 
 
8706
\noindent
 
8707
{\bf Note:} not implemented yet.
 
8708
 
 
8709
\noindent
 
8710
There is a bit for input and a bit for output. The both bits indicate
 
8711
present of input and output structure, respectively. The first 32 bits
 
8712
after current 32 bits is an output member. The structure member domain
 
8713
indicate how many 32-bit words are reserved for the domain
 
8714
information. Currently, domain information are 2 32-bit words for
 
8715
arrays and a 32-bit word for enumeration type. The structure member
 
8716
arit\_class defines an atomary type. The structure member export\_type
 
8717
indicates if the type should be exported. The structure member
 
8718
function\_class has only two options local and remote, now. The
 
8719
structure member arity indicates the distance in number of 32-bit
 
8720
words to the continuing of the structure.
 
8721
 
 
8722
We propose this arrangements of bits:
 
8723
 
 
8724
\vspace{1cm}
 
8725
 
 
8726
\begin{center}
 
8727
\begin{tabular}{|c|c|l|}\hline
 
8728
bit & \# of bits & name \\ \hline \hline
 
8729
0 & (1) & input \\ \hline
 
8730
1 & (1) & output \\ \hline
 
8731
2-4 & (3) & domain \\ \hline
 
8732
5-7 & (3) & memory\_size \\ \hline
 
8733
8-13 & (6) & arit\_class \\ \hline
 
8734
14 & (1) & export\_type \\ \hline
 
8735
15-19 & (5) & function\_class \\ \hline
 
8736
20-29 & (10) & arity \\ 
 
8737
\hline \hline
 
8738
0-29 & (30) & $\sum$ \\ \hline
 
8739
\end{tabular}
 
8740
\end{center}
 
8741
 
 
8742
We use 30 bits of each 32 bit word. 2 bits are left unused.
 
8743
 
 
8744
Example of \verb|extern int a(int b, int c[][10], ....)...| is in the
 
8745
figure~\ref{cod_tree} and bit representation in the following table
 
8746
(note that \verb|[]| is internally represented as -2,
 
8747
i.e. 0xfffffffe):
 
8748
 
 
8749
\begin{figure}
 
8750
{\setlength{\unitlength}{0.01250000in}%
 
8751
%
 
8752
\begingroup\makeatletter\ifx\SetFigFont\undefined
 
8753
% extract first six characters in \fmtname
 
8754
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
 
8755
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
 
8756
\ifx\x\y   % LaTeX or SliTeX?
 
8757
\gdef\SetFigFont#1#2#3{%
 
8758
  \ifnum #1<17\tiny\else \ifnum #1<20\small\else
 
8759
  \ifnum #1<24\normalsize\else \ifnum #1<29\large\else
 
8760
  \ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
 
8761
     \huge\fi\fi\fi\fi\fi\fi
 
8762
  \csname #3\endcsname}%
 
8763
\else
 
8764
\gdef\SetFigFont#1#2#3{\begingroup
 
8765
  \count@#1\relax \ifnum 25<\count@\count@25\fi
 
8766
  \def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
 
8767
  \expandafter\x
 
8768
    \csname \romannumeral\the\count@ pt\expandafter\endcsname
 
8769
    \csname @\romannumeral\the\count@ pt\endcsname
 
8770
  \csname #3\endcsname}%
 
8771
\fi
 
8772
\fi\endgroup
 
8773
\begin{picture}(520,524)(28,313)
 
8774
\thinlines
 
8775
\put(465,450){\line( 1, 0){  6}}
 
8776
\put(471,450){\line( 0,-1){ 57}}
 
8777
\put(471,393){\line(-1, 0){ 33}}
 
8778
\put(438,393){\vector( 0,-1){ 18}}
 
8779
\put(414,315){\framebox(51,60){}}
 
8780
\put(414,345){\line( 1, 0){ 51}}
 
8781
\put(438,354){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
8782
  \smash{%
 
8783
    0}%
 
8784
  }}
 
8785
\put(438,324){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
8786
  \smash{%
 
8787
    -2}%
 
8788
  }}
 
8789
\put(464,580){\vector( 3, 4){ 24.360}}
 
8790
\put( 56,619){\vector( 0,-1){ 25}}
 
8791
\put( 81,810){\vector( 3, 1){ 26.400}}
 
8792
\put(107,797){\line( 1, 0){ 51}}
 
8793
\put(107,772){\line( 1, 0){ 51}}
 
8794
\put(107,645){\line( 1, 0){ 51}}
 
8795
\put(120,772){\line( 0,-1){127}}
 
8796
\put(120,746){\line( 1, 0){ 38}}
 
8797
\put(120,721){\line( 1, 0){ 38}}
 
8798
\put(120,696){\line( 1, 0){ 38}}
 
8799
\put(120,670){\line( 1, 0){ 38}}
 
8800
\put(158,784){\vector( 3, 4){ 23.400}}
 
8801
\put(234,784){\vector( 3, 4){ 23.760}}
 
8802
\put(311,784){\vector( 3, 4){ 23.400}}
 
8803
\put(209,823){\line( 0, 1){ 12}}
 
8804
\put(209,835){\line( 1, 0){229}}
 
8805
\put(438,835){\vector( 0,-1){216}}
 
8806
\put(107,619){\framebox(51,204){}}
 
8807
\put(183,797){\line( 1, 0){ 51}}
 
8808
\put(183,772){\line( 1, 0){ 51}}
 
8809
\put(183,645){\line( 1, 0){ 51}}
 
8810
\put(183,619){\framebox(51,204){}}
 
8811
\put(196,772){\line( 0,-1){127}}
 
8812
\put(196,746){\line( 1, 0){ 38}}
 
8813
\put(196,721){\line( 1, 0){ 38}}
 
8814
\put(196,696){\line( 1, 0){ 38}}
 
8815
\put(196,670){\line( 1, 0){ 38}}
 
8816
\put(209,619){\vector( 0,-1){ 25}}
 
8817
\put(260,797){\line( 1, 0){ 51}}
 
8818
\put(260,772){\line( 1, 0){ 51}}
 
8819
\put(260,645){\line( 1, 0){ 51}}
 
8820
\put(260,619){\framebox(51,204){}}
 
8821
\put(273,772){\line( 0,-1){127}}
 
8822
\put(273,746){\line( 1, 0){ 38}}
 
8823
\put(273,721){\line( 1, 0){ 38}}
 
8824
\put(273,696){\line( 1, 0){ 38}}
 
8825
\put(273,670){\line( 1, 0){ 38}}
 
8826
\put(336,797){\line( 1, 0){ 51}}
 
8827
\put(336,772){\line( 1, 0){ 51}}
 
8828
\put(336,645){\line( 1, 0){ 51}}
 
8829
\put(336,619){\framebox(51,204){}}
 
8830
\put(349,772){\line( 0,-1){127}}
 
8831
\put(349,746){\line( 1, 0){ 38}}
 
8832
\put(349,721){\line( 1, 0){ 38}}
 
8833
\put(349,696){\line( 1, 0){ 38}}
 
8834
\put(349,670){\line( 1, 0){ 38}}
 
8835
\put(413,594){\line( 1, 0){ 51}}
 
8836
\put(413,568){\line( 1, 0){ 51}}
 
8837
\put(413,441){\line( 1, 0){ 51}}
 
8838
\put(413,415){\framebox(51,204){}}
 
8839
\put(426,568){\line( 0,-1){127}}
 
8840
\put(426,543){\line( 1, 0){ 38}}
 
8841
\put(426,517){\line( 1, 0){ 38}}
 
8842
\put(426,492){\line( 1, 0){ 38}}
 
8843
\put(426,466){\line( 1, 0){ 38}}
 
8844
\put(489,594){\line( 1, 0){ 51}}
 
8845
\put(489,568){\line( 1, 0){ 51}}
 
8846
\put(489,441){\line( 1, 0){ 51}}
 
8847
\put(489,415){\framebox(51,204){}}
 
8848
\put(502,568){\line( 0,-1){127}}
 
8849
\put(502,543){\line( 1, 0){ 38}}
 
8850
\put(502,517){\line( 1, 0){ 38}}
 
8851
\put(502,492){\line( 1, 0){ 38}}
 
8852
\put(502,466){\line( 1, 0){ 38}}
 
8853
\put( 30,797){\line( 1, 0){ 51}}
 
8854
\put( 30,772){\line( 1, 0){ 51}}
 
8855
\put( 30,645){\line( 1, 0){ 51}}
 
8856
\put( 30,619){\framebox(51,204){}}
 
8857
\put( 43,772){\line( 0,-1){127}}
 
8858
\put( 43,746){\line( 1, 0){ 38}}
 
8859
\put( 43,721){\line( 1, 0){ 38}}
 
8860
\put( 43,696){\line( 1, 0){ 38}}
 
8861
\put( 43,670){\line( 1, 0){ 38}}
 
8862
\put( 30,568){\line( 1, 0){ 51}}
 
8863
\put( 30,543){\line( 1, 0){ 51}}
 
8864
\put( 30,415){\line( 1, 0){ 51}}
 
8865
\put( 30,390){\framebox(51,204){}}
 
8866
\put( 43,543){\line( 0,-1){128}}
 
8867
\put( 43,517){\line( 1, 0){ 38}}
 
8868
\put( 43,492){\line( 1, 0){ 38}}
 
8869
\put( 43,466){\line( 1, 0){ 38}}
 
8870
\put( 43,441){\line( 1, 0){ 38}}
 
8871
\put(183,568){\line( 1, 0){ 51}}
 
8872
\put(183,543){\line( 1, 0){ 51}}
 
8873
\put(183,415){\line( 1, 0){ 51}}
 
8874
\put(183,390){\framebox(51,204){}}
 
8875
\put(196,543){\line( 0,-1){128}}
 
8876
\put(196,517){\line( 1, 0){ 38}}
 
8877
\put(196,492){\line( 1, 0){ 38}}
 
8878
\put(196,466){\line( 1, 0){ 38}}
 
8879
\put(196,441){\line( 1, 0){ 38}}
 
8880
\put(540,450){\line( 1, 0){  6}}
 
8881
\put(546,450){\line( 0,-1){ 57}}
 
8882
\put(546,393){\line(-1, 0){ 33}}
 
8883
\put(513,393){\vector( 0,-1){ 18}}
 
8884
\put(489,315){\framebox(51,60){}}
 
8885
\put(489,345){\line( 1, 0){ 51}}
 
8886
\put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8887
  \smash{%
 
8888
    A}%
 
8889
  }}
 
8890
\put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8891
  \smash{%
 
8892
    T}%
 
8893
  }}
 
8894
\put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8895
  \smash{%
 
8896
    T}%
 
8897
  }}
 
8898
\put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8899
  \smash{%
 
8900
    R}%
 
8901
  }}
 
8902
\put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8903
  \smash{%
 
8904
    I}%
 
8905
  }}
 
8906
\put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8907
  \smash{%
 
8908
    B}%
 
8909
  }}
 
8910
\put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8911
  \smash{%
 
8912
    U}%
 
8913
  }}
 
8914
\put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8915
  \smash{%
 
8916
    T}%
 
8917
  }}
 
8918
\put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8919
  \smash{%
 
8920
    E}%
 
8921
  }}
 
8922
\put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8923
  \smash{%
 
8924
    INPUT}%
 
8925
  }}
 
8926
\put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8927
  \smash{%
 
8928
    ARITY}%
 
8929
  }}
 
8930
\put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8931
  \smash{%
 
8932
    Memory}%
 
8933
  }}
 
8934
\put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8935
  \smash{%
 
8936
    Size}%
 
8937
  }}
 
8938
\put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8939
  \smash{%
 
8940
    0}%
 
8941
  }}
 
8942
\put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
8943
  \smash{%
 
8944
    INT}%
 
8945
  }}
 
8946
\put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8947
  \smash{%
 
8948
    OUTPUT}%
 
8949
  }}
 
8950
\put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8951
  \smash{%
 
8952
    OUTPUT}%
 
8953
  }}
 
8954
\put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8955
  \smash{%
 
8956
    A}%
 
8957
  }}
 
8958
\put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8959
  \smash{%
 
8960
    T}%
 
8961
  }}
 
8962
\put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8963
  \smash{%
 
8964
    T}%
 
8965
  }}
 
8966
\put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8967
  \smash{%
 
8968
    R}%
 
8969
  }}
 
8970
\put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8971
  \smash{%
 
8972
    I}%
 
8973
  }}
 
8974
\put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8975
  \smash{%
 
8976
    B}%
 
8977
  }}
 
8978
\put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8979
  \smash{%
 
8980
    U}%
 
8981
  }}
 
8982
\put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8983
  \smash{%
 
8984
    T}%
 
8985
  }}
 
8986
\put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8987
  \smash{%
 
8988
    E}%
 
8989
  }}
 
8990
\put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8991
  \smash{%
 
8992
    INPUT}%
 
8993
  }}
 
8994
\put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
8995
  \smash{%
 
8996
    ARITY}%
 
8997
  }}
 
8998
\put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
8999
  \smash{%
 
9000
    Memory}%
 
9001
  }}
 
9002
\put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9003
  \smash{%
 
9004
    Size}%
 
9005
  }}
 
9006
\put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9007
  \smash{%
 
9008
    DOMAIN}%
 
9009
  }}
 
9010
\put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9011
  \smash{%
 
9012
    Class}%
 
9013
  }}
 
9014
\put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9015
  \smash{%
 
9016
    Arit}%
 
9017
  }}
 
9018
\put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9019
  \smash{%
 
9020
    Export}%
 
9021
  }}
 
9022
\put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9023
  \smash{%
 
9024
    Type}%
 
9025
  }}
 
9026
\put(285,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9027
  \smash{%
 
9028
    OUTPUT}%
 
9029
  }}
 
9030
\put(267,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9031
  \smash{%
 
9032
    A}%
 
9033
  }}
 
9034
\put(267,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9035
  \smash{%
 
9036
    T}%
 
9037
  }}
 
9038
\put(267,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9039
  \smash{%
 
9040
    T}%
 
9041
  }}
 
9042
\put(267,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9043
  \smash{%
 
9044
    R}%
 
9045
  }}
 
9046
\put(267,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9047
  \smash{%
 
9048
    I}%
 
9049
  }}
 
9050
\put(267,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9051
  \smash{%
 
9052
    B}%
 
9053
  }}
 
9054
\put(267,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9055
  \smash{%
 
9056
    U}%
 
9057
  }}
 
9058
\put(267,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9059
  \smash{%
 
9060
    T}%
 
9061
  }}
 
9062
\put(267,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9063
  \smash{%
 
9064
    E}%
 
9065
  }}
 
9066
\put(285,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9067
  \smash{%
 
9068
    INPUT}%
 
9069
  }}
 
9070
\put(285,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9071
  \smash{%
 
9072
    ARITY}%
 
9073
  }}
 
9074
\put(293,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9075
  \smash{%
 
9076
    Memory}%
 
9077
  }}
 
9078
\put(293,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9079
  \smash{%
 
9080
    Size}%
 
9081
  }}
 
9082
\put(293,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9083
  \smash{%
 
9084
    DOMAIN}%
 
9085
  }}
 
9086
\put(293,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9087
  \smash{%
 
9088
    Class}%
 
9089
  }}
 
9090
\put(293,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9091
  \smash{%
 
9092
    Arit}%
 
9093
  }}
 
9094
\put(293,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9095
  \smash{%
 
9096
    Export}%
 
9097
  }}
 
9098
\put(293,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9099
  \smash{%
 
9100
    Type}%
 
9101
  }}
 
9102
\put(362,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9103
  \smash{%
 
9104
    OUTPUT}%
 
9105
  }}
 
9106
\put(344,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9107
  \smash{%
 
9108
    A}%
 
9109
  }}
 
9110
\put(344,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9111
  \smash{%
 
9112
    T}%
 
9113
  }}
 
9114
\put(344,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9115
  \smash{%
 
9116
    T}%
 
9117
  }}
 
9118
\put(344,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9119
  \smash{%
 
9120
    R}%
 
9121
  }}
 
9122
\put(344,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9123
  \smash{%
 
9124
    I}%
 
9125
  }}
 
9126
\put(344,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9127
  \smash{%
 
9128
    B}%
 
9129
  }}
 
9130
\put(344,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9131
  \smash{%
 
9132
    U}%
 
9133
  }}
 
9134
\put(344,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9135
  \smash{%
 
9136
    T}%
 
9137
  }}
 
9138
\put(344,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9139
  \smash{%
 
9140
    E}%
 
9141
  }}
 
9142
\put(362,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9143
  \smash{%
 
9144
    INPUT}%
 
9145
  }}
 
9146
\put(362,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9147
  \smash{%
 
9148
    ARITY}%
 
9149
  }}
 
9150
\put(369,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9151
  \smash{%
 
9152
    Memory}%
 
9153
  }}
 
9154
\put(369,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9155
  \smash{%
 
9156
    Size}%
 
9157
  }}
 
9158
\put(369,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9159
  \smash{%
 
9160
    DOMAIN}%
 
9161
  }}
 
9162
\put(369,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9163
  \smash{%
 
9164
    Class}%
 
9165
  }}
 
9166
\put(369,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9167
  \smash{%
 
9168
    Arit}%
 
9169
  }}
 
9170
\put(369,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9171
  \smash{%
 
9172
    Export}%
 
9173
  }}
 
9174
\put(369,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9175
  \smash{%
 
9176
    Type}%
 
9177
  }}
 
9178
\put(438,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9179
  \smash{%
 
9180
    OUTPUT}%
 
9181
  }}
 
9182
\put(420,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9183
  \smash{%
 
9184
    A}%
 
9185
  }}
 
9186
\put(420,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9187
  \smash{%
 
9188
    T}%
 
9189
  }}
 
9190
\put(420,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9191
  \smash{%
 
9192
    T}%
 
9193
  }}
 
9194
\put(420,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9195
  \smash{%
 
9196
    R}%
 
9197
  }}
 
9198
\put(420,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9199
  \smash{%
 
9200
    I}%
 
9201
  }}
 
9202
\put(420,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9203
  \smash{%
 
9204
    B}%
 
9205
  }}
 
9206
\put(420,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9207
  \smash{%
 
9208
    U}%
 
9209
  }}
 
9210
\put(420,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9211
  \smash{%
 
9212
    T}%
 
9213
  }}
 
9214
\put(420,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9215
  \smash{%
 
9216
    E}%
 
9217
  }}
 
9218
\put(438,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9219
  \smash{%
 
9220
    INPUT}%
 
9221
  }}
 
9222
\put(438,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9223
  \smash{%
 
9224
    ARITY}%
 
9225
  }}
 
9226
\put(446,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9227
  \smash{%
 
9228
    Memory}%
 
9229
  }}
 
9230
\put(446,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9231
  \smash{%
 
9232
    Size}%
 
9233
  }}
 
9234
\put(446,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9235
  \smash{%
 
9236
    DOMAIN}%
 
9237
  }}
 
9238
\put(446,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9239
  \smash{%
 
9240
    Class}%
 
9241
  }}
 
9242
\put(446,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9243
  \smash{%
 
9244
    Arit}%
 
9245
  }}
 
9246
\put(446,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9247
  \smash{%
 
9248
    Export}%
 
9249
  }}
 
9250
\put(446,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9251
  \smash{%
 
9252
    Type}%
 
9253
  }}
 
9254
\put(515,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9255
  \smash{%
 
9256
    OUTPUT}%
 
9257
  }}
 
9258
\put(497,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9259
  \smash{%
 
9260
    A}%
 
9261
  }}
 
9262
\put(497,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9263
  \smash{%
 
9264
    T}%
 
9265
  }}
 
9266
\put(497,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9267
  \smash{%
 
9268
    T}%
 
9269
  }}
 
9270
\put(497,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9271
  \smash{%
 
9272
    R}%
 
9273
  }}
 
9274
\put(497,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9275
  \smash{%
 
9276
    I}%
 
9277
  }}
 
9278
\put(497,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9279
  \smash{%
 
9280
    B}%
 
9281
  }}
 
9282
\put(497,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9283
  \smash{%
 
9284
    U}%
 
9285
  }}
 
9286
\put(497,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9287
  \smash{%
 
9288
    T}%
 
9289
  }}
 
9290
\put(497,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9291
  \smash{%
 
9292
    E}%
 
9293
  }}
 
9294
\put(515,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9295
  \smash{%
 
9296
    INPUT}%
 
9297
  }}
 
9298
\put(515,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9299
  \smash{%
 
9300
    ARITY}%
 
9301
  }}
 
9302
\put(522,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9303
  \smash{%
 
9304
    Memory}%
 
9305
  }}
 
9306
\put(522,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9307
  \smash{%
 
9308
    Size}%
 
9309
  }}
 
9310
\put(522,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9311
  \smash{%
 
9312
    DOMAIN}%
 
9313
  }}
 
9314
\put(522,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9315
  \smash{%
 
9316
    Class}%
 
9317
  }}
 
9318
\put(522,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9319
  \smash{%
 
9320
    Arit}%
 
9321
  }}
 
9322
\put(522,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9323
  \smash{%
 
9324
    Export}%
 
9325
  }}
 
9326
\put(522,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9327
  \smash{%
 
9328
    Type}%
 
9329
  }}
 
9330
\put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9331
  \smash{%
 
9332
    OUTPUT}%
 
9333
  }}
 
9334
\put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9335
  \smash{%
 
9336
    A}%
 
9337
  }}
 
9338
\put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9339
  \smash{%
 
9340
    T}%
 
9341
  }}
 
9342
\put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9343
  \smash{%
 
9344
    T}%
 
9345
  }}
 
9346
\put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9347
  \smash{%
 
9348
    R}%
 
9349
  }}
 
9350
\put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9351
  \smash{%
 
9352
    I}%
 
9353
  }}
 
9354
\put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9355
  \smash{%
 
9356
    B}%
 
9357
  }}
 
9358
\put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9359
  \smash{%
 
9360
    U}%
 
9361
  }}
 
9362
\put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9363
  \smash{%
 
9364
    T}%
 
9365
  }}
 
9366
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9367
  \smash{%
 
9368
    E}%
 
9369
  }}
 
9370
\put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9371
  \smash{%
 
9372
    INPUT}%
 
9373
  }}
 
9374
\put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9375
  \smash{%
 
9376
    ARITY}%
 
9377
  }}
 
9378
\put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9379
  \smash{%
 
9380
    Memory}%
 
9381
  }}
 
9382
\put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9383
  \smash{%
 
9384
    Size}%
 
9385
  }}
 
9386
\put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9387
  \smash{%
 
9388
    DOMAIN}%
 
9389
  }}
 
9390
\put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9391
  \smash{%
 
9392
    Class}%
 
9393
  }}
 
9394
\put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9395
  \smash{%
 
9396
    Arit}%
 
9397
  }}
 
9398
\put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9399
  \smash{%
 
9400
    Export}%
 
9401
  }}
 
9402
\put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9403
  \smash{%
 
9404
    Type}%
 
9405
  }}
 
9406
\put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9407
  \smash{%
 
9408
    Class}%
 
9409
  }}
 
9410
\put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9411
  \smash{%
 
9412
    Class}%
 
9413
  }}
 
9414
\put(293,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9415
  \smash{%
 
9416
    Class}%
 
9417
  }}
 
9418
\put(369,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9419
  \smash{%
 
9420
    Class}%
 
9421
  }}
 
9422
\put(446,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9423
  \smash{%
 
9424
    Class}%
 
9425
  }}
 
9426
\put(522,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9427
  \smash{%
 
9428
    Class}%
 
9429
  }}
 
9430
\put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9431
  \smash{%
 
9432
    Function}%
 
9433
  }}
 
9434
\put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9435
  \smash{%
 
9436
    Function}%
 
9437
  }}
 
9438
\put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9439
  \smash{%
 
9440
    Function}%
 
9441
  }}
 
9442
\put(294,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9443
  \smash{%
 
9444
    Function}%
 
9445
  }}
 
9446
\put(369,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9447
  \smash{%
 
9448
    Function}%
 
9449
  }}
 
9450
\put(447,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9451
  \smash{%
 
9452
    Function}%
 
9453
  }}
 
9454
\put(522,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9455
  \smash{%
 
9456
    Function}%
 
9457
  }}
 
9458
\put(140,649){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9459
  \smash{%
 
9460
    NULL}%
 
9461
  }}
 
9462
\put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9463
  \smash{%
 
9464
    OUTPUT}%
 
9465
  }}
 
9466
\put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9467
  \smash{%
 
9468
    T}%
 
9469
  }}
 
9470
\put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9471
  \smash{%
 
9472
    A}%
 
9473
  }}
 
9474
\put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9475
  \smash{%
 
9476
    T}%
 
9477
  }}
 
9478
\put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9479
  \smash{%
 
9480
    T}%
 
9481
  }}
 
9482
\put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9483
  \smash{%
 
9484
    R}%
 
9485
  }}
 
9486
\put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9487
  \smash{%
 
9488
    I}%
 
9489
  }}
 
9490
\put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9491
  \smash{%
 
9492
    B}%
 
9493
  }}
 
9494
\put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9495
  \smash{%
 
9496
    U}%
 
9497
  }}
 
9498
\put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9499
  \smash{%
 
9500
    E}%
 
9501
  }}
 
9502
\put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9503
  \smash{%
 
9504
    INPUT}%
 
9505
  }}
 
9506
\put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9507
  \smash{%
 
9508
    ARITY}%
 
9509
  }}
 
9510
\put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9511
  \smash{%
 
9512
    Memory}%
 
9513
  }}
 
9514
\put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9515
  \smash{%
 
9516
    Size}%
 
9517
  }}
 
9518
\put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9519
  \smash{%
 
9520
    INT}%
 
9521
  }}
 
9522
\put(209,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9523
  \smash{%
 
9524
    OUTPUT}%
 
9525
  }}
 
9526
\put(191,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9527
  \smash{%
 
9528
    T}%
 
9529
  }}
 
9530
\put(191,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9531
  \smash{%
 
9532
    A}%
 
9533
  }}
 
9534
\put(191,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9535
  \smash{%
 
9536
    T}%
 
9537
  }}
 
9538
\put(191,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9539
  \smash{%
 
9540
    T}%
 
9541
  }}
 
9542
\put(191,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9543
  \smash{%
 
9544
    R}%
 
9545
  }}
 
9546
\put(191,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9547
  \smash{%
 
9548
    I}%
 
9549
  }}
 
9550
\put(191,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9551
  \smash{%
 
9552
    B}%
 
9553
  }}
 
9554
\put(191,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9555
  \smash{%
 
9556
    U}%
 
9557
  }}
 
9558
\put(191,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9559
  \smash{%
 
9560
    E}%
 
9561
  }}
 
9562
\put(209,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9563
  \smash{%
 
9564
    INPUT}%
 
9565
  }}
 
9566
\put(209,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
 
9567
  \smash{%
 
9568
    ARITY}%
 
9569
  }}
 
9570
\put(216,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9571
  \smash{%
 
9572
    Memory}%
 
9573
  }}
 
9574
\put(216,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9575
  \smash{%
 
9576
    Size}%
 
9577
  }}
 
9578
\put(216,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9579
  \smash{%
 
9580
    0}%
 
9581
  }}
 
9582
\put(216,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9583
  \smash{%
 
9584
    0}%
 
9585
  }}
 
9586
\put(216,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9587
  \smash{%
 
9588
    INT}%
 
9589
  }}
 
9590
\put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9591
  \smash{%
 
9592
    NULL}%
 
9593
  }}
 
9594
\put(216,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9595
  \smash{%
 
9596
    NULL}%
 
9597
  }}
 
9598
\put(140,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
 
9599
  \smash{%
 
9600
    Class}%
 
9601
  }}
 
9602
\put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9603
  \smash{%
 
9604
    1}%
 
9605
  }}
 
9606
\put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
 
9607
  \smash{%
 
9608
    1}%
 
9609
  }}
 
9610
\put(513,354){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
 
9611
  \smash{%
 
9612
    0}%
 
9613
  }}
 
9614
\put(513,324){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
 
9615
  \smash{%
 
9616
    10}%
 
9617
  }}
 
9618
\end{picture}}%
 
9619
 
 
9620
 
 
9621
\caption{Internal type representation of function in form
 
9622
{\sf extern int a(int b, int c[][10], ....)...}}\label{cod_tree}
 
9623
\end{figure}
 
9624
 
 
9625
\vspace{1cm}
 
9626
\begin{center}
 
9627
{\tiny
 
9628
\begin{tabular}{|c|c|c|c|c|c|c|c||c|c|c|c|c|c|c|c|||c|c|c|c|c|c|c|c||c|c|c|c|c|c|c|c|}
 
9629
 31 & & & & & & & 24 & & & & & & & & & 15 & & & & & & & & 7 & & & & & & & 0 \\ 
 
9630
\hline
 
9631
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
 
9632
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ 
 
9633
\hline
 
9634
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1
 
9635
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 
 
9636
\hline
 
9637
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0
 
9638
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 
 
9639
\hline
 
9640
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
 
9641
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ 
 
9642
\hline
 
9643
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
 
9644
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 
 
9645
\hline
 
9646
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0
 
9647
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 
 
9648
\hline
 
9649
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
 
9650
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 
 
9651
\hline
 
9652
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1
 
9653
& 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 \\ 
 
9654
\hline
 
9655
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
 
9656
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 
 
9657
\hline
 
9658
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
 
9659
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 
 
9660
\hline
 
9661
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
 
9662
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 \\ 
 
9663
\hline
 
9664
\multicolumn{32}{|c|}{$\ldots$} \\ \hline
 
9665
\end{tabular}}
 
9666
\end{center}
 
9667
 
 
9668
% 10 deca = 1010 bin
 
9669
% 8 deca = 1000 bin
 
9670
% 1000 bin is used in the 4-th row as an arity (it means number of 32
 
9671
% bit words to jump)
 
9672
% 1010 bin is used in the last row as an arity
 
9673
 
 
9674
\section{Notes to the implementation of internal types}
 
9675
 
 
9676
Each type is copied when it is defined in structure, union, or
 
9677
enumeration. It is copied only in one level (not recursive). The
 
9678
reason is that the {\sf field\_name} is assigned to the types in
 
9679
aggregate. Each field has to have its own representation of the type. 
 
9680
 
 
9681
For deallocation of types, cyclic definition must be checked to avoid
 
9682
endless loops.
 
9683
 
 
9684
Pointers to aggregates should be the same. There is only one instance
 
9685
of each type. If the similar aggregate is declared more than once it
 
9686
is considered to be not compatible. (In the figure~\ref{internal19},
 
9687
it is a real example of the following structure definition:
 
9688
\begin{verbatim}
 
9689
struct d {
 
9690
  struct c *a;
 
9691
  struct d *b;
 
9692
};
 
9693
\end{verbatim}
 
9694
where the {\sf c} structure is:
 
9695
\begin{verbatim}
 
9696
struct c {
 
9697
  int a;
 
9698
  int b;
 
9699
};
 
9700
\end{verbatim}
 
9701
 
 
9702
\begin{figure}
 
9703
\begin{center}
 
9704
\psfig{figure=reccycla.ps,width=15.4cm,angle=-90}
 
9705
\caption{Recursive structure declaration}\label{internal19}
 
9706
\end{center} 
 
9707
\end{figure}
 
9708
 
 
9709
\chapter{Files of the \CiF}
 
9710
 
 
9711
The following sections describe the goal of some important files.
 
9712
 
 
9713
\section{File `allocx.c'}\index{file!allocx.c}
 
9714
 
 
9715
Basic allocation functions.
 
9716
 
 
9717
\begin{description}
 
9718
\item[allocate (size, pool)]\index{function!allocate@{\sf allocate}}\index{allocate@{\sf allocate}}   
 
9719
  memory of size {\sf size}, from the pool {\sf pool}. Return pointer
 
9720
  to the allocated memory.
 
9721
\item[deallocate
 
9722
  (pool)]\index{function!deallocate@{\sf deallocate}}\index{deallocate@{\sf deallocate}}
 
9723
  memory of {\sf pool}. It is stored to list and if the memory is
 
9724
  needed again it is simply taken from this list.
 
9725
\item[init\_zero (pointer,
 
9726
  size)]\index{function!init\_zero@{\sf init\_zero}}\index{init\_zero@{\sf init\_zero}}
 
9727
  memory pointed to by pointer is initialized to zeroes.
 
9728
\item[callocx]
 
9729
\item[mallocx]
 
9730
\item[reallocx] just wrappers for allocation.
 
9731
\end{description}
 
9732
 
 
9733
There are only two different {\sf pool} now: {\bf
 
9734
  PERM}\index{macro!PERM@{\bf PERM}}\index{PERM@{\bf PERM}} and {\bf
 
9735
  BLOCK}\index{macro!BLOCK@{\bf BLOCK}}\index{BLOCK@{\bf BLOCK}}.
 
9736
 
 
9737
\section{File `comp\_maint.c'}\index{file!comp\_maint.c}
 
9738
 
 
9739
Catch all file.
 
9740
 
 
9741
\begin{description}
 
9742
\item[info]\index{function!info@{\sf info}} \index{info@{\sf info}} is
 
9743
  printed if verbose is specified on the command line.
 
9744
\item[clif]\index{function!clif@{\sf clif}} \index{clif@{\sf clif}}
 
9745
main function. It parses command line options, initializes memory,
 
9746
sets proper input\index{input} function for scanner and starts parser.
 
9747
\item[brfix]\index{function!brfix@{\sf brfix}} \index{brfix@{\sf brfix}}
 
9748
  {\sf break}\index{statement!break@{\sf break}}
 
9749
  fixation\index{fixation}.
 
9750
\item[cofix]\index{function!cofix@{\sf cofix}} \index{cofix@{\sf cofix}} 
 
9751
  {\sf continue}\index{statement!continue@{\sf continue}}
 
9752
  fixation\index{fixation}.
 
9753
\item[retfix]\index{function!retfix@{\sf retfix}} \index{retfix@{\sf retfix}} 
 
9754
  {\sf return}\index{statement!return@{\sf return}}
 
9755
  fixation\index{fixation}.
 
9756
\item[fix\_cont\_w]\index{function!fix\_cont\_w@{\sf fix\_cont\_w}}
 
9757
  \index{fix\_cont\_w@{\sf fix\_cont\_w}} fixation\index{fixation} of
 
9758
  {\sf continue}\index{statement!continue@{\sf continue}} in {\sf
 
9759
    while}\index{statement!while@{\sf while}}.
 
9760
\item[fix\_cont\_f]\index{function!fix\_cont\_f@{\sf fix\_cont\_f}}
 
9761
  \index{fix\_cont\_f@{\sf fix\_cont\_f}} fixation\index{fixation} of
 
9762
  {\sf continue}\index{statement!continue@{\sf continue}} in {\sf
 
9763
    for}\index{statement!for@{\sf for}}.
 
9764
\item[fix\_break\_w]\index{function!fix\_break\_w@{\sf fix\_break\_w}}
 
9765
  \index{fix\_break\_w@{\sf fix\_break\_w}} fixation\index{fixation}
 
9766
  of {\sf break}\index{statement!break@{\sf break}} in {\sf
 
9767
    while}\index{statement!while@{\sf while}}.
 
9768
\item[fix\_break\_f]\index{function!fix\_break\_f@{\sf fix\_break\_f}}
 
9769
  \index{fix\_break\_f@{\sf fix\_break\_f}} fixation\index{fixation}
 
9770
  of {\sf break}\index{statement!break@{\sf break}} in {\sf
 
9771
    for}\index{statement!for@{\sf for}}.
 
9772
\item[fix\_ret]\index{function!fix\_ret@{\sf fix\_ret}}
 
9773
  \index{fix\_ret@{\sf fix\_ret}} Backpatching of the return address
 
9774
  for {\sf return}\index{statement!return@{\sf return}} in function.
 
9775
\item[fix\_break\_s]\index{function!fix\_break\_s@{\sf fix\_break\_s}}
 
9776
  \index{fix\_break\_s@{\sf fix\_break\_s}} Backpatching of the
 
9777
  address for {\sf break}\index{statement!break@{\sf break}} in {\sf
 
9778
    for} loop.
 
9779
\item[init]\index{function!init@{\sf init}} \index{init@{\sf init}}
 
9780
  initialization of \CiF\index{memory}.
 
9781
\item[implicit\_cast]\index{function!implicit\_cast@{\sf implicit\_cast}}
 
9782
  \index{implicit\_cast@{\sf implicit\_cast}} check if an implicit
 
9783
  cast in an expression is needed.
 
9784
\item[l\_value\_cast]\index{function!l\_value\_cast@{\sf l\_value\_cast}}
 
9785
  \index{l\_value\_cast@{\sf l\_value\_cast}} check if a cast to \cl
 
9786
  l\_value \r\ is needed.
 
9787
\item[pointer\_cast]\index{function!pointer\_cast@{\sf pointer\_cast}}
 
9788
  \index{pointer\_cast@{\sf pointer\_cast}} check for pointer casts in
 
9789
  \cl l\_value \r\ is needed. Issues appropriate error message.
 
9790
\item[array\_subscript]\index{function!array\_subscript@{\sf array\_subscript}}
 
9791
  \index{array\_subscript@{\sf array\_subscript}} initialization of
 
9792
  the {\sf dim} variable with subscripts according to the array
 
9793
  definition.
 
9794
\item[put\_array\_subscript]\index{function!put\_array\_subscript@{\sf put\_array\_subscript}} 
 
9795
  \index{put\_array\_subscript@{\sf put\_array\_subscript}} store
 
9796
  subscripts in {\sf internal\_type} structure.\index{type!internal}
 
9797
\item[ERR\_NO\_INFO]\index{macro!ERR\_NO\_INFO@{\bf ERR\_NO\_INFO}}
 
9798
  \index{ERR\_NO\_INFO@{\bf ERR\_NO\_INFO}}
 
9799
\item[ERROR\_INFO]\index{macro!ERROR\_INFO@{\bf ERROR\_INFO}}
 
9800
  \index{ERROR\_INFO@{\bf ERROR\_INFO}}
 
9801
\item[ERROR\_FULL\_INFO]\index{macro!ERROR\_FULL\_INFO@{\bf ERROR\_FULL\_INFO}}
 
9802
\index{ERROR\_FULL\_INFO@{\bf ERROR\_FULL\_INFO}} formatting macros
 
9803
for error message.
 
9804
\item[error\_message]\index{function!error\_message@{\sf error\_message}}
 
9805
  \index{error\_message@{\sf error\_message}} according to the number
 
9806
  send, print the error message.\index{error}
 
9807
\item[print\_file\_name]\index{function!print\_file\_name@{\sf print\_file\_name}}
 
9808
  \index{print\_file\_name@{\sf print\_file\_name}}
 
9809
\item[print\_source\_line]\index{function!print\_source\_line@{\sf print\_source\_line}}
 
9810
  \index{print\_source\_line@{\sf print\_source\_line}}
 
9811
\item[print\_error\_number]\index{function!print\_error\_number@{\sf print\_error\_number}}
 
9812
  \index{print\_error\_number@{\sf print\_error\_number}}
 
9813
\item[print\_line\_number]\index{function!print\_line\_number@{\sf print\_line\_number}}
 
9814
  \index{print\_line\_number@{\sf print\_line\_number}} functions
 
9815
  formatting error messages.
 
9816
\item[type2string]\index{function!type2string@{\sf type2string}}
 
9817
  \index{type2string@{\sf type2string}} converts internal type to
 
9818
  string representation for error messages.
 
9819
\item[type\_transform]\index{function!type\_transform@{\sf type\_transform}}
 
9820
\index{type\_transform@{\sf type\_transform}} transformation of type.
 
9821
It is used when the intrinsic (remote)
 
9822
functions\index{function!intrinsic} are called.
 
9823
\item[add\_to\_spec\_list]\index{function!add\_to\_spec\_list@{\sf add\_to\_spec\_list}}
 
9824
\index{add\_to\_spec\_list@{\sf add\_to\_spec\_list}} create list of
 
9825
specifiers of function declaration and/or definition to the {\sf
 
9826
  internal\_type}\index{type!internal} structure. This function is
 
9827
used during structure definition as well.
 
9828
\item[add\_to\_ident\_list]\index{function!add\_to\_ident\_list@{\sf add\_to\_ident\_list}}
 
9829
  \index{add\_to\_ident\_list@{\sf add\_to\_ident\_list}} create list
 
9830
  of identifiers during the function declaration and/or definition.
 
9831
\item[compare2trees]\index{function!compare2trees@{\sf compare2trees}}
 
9832
  \index{compare2trees@{\sf compare2trees}} compare two trees for
 
9833
  equality. Check if the definition of the function corresponds with
 
9834
  its prototype.
 
9835
\item[copy\_type]\index{function!copy\_type@{\sf copy\_type}}
 
9836
  \index{copy\_type@{\sf copy\_type}} copy {\sf
 
9837
    internal\_type}\index{type!internal} structure. It is used during
 
9838
  function declaration and/or definition and structure definition. We
 
9839
  need a copy because the type can be slowly added, i.e. on one line
 
9840
  can be more identifiers such as simple variables, arrays, function
 
9841
  prototypes and all of them have slightly different representation.
 
9842
\item[add\_subs\_to\_spec\_list]\index{function!add\_subs\_to\_spec\_list@{\sf
 
9843
add\_subs\_to\_spec\_list}}
 
9844
\index{add\_subs\_to\_spec\_list@{\sf add\_subs\_to\_spec\_list}}
 
9845
create {\sf internal\_type}\index{type!internal} for function
 
9846
declaration if only type specifier and range of array were in the
 
9847
function prototype.
 
9848
\item[clear\_internal\_type]\index{function!clear\_internal\_type@{\sf clear\_internal\_type}}
 
9849
  \index{clear\_internal\_type@{\sf clear\_internal\_type}} clear
 
9850
  internal type\index{type!internal}.
 
9851
\item[search\_duplicate\_labels]\index{function!search\_duplicate\_labels@{\sf
 
9852
search\_duplicate\_labels}}
 
9853
\index{search\_duplicate\_labels@{\sf search\_duplicate\_labels}}
 
9854
after each new label\index{label} declaration we need to check for
 
9855
duplication.
 
9856
\item[add\_constant\_to\_list]\index{function!add\_constant\_to\_list@{\sf
 
9857
add\_constant\_to\_list}}
 
9858
\index{add\_constant\_to\_list@{\sf add\_constant\_to\_list}} create
 
9859
list of constants of {\sf switch}\index{statement!switch@{\sf switch}}.
 
9860
\item[add\_default\_to\_fixp]\index{function!add\_default\_to\_fixp@{\sf
 
9861
add\_default\_to\_fixp}}
 
9862
\index{add\_default\_to\_fixp@{\sf add\_default\_to\_fixp}}the same as
 
9863
above but for default label; check for only one default.
 
9864
\item[func\_def\_s]\index{function!func\_def\_s@{\sf func\_def\_s}}
 
9865
  \index{func\_def\_s@{\sf func\_def\_s}} Functions for setting and
 
9866
  resetting of the flag of function definition or declaration context.
 
9867
\item[enter\_scope]\index{function!enter\_scope@{\sf enter\_scope}}
 
9868
  \index{enter\_scope@{\sf enter\_scope}}
 
9869
\item[exit\_scope]\index{function!exit\_scope@{\sf exit\_scope}}
 
9870
  \index{exit\_scope@{\sf exit\_scope}} functions changing scope (hash
 
9871
  tables of locals)\index{hash!table} upon nesting level.
 
9872
\item[mov2lvalue]\index{function!mov2lvalue@{\sf mov2lvalue}}
 
9873
  \index{mov2lvalue@{\sf mov2lvalue}}
 
9874
\item[move2lvalue]\index{function!move2lvalue@{\sf move2lvalue}}
 
9875
    \index{move2lvalue@{\sf move2lvalue}} generate proper {\bf
 
9876
      MOV}\index{instruction!MOV@{\bf MOV}} instruction.
 
9877
\item[type\_compare]\index{function!type\_compare@{\sf type\_compare}}
 
9878
  \index{type\_compare@{\sf type\_compare}} compare if pointers are
 
9879
  compatible.
 
9880
\item[cyclic\_def]\index{function!cyclic\_def@{\sf cyclic\_def}}
 
9881
  \index{cyclic\_def@{\sf cyclic\_def}} find cycles in pointer
 
9882
  definitions and declarations.
 
9883
\item[put2table]\index{function!put2table@{\sf put2table}}
 
9884
  \index{put2table@{\sf put2table}} Combination of all hashing
 
9885
  tables. Choose the appropriate one and put the variable there.
 
9886
\item[get\_num\_args]
 
9887
  \index{function!get\_num\_args@{\sf get\_num\_args}} 
 
9888
  \index{get\_num\_args@{\sf get\_num\_args}} Number of args for a
 
9889
  function is returned. This value is checked against number of actual
 
9890
  parameters, if they are equal.
 
9891
\item[promote\_type]
 
9892
  \index{function!promote\_type@{\sf promote\_type}}
 
9893
  \index{promote\_type@{\sf promote\_type}} C-like type promotion.
 
9894
\item[start\_main] \index{function!start\_main@{\sf start\_main}}
 
9895
  \index{start\_main@{\sf start\_main}} Arrange all things to start
 
9896
  main function. Simulate a compiler like behavior.
 
9897
\item[check\_spec\_constr]
 
9898
  \index{function!check\_spec\_constr@{\sf check\_spec\_constr}} 
 
9899
  \index{check\_spec\_constr@{\sf check\_spec\_constr}} Checks if
 
9900
  specified type specifiers are valid. If not issues an error
 
9901
  message.
 
9902
\end{description}
 
9903
 
 
9904
\section{File `control.h'}\index{file!control.h}
 
9905
 
 
9906
See section~\ref{fixation} for full detail.
 
9907
 
 
9908
\section{File `define.h'}\index{file!define.h}
 
9909
 
 
9910
See section~\ref{memory} for full detail.
 
9911
 
 
9912
\section{File `dbg-out.c'}\index{file!dbg-out.c}
 
9913
 
 
9914
Debugging information generation and printing. The following functions
 
9915
are a simple interface for symbolic debugging.
 
9916
 
 
9917
\begin{description}
 
9918
\item[store\_pos]\index{store\_pos@{\sf store\_pos}}
 
9919
  \index{function!store\_pos@{\sf store\_pos}} Store line number and
 
9920
  code pointer in the list. These data are only ones necessary during
 
9921
  symbolic information output.
 
9922
\item[dbg\_create]\index{dbg\_create@{\sf dbg\_create}}
 
9923
  \index{function!dbg\_create@{\sf dbg\_create}} Create a list of file
 
9924
  names with pointers to the list of line number and code pointer (see
 
9925
  above).
 
9926
\item[get\_pos]\index{get\_pos@{\sf get\_pos}}
 
9927
  \index{function!get\_pos@{\sf get\_pos}} Restore line number from
 
9928
  the list of code pointer and line number. The line number is chosen
 
9929
  appropriately comparing to the current value of the program
 
9930
  counter.
 
9931
\item[dbg\_print]\index{dbg\_print@{\sf dbg\_print}}
 
9932
  \index{function!dbg\_print@{\sf dbg\_print}} Print the currently
 
9933
  executed line.
 
9934
\end{description}
 
9935
 
 
9936
\section{File `geninstr.h'}\index{file!geninstr.h}
 
9937
 
 
9938
The implementation of generation of virtual machine instructions. The
 
9939
instructions are described in section~\ref{stroj}.
 
9940
 
 
9941
\section{File `input.c'}\index{file!input.c}
 
9942
 
 
9943
\begin{description}
 
9944
\item[input\_komp]\index{function!input\_komp@{\sf input\_komp}}
 
9945
  \index{input\_komp@{\sf input\_komp}} the general input\index{input}
 
9946
  for compiling.
 
9947
\item[input\_std]\index{function!input\_std@{\sf input\_std}}
 
9948
  \index{input\_std@{\sf input\_std}} this input function is used
 
9949
  during the processing of an asynchronous or synchronous interrupt
 
9950
  (see~\ref{int_service}).
 
9951
\item[input\_buf]\index{function!input\_buf@{\sf input\_buf}}
 
9952
  \index{input\_buf@{\sf input\_buf}} during the processing of the
 
9953
  compiler interrupt after the interrupt key is pressed again this
 
9954
  input function sends to the compiler a keyword {\sf
 
9955
    resume;}\index{statement!resume@{\sf resume}} the compilation
 
9956
  resumes and the compiler input is reset to the {\sf input\_komp}
 
9957
  function.
 
9958
\item[init\_input]\index{function!init\_input@{\sf init\_input}}
 
9959
  \index{init\_input@{\sf init\_input}} this function opens files and
 
9960
  stores the pointers to the globally known array. The files could be
 
9961
  specified on the command line and/or in the `clif.ini' file.
 
9962
\item[terminate\_buffer]
 
9963
  \index{function!terminate\_buffer@{\sf terminate\_buffer}}
 
9964
  \index{terminate\_buffer@{\sf terminate\_buffer}} in flex, close
 
9965
  file, reset line counter, reinitialize file attribute structure and
 
9966
  exit file scope.
 
9967
\end{description}
 
9968
 
 
9969
\noindent
 
9970
{\bf Note:} The option to switch among several input functions and
 
9971
enable synchronous and asynchronous interrupts must be specified
 
9972
during the compilation of the \CiF\ (see~\ref{compiling_options}).
 
9973
 
 
9974
\section{File `instr.h'}\index{file!instr.h}
 
9975
 
 
9976
This file is declaration of different structures that are used in the
 
9977
virtual machine. Detailed description can be found in
 
9978
section~\ref{stroj} (see table~\ref{instructions}). Each field of
 
9979
structures is integer if it is not stated otherwise.
 
9980
 
 
9981
\begin{description}
 
9982
\item[struct OPERAND\_0\_ma]
 
9983
\index{structure!OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}}
 
9984
\index{OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}} only major.
 
9985
\item[struct OPERAND\_0\_mi]
 
9986
\index{structure!OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}}
 
9987
\index{OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}} major and minor.
 
9988
\item[struct OPERAND\_1\_ma]
 
9989
\index{structure!OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}}
 
9990
\index{OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}} major and address as a
 
9991
char pointer.
 
9992
\item[struct OPERAND\_1\_mi]
 
9993
\index{structure!OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}}
 
9994
\index{OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}} major, minor and address
 
9995
as a char pointer.
 
9996
\item[struct OPERAND\_1\_i]
 
9997
\index{structure!OPERAND\_1\_i@{\bf OPERAND\_1\_i}}
 
9998
\index{OPERAND\_1\_i@{\bf OPERAND\_1\_i}} major, minor and number
 
9999
(immediately) integer.
 
10000
\item[struct OPERAND\_1\_id]
 
10001
\index{structure!OPERAND\_1\_id@{\bf OPERAND\_1\_id}}
 
10002
\index{OPERAND\_1\_id@{\bf OPERAND\_1\_id}} major, minor and number of
 
10003
type double (immediately double).
 
10004
\item[struct OPERAND\_1\_if]
 
10005
\index{structure!OPERAND\_1\_if@{\bf OPERAND\_1\_if}}
 
10006
\index{OPERAND\_1\_if@{\bf OPERAND\_1\_if}} major, minor and number of
 
10007
type float (immediately float).
 
10008
\item[struct OPERAND\_1\_ic]
 
10009
\index{structure!OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}}
 
10010
\index{OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}} major, minor and number of
 
10011
type char (immediately char).
 
10012
\end{description}
 
10013
 
 
10014
There are definitions of instructions major constants in the file as
 
10015
well.
 
10016
 
 
10017
\section{File `keyword.gperf'}\index{file!keyword.gperf}
 
10018
 
 
10019
The file is a template that has a list of keywords. The C source file
 
10020
is produced by \verb|gperf -t -p -k 2,3 ./keyword.gperf| command.
 
10021
 
 
10022
\section{File `parser.h'}\index{file!parser.h}
 
10023
 
 
10024
\begin{description}
 
10025
\item[param\_flag]\index{param\_flag@{\sf param\_flag}}
 
10026
  \index{variable!param\_flag@{\sf param\_flag}} the variable
 
10027
  is set during the parsing of parameters to function. Parameters have
 
10028
  no such strong constraints as if they are used in expressions. For
 
10029
  example, as a parameter can be used array name (pointer).
 
10030
\item[atom\_type\_flag]\index{atom\_type\_flag@{\sf atom\_type\_flag}}
 
10031
  \index{variable!atom\_type\_flag@{\sf atom\_type\_flag}}
 
10032
  variable that specialized if it is a pointer which is pushed as a
 
10033
  parameter to a remote function (pointer to the array) or only a
 
10034
  dereferenced variable of the type. It is used only for {\bf
 
10035
  REMOTE\_F}\index{REMOTE\_F@{\bf REMOTE\_F}} type of
 
10036
  function\index{function!type of}.
 
10037
\item[variable]\index{variable@{\sf variable}}
 
10038
  \index{variable!variable@{\sf variable}} array of structures. The
 
10039
  structure members are {\sf address, offset} and {\sf name}. The
 
10040
  address (is a pointer to char) of the global variable currently on
 
10041
  the stack\index{stack}. The offset\index{offset@{\sf offset}}
 
10042
  (integer) is an address of local variable currently on the
 
10043
  stack\index{stack}.  It is offset to the current value of the {\bf
 
10044
    BP}\index{BP@{\bf BP}}.  The {\sf name} field is the name of the
 
10045
  variable. It is an array because we have to know addresses of all
 
10046
  variables currently in the expression. Depending on the context,
 
10047
  either address or offset are non NULL, nonzero respectively. If the
 
10048
  variable is global, the address is non NULL. If the variable is
 
10049
  local, the offset is nonzero. If the local variable has storage
 
10050
  class specifier {\sf static} the address is non NULL and the offset
 
10051
  is zero.
 
10052
\item[it\_is\_in\_case]\index{it\_is\_in\_case@{\sf it\_is\_in\_case}}
 
10053
  \index{variable!it\_is\_in\_case@{\sf it\_is\_in\_case}}
 
10054
  It is always set when the case\index{statement!case@{\sf case}}
 
10055
  statement is compiled.
 
10056
\item[jmp1]\index{jmp1@{\sf jmp1}}\index{variable!jmp1@{\sf jmp1}}
 
10057
  Variable for fixing the beginning of code in {\sf
 
10058
    for}\index{statement!for@{\sf for}} loop. The description can be
 
10059
  found in section~\ref{fixation} and fig.~\ref{obr3}.
 
10060
\item[subscript\_flag]\index{subscript\_flag@{\sf subscript\_flag}}
 
10061
  \index{variable!subscript\_flag@{\sf subscript\_flag}} The flag is
 
10062
  set after the first subscript of an array was parsed. The first
 
10063
  subscript needs special treatment. The variable is an array, i.e.
 
10064
  {\sf subscript\_flag} has each variable currently on the stack. It
 
10065
  is cleared by macro \index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}} {\bf
 
10066
    TYPE\_CLEAR}\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}}.
 
10067
\item[is\_address]\index{is\_address@{\sf is\_address}}
 
10068
  \index{variable!is\_address@{\sf is\_address}} It is set when the
 
10069
  address operator\index{operator!address} was used in the current
 
10070
  expression.
 
10071
\item[struct\_union\_field]
 
10072
  \index{struct\_union\_field@{\sf struct\_union\_field}}
 
10073
  \index{variable!struct\_union\_field@{\sf struct\_union\_field}}
 
10074
  The variable is set when structure\index{structure} or
 
10075
  union\index{union} identifier is parsed. If there are more dots or
 
10076
  pointer operators in the variable additional code must be generated.
 
10077
  Each variable on the stack which currently parsed in expression has
 
10078
  a {\sf struct\_union\_field}.  This variable is reset by {\bf
 
10079
    TYPE\_CLEAR}.\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}}
 
10080
  \index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}}
 
10081
\item[or\_jmp]\index{or\_jmp@{\sf or\_jmp}}
 
10082
  \index{variable!or\_jmp@{\sf or\_jmp}}
 
10083
\item[and\_jmp]\index{and\_jmp@{\sf and\_jmp}}
 
10084
  \index{variable!and\_jmp@{\sf and\_jmp}} both are used for
 
10085
  generation of jumps in expressions with \verb2||2 and \&\& operands.
 
10086
  \verb2||2 expression is evaluated until a subexpression is true.
 
10087
  \&\& is evaluated until a subexpression is false.
 
10088
\item[main\_defined]\index{main\_defined@{\sf main\_defined}}
 
10089
  \index{variable!main\_defined@{\sf main\_defined}}
 
10090
  set when the main function is defined.
 
10091
\item[initialize\_only]\index{initialize\_only@{\sf initialize\_only}}
 
10092
  \index{variable!initialize\_only@{\sf initialize\_only}}
 
10093
  set when there is a need for execution of initialization code of
 
10094
  variables. 
 
10095
\item[full\_bracketing]\index{full\_bracketing@{\sf full\_bracketing}}
 
10096
  \index{variable!full\_bracketing@{\sf full\_bracketing}}
 
10097
  Flag for proper code generation for fully  bracketed
 
10098
  initialization. 
 
10099
\item[aggregate\_memory\_size]
 
10100
  \index{aggregate\_memory\_size@{\sf aggregate\_memory\_size}}
 
10101
  \index{variable!aggregate\_memory\_size@{\sf aggregate\_memory\_size}}
 
10102
  During initialization, the size of subtypes are remembered. The
 
10103
  right number of initializers is checked. If the initialization was
 
10104
  incomplete, zeros are added.
 
10105
\item[TYPE\_CLEAR]\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}}
 
10106
  \index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}} macro that resets the
 
10107
  following variables: {\sf subscript\_flag, struct\_union\_field,
 
10108
    type, type\_com}\index{subscript\_flag@{\sf subscript\_flag}}
 
10109
  \index{struct\_union\_field@{\sf struct\_union\_field}} \index{type}
 
10110
  \index{type\_com@{\sf type\_com}}
 
10111
\item[SET\_ADDRESS]\index{SET\_ADDRESS@{\bf SET\_ADDRESS}}
 
10112
  \index{macro!SET\_ADDRESS@{\bf SET\_ADDRESS}} macro that resets {\sf
 
10113
    variable}\index{variable@{\sf variable}}
 
10114
  \index{variable!variable@{\sf variable}} and {\sf
 
10115
    offset}\index{offset@{\sf offset}} variables.
 
10116
\item[FUNCTION\_PROLOGUE]
 
10117
  \index{macro!FUNCTION\_PROLOGUE@{\bf FUNCTION\_PROLOGUE}}
 
10118
  \index{FUNCTION\_PROLOGUE@{\bf FUNCTION\_PROLOGUE}} it generates
 
10119
  code for function prologue.
 
10120
\item[FUNCTION\_EPILOGUE]
 
10121
  \index{macro!FUNCTION\_EPILOGUE@{\bf FUNCTION\_EPILOGUE}}
 
10122
  \index{FUNCTION\_EPILOGUE@{\bf FUNCTION\_EPILOGUE}} it generates
 
10123
  code for function epilogue.
 
10124
\item[DELETE\_SUBSCRIPT] 
 
10125
  \index{macro!DELETE\_SUBSCRIPT@{\bf DELETE\_SUBSCRIPT}} 
 
10126
  \index{DELETE\_SUBSCRIPT@{\bf DELETE\_SUBSCRIPT}} runs code for
 
10127
  deleting dimensions. The variable is used for generating proper
 
10128
  offset of array\index{array!dimension} variable in parsing
 
10129
  expression. The dimensions stored in this variable are needed for
 
10130
  computing of map function and map instructions of virtual machine
 
10131
  \index{virtual machine} for variable of the type array.
 
10132
\item[OFFSET\_LAST\_ADD]
 
10133
  \index{macro!OFFSET\_LAST\_ADD@{\bf OFFSET\_LAST\_ADD}}
 
10134
  \index{OFFSET\_LAST\_ADD@{\bf OFFSET\_LAST\_ADD}} generates last
 
10135
  instructions after variable dereferencing structure and/or union was
 
10136
  parsed. The special code is needed when the variable has more than
 
10137
  one dereferencing operator.
 
10138
\item[OFFSET\_LAST\_ADD\_ARRAY]
 
10139
  \index{macro!OFFSET\_LAST\_ADD\_ARRAY@{\bf OFFSET\_LAST\_ADD\_ARRAY}}
 
10140
  \index{OFFSET\_LAST\_ADD\_ARRAY@{\bf OFFSET\_LAST\_ADD\_ARRAY}}
 
10141
  generates instructions after variable dereferencing structure and/or
 
10142
  union was parsed and the last dereference was an array. The special
 
10143
  code is needed when the variable has more than one dereferencing
 
10144
  operator.
 
10145
\item[ERROR\_P]\index{macro!ERROR\_P@{\bf ERROR\_P}}
 
10146
  \index{ERROR\_P@{\sf ERROR\_P}} if there were errors don't do
 
10147
  semantic, just check syntax.
 
10148
\item[MOV\_P]\index{macro!MOV\_P@{\bf MOV\_P}}
 
10149
  \index{MOV\_P@{\bf MOV\_P}} test if the last generated instruction
 
10150
  was {\bf MOV}.
 
10151
\item[POPA\_P]\index{macro!POPA\_P@{\bf POPA\_P}}
 
10152
  \index{POPA\_P@{\bf POPA\_P}} test if the last generated instruction
 
10153
  was {\bf POPA}.
 
10154
\item[PUSHA\_P]\index{macro!PUSHA\_P@{\bf PUSHA\_P}}
 
10155
  \index{PUSHA\_P@{\bf PUSHA\_P}} test if the last generated
 
10156
  instruction was {\bf PUSHA\_P}.
 
10157
\item[RESET\_CODE\_GENERATION\_BEGINNING]
 
10158
  \index{macro!RESET\_CODE\_GENERATION\_BEGINNING@{\bf RESET\_CODE\_GENERATION\_BEGINNING}}
 
10159
  \index{RESET\_CODE\_GENERATION\_BEGINNING@{\bf RESET\_CODE\_GENERATION\_BEGINNING}}
 
10160
  do not fill up the memory continuously. Reset to beginning of the
 
10161
  memory, if possible.
 
10162
\item[SET\_CODE\_GENERATION\_BEGINNING]
 
10163
  \index{macro!SET\_CODE\_GENERATION\_BEGINNING@{\bf SET\_CODE\_GENERATION\_BEGINNING}}
 
10164
  \index{SET\_CODE\_GENERATION\_BEGINNING@{\bf SET\_CODE\_GENERATION\_BEGINNING}}
 
10165
  if variables are defined, set new memory beginning.
 
10166
\end{description}
 
10167
 
 
10168
\section{File `pso.c'}\index{file!pso.c}
 
10169
 
 
10170
Parser support functions.
 
10171
 
 
10172
\begin{description}
 
10173
\item[lookup\_tables]
 
10174
  \index{function!lookup\_tables@{\sf lookup\_tables}}
 
10175
  \index{lookup\_tables@{\sf lookup\_tables}} lookup in tables of
 
10176
  local variables, if the variable is not found in the table of global
 
10177
  variables. Setting of addresses for code generation.
 
10178
\item[typedef\_copy]
 
10179
  \index{function!typedef\_copy@{\sf typedef\_copy}}
 
10180
  \index{typedef\_copy@{\sf typedef\_copy}} internal type for {\sf
 
10181
    typedef} must be copied, if there is no type specifier directly
 
10182
  following the typedef (considering internal type tree (see
 
10183
  fig.~\ref{internal14})), i.e.  pointer, array, function, array,
 
10184
  struct, etc.
 
10185
\item[set\_memory\_size]
 
10186
  \index{function!set\_memory\_size@{\sf set\_memory\_size}}
 
10187
  \index{set\_memory\_size@{\sf set\_memory\_size}} for cast operator
 
10188
  the memory size must be set.
 
10189
\end{description}
 
10190
 
 
10191
\section{File `s-conv.c'}\index{file!s-conv.c}
 
10192
 
 
10193
Functions in the file manipulate format strings and check arguments to
 
10194
printf and scanf class of functions.
 
10195
 
 
10196
\begin{description}
 
10197
\item[s\_conv]\index{function!s\_conv@{\sf s\_conv}}
 
10198
  \index{s\_conv@{\sf s\_conv}} checks format string and emits error
 
10199
  messages.
 
10200
\item[store\_arg\_type] 
 
10201
  \index{function!store\_arg\_type@{\sf store\_arg\_type}}
 
10202
  \index{store\_arg\_type@{\sf store\_arg\_type}}
 
10203
  Types of arguments are stored in the array for later checking.
 
10204
\item[compare\_format\_args]
 
10205
  \index{function!compare\_format\_args@{\sf compare\_format\_args}}
 
10206
  \index{compare\_format\_args@{\sf compare\_format\_args}}
 
10207
  Checks if the argument is compatible with the specified format.
 
10208
\end{description}
 
10209
 
 
10210
\section{File `s-conv.h'}\index{file!s-conv.h}
 
10211
 
 
10212
\begin{description}
 
10213
\item[PRINTF\_P] \index{macro!PRINTF\_P@{\bf PRINTF\_P}}
 
10214
  \index{PRINTF\_P@{\bf PRINTF\_P}}
 
10215
\item[SCANF\_P] \index{macro!SCANF\_P@{\bf SCANF\_P}}
 
10216
  \index{SCANF\_P@{\bf SCANF\_P}} checks for printf and scanf class of
 
10217
  function call parsing.
 
10218
\end{description}
 
10219
 
 
10220
\section{File `tables.c'}\index{file!tables.c}
 
10221
 
 
10222
Functions in this file set, process, change and clear information in
 
10223
hash tables.
 
10224
 
 
10225
\begin{description}
 
10226
\item[hastab]\index{hastab@{\sf hastab}}
 
10227
  \index{variable!hastab@{\sf hastab}} see~\ref{storage_and_hash}
 
10228
\item[hastab\_goto]\index{hastab\_goto@{\sf hastab\_goto}}
 
10229
  \index{variable!hastab\_goto@{\sf hastab\_goto}}
 
10230
  see~\ref{fixation}.
 
10231
\item[hastab\_type]\index{hastab\_type@{\sf hastab\_type}}
 
10232
  \index{variable!hastab\_type@{\sf hastab\_type}}
 
10233
  see~\ref{storage_and_hash}.
 
10234
\item[typetab]\index{typetab@{\sf typetab}}
 
10235
  \index{variable!typetab@{\sf typetab}}
 
10236
  see~\ref{storage_and_hash}.
 
10237
\item[identtab]\index{identtab@{\sf identtab}}
 
10238
  \index{variable!identtab@{\sf identtab}}
 
10239
  see~\ref{storage_and_hash}.
 
10240
\item[identtab\_loc]\index{identtab\_loc@{\sf identtab\_loc}}
 
10241
  \index{variable!identtab\_loc@{\sf identtab\_loc}}
 
10242
  see~\ref{storage_and_hash}.
 
10243
\item[pi]\index{pi@{\sf pi}} \index{variable!pi@{\sf pi}} counter of
 
10244
  globally declared variables, used as a subscript to the {\sf
 
10245
    identtab} array.
 
10246
\item[pi\_type]\index{pi\_type@{\sf pi\_type}}
 
10247
  \index{variable!pi\_type@{\sf pi\_type}} counter of globally
 
10248
  declared types, used as a subscript to the {\sf typetab} array.
 
10249
\item[integer\_cons]\index{integer\_cons@{\sf integer\_cons}}
 
10250
  \index{variable!integer\_cons@{\sf integer\_cons}} default
 
10251
  integer for {\sf arit\_class} (see~\ref{internal_type}).
 
10252
\item[doub\_cons]\index{doub\_cons@{\sf doub\_cons}}
 
10253
  \index{variable!doub\_cons@{\sf doub\_cons}} default double
 
10254
  for {\sf arit\_class} (see~\ref{internal_type}).
 
10255
\item[flt\_cons]\index{flt\_cons@{\sf flt\_cons}}
 
10256
  \index{variable!flt\_cons@{\sf flt\_cons}} default float for
 
10257
  {\sf arit\_class} (see~\ref{internal_type}).
 
10258
\item[chr\_cons]\index{chr\_cons@{\sf chr\_cons}}
 
10259
  \index{variable!chr\_cons@{\sf chr\_cons}} default char for
 
10260
  {\sf arit\_class} (see~\ref{internal_type}).
 
10261
\item[vid\_cons]\index{vid\_cons@{\sf vid\_cons}}
 
10262
  \index{variable!vid\_cons@{\sf vid\_cons}} default void for
 
10263
  {\sf arit\_class} (see~\ref{internal_type}).
 
10264
\item[type]\index{type} \index{variable!type@{\sf type}} the type used
 
10265
  in expressions to control the generation of proper instructions. The
 
10266
  variable has the same type as a {\sf arit\_class} in the internal
 
10267
  type structure\index{type!internal}.
 
10268
\item[hastab\_init]\index{hastab\_init@{\sf hastab\_init}}
 
10269
  \index{function!hastab\_init@{\sf hastab\_init}}
 
10270
  initialization of the hash table\index{table!hashing} for global
 
10271
  variables.
 
10272
\item[hastab\_goto\_init]
 
10273
  \index{function!hastab\_goto\_init@{\sf hastab\_goto\_init}}
 
10274
  \index{hastab\_goto\_init@{\sf hastab\_goto\_init}} initialization
 
10275
  of goto label\index{label} table\index{table!of labels}.
 
10276
\item[identtab\_init]
 
10277
  \index{function!identtab\_init@{\sf identtab\_init}}
 
10278
  \index{identtab\_init@{\sf identtab\_init}} initialization of the
 
10279
  table of global identifiers\index{table!of global identifiers}.
 
10280
\item[allocate\_hastab\_loc]
 
10281
  \index{function!allocate\_hastab\_loc@{\sf allocate\_hastab\_loc}}
 
10282
  \index{allocate\_hastab\_loc@{\sf allocate\_hastab\_loc}}allocation
 
10283
  of the hash table\index{table!hashing} of local variables.
 
10284
\item[allocate\_loc\_tables]
 
10285
  \index{function!allocate\_loc\_tables@{\sf allocate\_loc\_tables}}
 
10286
  \index{allocate\_loc\_tables@{\sf allocate\_loc\_tables} }allocation
 
10287
  of table\index{table!of local variables} of identifiers of local
 
10288
  variables. It is used each time a new block is entered.
 
10289
\item[clear\_hash\_tab\_declaration]
 
10290
  \index{function!clear\_hash\_tab\_declaration@{\sf clear\_hash\_tab\_declaration}}
 
10291
  \index{clear\_hash\_tab\_declaration@{\sf clear\_hash\_tab\_declaration}}
 
10292
\item[clear\_hash\_tab]
 
10293
  \index{function!clear\_hash\_tab@{\sf clear\_hash\_tab}}
 
10294
  \index{clear\_hash\_tab@{\sf clear\_hash\_tab}}
 
10295
\item[clear\_hash\_tab\_next\_declaration]
 
10296
  \index{function!clear\_hash\_tab\_next\_declaration@{\sf clear\_hash\_tab\_next\_declaration}}
 
10297
  \index{clear\_hash\_tab\_next\_declaration@{\sf clear\_hash\_tab\_next\_declaration}}
 
10298
\item[clear\_hash\_tab\_next]
 
10299
  \index{function!clear\_hash\_tab\_next@{\sf clear\_hash\_tab\_next}}
 
10300
  \index{clear\_hash\_tab\_next@{\sf clear\_hash\_tab\_next}}
 
10301
  functions for initialization of different parts of hash
 
10302
  table\index{table!hashing}. These functions are used after block is
 
10303
  exited.
 
10304
\item[point]\index{point@{\sf point}}  
 
10305
  \index{function!point@{\sf point}} returns the address of global
 
10306
  variable or null if it is not declared. It prints an
 
10307
  error\index{error} message as well.
 
10308
\item[point\_call]\index{point\_call@{\sf point\_call}}
 
10309
  \index{function!point\_call@{\sf point\_call}} It is used
 
10310
  \begin{itemize}
 
10311
  \item to find if the identifier has a function type 
 
10312
  \item to fix the address (if the (formal) call was done prior to the
 
10313
    definition of the function)
 
10314
  \item to add the address to the list of addresses where to fix
 
10315
    later.
 
10316
  \end{itemize}
 
10317
\item[has]\index{has@{\sf has}} \index{function!has@{\sf has}}
 
10318
\item[putstruct]\index{putstruct@{\sf putstruct}}
 
10319
  \index{function!putstruct@{\sf putstruct}} the functions are
 
10320
  used for storing global variables into the hash
 
10321
  table\index{table!hashing}. The allocation of the
 
10322
  memory\index{memory} is also done in the functions.
 
10323
\item[putstruct\_body]\index{putstruct\_body@{\sf putstruct\_body}}
 
10324
  \index{function!putstruct\_body@{\sf putstruct\_body}}
 
10325
  sets appropriate variables that the function was defined (not only
 
10326
  declared).
 
10327
\item[lookup]\index{lookup@{\sf lookup}}
 
10328
  \index{variable!lookup@{\sf lookup}} returns pointer to the hash
 
10329
  table\index{table!hashing} where the variable is stored.
 
10330
\item[hash\_code]\index{hash\_code@{\sf hash\_code}}
 
10331
  \index{function!hash\_code@{\sf hash\_code}}
 
10332
  see~\ref{storage_and_hash}.
 
10333
\item[hash\_code\_loc]\index{hash\_code\_loc@{\sf hash\_code\_loc}}
 
10334
  \index{function!hash\_code\_loc@{\sf hash\_code\_loc}}
 
10335
  the same as above but for local variables.
 
10336
\item[point\_loc]\index{point\_loc@{\sf point\_loc}}
 
10337
  \index{function!point\_loc@{\sf point\_loc}} returns pointer
 
10338
  to the hash table of local variables\index{table!of local variables}.
 
10339
\item[has\_loc]\index{has\_loc@{\sf has\_loc}}
 
10340
  \index{function!has\_loc@{\sf has\_loc}}
 
10341
\item[putstruct\_loc]\index{putstruct\_loc@{\sf putstruct\_loc}}
 
10342
  \index{function!putstruct\_loc@{\sf putstruct\_loc}}
 
10343
  functions are used for storing local variables into the hash table.
 
10344
\item[lookup\_loc]\index{lookup\_loc@{\sf lookup\_loc}}
 
10345
  \index{function!lookup\_loc@{\sf lookup\_loc}} returns
 
10346
  pointer to the hash table where the local variable is stored.
 
10347
\item[add\_spec\_to\_has]  
 
10348
  \index{add\_spec\_to\_has@{\sf add\_spec\_to\_has}}
 
10349
  \index{function!add\_spec\_to\_has@{\sf add\_spec\_to\_has}}  
 
10350
  to the function, the specifiers (type
 
10351
  information)\index{type!internal} of parameters are added. If the
 
10352
  function was already declared it finds out if declaration and
 
10353
  definition (or two declarations) match.
 
10354
\item[add\_ident\_to\_has]
 
10355
  \index{add\_ident\_to\_has@{\sf add\_ident\_to\_has}}
 
10356
  \index{function!add\_ident\_to\_has@{\sf add\_ident\_to\_has}}   
 
10357
  the information in hash table about function identifiers of
 
10358
  formal parameters\index{parameter!formal} is added. If the function
 
10359
  was already declared it finds out if declaration and definition (or
 
10360
  two declarations) match.
 
10361
\item[link\_function]\index{link\_function@{\sf link\_function}}
 
10362
  \index{function!link\_function@{\sf link\_function}} sets
 
10363
  addresses of remote functions\index{function!intrinsic}.
 
10364
\item[set\_value]\index{set\_value@{\sf set\_value}}
 
10365
  \index{function!set\_value@{\sf set\_value}} gathers
 
10366
  information for checking sets of local variables (used for issuing
 
10367
  warnings\index{warning}). The information is checked after
 
10368
  compilation of a function and/or block.
 
10369
\item[fix\_and\_clear\_goto\_table]
 
10370
  \index{fix\_and\_clear\_goto\_table@{\sf fix\_and\_clear\_goto\_table}}  
 
10371
  \index{function!fix\_and\_clear\_goto\_table@{\sf fix\_and\_clear\_goto\_table}}
 
10372
  scans the goto label table;\index{table!of labels} fix addresses of
 
10373
  gotos.\index{statement!goto@{\sf goto}} This is processed after the
 
10374
  return to the level zero of parsing (just before the virtual
 
10375
  machine\index{virtual machine} runs).
 
10376
\item[has\_goto]\index{has\_goto@{\sf has\_goto}}
 
10377
  \index{function!has\_goto@{\sf has\_goto}} adds a label into
 
10378
  the hash table if it was not already in. It adds address of the
 
10379
  goto\index{statement!goto@{\sf goto}} to the list of gotos.
 
10380
\item[has\_label]\index{has\_label@{\sf has\_label}}
 
10381
  \index{function!has\_label@{\sf has\_label}} adds a label into
 
10382
  the hash table. If it was in, issues an error\index{error} message.
 
10383
  It adds address of the label to the internal representation.
 
10384
\item[lookup\_goto\_table]
 
10385
  \index{lookup\_goto\_table@{\sf lookup\_goto\_table}}  
 
10386
  \index{function!lookup\_goto\_table@{\sf lookup\_goto\_table}}
 
10387
  returns address of the hash table where the label is stored.
 
10388
\item[hash\_code\_goto]
 
10389
  \index{hash\_code\_goto@{\sf hash\_code\_goto}}
 
10390
  \index{function!hash\_code\_goto@{\sf hash\_code\_goto}}
 
10391
  hash function for goto labels.
 
10392
\item[align\_memory]
 
10393
  \index{align\_memory@{\sf align\_memory}}
 
10394
  \index{function!align\_memory@{\sf align\_memory}} used for
 
10395
  allocation of variables. Each type has to be properly aligned.
 
10396
\item[scope\_offset\_get]
 
10397
  \index{scope\_offset\_get@{\sf scope\_offset\_get}}
 
10398
  \index{function!scope\_offset\_get@{\sf scope\_offset\_get}}
 
10399
\item[scope\_offset\_set]
 
10400
  \index{scope\_offset\_set@{\sf scope\_offset\_set}}
 
10401
  \index{function!scope\_offset\_set@{\sf scope\_offset\_set}}
 
10402
  Functions set and get global offset (valid for whole table). The
 
10403
  functions are used if nesting scope is greater than zero, i.e. at
 
10404
  least two different blocks exist.
 
10405
\item[move\_offset\_aligned]
 
10406
  \index{move\_offset\_aligned@{\sf move\_offset\_aligned}}
 
10407
  \index{function!move\_offset\_aligned@{\sf move\_offset\_aligned}}
 
10408
  adjusting offsets according to size of type.
 
10409
\item[lookup\_type]\index{lookup\_type@{\sf lookup\_type}}
 
10410
  \index{function!lookup\_type@{\sf lookup\_type}} returns
 
10411
  address of the hash table where the type is stored.
 
10412
\item[has\_type]\index{has\_type@{\sf has\_type}}
 
10413
  \index{function!has\_type@{\sf has\_type}}
 
10414
\item[putstruct\_type]\index{putstruct\_type@{\sf putstruct\_type}}
 
10415
  \index{function!putstruct\_type@{\sf putstruct\_type}}
 
10416
  process tags and type names. Information is put into the hash table.
 
10417
\item[putstruct\_type\_body]
 
10418
  \index{putstruct\_type\_body@{\sf putstruct\_type\_body}}\
 
10419
  \index{function!putstruct\_type\_body@{\sf putstruct\_type\_body}}
 
10420
  allocates space for the type if it is necessary.
 
10421
\item[add\_spec\_to\_type]
 
10422
  \index{add\_spec\_to\_type@{\sf add\_spec\_to\_type}}
 
10423
  \index{function!add\_spec\_to\_type@{\sf add\_spec\_to\_type}}  
 
10424
  adds information about type specifiers of struct, union or enum
 
10425
  fields to the hash table.
 
10426
\item[add\_ident\_to\_type]
 
10427
  \index{add\_ident\_to\_type@{\sf add\_ident\_to\_type}}
 
10428
  \index{function!add\_ident\_to\_type@{\sf add\_ident\_to\_type}}
 
10429
  adds identifiers of struct, union or enum fields to the hash table.
 
10430
\item[allocate\_var]\index{allocate\_var@{\sf allocate\_var}}
 
10431
  \index{function!allocate\_var@{\sf allocate\_var}}
 
10432
  allocates memory\index{memory} for global variable.
 
10433
\item[allocate\_struct]\index{allocate\_struct@{\sf allocate\_struct}}
 
10434
  \index{function!allocate\_struct@{\sf allocate\_struct}}
 
10435
  counts memory size of structures.
 
10436
\item[find\_member]\index{find\_member@{\sf find\_member}}
 
10437
  \index{function!find\_member@{\sf find\_member}} returns
 
10438
  offset in the currently parsed structure (dereference of it is
 
10439
  parsed) or -1 if name is not a member.
 
10440
\item[offset\_aggregate\_member]
 
10441
  \index{offset\_aggregate\_member@{\sf offset\_aggregate\_member}}
 
10442
  \index{function!offset\_aggregate\_member@{\sf offset\_aggregate\_member}}
 
10443
  just a wrapper above the former function.
 
10444
\item[allocate\_aggregate]
 
10445
  \index{allocate\_aggregate@{\sf allocate\_aggregate}}
 
10446
  \index{function!allocate\_aggregate@{\sf allocate\_aggregate}}  
 
10447
  counts memory size of structures (calls {\sf allocate\_struct}) and
 
10448
  aligns offsets of aggregate fields.
 
10449
\item[putstruct\_static]
 
10450
  \index{putstruct\_static@{\sf putstruct\_static}}
 
10451
  \index{function!putstruct\_static@{\sf putstruct\_static}}
 
10452
  Static variables are put into tables.
 
10453
\item[enter\_file\_scope]
 
10454
  \index{enter\_file\_scope@{\sf enter\_file\_scope}} 
 
10455
  \index{function!enter\_file\_scope@{\sf enter\_file\_scope}}
 
10456
\item[exit\_file\_scope]
 
10457
  \index{exit\_file\_scope@{\sf exit\_file\_scope}} 
 
10458
  \index{function!exit\_file\_scope@{\sf exit\_file\_scope}}
 
10459
  have special meaning. They are used in file scope static variables.
 
10460
\item[typedef\_p]\index{typedef\_p@{\sf typedef\_p}}
 
10461
  \index{function!typedef\_p@{\sf typedef\_p}}
 
10462
  If the name is declared as typedef return it as TYPENAME token
 
10463
  \index{token!TYPENAME@{\bf TYPENAME}} - true (1);
 
10464
  IDENT\index{token!INDEX@{\bf INDEX}} - false (0), otherwise.
 
10465
\item[get\_declaration\_line]
 
10466
  \index{get\_declaration\_line@{\sf get\_declaration\_line}}
 
10467
  \index{function!get\_declaration\_line@{\sf get\_declaration\_line}}
 
10468
  Returns the declaration line of a variable. Called from error\_message
 
10469
  function.\index{function!error\_message@{\sf error\_message}}
 
10470
  \index{error\_message@{\sf error\_message}}
 
10471
\item[memory\_size]\index{memory\_size@{\sf memory\_size}}
 
10472
  \index{function!memory\_size@{\sf memory\_size}} During
 
10473
  initialization of variables,  walk recursively down the type and set
 
10474
  the size of the subtype of an aggregate.
 
10475
\item[check\_init\_bracket]
 
10476
  \index{check\_init\_bracket@{\sf check\_init\_bracket}}
 
10477
  \index{function!check\_init\_bracket@{\sf check\_init\_bracket}}
 
10478
  The right initialization bracketing has the same number of brackets
 
10479
  as is the number of subtypes. The function checks the number of
 
10480
  subtypes. The return value is in {\sf level} variable.
 
10481
\item[get\_memory\_size]
 
10482
  \index{get\_memory\_size@{\sf get\_memory\_size}} 
 
10483
  \index{function!get\_memory\_size@{\sf get\_memory\_size}}
 
10484
  For the first initializer of the variable, the number of subtypes is
 
10485
  evaluated and returned from the {\sf check\_init\_bracket}
 
10486
  function. If the number of bracket is less than number of subtypes a
 
10487
  warning is printed. The return value is the memory size of the
 
10488
  aggregate. 
 
10489
\item[get\_field\_size]
 
10490
  \index{get\_field\_size@{\sf get\_field\_size}}
 
10491
  \index{function!get\_field\_size@{\sf get\_field\_size}}
 
10492
  It is called during the variable initialization. The size of a
 
10493
  sub-type of the aggregate is returned.
 
10494
\item[noninitialized\_loc]
 
10495
  \index{noninitialized\_loc@{\sf noninitialized\_loc}}
 
10496
  \index{function!noninitialized\_loc@{\sf noninitialized\_loc}}
 
10497
  If the local variable was not initialized during declaration, the
 
10498
  usage counter must be reset.
 
10499
\end{description}
 
10500
 
 
10501
\section{File `type.h'}\index{file!type.h}
 
10502
 
 
10503
\begin{description}
 
10504
\item[INTERNAL\_TYPE]\index{macro!INTERNAL\_TYPE@{\bf INTERNAL\_TYPE}}
 
10505
  \index{INTERNAL\_TYPE@{\bf INTERNAL\_TYPE}} macro for unfolding enum
 
10506
  constants.
 
10507
\item[intern\_arit\_class]
 
10508
  \index{intern\_arit\_class@{\sf intern\_arit\_class}}
 
10509
  \index{type!intern\_arit\_class@{\sf intern\_arit\_class}}  
 
10510
  enumeration type for internal arithmetical class
 
10511
  (see~\ref{internal_type}).
 
10512
\item[PAR]\index{macro!PAR@{\bf PAR}}\index{PAR@{\bf PAR}} flag for
 
10513
  formal parameter\index{parameter!formal}.
 
10514
\item[VAR]\index{macro!VAR@{\bf VAR}}\index{VAR@{\bf VAR}} flag for
 
10515
  local variable\index{variable!local}.
 
10516
\item[intern\_func\_class]
 
10517
  \index{intern\_func\_class@{\sf intern\_func\_class}}
 
10518
  \index{type!intern\_func\_class@{\sf intern\_func\_class}}  
 
10519
  enumeration type for internal function class
 
10520
  (see~\ref{internal_type}).
 
10521
\item[YES]\index{macro!YES@{\bf YES}}\index{YES@{\bf YES}} flag for
 
10522
  remote function\index{function!intrinsic} with exported type of
 
10523
  parameters.
 
10524
\item[NOT\_DEFINED]\index{macro!NOT\_DEFINED@{\bf NOT\_DEFINED}}
 
10525
  \index{NOT\_DEFINED@{\bf NOT\_DEFINED}} not defined range for
 
10526
  arrays. It is used mainly for formal
 
10527
  parameters.\index{parameter!formal} For example, \verb|int z(int
 
10528
  b[][3][3])|, the first subscript of the formal parameter \verb|b|
 
10529
  has undefined size.
 
10530
\item[GLOBAL\_TYPE]\index{macro!GLOBAL\_TYPE@{\bf GLOBAL\_TYPE}}
 
10531
  \index{GLOBAL\_TYPE@{\bf GLOBAL\_TYPE}} macro for unfolding enum
 
10532
  constants.
 
10533
\item[global\_type]\index{global\_type@{\sf global\_type}}
 
10534
  \index{type!global\_type@{\sf global\_type}} enumeration
 
10535
  type for type flag used in remote
 
10536
  functions\index{function!intrinsic} with export types.
 
10537
\item[type\_qual]\index{type\_qual@{\sf type\_qual}}
 
10538
  \index{type!type\_qual@{\sf type\_qual}}  enumeration type for type
 
10539
  qualifiers.
 
10540
\item[storage\_class\_specifier]
 
10541
  \index{storage\_class\_specifier@{\sf storage\_class\_specifier}}
 
10542
  \index{type!storage\_class\_specifier@{\sf storage\_class\_specifier}}
 
10543
  enumeration type for storage class specifiers.
 
10544
\item[POINTER\_P]\index{macro!POINTER\_P@{\bf POINTER\_P}}
 
10545
  \index{POINTER\_P@{\bf POINTER\_P}}
 
10546
\item[STRUCT\_P]\index{macro!STRUCT\_P@{\bf STRUCT\_P}}
 
10547
  \index{STRUCT\_P@{\bf STRUCT\_P}}
 
10548
\item[UNION\_P]\index{macro!UNION\_P@{\bf UNION\_P}}
 
10549
  \index{UNION\_P@{\bf UNION\_P}}
 
10550
\item[ENUM\_P]\index{macro!ENUM\_P@{\bf ENUM\_P}}
 
10551
  \index{ENUM\_P@{\bf ENUM\_P}}
 
10552
\item[ARRAY\_P]\index{macro!ARRAY\_P@{\bf ARRAY\_P}}
 
10553
  \index{ARRAY\_P@{\bf ARRAY\_P}}
 
10554
\item[SIMPLE\_P]\index{macro!SIMPLE\_P@{\bf SIMPLE\_P}}
 
10555
  \index{SIMPLE\_P@{\bf SIMPLE\_P}}
 
10556
\item[LOCAL\_P]\index{macro!LOCAL\_P@{\bf LOCAL\_P}}
 
10557
  \index{LOCAL\_P@{\bf LOCAL\_P}}
 
10558
\item[REMOTE\_P]\index{macro!REMOTE\_P@{\bf REMOTE\_P}}
 
10559
  \index{REMOTE\_P@{\bf REMOTE\_P}}
 
10560
  predicates for the field function class in the internal
 
10561
  type\index{type!internal} (see~\ref{internal_type}).
 
10562
\item[STATIC\_P]\index{macro!STATIC\_P@{\bf STATIC\_P}}
 
10563
  \index{STATIC\_P@{\bf STATIC\_P}} predicate for the field storage
 
10564
  class specifier in the internal type\index{type!internal}
 
10565
  (see~\ref{internal_type}).
 
10566
\item[VOID\_P]\index{macro!VOID\_P@{\bf VOID\_P}}
 
10567
  \index{VOID\_P@{\bf VOID\_P}}
 
10568
\item[CHAR\_P]\index{macro!CHAR\_P@{\bf CHAR\_P}}
 
10569
  \index{CHAR\_P@{\bf CHAR\_P}}
 
10570
\item[SHORT\_P]\index{macro!SHORT\_P@{\bf SHORT\_P}}
 
10571
  \index{SHORT\_P@{\bf SHORT\_P}}
 
10572
\item[INTEGER\_P]\index{macro!INTEGER\_P@{\bf INTEGER\_P}}
 
10573
  \index{INTEGER\_P@{\bf INTEGER\_P}}
 
10574
\item[LONG\_P]\index{macro!LONG\_P@{\bf LONG\_P}}
 
10575
  \index{LONG\_P@{\bf LONG\_P}}
 
10576
\item[FLOAT\_P]\index{macro!FLOAT\_P@{\bf FLOAT\_P}}
 
10577
  \index{FLOAT\_P@{\bf FLOAT\_P}}
 
10578
\item[DOUBLE\_P]\index{macro!DOUBLE\_P@{\bf DOUBLE\_P}}
 
10579
  \index{DOUBLE\_P@{\bf DOUBLE\_P}}
 
10580
\item[SIGNED\_P]\index{macro!SIGNED\_P@{\bf SIGNED\_P}}
 
10581
  \index{SIGNED\_P@{\bf SIGNED\_P}}
 
10582
\item[UNSIGNED\_P]\index{macro!UNSIGNED\_P@{\bf UNSIGNED\_P}}
 
10583
  \index{UNSIGNED\_P@{\bf UNSIGNED\_p}}
 
10584
\item[UNUSED\_P]\index{macro!UNUSED\_P@{\bf UNUSED\_P}}
 
10585
  \index{UNUSED\_P@{\bf UNUSED\_P}}
 
10586
  predicates for the field attribute arit class in the internal
 
10587
  type\index{type!internal} (see~\ref{internal_type}).
 
10588
\item[TYPES\_EQ\_P]\index{macro!TYPES\_EQ\_P@{\bf TYPES\_EQ\_P}}
 
10589
  \index{TYPES\_EQ\_P@{\bf TYPES\_EQ\_P}}
 
10590
  compares if subtype of the field attribute arit class is
 
10591
  compatible. 
 
10592
\item[CONST\_P]\index{macro!CONST\_P@{\bf CONST\_P}}
 
10593
  \index{CONST\_P@{\bf CONST\_P}}
 
10594
  predicate for const type qualifier.
 
10595
\end{description}
 
10596
 
 
10597
\section{File `virtual\_machine.c'}\index{file!virtual\_machine.c}
 
10598
 
 
10599
\begin{description}
 
10600
\item[exec]\index{function!exec@{\sf exec}} \index{exec@{\sf exec}}
 
10601
  wrapper to run the virtual machine. It checks if a virtual machine
 
10602
  instruction was not interrupted\index{interrupt}.
 
10603
\item[exe]\index{function!exe@{\sf exe}} \index{exe@{\sf exe}} all
 
10604
  instructions of the virtual machine are coded in this function.
 
10605
\item[vtrue]\index{function!vtrue@{\sf vtrue}}
 
10606
  \index{vtrue@{\sf vtrue}} logical true. The value is stored on the
 
10607
  temporary stack.\index{stack}
 
10608
\item[vfalse]\index{function!vfalse@{\sf vfalse}}  
 
10609
  \index{vfalse@{\sf vfalse}} logical false. The value is stored on
 
10610
  the temporary stack.\index{stack}
 
10611
\item[div\_yes]\index{function!div\_yes@{\sf div\_yes}}
 
10612
  \index{div\_yes@{\sf div\_yes}} integer division.\index{division}
 
10613
\item[divd\_yes]\index{function!divd\_yes@{\sf divd\_yes}}
 
10614
  \index{divd\_yes@{\sf divd\_yes}} double division.\index{division}
 
10615
\item[divf\_yes] \index{function!divf\_yes@{\sf divf\_yes}}
 
10616
  \index{divf\_yes@{\sf divf\_yes}} float division.\index{division}
 
10617
\item[divc\_yes]\index{function!divc\_yes@{\sf divc\_yes}}
 
10618
  \index{divc\_yes@{\sf divc\_yes}} char division.\index{division}
 
10619
\item[mod\_yes]\index{function!mod\_yes@{\sf mod\_yes}}
 
10620
  \index{mod\_yes@{\sf mod\_yes}} modulus.\index{modulus}
 
10621
\item[move\_stack\_aligned]
 
10622
  \index{function!move\_stack\_aligned@{\sf move\_stack\_aligned}}
 
10623
  \index{move\_stack\_aligned@{\sf move\_stack\_aligned}} the
 
10624
  temporary stack\index{stack} has to be always aligned.
 
10625
\end{description}
 
10626
 
 
10627
\section{File `ys.h'}\index{file!ys.h}
 
10628
 
 
10629
\begin{description}
 
10630
\item[yyparse]\index{function!yyparse@{\sf yyparse}}
 
10631
  \index{yyparse@{\sf yyparse}} function prototype.
 
10632
\end{description}
 
10633
 
 
10634
\section{File `ys.y'}\index{file!ys.y}
 
10635
 
 
10636
%The commented parser is in Appendix~\ref{commented_parser}. 
 
10637
Some rules in the grammar are not designed as stated in~\cite{ansic}.
 
10638
It is partially because of one pass compiler design and fully
 
10639
interpretative approach. Compilation of this file may cause problems
 
10640
(see section~\ref{problems}).
 
10641
 
 
10642
The biggest discrepancies between Standard ANSI C and \CiF\ 
 
10643
implementation is in parameter passing mechanism (see
 
10644
section~\ref{parameter_passing}). The bit-fields and preprocessing
 
10645
directives are not yet supported. The \CiF\ has no preprocessing
 
10646
option. This stuff will be included as soon as possible. The goal is
 
10647
convergence of the framework to the Standard ANSI C specification.
 
10648
 
 
10649
 
 
10650
\chapter{Some implementation details}
 
10651
 
 
10652
\section{Postfix operators (postfix increment and decrement)}
 
10653
 
 
10654
Compilation of postfix increment and decrement is based on the
 
10655
following observation:
 
10656
\begin{itemize}
 
10657
\item On the top of the arithmetic stack is the address of the
 
10658
  operand:
 
10659
  \begin{itemize}
 
10660
    \item If the operand is an array, finish evaluation of the
 
10661
      offset. 
 
10662
    \item If the operand is a structure or union, finish evaluation of
 
10663
      the offset.
 
10664
    \item If the operand is a pointer, add the size of the object it
 
10665
      points to.
 
10666
  \end{itemize}
 
10667
\item Create a copy of the value, which is stored on the top of the
 
10668
  arithmetic stack.
 
10669
\item Exchange two addresses of the top most operands on the
 
10670
  arithmetic stack.
 
10671
\item Create address copy of the top most operand on the arithmetic
 
10672
  stack.
 
10673
\item Push second operand on the arithmetic stack.
 
10674
\item Add two top most operands.
 
10675
\item Move the value on the top of the arithmetic stack to the top
 
10676
  most but last address on the arithmetic stack.
 
10677
\item Pop the arithmetic stack.
 
10678
\end{itemize}
 
10679
 
 
10680
\section{Aggregate assigning}
 
10681
 
 
10682
If the right side operand and the left side operand are aggregates of
 
10683
the same type, move a byte instructions are generated in the loop. The
 
10684
number of move instructions is generated accordingly to the memory
 
10685
size which the aggregate occupies.
 
10686
 
 
10687
\chapter{Bug report}
 
10688
 
 
10689
If you have found a bug please report this bug to authors at the
 
10690
following e-mail address:
 
10691
 
 
10692
\begin{center}
 
10693
{\bf
 
10694
koren@vm.stuba.sk
 
10695
}
 
10696
\end{center}
 
10697
 
 
10698
\noindent
 
10699
Please, include in your bug report:
 
10700
\begin{itemize}
 
10701
\item Platform on which the \CiF\ was running, i.e. machine, CPU,
 
10702
  operating system.
 
10703
\item Version of the \CiF.
 
10704
\item Source file that caused the problem. We will appreciate if the
 
10705
  source file will be as short as possible and still consists the bug
 
10706
  you want to report. If you don't know how to isolate the bug, send
 
10707
  it anyway.
 
10708
\item Error message, if any, produced by the \CiF.
 
10709
\item Indicate if you did any changes to the source of the \CiF.
 
10710
\end{itemize}
 
10711
 
 
10712
\noindent
 
10713
We will try to fix the bug if it is reproducible on platforms that are
 
10714
accessible to us.
 
10715
 
 
10716
\section{Problems}\label{problems}
 
10717
 
 
10718
Problems occur sometimes during compilation of the parser
 
10719
(c-parser.c).\index{file!c-parser.c@{\sf c-parser.c}}
 
10720
\index{c-parser.c@{\sf c-parser.c}} This problem is due to the large
 
10721
{\sf switch} statement. Sometimes helps to specify -O2 optimization
 
10722
flag. 
 
10723
 
 
10724
%\begin{appendix}
 
10725
%\input{apma.tex}
 
10726
%\end{appendix}
 
10727
%\input{acknowledgment.tex}
 
10728
%\input{knia.tex}
 
10729
\bibliographystyle{plain}
 
10730
\bibliography{knia}
 
10731
\printindex
 
10732
\pagenumbering{roman}
 
10733
\tableofcontents
 
10734
\listoffigures
 
10735
 
 
10736
\end{document}