Iron Spring PL/I Compiler

Beta Version 0.8c
17 Oct, 2009

Release Notes

This is beta software. Some PL/I features are still missing from this version. See the Programming Guide for a partial list of missing features.

Introduction

PL/I is a powerful programming language suitable for a wide range of problems. PL/I has been used to write operating systems and compilers, simulations, real-time programs, mathematical software, spreadsheets, GUI programs, and for general computing.

PL/I is widely used on mainframes and midrange systems today, but since the demise of Digital Research, Inc. has not been easily available on personal computers.

Iron Spring Software was founded in 2007 with the intention of bringing the benefits of PL/I: flexibility, reliability, and portability, to a wider market. The initial version(s) will run on OS/2 and eCS only. It is anticipated that future versions will run on Linux and may be ported to other systems.

This as the second beta version of Iron Spring PL/I. This version is still missing some features of full PL/I. The Programming Guide lists many of the missing features.

The current version still contains bugs. As a user of beta software, you can help improve the compiler. See the section Reporting bugs.

Trademarks
eComStation is a trademark of Serenity Systems International.
Gnu is a trademark of the Free Software Foundation.
IBM is a trademark of IBM, Inc.
Intel is a trademark of Intel Corporation.
Iron Spring is a trademark of Iron Spring Software.
Linux is a registered trademark of Linus Torvalds.
VAX is a trademark of Hewlett-Packard, Inc.
WATCOM is a trademark of Sybase, Inc. and its subsidiaries.

License

<boring-legal-stuff>
This license a legal agreement between you and Iron Spring Software. Your use of this software signifies that you agree to the terms of this license.

Iron Spring Software grants you the right to use and copy the Iron Spring PL/I compiler and library freely. You may distribute programs compiled using the compiler and/or linked with the library under any terms you wish without restriction. The source to the library is licensed under the terms of the Gnu Lesser General Public License (LGPL).

All material is copyright Iron Spring Software, 2008, 2009.

THE COMPILER AND LIBRARY ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COMPILER AND LIBRARY IS WITH YOU. SHOULD THEY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
</boring-legal-stuff>

Contents

This distribution includes the executable for the PL/I compiler PLIC.EXE, the runtime DLL, the static and import libraries lib\static\prf.lib and \lib\prf.lib, and the sources for the library and sample programs.

  pli08c
    |
    +-----------------------samples----------------lib
    |                          |                    |
 plic.exe                   (Sample sources and     +--------------------------static---include----source
 (compiler executable)       %include files,        PL/I DLL (prf.dll)         |         |         |
 (documentation, etc.)       sample makefiles       Import Library (prf.lib)   |         |         +--------asm
                             and module definition  (.obj files for all        |         |   (PL/I source)   |   
                             file).                  library procedures).      |         |               (assembler
                                                                               |  (%include files          source)
                                                                               |    required by                                                                                      
                                                                               |     library).
                                                                               |
                                                                      prf.lib (static library)
                                                                      OS2386.lib

Requirements

The folowing software is required to run the compiler:
The following software is recommended:

Installation

  1. Unpack the distribution file into a directory named "x:\pli08c", (Specify your desired drive in place of 'x'.)
  2. Only the compiler (x:\pli08c\plic.exe) and either the static runtime library (x:\pli08c\lib\static\prf.lib) OR the DLL (x:\pli08c\lib\prf.dll) and the import library (x:\pli08c\lib\\prf.lib) are required. You should already have a version of OS2386.LIB. If you don't, you can use the one supplied in "x:\pli08c\lib\static\OS2386.lib".
  3. Move the compiler to a directory in your PATH or add x:\pli08c to your path in config.sys.
  4. If you are using the DLL version of the library, move prf.dll to a directory in LIBPATH, or add (x:\pli08c\lib) to your LIBPATH in CONFIG.SYS and reboot. In order to link compiled programs you also need to make the import library prf.lib available by moving it to a directory listed in the LIB environment variable. Alternatatively, you can add the line "LIB = x:\pli08c\lib" to your makefiles.
  5. If you are using the static version of the library (x:\pli08c\lib\static\prf.lib), move it [and x:\pli08c\lib\static\OS2386.lib if required] to a directory listed in the LIB environment variable. Alternatatively, you can add the line "LIB = x:\pli08c\lib\static" to your makefiles.
  6. Test the sample programs. Two makefiles are provided: 'makefile' links with the DLL, 'makefile.static' links with the static library. CD to the directory "x:\pli08c\samples" and type "make" for the DLL version, or "make -f makefile.static" for the static version. If you don't have make available, you can manually type the commands in the makefile. The sample programs "numwrd", "filedump", and "libver" build to executables, the remainder should generate object files.
  7. Test numwrd. Enter ".\numwrd 123". The program should display the result "one hundred twenty-three".
  8. You might want access to the %INCLUDE files in "x:\pli08c\lib\include" or "x\pli08c\samples" for your own programming.

A later version will be installable using the WarpIN installer.

Documentation

