LOGLAN'82







                       USER'S GUIDE 















		

		Institute of Informatics
		University of Warsaw
		January 1988

		revised October 1993
		LITA
		Université de Pau

TABLE of CONTENTS



{TOC \o|0. PREFACE	3
1. USING LOGLAN-82 SYSTEM	3
1.1. COMPILATION	3
1.2. COMPILER SWITCHES	4
1.3.  CODE GENERATION	4
1.4.  PROGRAM INTERPRETATION	5
1.5. COMPILE TIME ERRORS	6
1.6. RUN-TIME ERRORS	6
2. COMPILER OPTIONS	6
2.1. OPTION FORMAT	7
2.2. OPTIONS LIST	7
3.  CURRENT  LOGLAN-82  IMPLEMENTATION  SPECIFICATION	8
3.1. IMPLEMENTED SUBSET OF LOGLAN	8
3.2. PREDEFINED  LANGUAGE  ELEMENTS	8
3.3. FILE SYSTEM	8
3.3.1. FILE VARIABLES	8
3.3.2. FILE GENERATION	9
3.3.3. FILE DEALLOCATION	9
3.3.4. GENERAL FILE OPERATIONS	9
3.3.5. TEXT FILES	10
3.3.6. BINARY SEQUENTIAL FILES	10
3.3.7  DIRECT ACCESS BINARY FILES	10
3.4.  CONCURRENCY	11
3.4.1.  INVOKING THE LOGLAN INTERPRETER FOR CONCURRENT PROGRAMS	11
3.4.2.  RESTRICTIONS AND DIFFERENCES FROM THE REPORT	12
3.4.3.  COMMUNICATION MECHANISM	13
3.5. SYSTEM SIGNALS	15
3.6. IMPLEMENTATION RESTRICTIONS	15

APPENDICES
    A : PREDEFINED CONSTANTS	16
    B : PREDEFINED CLASSES	16
    C : PREDEFINED PROCEDURES AND FUNCTIONS	20
    D : ERROR CODES	22
    E : LOGLAN RUNTIME ERRORS	34
    F : CHARACTER SET	36

BIBLIOGRAPHY	37
I.  LOGLAN'82	37
II.  Algorithmic Logic	39
III. Related literature	40
}
0. PREFACE 
 This document provides information necessary to compile and execute Loglan programs. 
 This manual assumes basic knowledge of Loglan-82 language, described in "Report on the Loglan Programming Language" (see Bibliography). 
1. USING LOGLAN-82 SYSTEM 
The following  three  steps  are  required  to  execute  a   Loglan program: 
	{SYMBOL 183 \f "Symbol" \s 10 \h}	Compilation (to intermediate code), 
	{SYMBOL 183 \f "Symbol" \s 10 \h}	Generation of the interpreted code (from intermediate code), 
	{SYMBOL 183 \f "Symbol" \s 10 \h}	Interpretation (i.e. execution of program). 


 Compilation is accomplished by invoking Loglan compiler. This step creates two destination files: the intermediate code file and the listing file. The intermediate code file is the input file for the second step: generation of the code accepted by interpreter.In this step two files containing object code are produced. They are the input files for the third step: interpretation. This step is equivalent to execution of a program.

1.1. COMPILATION 
To invoke the Loglan compiler without specifying any command line parameters, type: 
             LOGLAN 
Then the prompt appears on your terminal: 
             File name: 
and the compiler waits for file specification.The default extension is LOG. 
The compiler will produce (optionally) listing file with the same file name and the extension LST and will produce, if no error occurs, the code file with the extension LCD. Destination files will be stored on the same drive and directory as the source file. 


Examples:
        $ LOGLAN 

     File name:      PROGRAM <ENTER> 

 Loglan compiler compiles program from PROGRAM.LOG file and creates PROGRAM.LCD. 


   $  LOGLAN A:PROGRAM1 	or


In this case the source file is A:PROGRAM.DAT. The file PROGRAM.LCD will be created on drive A. 

   $      LOGLAN /home/vous/PROGRAM2

If any error occurs, the code file is not produced. At the end of compilation the following message is printed: 
     <number of errors>  error(s) detected 				    {SYMBOL 168 \f "ZapfDingbats"}
1.2. COMPILER SWITCHES 
 There are two possibilities to specify compiler's options: by compiler switches (i.e. external options) or by comments in the source program (see chapter 2.). You may enter the compiler switches in command line after file name in the following format:
            sw1 sw2... swk <return>
where swi consists of character that designates the name of the option and either '+' or '-'.



Examples:
 
 	$  LOGLAN PROGRAM L- T+ 

 	$  LOGLAN PROGRAM 

   	        In this case the default switches values are assumed. 		          {SYMBOL 168 \f "ZapfDingbats"}


 Scope of the switch is the entire program. All switches ,except H, correspond to options. A switch has greater priority then options: when you specify switch, all corresponding options inside source program will be ignored. Full description of each option is given in chapter 2.2. Switch L has additional significance. When this switch is set off no listing file is produced. 
1.3.  CODE GENERATION 
 In this step information from the intermediate code file is read and two destination files containing the code are produced. No switch is permitted for this step. To generate code files, type: 
            GEN  <file name>
  or  HGEN  <file name>, if the switch H+ was specified for  the compiler.(DOS/AT only)

You type file name without extension (extension is ignored). 


Examples: 


      $ GEN 
          FILE_NAME:     PROGRAM 
Information is read from file PROGRAM.LCD from default drive and directory. Two destination files are produced: PROGRAM.CCD and PROGRAM.PCD and stored in the same directory as the input file. 


    $     GEN /home/vous/PROGRAM2

            Files PROGRAM.CCD and PROGRAM.PCD are stored on drive A. 	         {SYMBOL 169 \f "Symbol"}
1.4.  PROGRAM INTERPRETATION 
 To interprete (execute) the Loglan program you must invoke the interpreter INT or HINT (if the switch H+ was specified). File name must be specified in command line. The file extension is ignored. The interpreter reads input files with the given name and extensions CCD and PCD and executes the Loglan program.
The syntax for calling the interpreter is

             INT <options> <file name>      
  or
            HINT <options> <file name>     (DOS/AT only)

The following options are supported:

   /m < n >  	set memory size for Loglan program (in  16  bit  words for small and 32 		bit  words  for  huge  memory).  For concurrent programs it means 			memory  size  for  every process.
   /i       	information about garbage collection-compactification is printed.
   /r < n >  	used to invoke interpreter  on  nodes  different  from console (see 3.4.). 			option parameter is  console  node number (as defined by D-Link 			Network).
   /d       	causes trace to be  printed  to  the  file  with  .TRD extension provided 			that the option or  switch  D+  was used during compiling.


 At the end of interpretation the following message is printed: 

    End of LOGLAN-82 program execution 


Examples: 

     $   LOGLAN \DAT\EXAMP.SRC, L+ 


   The file \DAT\EXAMP.LCD and \DAT\EXAMP.LST are generated. 	   

       $ GEN  \DAT\EXAMP 

   The files  \DAT\EXAMP.CCD and \DAT\EXAMP.PCD  are created. 	{SYMBOL 168 \f "ZapfDingbats"}

Then the program can be interpreted by: 

       $ INT  \DAT\EXAMP 
1.5. COMPILE TIME ERRORS
 The errors detected during the compilation are printed on the listing file, if this file is created. In the scope of option L- or if the switch L is set off only the incorrect lines and errors messages are printed . When the switch ( not option !) L is set off then listing file is not produced and incorrect lines and error messages are printed on the user's terminal. 
   Error message has the following format: 

            *** ln ERROR  en txt id 
where: 

     ln - index of incorrect line, 
     en - error code (see Appendix B), 
     txt- text that explain type of the error, 
     id - identifier helpful to situate the error. 

Error messages are printed in the source listing after incorrect lines. 
For syntax errors (numbered 101-147, 201-212), sign '?' indicates the error's position in the line. 
Error may be detected beyond the line containing it. 
Identifier helpful to find an error is printed as soon as possible. 

For codes 331-338 error message is printed after first line of virtual module declaration. 
Errors like "undeclared identifier" are printed in each module once, after first reference to this identifier. Further references are ignored. 
The errors  related  to  case  instruction  may  appear before the incorrect line. 
1.6. RUN-TIME ERRORS 
 Loglan run-time errors are detected by Loglan run-time system. When any of these errors occurs, the appropriate system signal is raised and error message is printed if handler is not found. All of these error messages are described in Appendix C. moreover the line number of the last executed statement is printed on the user's terminal. 
2. COMPILER OPTIONS 
Options, like switches are used to pass some information to the compiler. Options are placed in source program in comments. Scope of options in source program is textual. Option may appear in any place of source program, but it is active from the beginning of the nearest instruction. Listing option L is active from the next line after line containing setting this option on up to the line containing setting this option off. Options overwrite defaults, but are overwritten by switches (external options). Option definition is not allowed before the keyword program. 
2.1. OPTION FORMAT 
  Options may be placed in source program in comments in the following format: 
        (*$opt1,opt2,...*)
where opti consists of character that designates the option and either '+' or '-' e.g.: (*$L-,T+*). Options in one comment should be separated by commas. Spaces in such comment are not allowed. 



2.2. OPTIONS LIST 
     D - trace 
         D+ - causes the line numbers of the executed  instruction  to be printed, 
         D- - default, 
     L - listing 
         L- -  default,  only  incorrect  lines  are  printed  on  the terminal
         L+ - all lines are printed on the listing file
     O - optimization 
         O+ - optimization   of   some  arithmetical   and   logical expressions are 			      included to generated code (default), 
         O- - generate code without optimization, 
     T - type conflict checking 
         T+ - default, dynamic checking of type conflict in assignment instructions and 	 	     in parameter transmissions, 
         T-  - no dynamic checking 
     H - memory model (switch only)       APPLIES ONLY to PC/AT/XT  !!
         H- - default, small memory
         H+ - huge memory

         PC/AT/XT         When H- is specified all code and  data  must  fit  into  64K 
         			bytes. When H+ is specified all memory available  on  IBM  PC 
         			may be utilized, with the cost of increased execution time.
3.  CURRENT  LOGLAN-82  IMPLEMENTATION  SPECIFICATION
3.1. IMPLEMENTED SUBSET OF LOGLAN 
 The following constructions described in the report of Loglan-82 have not been implemented: 
     - local attributes, 
     - separate compilation, 
File system is described in 3.3. 
3.2. PREDEFINED  LANGUAGE  ELEMENTS 
 Predefined constants, procedures and functions are added to the language (see Appendix A). Moreover keywords char (short form of character) and bool (short form of boolean) are added. 
 The character set, defined in the report of Loglan-82, is extended by lower-case letters and the tabulation character (decimal code 9). It is possible to use operator '<>' which stands for 'not equal'. 
3.3. FILE SYSTEM 
Loglan contains the predefined reference type file and a set of statements and standard procedures to manipulate files.	
Both sequential and direct access files are implemented.
3.3.1. FILE VARIABLES 
 Variables of the type file can be declared in the Loglan program and can be used as any variables of a reference type. 

Example: 

   var f:file, 
       A:arrayof file; 

   unit p:procedure(f:file); ... end p; 
   begin 
       ...... 
       f := A(i); 
       ...... 
   end; 
3.3.2. FILE GENERATION 
A file object is generated by open statement of the form: 

     open(f,T)  	for internal files or 

     open(f,T,A)  	for external files 

where 
   f  is a file variable, 

   T   =    text           for text files, 
               char          for binary sequential files  of character,
               integer  				      integer or
               real           			      real values
               direct         for direct access binary files.
            
A is an expression of the type arrayof char designating external file name. After execution of open statement the new file object is created and it becomes a value of the file variable f. If the file is opened as an external one, then it references to the file A.


Example: 

  open(data,text)                                                    - new internal text file data is opened
  open(num ,integer)                                    - new internal  binary  file   num  is opened
						       (the  file components are integer numbers)
  open(f,text,unpack("my.dat")) 	-                                       external text file f is opened;
                       it references to the file my.dat stored on the default drive and directory.
  open(f,direct,A)          - an external direct access file with name in array A is opened.
3.3.3. FILE DEALLOCATION 
 The file can be closed and deallocated by execution of the statement kill. 
3.3.4. GENERAL FILE OPERATIONS 
 There are three standard procedures associated with files: RESET, REWRITE and UNLINK. 

call RESET(f) rewinds the file f. After execution of RESET on sequential files only read/get operations are available. 

call REWRITE(f) creates a new empty file. After execution of REWRITE on sequential files only write/put operations are available.

call UNLINK(f) closes and deletes file f. File object is deallocated and f is set to one.

 RESET or REWRITE must be performed on the file opening before the first I/O operation on it. 
3.3.5. TEXT FILES 
 The following operations are available to text files: read, readln, eoln, write, writeln, eof. The first parameter of the operation is a file variable. If it is omitted, then a standard input/output file assigned to user's terminal is used.





Example: 

   read(f,a,b); 
   read(c); 
   writeln(g," .... "); 
   if eof(f) then .... 


For more information see [1]. 
3.3.6. BINARY SEQUENTIAL FILES
 Any file created with the parameter T = integer, real or char is a binary one. It is a sequence of components of the type T. Only objects of type T can be read from or written to this file. 
   The following operations are available to binary files:
    put(f, w1, ..., wn) 
    get(f, x1, ..., xn) 
    eof(f) 

where f is a file opened with the type T, wi is an expression of the type T and xi is a variable of the type T. 
 The statement put(f, w1, ..., wn) writes the components w1, ...,wn to the file f. The statement get(f, x1, ..., xn) reads the next n components from the file f and assigns them to the variables x1, ..., xn. The statement eof is the same as for text files. 
3.3.7  DIRECT ACCESS BINARY FILES
Direct access files are treated as a sequence of bytes without any interpretation. Operations RESET and REWRITE prepare a file for both reading and writing. 	RESET is used for existing files, 
	REWRITE for the new ones. 
The following additional operations are available:

call SEEK(f, offset, base) - moves the file pointer to the position designated by offset 										        relative to base. 
	Offset is a signed integer specifying the number of bytes. 
Possible values for base  are:
       0 - begining of file,
       1 - current position of file pointer,
       2 - end of the file.

Examples:

call SEEK(f, 0, 0)    - rewinds file f,
call SEEK(f, -3, 1)   - backspaces file f by 3 bytes,
call SEEK(f, 0, 2)    - moves the file pointer to the first byte after end of file

POSITION(f)           - returns  current  position  of  the  file pointer associated with f.

PUTREC(f, A, n) - where A is an array of any primitive type and n is an integer variable. Let k be the number of bytes occupied by elements of array A. This operation writes min(k, n) bytes from A to the file f and advances file pointer by the number of written bytes. The number of bytes written to the file is returned in the variable n.


GETREC(f, A, n) - where A is an existing array of any primitive type and n is an integer variable. Let k be the number of bytes occupied by elements of array A This operation reads min(k,n) bytes (or less, if end of file is encountered) from the file and advances the file pointer by the number of read bytes. The number of bytes read from the file is returned in the variable n.
3.4.  CONCURRENCY
 Implemented concurrency mechanisms differ much from those described in the LOGLAN-82 report []. In particular, only distributed processes are implemented, so they cannot communicate through shared variables. For this reason semaphores had to be replaced by an entirely new communication mechanism. Such a mechanism has been designed and it is based on the rendez-vous schema.
3.4.1.  INVOKING THE LOGLAN INTERPRETER FOR CONCURRENT ROGRAMS
 A concurrent LOGLAN program may run on a single computer with concurrency simulated by time slicing. In this case LOGLAN interpreter is invoked as usual. One must only remember that /m optional parameter (see 1.4.) denotes memory size for each process rather than for the whole program.
To achieve true parallel (multiprocessor) execution, a network of IBM PC computers may be used. For the time being, only D-Link Network Version 3.21 is supported. In order to run a LOGLAN program in the network environment take the following steps:
  1) make sure that every node is logged on,
  2) select arbitrarily one node as a console,
  3) invoke the LOGLAN interpreter on every node except  the  console, giving it /r option with the console node number (see 1.4.).  You must give  the  same  program  file  to  all  interpreters.  Most conveniently it may be achieved by accessing a  file  on  a  disk connected through the network to each node.
  4) invoke the interpreter on the console without the /r  option  (in the usual way). 	Give it the same program file as above.

After the last step the main program process begins its execution on the console node. Other processes may be created dynamically on any node on which an interpreter is running.

Regardless of the fact whether the network is used or not, more than one process may be executed on the same computer.