The Iron Spring PL/I Compiler Programming Guide contains a description of the features of the compiler. Except as noted in the Programming Guide under Compiler Differences and Restrictions this compiler is compatible with the IBM "PL/I for MVS and VM Compiler 1.1". A complete language reference in HTML will be available as part of a future release.

Documentation for the IBM compiler is available online.

Changes in the current version

/table>
Changes in version 0.8c
Exponentiation is allowed for powers of non-integers. Edit-directed I/O handles complex format specifications correctly. Float values can be written with LIST- and DATA-directed output. Single-argument calls to HBOUND, LBOUND, and DIM are allowed. COMPLEX constants are generated correctly.
 
Changes in version 0.8b
Version 0.8b was never officially released; it included mainly a "HIPER" fix for a bug that prevented generation of correct ELF objects. Other changes include previously-unimplemented cases of the CURRENTSTORAGE builtin for unaligned bit strings and structures, and initialization of static unaligned bit data. The HEXIMAGE, ADD, MULTIPLY, and DIVIDE builtins were added.
 
Changes in version 0.8a
List-directed input is now implemented.
The condition-handling builtins, DATAFIELD, ONCHAR, ONCODE, ONCOUNT, ONFILE, ONKEY, ONLOC, and ONSOURCE, and the pseudovariables ONCHAR and ONSOURCE were added. DATAFIELD and ONKEY always return the null string, since the corresponding data-directed input and the KEY condition are not currently implemented. ONCOUNT always returns zero since multiple conditions can not occur.
The DISPLAY statement was added.
A cross-reference listing can now be produced.
Subscripted statement label constants are now allowed.
The compiler can now optionally generate ELF object files.
The range of allowed arguments for the STRING builtin was restricted (see the description of STRING in the programming guide), and code for all allowable argument types was completed.
 
Changes in version 0.7b
The BOOL, COS, COSD, LOG, LOG10, LOG2, SIN, SIND, SQRT, TAN, and TAND builtins were added.
The UNION attribute was implemented.
Bit string AND, OR, and NOT now works with strings of arbitrary length.
Better code is now generated for the RETURN statement when a procedure contains multiple entries.
FLOAT data can now be output using the F-format.
 
Changes in version 0.7a
Version 0.7a includes a completely rewritten code generator that produces object files, with optional assembler output. This is a major enhancement over previous versions that generated assembler output only. Because of the scope of the change this is still an alpha release. Assuming no major problems with the new code, the next version should be a beta.

A great deal of effort was made to ensure that the generated object code is identical to that produced by ALP in previous versions. No attempt has been made to improve the quality of the code, even in cases where improvements were identified. Although the instructions are identical the code is packaged somewhat differently in the object file. In most cases the files created by PL/I should be smaller than the corresponding file generated by ALP.

Because of this change the ALP asssembler has been changed from a required to an optional program. It is still required if you need to assemble the .asm output of the compiler or the assembler programs in the library.

 
Changes in version 0.6a
The principal change is repackaging the library as both a DLL and a static library.
The %REPLACE preprocessor statement has been implemented to provide limited support for named constants, pending implementation of the full preprocessor.
The procedure and entry option FROMALIEN was added to allow 'callbacks' to PL/I procedures from C or assembler code.
 
Changes in version 0.5e
Conversion between scaled FIXED BINARY and FIXED DECIMAL is now supported.
PUT DATA has been largely implemented, except for arrays of structures.
The COLUMN and SKIP format-items are now supported.
 