3.4.2.  RESTRICTIONS AND DIFFERENCES FROM THE REPORT
All processes (even those executed on the same computer) are implemented as distributed, i.e. without any shared memory. This fact implies some restrictions on how processes may be used. Not all restrictions are enforced by the present compiler, so it is the programmer's responsibility to respect them. This is the list of restrictions:

 1) all process units must be declared as global, i.e. directly inside the main program, 
 2) a process cannot access global variables (except for the main program process),
 3) any remote access to a process object other than a procedure  call is inhibited
 4) each parameter of
	{SYMBOL 183 \f "Symbol" \s 10 \h} a process,
	{SYMBOL 183 \f "Symbol" \s 10 \h} a procedure called by remote access to a process object,
	{SYMBOL 183 \f "Symbol" \s 10 \h} a procedure parameter of a process,
     must be one of the following:
       {SYMBOL 183 \f "Symbol"} a value of the primitive type (Integer, Real, Char,  Boolean, String)
       {SYMBOL 183 \f "Symbol"} a procedure declared directly inside a process
       {SYMBOL 183 \f "Symbol"} a procedure which is a formal parameter of a process
       {SYMBOL 183 \f "Symbol"} any reference to a process object.
 This restriction implies that references to objects other than processes have only local meaning (in a single process) and cannot be passed among the processes.
  5) comparisons, IS, IN and QUA operations are not  allowed  for  the references to processes. 
  6) operations which require dynamic type checking on the references to processes are not allowed.
  7) a process may be attached only by a proper coroutine generated by it.
  8) the variable MAIN is accesible only in the main program process.

   The following concurrent constructs described in the report are not implemented at all:

   - semaphores and all operations on them
   - the WAIT expression.

 Semantics of the NEW generator is slightly modified when applied to the processes. The first parameter of the first process unit in the prefix sequence must be of type INTEGER. This parameter denotes the node number of the computer on which this process will be created. For a single computer operation this parameter must be equal to 0.

Example:

unit A:class(msg:string);
...
end A;
unit P:A process(node:integer, pi:real);
...
end P;
...
var x:P;
...
begin
...
 (* Create process on node  4.  The  first  parameter  is  the  *) 
 (* string required by the prefix A, the second is the node number *)
 x := new P("Hello", 4, 3.141592653);
...
end


   The following parallel constructs are implemented as defined in the report:

   - KILL operation for a process
   - RESUME statement
   - STOP statement without parameter.
3.4.3.  COMMUNICATION MECHANISM
 Processes may communicate and synchronize by a mechanism based on rendez-vous. It will be referred to as "alien call" in the following description.

   An alien call is either:
   - a procedure (or function) call performed by a remote access to  a  process object, or
   - a call of a procedure which is a formal parameter of  a  process,   or
   - a call  of  a  procedure  which  is  a  formal  parameter  of  an alien-called procedure (this is a recursive definition).

 Every process object has an enable mask. It is defined as a subset of all procedures declared directly inside a process unit or any unit from its prefix sequence (i.e. subset of all procedures that may be alien-called).
 A procedure is enabled in a process if it belongs to that process' enable mask. A procedure is disabled if it does not belong to the enable mask. 
 Immediately after generation of a process object its enable mask is empty (all procedures are disabled).
 Semantics of the alien call is different from the remote call described in the report. Both the calling process and the process in which the procedure is declared (i.e. the called process) are involved in the alien call. This way the alien call may be used as a synchronization mechanism.
 The calling process passes the input parameters and waits for the call to be completed.
 The alien-called procedure is executed by the called process. Execution of the procedure will not begin before certain conditions are satisfied. First, the called process must not be suspended in any way. The only exception is that it may be waiting during the ACCEPT statement (see below). Second, the procedure must be enabled in the called process.
   When the above  two  conditions  are  met  the  called  process  is interrupted and forced to execute  the  alien-called  procedure  (with parameters passed by the calling process).
Upon entry to the alien-called procedure all procedures become disabled in the called process.
Upon exit the enable mask of the called process is restored to that from before the call (regardless of how it has been changed during the execution of the procedure). The called process is resumed at the point of the interruption. The execution of the ACCEPT statement is ended if the called process was waiting during the ACCEPT (see below). 
At last the calling process reads back the output parameters and resumes its execution after the call statement.

The process executing an alien-called procedure can easily be interrupted by another alien call if the enable mask is changed.

There are some new language constructs associated with the alien call mechanism. The following statements change the enable mask of a process:
	 ENABLE p1, ..., pn
enables the procedures with identifiers p1, ..., pn. If there are any processes waiting for an alien call of one of these procedures, one of them is chosen and its request is processed. The scheduling is done on a FIFO basis, so it is strongly fair. The statement:
	 DISABLE p1, ..., pn
disables the procedures with identifiers p1, ..., pn.
In addition a special form of the RETURN statement:
	 RETURN ENABLE p1, ..., pn DISABLE q1, ..., qn
allows to enable the procedures p1, ..., pn and disable the procedures q1,...,qn after the enable mask is restored on exit from the alien-called procedure. It is legal only in the alien-called procedures (the legality is not enforced by the compiler).
A called process may avoid busy waiting for an alien call by means of the ACCEPT statement:
	 ACCEPT p1, ..., pn
adds the procedures p1, ..., pn to the current mask, and waits for an alien call of one of the currently enabled procedures. After the procedure return the enable mask is restored to that from before the ACCEPT statement.

 Note that the ACCEPT statement alone (i.e. without any ENABLE/DISABLE statements or options) provides a sufficient communication mechanism. In this case the called process may execute the alien-called procedure only during the ACCEPT statement (because otherwise all procedures are disabled). It means that the enable mask may be forgotten altogether and the alien call may be used as a pure totally synchronous rendez-vous. Other constructs are introduced to make partially asynchronous communication patterns possible.


3.5. SYSTEM SIGNALS 
   System signals  are connected to runtime errors (see  APPENDIX  C). 

These signals are the following: 

     ACCERROR - reference to non existing object, 
     CONERROR - array  index  outside  the  range  or  lower bound  is greater   than  upper   bound   during  array   object generation, 
     LOGERROR - errors related to control transfer, 
     MEMERROR - memory overflow, 
     NUMERROR - errors related to arithmentic operations like division by zero, floating point overflow, 
     TYPERROR - type conflict in assignment statement, during parameter transmission or headline conflict for actual parameter function and procedure. 
     SYSERROR - errors  related  to  file  system,  like reading after writing, too many files etc. 
3.6. IMPLEMENTATION RESTRICTIONS 
      - Text  line in  source program  can't  be  longer than  80 characters. 
      - Maximal length of identifier is 20 characters, but entire length  of all  identifiers and  keywords should  be less than 3000 characters. 
      - String constant can't be longer than 260 characters. 
      - For case instructions: 
             - up  to  6  levels  of  nested  case  instructions are allowed, 
             - range of labels can't be greater than 160. 
      - Number of formal parameters can't be greater than 40, whereas up to 35 output or input parameters are allowed. Total number of formal parameters and variables declared in one module can't be greater than 130. 
      -  Number of array indices (i.e. arrayof) can't be greater than 63, 
      - Standard type integer has the range (-32767,+32767) for small memory (16 - bit word). For huge memory (32-bit word) the range is (-2147483647,+2147483647), but values of constant expressions in a program must lie within the range (-2767, 32767).
      - Real numbers have the range (-8.43E-37, 3.37E+38) with 24-bit mantissa and 8-bit exponenet for small memory , giving about 7 digits of precision. For huge memory the range is (4.19E-307, 1.67E+308) with 53-bit mantissa and 11-bit exponent, giving about 15 digits of precision.Values of constant expression in a program must lie in the range (-8.43E-37, 3.37E+38).



Warning           

Compiler computes values of expressions built from constants without range checking. It means, that integer overflow, floating point overflow or underflow cause incorrect result without any message. 



APPENDIX A : PREDEFINED CONSTANTS


    INTSIZE
        The size in bytes of integer variables  (2  for  small  memory, 4 for huge memory)

    REALSIZE
        The size in bytes  of  real  variables  (4  for  small memory, 8 for huge memory)

APPENDIX B : PREDEFINED CLASSES
IIUWGRAPH

{Applies for DOS/AT versions, see a separate document IIUWGRAPH for details}	

{For Unix, see the separate document XIIUWGRAF}	

Class IIUWGRAPH defines the set of graphics procedures. The full description of these procedures is contained in the description of the library IIUWGRAF (Institute  of   Informatics,  University  of  Warsaw). The following procedures are available in Loglan (heads are specified if they are different from these in IIUWGRAF description): 

    gron   - graphics on 1 parameter to be ignored integer
    groff  - GRAPHICS OFF, no parameters
    cls    - Clear screen, no pamrameters
    point  - set current position to (x,y) and give it current colour
    move   - set current position to (x,y)
    draw 
    hfill 
    vfill 
    color 
    style 
    patern 
    intens 
    pallet 
    border 
    video 
    hpage 
    nocard : function: integer; 
    pushxy 
    popxy 
    inxpos : function: integer; 
    inypos : function: integer; 
    inpix 
    getmap : function(input x,y:integer): arrayof integer; 
    putmap 
    ormap 
    xormap 
    track 
    inkey : function : integer; 
    hascii 
    hfont 
    hfont8 
    outstring 
    cirb




MOUSE

{Applies only to DOS/AT versions}    
{For UNIX and 386 versions see the corresponding documents}

A predefined class MOUSE provides basic support for mouse. An external resident Microsoft compatible mouse driver (such as MOUSE.SYS) must be installed to use this class. MOUSE contains following procedures and functions:

unit MOUSE: class;

init:function(output b:integer):boolean
{Initializes mouse driver. Number of mouse buttons is returned in b.  Returns  true  iff  mouse  hardware  and  software  are installed.}

showcursor:procedure
{This procedure increments the internal cursor counter. If  the counter is 0 it displays the cursor on the screen. The  cursor tracks the motion of the mouse, changing position as the mouse changes position.}

hidecursor:procedure
{This  procedure  removes  the  cursor  from  the  screen   and decrements the internal cursor counter. Although the cursor is hidden it still tracks  the  motion  of  the  mouse,  changing position as the mouse changes position.}

status:procedure(output h, v:integer, l, r, c:boolean)
{This procedure reports the status of the buttons  and  cursor. l, r, c are true iff respectively left, right and  center  (if it exists) buttons are down when the procedure is called. Also position of cursor  is  returned  in  h  and  v.  Position  is expressed in  Color Graphics Adapter pixels  (with  resolution 640x200).}

setposition:procedure(h, v:integer)
{This procedure sets the cursor to the specified horizontal and vertical positions on the  screen.  The  new  values  must  be within the specified ranges of the virtual screen. The  values are rounded to the nearest values permitted by the screen  for horizontal and vertical positions.}

getpress:procedure(b:integer; output h, v, p:integer, l, r, c:boolean)
{This procedure gives a count of selected button presses (on p) since the last call to it and the position of the cursor (on h and v) the last time  the  button  was  pressed.  Parameter  b selects button to be checked: 0 - left, 1 - right, 2 - center. In addition current button status is returned in l,  r  and  c (see procedure status).}

getrelease:procedure(b:integer; output h, v, p:integer, l, r, c:boolean)
{This procedure gives a count of selected button  releases  (on p) since the last call to it and the position  of  the  cursor (on h and v) the last time the button was released.  Parameter b selects button to be checked: 0 -  left,  1  -  right,  2  - center. In addition current button status is returned in l,  r and c (see procedure status).}

setwindow:procedure(l, r, t, b:integer)
{Restricts the cursor movement to window described by l, r,  t, b. L and r are minimum and maximum horizontal cursor position,  t and b are minimum and maximum vertical cursor  position  (in pixels)}

defcursor:procedure(s, x, y:integer)
{Selects  text  mode  cursor  characteristics.  When  s  is  0, software cursor is selected and x, y define masks to  be  used when  modifying  character-attribute  word  in  screen  memory associated with position under cursor. This word  is  logicaly ANDed with x and the result is XORed with y. When s  is  1,  a hardware cursor is selected and x, y  define  first  and  last scan lines of the cursor box within character box. X  must  be not greater than y and both must be in  range  0-7  for  Color Graphics Adapter  or  0-13  for  Monochrome  Display  Adapter, Hercules Graphics Card and Enhanced Graphics Adapter.
Examples:
call defcursor(0, -1, 30464)	
   - selects standard (reverse video) software cursor	
call defcursor(1, 11, 12)	
   - selects standard hardware cursor for HGC}

getmovement:procedure(output h, v:integer)
{Returns relative mouse movement  since  last  call  (in  1/200 inches).}

setspeed:procedure(h, v:integer)
{H and v specify horizontal and vertical cursor speed  relative to mouse speed. It is expressed in mouse  steps  (1/200  inch) corresponding  to  8   pixels  on  screen.  Default  is  8 horizontaly and 16 verticaly.
Examples:	
call setspeed(1, 1)	
   - set maximum cursor speed	
call setspeed(16, 32)	
   - set cursor speed two times slower than default}

setthreshold:procedure(s:integer)
{sets threshold speed for double speed feature.  If  the  mouse moves faster than the  threshold,  the  cursor  speed  on  the screen is doubled. Default threshold is 64 mouse steps/second.	
	
Example:	
call setthreshold(10000)	
   - efectively disable double speed feature.}


end MOUSE;

APPENDIX C : PREDEFINED PROCEDURES AND FUNCTIONS           
          ENDRUN:procedure; 
                Terminates program execution (ABORT). 

          RANSET:procedure(x:real); 
                 Initializes random generator (for RANDOM function) 

          RANDOM:function:real; 
                 Generates uniformly distributed pseudo-random numbers in the interval (0,1). 

          SQRT:function(x:real):real; 
                Computes square root of parameter x. 

          SIN:function(x:real):real; 
                Computes sinus of parameter x. 

          COS:function(x:real):real; 
                Computes cosinus of parameter x. 

          TAN:function(x:real):real; 
                Computes tangens of parameter x. 

          EXP:function(x:real):real; 
                Computes e**x. 

          LN:function(x:real):real; 
                Computes natural logarithmus of parameter x. 

          ATAN:function(x:real):real; 
                Computes arcus tangens of parameter x. 

          ENTIER:function(x:real):integer; 
                Computes entier part of parameter x. 

          ROUND:function(x:real):integer; 
                Computes rounded value of parameter x: ROUND(x)=ENTIER(x+0.5). 

          IMIN:function(x, y:integer):integer; 
                Computes minimum of two parameters. 

          IMAX:function(x, y:integer):integer; 
                Computes maximum of two parameters. 

          IMIN3:function(x, y, z:integer):integer; 
                Returns the minimum of three parameters. 

          IMAX3:function(x, y, z:integer):integer; 
                Returns maximum of three parameters. 

          ISHFT:function(x, k:integer):integer; 
                Logically  shifts  x  by k  bits:  left,  when  k  is positive, right otherwise. 

          IAND:function(n, k:integer):integer; 
                Returns logical product of parameters (on all bits). 

          IOR:function(n, k:integer):integer; 
                Returns logical sum of parameters (on all bits). 

          XOR:function(n, k:integer):integer; 
                Returns exlusive sum of parameters (on all bits). 

          INOT:function(n:integer):integer; 
                Returns  logical  complement  of  parameters  (on  all bits). 

          ORD:function(c:char):integer; 
                Returns  number  that  represents  character  c  (see APPENDIX F). 
	    The following equations are satisfied:  CHR(ORD(c)) = c &ORD(CHR(n)) = n 

          CHR:function(n:integer):char; 
                Returns  character  represented  by  parameter n  (see APPENDIX F). 

          UNPACK:function(s:string):arrayof char; 
                Returns address of new array object containing characters of the string s. 

          MEMAVAIL:function:integer;
                Returns the size of available memory  in  the  current process (in words).

          EXEC:function(cmd:arrayof char):integer; 
                Calls  secondary  command  processor  with  cmd  as a command  string.  			Exit code is returned as a value of EXEC. 
                 
          TIME:function: integer; 
                Returns  an  integer value indicating the  amount  of central processor  			time  in  seconds used by  current process. 
                   
          RESET:procedure(f:file); 
                Positionnes file f at the first component and readies it to reading. 

          REWRITE:procedure(f:file); 
                Positionnes file f at the first component and readies it for output.  
	    The file f becomes empty (eof(f)  = true). 

          UNLINK:procedure(f:file);
                Closes and deletes file f (see 3.3.4)

          SEEK:procedure(f:file; offset, base:integer);
                Positiones file pointer (see 3.3.7)

          POSITION:function(f:file):real;
                Reads position of file pointer (see 3.3.7)


APPENDIX D : ERROR CODES
            0 - ***declaration part overloaded 