Changes in version 0.5d
The compiler will now honor alternate characters for OR or NOT coded on the command line.
Character strings can use either the single (') or the double (") quote characters as delimiters.
All FIXED to FLOAT conversion routines now correctly handle constants and scaled values.
The DEFINED attribute now accepts any valid reference as the base variable.

Bugs fixed in the current version

This is a cumulative fix list since the inital alpha version.
Bug
number
Fixed
in version
Description
1150.8cEnabling SUBSCRIPTRANGE can cause "compiler error" messages.
1140.8cLIST-directed input fails to read the last data item in the stream if it is a quoted string.
1120.8cThe DISPLAY statement does not free storage allocated for its argument list.
1110.8cGenerated code loading the address of an external data item generates incorrect relocation for ELF.
1070.8cHEXIMAGE causes compiler trap if called with non-syntactically-correct argument list.
1040.8bREPEAT builtin generating incorrect output if count is greater than one.
1020.8bPUT with E-format output incorrect if rounding causes value to be renormalized.
970.8bDISPLAY(ptr) correctly diagnoses error, but fails to recover.
940.8bSTORAGE and CURRENTSTORAGE of a scalar non-string produce incorect results.
930.8aThe DISPLAY statement traps when called with pictured data.
920.8aConversion of pictured data to character incorrect.
900.8aAdjustable structures may not be correctly mapped at run time.
880.8aCompiler does not allow specification of full pathname for %INCLUDE files.
860.8aUse of [currently unsupported] structure expression causes compiler trap.
850.8aSTORAGE(array) returns the size of one array element.
840.8aWRITE FILE(x) KEY(...) causes message 'Unrecognized keyword KEY."
820.8aCompiling a CALL statement to an INTERNAL ENTRY which had syntax errors causes compiler trap.
810.8a'PUT ();' without the DATA, EDIT, or LIST option can cause the runtime error "Invalid intrinsic call.
330.8aGOTO the THEN or ELSE clause of an IF-statement causes trap 5 at run time.
780.7bFLOAT constants erroneously match already- generated constants.
770.7bFloating point and decimal division generates incorrect results with new code generator.
760.7bDuplicate declarations containing the INITIAL or DEFINED attribute or adjustable lengths or bounds cause trap.
730.7bErrors in minor structure alignment cause storage overlays.
720.7bF-format output prints incorrectly when library is compiled with new code generator.
710.7bIncorrect code for the SIZE condition for FIXED BINARY data generated by new code generator.
700.7bCompiler traps when too few arguments supplied for builtin function.
640.7aSyntax error in expression in 'DO WHILE()' or 'DO UNTIL()' causes trap 5.
630.7aCompare character string of length<=4 to character string of length>4 generates incorrect output.
610.7aFLOAT zeroes convert incorrectly.
600.7aScaled FIXED to FLOAT constant conversions generate incorrect output.
580.7aENDPAGE condition not raised when page size exceeded.
560.7aPTRADD builtin generates incorrect output
550.7a'PUT (PLIRETV)' generates incorrect output.
540.7aUse of BYTE builtin in expression causes trap 5.
520.6aVarious conditions cause extra unused storage to be reserved on the stack.
490.6aArray declaration with bound information missing [DCL a ()...] causes trap 5.
460.6aMissing final END statement causes ending code not to be generated.
440.5eXCPT_FLOAT_DENORMAL_OPERAND if control variable for an iterative DO is FLOAT.
430.5eSubscripting EXTERNAL data generates incorrect output.
400.5eDeclaring a parameter with the PICTURE attribute causes compiler trap 5.
390.5eReturning an adjustable string from a procedure with multiple entry points returns the null string.
350.5eINDEX(SUBSTR(x... generates incorrect code.
330.5eAlignment may cause length of adjustable descriptors to be miscalculated.
320.5eGOTO an undeclared label variable causes compiler trap 5.
310.5eGOTO out of an iterative DO statement causes compiler trap 5.
300.5eWRITE FROM a structure causes error.
290.5eKEYFROM option not recognized on WRITE statement.
280.5eArithmetic with STATIC variables caused spradic traps.
260.5eEntry name text not generated for second and subsequent labels of a PROCEDURE or ENTRY statement.
230.5ePUT to SYSPRINT in an ON-Unit entered as result of an error caused by I/O to SYSPRINT causes infinite loop
200.5dScaled divisors were not handled correctly.
180.5dF format output had the decimal point placed incorrectly and the data not correctly rounded.
160.5dStructures declared with the LIKE attribute had the level number of the last member set incorrectly.
140.5dThe third and fourth arguments to ADD, SUBTRACT, MULTIPLY and DIVIDE handled incorrectly.
110.5dThe INITIAL, BASED, and DEFINED attributes and adjustable bounds and lengths not working correctly in factored declarations.
80.5cAssignment to expression generates incorrect error message.
70.5cTrap in structure declaration for ',;'.
60.5cLENGTH(<expression>) generates spurious error message.
50.5cF-Format output incorrect.
30.5bPLITABS linked incorrectly.
20.5bConversion of arithmetic data to character may cause various errors.
10.5bAllocating temporary stack storage >4K may cause Trap 5.

Modifying the Runtime Library

The document
About the Iron Spring PL/I Library Contains information necessary to modify or extend the runtime library. Most users of Iron Spring PL/I will not be interesting in making modifications to the library.

Support

No formal support is provided for pre-release versions of Iron Spring PL/I. Bugs will be fixed on a best-efforts basis only, and the fix included in the next distributed version.

A Yahoo! group "ISPLI" (http://tech.groups.yahoo.com/group/ISPLI) is available as a user forum for problems, tips, etc. The developers also monitor this group.

Reporting bugs

For the current beta version of the compiler, a bug is one of the following:
  1. Any compiler trap.
  2. Incorrect output not caused by a flagged unimplemented feature (compile-time message 995 or run-time UNIMPLEMENTED condition.
  3. Compile-time message 990 (Compiler error).
  4. Output of the compiled program different from that produced when the program is compiled with the IBM compiler, except for differences noted.
Features not implemented in the current version will be added in future versions. In the meantime, their absence should at least be indicated by an error message.

Before reporting a bug, please make sure you are running the most recent release.

The following information is required to report a bug:

  1. A brief description of the problem (trap, incorrect output, etc.)
  2. The command-line options used to compile this program.
  3. The current compiler version obtained by running "PLIC -V".
  4. A small sample program ilustrating the problem. Please make sure you imbed or supply all the %include files required to compile the sample.
Hopefully, all this information will be small enough to be sent as plain text in a mail message. Otherwise please attach a zip file. No other formats will be accepted.

Mail bug reports to:

   bugs@iron-spring.com


version 0.8c, 17 Oct, 2009
http://www.iron-spring.com