Overflow of compiler data structure of declaration  part.  Possible reasons:  too complicated program structure  (too  many  classes, protection  lists, parameter  lists,...),  too  complicated  function expressions e.g. f(g(h(...))). It is possible that removing  some errors e.g. "unvisible  identifier" causes shortening of the program. 
           10 - ***too many errors 
Overflow of  error  diagnostic  table.  1024 first detected errors are  printed, but global number of error is equal to number of all detected errors. 
           41 - ***declaration part overloaded 
Comments as for 0. 
          101 - ':='  expected 
          102 - ';'  expected 
          103 - 'then'  expected 
          104 - 'fi'/'else'  expected 
          105 - 'od'  expected 
          106 - '('  expected 
          107 - ')'  expected 
          108 - 'do'  expected 
          109 - identifier  expected 
          110 - too many exits found 
                    Length of sequence exit exit ...exit exceeds level of loop nesting +1. 
          111 - illegal character 
          112 - wrong structure of 'if'-statement 
          113 - 'end'  missing 
          114 - '.'  expected 
          115 - illegal constant in expression 
  Character constant or  text appears in logical  or arithmetical expression. 
          116 - '='  expected 
          117 - constant  expected 
          118 - ':'  expected 
          119 - unit kind specification expected 
Keywords: class, procedure, function, coroutine or process missing in module headline.			 
          120 - 'hidden' or 'close' occurred twice 
          121 - 'hidden' or 'close' out of a class 
          122 - 'block'  expected 
          123 - object expression is not a generator 
Object expression appearing as instruction is not a generator e.g. new (a).b 
          124 - 'dim'  expected 
          125 - 'to'/'downto'  expected 
          126 - illegal arithmetic operator 
          127 - declaration part  expected 
          128 - incorrect identifier at 'end' 
Module name after  end does not correspond to name in module headline. 
          129 - wrong structure of 'case'-statement 
          130 - wrong structure of 'do'-statement 
          131 - illegal use of 'main' 
 Name main may be used only as an argument of attach operator; in other cases it is illegal. 
          132 - 'when'  expected 
          133 - too many branches in 'case'-statement 
Number of branches  in case instruction is greater than 160. 
          134 - 'begin'  missed 
          135 - bad option 
          136 - is it really a loglan program??? 
There is no Loglan keyword found in source program like: begin, block, unit, class,... 
          137 - 'block'  missed - parsing began 
There  is  no  keyword  block  or  program  at the beginning  of  the  Loglan  program. This  message indicates  the  source  line, that  is  the  first compiled line. 
          138 - 'repeat' out of a loop 
 The  length  of  sequence:  (exit)*repeat  exceeds nested depth of the loop. 
          139 - there is no path to this statement 
          140 - 'andif'/'orif' mixed 
          141 - array of 'semaphore' is illegal 
          142 - wrong handler end 
Handler  declaration is  not ended  by instruction end or end handlers. 
          143 - lastwill inside a structured statement 
          144 - repeated lastwill 
Label LASTWILL appears  more than once in the same module. 
          145 - no parameter specification 
          146 - wrong register specification 
          147 - "," expected
          191 - ***null program 
There is no source program  on the  input  file or there is no module declaration. Causes termination of program compilation. 
          196 - ***too many identifiers 
Entire length of all identifiers and keywords is greater than 3000  characters. This overflow terminates program compilation. 
          197 - ***too many formal parameters 
The length of formal parameter list and declared local variables (in actual module) is greater than 130. This error terminates program compilation. 
          198 - ***parsing stack overloaded 
Too complicated (nested) program structure. This error terminates program compilation. 
          199 - ***too many prototypes 
Too many declarations in program caused overflow of the compiler data   structure.   This  error terminates program compilation. 
          201 - wrong real constant 
          202 - wrong comment 
          203 - wrong character constant 
          204 - wrong integer constant 
          205 - integer overflow 
Integer constant out of range. 
          206 - real overflow 
Real constant out of range. 
          211 - identifier too long 
Length  of   identifier   is   greater   than   20 characters. 
          212 - string too long 
Length of  string  constant  is greater  than  260 characters. 
          301 - prefix is not a class       id 
Prefix name ID is not a  class name. It may appear when  identifier ID  is  used  earlier (declared more than once). 
          303 - coroutine/process illegal here as prefix       id 
Procedure, function or  block can't be prefixed by coroutine or process. 
          304 - hidden identifier cannot be taken        id 
Identifier ID placed on taken list is on hidden list in the prefixing module. 
          305 - undeclared identifier       id 
          306 - undeclared type identifier       id 
          307 - type identifier expected       id 
Identifier ID used in variable or function declaration as a type name, is  not  declared earlier  as  a  type   (but  name  has  been  used earlier). 
          308 - undeclared prefix identifier       id 
          309 - declared more than once       id 
          310 - taken list in unprefixed unit 
          316 - formal type specification after use       id 
Formal type ID appears in the parameter list after using this identifier as parameter  type  e.g. (... x: ID; type ID, ...). 
          317 - hidden type identifier       id 
Type name ID is on hidden  list in a prefix of one of  the modules from SL chain of actual module and it is a nearest declaration of this identifier. 
          318 - type identifier not taken       id 
Type  name ID is not on taken list in a prefix  of one of the modules from SL chain of actual module. 
          319 - hidden identifier in the list       id 
Identifier ID from hidden or close list is on hidden list in one of the prefixing modules. 
          320 - identifier in the list not taken       id 
Identifer ID from  hidden or  close  list  is  not placed on taken  list in  none  of  the  prefixing modules. 
          321 - identifier cannot be taken       id 
Identifer ID  from taken list is  placed on  taken list in none of the prefixes. 
          322 - hidden prefix identifier       id 
Analogical to 317 error. 
          323 - prefix identifier not taken       id 
Analogical to 318 error. 
          329 - only procedure and function may be virtual 
  virtual specification appears with class specification. 
          330 - virtual in unprefixed block/procedure/function 
          331 - incompatible kinds of virtuals       id 
Kind of virtual module ID is different from kind of replaced module (e.g. one of  them  is  a function, the other one is a procedure). 
          332 - incompatible types of virtuals       id 
 Type of virtual function ID is different from type of replaced function. 
          333 - different lengths of form.param.lists in virtuals id 
Virtual module ID and replaced module have different number of formal parameters. 
          334 - conflict kinds of the 1st level parameters       id 
In the headline of virtual module ID kind of formal parameter differs from corresponding formal parameter in the headline of replaced module (e.g. type and variable, input and output parameters,.). 
          335 - incompatible types of the 1st level parameters   id 
There  are  formal  parameters of different  types (function,  procedure) in the  headline of virtual module ID and in the headline  of replaced  module on the same position. 
          336 - different lengths of the 2nd level params lists  id 
There   are   formal   procedures/functions   with different numbers of parameters in the headline of virtual module ID  and in the headline of replaced module on the same position. 
          337 - incompatible kinds of the 2nd level parameters  id 
There are parameters of different kinds on the same position in the corresponding procedure or function parameters in the headline of virtual module ID and in the headline of replaced module. 
          338 - incompatible types of the 2nd level parameters  id 
There are parameters of different types on the same position in the corresponding procedure or function in the headline of virtual module ID and in the headline of replaced module. 
          341 - ***declaration part overloaded 
Analogical to error 0. 
          342 - ***too many classes declared 
          343 - ***too many prototypes 
Too many modules declared on the same level. 
          350 - undeclared signal identifier         id 
          351 - hidden signal identifier       id 
Analogical to error 317. 
          352 - signal identifier not taken       id 
Analogical to error 318. 
          353 - signal identifier expected       id 
Identifier ID placed in handler declaration as a signal name has not been declared as a signal. 
          354 - different types of parameters       id 
In the headlines of signals, that have common handler, parameters of the different types appear on the same  position. ID is one of these parameters. 
          355 - incompatible kinds of parameters       id 
In the headlines of signals that have common handler, parameters of different  kinds appear on the same position. ID is one of these parameters. 
          356 - different identifiers of parameters       id 
In  the  headlines  of  signals that  have  common handler  parameters of  different names appear  on the same position. ID is one of these parameters. 
          357 - incompatible kinds of the 2nd level parameters  id 
Analogous to error 355 for 2-nd level parameters. 
          358 - different types of the 2nd level parameters       id 
Analogous to error 354 for the 2-nd level parameters. 
          359 - different lengths of the 2nd level params lists  id 
There are formal procedures or formal functions with different number of parameters on the same position in the headlines of signals this have common handler. ID is one of these formal parameters/functions. 
          360 - different lengths of form. param. lists in signals id 
There are different number of formal parameters in the signals that have common handler. ID is one of these signals. 
          361 - non-local formal type cannot be used       id 
Formal parameter ID of  signal  is  of  non  local formal type. 
          362 - repeated handler for signal       id 
There are more than one  handler  for signal ID in the same module. 
          370 - only 'input' is legal here 
Formal parameter output  or  inout  is  illegal in process. 
          398 - class prefixed by itself       id 
Construction unit ID: ID class is not allowed. 
          399 - cycle in prefix sequence       id 
ID is a class identifier  used in cyclic prefixing i.e. ID prefixes a, a prefixes b, ... , z prefixes ID. This construction is not allowed. 
          401 - wrong label in 'case'       id 
Label in case instruction is not a constant. 
          402 - 'case' statement nested too deeply 
Nesting level in case instruction  is greater than 6. 
          403 - too long span of 'case' labels 
Range of branches  in  case instruction is greater than 160. 
          404 - repeated label in 'case'-statement       id 
Label  ID   appears  more  than   once   in   case instruction. 
          405 - illegal type of 'case' expression       id 
Control expression  in case statement  is  not  of 
                    integer or char type. 
          406 - different types of labels and 'case' expression 
          407 - non-logical expression after 'if'/'while'       id 
          408 - real constant out of integer range 
Error  during  conversion  of  real  constant   to integer constant. 
          410 - simple variable expected       id 
Control  variable  in for loop  is  not  a  simple variable. 
          411 - non-integer control variable       id 
Control variable ID in for loop  is not of integer type. 
          412 - non-integer expression       id 
Expression placed as array index or bound limit in array  generation  or  as step in  for loop  or as format in  write statement  should be reducable to integer type. 
          413 - file expression expected       id 
          414 - string expression expected       id 
          415 - reference expression expected       id 
Expression  placed  before  dot  (remote  access), before qua  or  as  a argument  of  kill  or  copy statement is not of class type. 
          416 - array expression expected       id 
          417 - boolean expression expected       id 
          418 - semaphore variable expected 
          419 - illegal type in 'open' 
The  type name placed  in  open is different  than TEXT, REAL, INTEGER, CHAR and DIRECT. 
          420 - variable  expected       id 
Expression  placed on the  left side of assignment statement or as an argument of read instruction or in array instruction is not a variable. 
          421 - class identifier after 'new' expected       id 
Identifier  ID  placed after new is  not  a  class identifier. 
          422 - procedure identifier after 'call' expected       id 
          423 - 'new'  missing       id 
Keyword new doesn't appear before class identifier for object generation. 
          424 - 'call'  missing       id 
Keyword call doesn't appear  before  procedure identifier for procedure call. 
          425 - 'inner' out of a class 
          426 - 'inner' occurred more than once 
          427 - 'wind'/'terminate' out of a handler 
          428 - 'inner' inside lastwill 
          429 - definition cannot be reduced to constant       id 
Identifier ID placed in constant definition is not a constant. 
          430 - undefined constant in the definition       id 
          431 - wrong number of indices       id 
Number of indices in  referencing to array element is different from declared number of indices. 
          432 - index out of range       id 
          433 - upper bound less than lower bound       id 
          434 - too many subscripts        id 
Dimension of static array ID is greater than 7. 
          435 - variable is not array       id 
          440 - type identifier expected after 'arrayof'       id 
Identifier ID placed after arrayof in actual parameter list, corresponding to type parameter is not a type name. 
          441 - incorrect format in 'write' 
There is  format for  expression  of  char type or there is  double format  for  expression  of  type integer or string. 
          442 - illegal expression in 'write' 
Argument of write  statement is not  of type char, string, integer or real. 
          443 - illegal type of variable in 'read'       id 
Argument  of  read  statement is not of type char, integer or real. 
          444 - no data for i/o transfer 
There is only file identifier in I/O instruction. 
          445 - illegal expression in 'put' 
          446 - illegal expression in 'get' 
          448 - 'raise' missing       id 
There is signal identifier without keyword raise in the context of signal raising. 
          449 - signal identifier expected        id 
Identifer ID after keyword raise is  not a  signal identifier. 
          450 - illegal procedure occurrence       id 
Procedure name ID appears in illegal context. 
          451 - illegal class occurrence       id 
Class name ID appears in illegal context. 
          452 - illegal type occurrence       id 
Type name ID appears in illegal context. 
          453 - illegal signal occurrence       id 
Signal name ID appears in illegal context. 
          454 - illegal operator occurence 
          455 - wrong number of operands 
          460 - divided by zero 
          470 - illegal input parameter       id 
Actual parameter  associated with  input parameter is not  expression that may  have any value: it is e.g. procedure name 
          471 - illegal output parameter       id 
Actual parameter corredponded to output  parameter is not a variable. 
          472 - illegal type parameter       id 
Actual parameter ID associated with type parameter is not a type name. 
          473 - illegal procedure parameter       id 
Actual  parameter  ID  associated  with  procedure parameter is not a procedure name. 
          474 - illegal function parameter       id 
Actual parameter ID associated with function parameter is not a function name. 
          475 - illegal left side of 'is'/'in'       id 
Left side argument ID of is/in is not a  reference expression. 
          476 - illegal right side od 'is'/'in'       id 
Right side argument ID  of is / in is  not a class name. 
          477 - illegal parameter of 'attach'       id 
Parameter ID of attach statement is not a reference variable of class object. 
          478 - illegal type of expression
          479 - negative step value
          550 - ***stack overloaded 
This error may be removed by dividing expressions into subexpressions, making simpler nested callings of arrays, functions, classes and for loops. This error terminates compilation of current module, but other modules  will be compiled. 
          551 - ***too many auxiliary variables needed 
Too  complicated expressions.  This error  may  be removed by declaration of additional variables and using them as auxiliary variables in expressions. 
          552 - ***too many auxiliary reference variable needed 
Analogical to error 551. 
          553 - ***statement sequence too long or too complicated 
This error may be removed by adding 'goto' statement into sequence of instructions e.g. if false then exit fi, inner, ... or by dividing complicated expression into subexpressions. 
          554 - ***real constants dictionary overflow 
Too many real constant, maybe because of evaluation of expressions built from  real  constants. 
          600 - undeclared identifier       id 
          601 - illegal type before '.'       id 
Expression placed  before dot  (remote  access) is not of class type. 
          602 - close identifier after '.'       id 
Identifier ID placed after dot is on close list in the class  or its prefix that construct expression before dot. 
          603 - undeclared identifier after '.'       id 
Identifier ID placed after dot is not attribute of expression placed before dot. It may  be caused by missing declaration or using bad prefix  for class constructing expression before dot. 
          604 - illegal operand type        id 
One of the arguments in arithmetical expression or in relation is not of arithmetical type. 
          605 - illegal type in 'div/'mod' term       id 
Expression identified  by  ID  used as argument of div or mode operation is not of integer type. 
          606 - incompatible types in comparison        id 
ID is an identifier of left argument of relation. 
          607 - unrelated class types in comparison       id 
ID is an identifier of left argument of relation. Both arguments are of class type and none of these classes prefixes the other one. 
          608 - string cannot be compared       id 
ID identifies a string. 
          609 - incompatible types in assignment/transmission  id 
ID is an  identifier of left side of assignment statement or an identifier of actual parameter in object generation. Types of both sides of instruction or type of formal parameter and type of actual parameter are incompatible. 
          610 - unrelated class types in assignment/transmission  id 
Analogical to errors 609 and 607. 
          611 - constant after '.'       id 
An attempt to remote access to constant. 
          612 - this class does not occur in sl-chain       id 
 Class ID appeared in expression  this  ID, but  ID dosn't prefix  any module in  SL chain  of  actual  module. It may be a cycle. 
          613,614 - class identifier expected      id 
For error 613: identifier ID used in expression this ID is not of class type. For error 614: identifier ID used in expression this ID is not name of any type. 
          615 - illegal type before 'qua'       id 
 Object expression before qua should be  of one  of  the  types:  class,  coroutine,  process or simple  (not array) formal type. 
          616,617 - illegal type after 'qua'       id 
For error 616: identifier ID used after qua is not of any type.	
For error 617: identifier ID used after qua is not of class type. 
          618 - unrelated types in 'qua'-expression       id 
Identifier ID is a name of class type used after qua. This class type and  class type  used before qua doesn't prefix each other. 
          619 - hidden identifier      id 
Identifier ID used in construction  qua ID or this ID  is  on hidden list in the prefix of one of the  module from SL chain of actual module. 
          620 - not taken identifier       id 
Identifier ID  used in construction qua ID or this ID  is  not on taken  list in any  prefix  of  any  module of actual module. 
          621 - invisible identifier after '.'       id 
Identifier ID placed after dot  is on hidden  list or is not on taken list in prefix. 
          622 - formal parameter list is shorter       id 
Identifier ID identifies generated object:  class, procedure or function. Formal  parameters  list of this  object  is  shorter  than  actual parameters list. 
          623 - formal parameter list is longer       id 
Analogical to error 622. 
          624 - actual parameter is not a reference type       id 
Actual  parameter  identified by ID  in  generated object can't  be of primitive type: integer, real, boolean or string. 
          625 - actual parameter is not a type       id 
Actual  parameter identified by ID  is not a type, so it can't replace formal type parameter. 
          626 - procedure-function conflict between parameters  id 
Actual parameter,  identified by ID, that replaced formal parameter in generated  object is  function whereas  formal parameter  is  a procedure or vice versa. 
          627 - unmatched heads-wrong kinds of parameters       id 
ID  identifies actual  module that replaced formal module. There are parameters of different kinds on the  same  position  in  the  headlines  of  these  modules. For input - output conflict the agreement of parameter types is checked also. 
          628 - unmatched heads-incompatible types in lists       id 
ID identifies  actual module  that replaced formal module. There  are  input  /output  parameters  of different  types  on  the  same  position  in  the  headlines of actual and formal module. 
          629 - unmatched heads-unrelated class types in lists  id 
ID identifies actual module that replaced formal module. There are   input/output   parameters  specifying classes of disjointed  prefix sequences 
in the headlines of actual and formal module. 
          630 - unmatched heads-different numbers of parameters  id 
There are different lengths of headlines in actual module identified by ID and formal module. 
          631 - incompatible types of function parameters        id 
There  are  different  types  of  actual  function  specified by identifier  ID and formal function in  generated object. 
          632 - function/procedure  expected        id 
Actual parameter identified by identifier ID is not function/procedure,  whereas   corresponding formal parameter is function/procedure. 
          633 - actual function type defined weaker than formal  id 
Type of actual function identified by ID is weaker defined  than  formal function  type  e.g.  formal function   type  is  statically  defined,  whereas                     actual  function  type  is  formal  (external)  or  formal function  is class, whereas actual function type is coroutine or process. 
          634 - unmatched heads-too weak type in actual list      id 
There are input/output parameters on the same position in the headlines   of actual module identified by identifier ID and formal module, but ID is  weaker defined than corresponding formal module parameter (see error 633). 
          635 - standard function/procedure cannot be actual par.    id 
ID  identifies standard procedure/function used as actual parameter. 
          636 - illegal use of semaphore       id 
          637 - 'semaphore' cannot be used       id 


APPENDIX E : LOGLAN RUNTIME ERRORS 
   In the following list system signal name, raised after detection of runtime error, is placed in brackets. 

ARRAY INDEX ERROR  (CONERROR) 
Index outside range during reference to array variable. 
NEGATIVE STEP VALUE (CONERROR)

SL CHAIN CUT OFF (LOGERROR) 
Control  transfer to object that  has SL link cut off earlier in the consequence of kill operation. 
ILLEGAL ATTACH (LOGERROR) 
The  value of parameter of attach instruction is none  or object differs from coroutine. 
ILLEGAL DETACH (LOGERROR) 
An attempt  to  return  by  detach  to  coroutine that has  been dealocated (by kill). 
ILLEGAL RESUME (LOGERROR)
An attempt to resume an object which  is  not  a  process  or  a process which is running.
TOO MANY PROCESSES ON ONE MACHINE (SYSERROR)
Number of processes existing on one computer is greater than 64.
INVALID NODE NUMBER (SYSERROR)
An attempt to create a  process  on  a  computer  which  is  not connected to network.
IMPROPER QUA (LOGERROR) 
Error during computing expression  of the form: ...x qua a, when 'x' references to none or 'a' doesn't  prefix dynamic  type object, which is value of 'x'. 
ILLEGAL ASSIGNMENT (TYPERROR) 
Type   conflict  between  left  and  right  side  of  assignment instruction. 
FORMAL TYPE MISSING (LOGERROR) 
Formal type is not accessible because of SL cut off. 
ILLEGAL KILL  (LOGERROR) 
An attempt to deallocate object in SL chain of active object. 
ILLEGAL COPY (LOGERROR) 
An  attempt  to copy  non  terminated object  (i.e. class before execution of return statement, coroutine before execution of end statement...). 
REFERENCE TO NONE (ACCERROR) 
An  attempt  to remote  access  (by  dot)  to attributes of  non existing object: dealocated or not generated. 
MEMORY OVERFLOW (MEMERROR) 

INCOMPATIBLE HEADERS (TYPERROR) 
Actual parameter  list of generated object  (procedure, function or class) is incompatible with formal parameter list from module declaration or formal function  type is incompatible with actual function type. 

INCORRECT ARRAY BOUNDS (CONERROR) 
An attempt to generate dynamic array object, when lower bound of 
	       index range is greater than upper bound. 
DIVISION BY ZERO  (NUMERROR) 

COROUTINE TERMINATED (LOGERROR) 
An attempt to transfer control to a terminated coroutine. 
COROUTINE ACTIVE (LOGERROR) 
An attempt to transfer control to an active coroutine. 
HANDLER NOT FOUND (LOGERROR) 
There is no handler for signal declared by user. 
ILLEGAL RETURN (LOGERROR) 
An attempt  to  execute  return instruction in  handler  serving system signal. 
UNIMPLEMENTED STANDARD PRC. (LOGERROR) 
Standard procedure or function is not implemented. 
FORMAL LIST TOO LONG (MEMERROR) 
Formal parameter list is greater than 40. 
ILLEGAL I/O OPERATION (SYSERROR) 
Reading after writing, the type of the read/write parameter does not match the type of the file etc. 
I/O ERROR (SYSERROR)
      System error during I/O.
CANNOT OPEN FILE (SYSERROR)

INPUT DATA FORMAT BAD (SYSERROR)

SYSTEM ERROR  (SYSERROR)
Should not occur.
UNRECOGNIZED ERROR

APPENDIX F : CHARACTER SET 
At the top of the table are hexadecimal digits (0 to 7), and to the left of the table are hexadecimal digits (0 to F). Hexadecimal code of ASCII  character is constructed  by contatenation of  column label and row  label. For example, the value of character  representing the plus sign is 2B. 

                   0     1     2     3     4     5     6     7 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          0     ! NUL ! DLE ! SP  !  0  !  @  !  P  !     !  p  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          1     ! SOH ! DC1 !  !  !  1  !  A  !  Q  !  a  !  q  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          2     ! STX ! DC2 !  "  !  2  !  B  !  R  !  b  !  r  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          3     ! ETX ! DC3 !  #  !  3  !  C  !  S  !  c  !  s  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          4     ! EOT ! DC4 !  $  !  4  !  D  !  T  !  d  !  t  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          5     ! ENQ ! NAK !  %  !  5  !  E  !  U  !  e  !  u  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          6     ! ACK ! SYN !  &  !  6  !  F  !  V  !  f  !  v  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          7     ! BEL ! ETB !  '  !  7  !  G  !  W  !  g  !  w  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          8     ! BS  ! CAN !  (  !  8  !  H  !  X  !  h  !  x  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          9     ! HT  ! EM  !  )  !  9  !  I  !  Y  !  i  !  y  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          A     ! LF  ! SUB !  *  !  :  !  J  !  Z  !  j  !  z  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          B     ! VT  ! ESC !  +  !  ;  !  K  !  [  !  k  !  {  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          C     ! FF  ! FS  !  ,  !  <  !  L  !  \  !  l  !  |  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          D     ! CR  ! GS  !  -  !  =  !  M  !  ]  !  m  !  }  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          E     ! SO  ! RS  !  .  !  >  !  N  !  ^  !  n  !  ~  ! 
                _________________________________________________ 
                !     !     !     !     !     !     !     !     ! 
          F     ! SI  ! US  !   / !  ?  !  O  !   _ !  o  ! DEL ! 
                _________________________________________________ 


where: 
     NUL  Null                 	DLE  Data Link Escape 
     SOH  Start of Heading      	DC1  Device Control 1 
     STX  Start of Text         	DC2  Device Control 2 
     ETX  End of Text           	DC3  Device Control 3 
     EOT  End of Transmission   	DC4  Device Control 4 
     ENQ  Enquiry               	NAK  Negative Acknowledge 
     ACK  Acknowledge           	SYN  Synchronous Idle 
     BEL  Bell                  	ETB  End of Transmission Block 
     BS   Backspace             	CAN  Cancel 
     HT   Horizontal Tabulation 	EM   End of Medium 
     LF   Line Feed             	SUB  Substitute 
     VF   Vertical Tab          	ESC  Escape 
     FF   Form Feed             	FS   File Separator 
     CR   Carriage Return       	GS   Group Separator 
     SO   Shift Out             	RS   Record Separator 
     SI   Shift In              	US   Unit Separator 
     SP   Space                 	DEL  Delete 
BIBLIOGRAPHY 
Last update: {TIME \@ "MMMM d, yyyy"|March 21, 1994}

Should you like to read on Loglan and its companion Algorithmic Logic, here it is, a short list of more important papers.
 I.  LOGLAN'82
Bartol,W.M., et al.
Report on the Loglan 82 programming Language,
Warszawa-Lodz, PWN, 1984

A.Kreczmar
A micro-manual of the programming language LOGLAN-82,
Institute of Informatics, University of Warsaw, 1984
(there exists a french translation of the above manual)
(both texts are distributed together with this package)

A.Kreczmar, A.Salwicki, M. Warpechowski, 
Loglan'88 - Report on the Programming Language,
Lecture Notes on Computer Science vol. 414, Springer Vlg, 1990,
ISBN 3-540-52325-1

/* do you know polish?   istnieje dobry podrecznik Loglanu!   */
A.Szalas, J.Warpechowska,
LOGLAN,  
Wydawnictwa Naukowo-Techniczne, Warszawa, 1991 ISBN 82-204-1295-1 
     

Some papers devoted to the problems and challenges of Loglan.

Bartol,W.M., Kreczmar, A., Litwiniuk, A., Oktaba, H.,
Semantic and Implementation of Prefixing at Many Levels, 
in Lecture Notes in Computer Science vol.148, Springer Verlag, Berlin,
1983, pp.45-80

Krause,M., Kreczmar, A., Langmaack, H., Salwicki,A.,
Specification and Implementation Problems of Programming Languaages
Proper for Hierarchical Data Types,
Report 8410 of Institut fuer Informatik und Praktische Mathematik
Christian-Albrechts-Universitaet Kiel, 1984, pp.1-68

Kreczmar,A., Salwicki,A.,
Concatenable Type Declarations, Their Application and Implementation
in: Programming Languages and System Design, in Programming, Languages and System Design Proc. IFIP TC2 Conference (J.Bormann ed.) Dresden, 1983 
North Holland, Amsterdam, 1983, pp.29-41


Cioni, G., Kreczmar, A.,
Modules in high level programming languages
in: Advanced Programming Methodologies (G.Cioni, A.Salwicki eds.)
Academic Press, London, 1989, 247-340

Kreczmar, A.,
On inheritance Rule in Object Oriented Programming
in: Advanced Programming Methodologies
Academic Press, London, 1989, pp. 141-164

Cioni,G., Kreczmar,A., Vitale, R.,
Storage Management
in: Advanced Programming Methodologies
Academic Press, London, 1989, pp.341-366


Cioni, G., Kreczmar, A.,
Programmed deallocation without Dangling References,
IPL, vol. 18 1984, pp. 179-185

Krause, M., Kreczmar, A., Langmaack, H., Warpechowski, M.,
Concatenation of program modules, an Algebraic Approach to the Semantic and Implementation Problems,
in: Proc. Computation Theory, LNCS 208, Springer Vlg, Berlin, 1986, pp. 134-156
full text in:  Report 8701 of Institut fuer Informatik und Praktische Mathematik
Christian-Albrechts-Universitaet Kiel, 1987, pp.1-48

Krause, M.,
Die Korrektheit einer Implementation der Modulpraefigerung mit reiner Static Scope Semantik,
Report 8616 of Institut fuer Informatik und Praktische Mathematik
Christian-Albrechts-Universitaet Kiel, 1986, pp.1-139

Langmaack, H.,
On static Semantic of  Prefixing (=inheritance),
Talk delivered during the Summer School on Loglan'82, Zaborow, September 1983


Ph.D. thesis (in polish!)  related somehow to Loglan project.

Szalas, A., 
On parallel processes, 1984

Gburzynski, P.,
GPR - theorem prover  1982

Petermann, U.,
On file system and signalling exceptions between processes 1987

Oktaba, H.
On Formalisation of the Notion of Reference  and its Applications in Theory of Data Structures, 1982

Bartol, W.M., 
Application of Static Structure of Type Declarations and the System of Dynamic Configurations in a Definition of Semantics of a Universal Programming Language 1981

Szczepanska-Wasersztrum, D.,
A logical system for reasoning about exceptions,1990

Litwiniuk, A.I.,
Several algorithms for optimisation of code in presence of nesting, 1988

Jankowska-Puchalka B.
A code genarator generator for an object oriented language, 1992
II.  Algorithmic Logic
There is a monograph:

G.Mirkowska, A.Salwicki, 
Algorithmic Logic, 
D.Reidel & Polish Scientific Publ., Dordrecht & Warszawa, 1987, ISBN 83-01-06859-0
   the book contains a chapter devoted to certain problems of Loglan.

A new book on AL appeared in polish
G.Mirkowska, A.Salwicki, 
Logika algorytmiczna dla programistow,
Wydawnictwa Naukowo-Techniczne, Warszawa, 1993 (ISBN 83-204-1296-X). 
An english version in preparation.


There are many papers discussing the applications of AL in programming.

Salwicki, A.,
Development of Software from Algorithmic Specifications
in: Advanced Programming Methodologies
Academic Press, London, 1989, pp.1-40

Salwicki, A.,
On algorithmic theory of Stacks,
in Proc. MFCS'78 (J.Winnkowski ed.), LNCS 63, Springer Berlin 1978, pp.

Salwicki, A.,
On algorithmic theory of dictionaries,
Proc. Logic of Programs (E.Engeler ed.), LNCS 125, Springer, Berlin 1981 pp.145-168

Müldner, T., Salwicki, A.,
On algorithmic Properties of Concurrent Programs,
in: Proc. Logic of Programs (E.Engeler ed.), LNCS 125, Springer, Berlin 1981 pp.170-193

Mirkowska,G., Salwicki, A.,
On applications of Algorithmic Logic,
in: Proc. CAAP'86 (P. Franchi-Zanetacci ed.) Springer, 1986 pp.288-306

Mirkowska,G., Salwicki, A.,
Axiomatic definability of programming language semantics,
in: Proc. IFIP Working Conf on Formal Description of Programming Concepts
Ebberup 1986 (M. Wirsing ed.)
Noth Holland, Amsterdam, 1986, pp1-15

Mirkowska,G., Salwicki, A.,
On Axiomatic Definition of Max-model of concurrency,
in Proc. Advanced School on Mathematical Models of Parallelism Rome 1986
(M. Venturini-Zilli ed.)  LNCS   Springer Berlin

Salwicki, A.,
Algorithmic Theories of Data Structures,
in Proc. ICALP'82 (M.Nilsen, E.Schmidt eds.) LNCS 140 Springer, Berlin, 1982, pp. 458-472
III. Related literature 
on object programming is immense.

Let us quote a few books:

E. Horowitz, 
Fundamentals of Programming Languages, 
Springer, New York, 1983


O.-J. Dahl, B. Myhrhaug, K. Nygaard, 
Simula 67 Common Base Language, 
Norwegian Computing Center, Oslo, 1970           the mother of object languages!!

B. Meyer,
Object-oriented software construction,
Prentice Hall, 1988

B. Stroustrup 
The C++ Programming Language, 
Addison-Wesley, Reading, Mass., 1991

on logics of programs:

see a survey

D. Kozen, J. Tiuryn
Logics of  Programs,
in: Handbook of Theoretical Computer Science, vol.B, Formal Models and Semantics
Elsevier, Amsterdam, 1990, pp. 789-998
{PAGE|40}		                                          Loglan'82  user's manual

Loglan'82 users's manual		{PAGE|39}