Hi,
 
Hopefully this information will answer some questions that have appeared on this list.
 
Q. What is ISO 7185?
 
A. The standard for the original Pascal language. It appeared in about 1982, and was revised in 1990, which
I believe is the current version.
 
Q. Who follows it?
 
A. GPC, FPC, and IP Pascal.
 
Q. How do I find out if my compiler complies with ISO 7185?
 
A. You can either get ahold of the BSI standards suite, or use Pascal-P5 testing facillities.
The BSI test is defunct, BSI (British Standards Institute) no longer provides it. It used to sell for
$1000. It bears copyrights. However, there is always that friend of a friend who has it.
 
Q. What is negative and positive testing?
 
A. This is my own terminology, but I note that many others also use it. Positive testing is testing
for programs that will correctly compile/run on an ISO 7185 system, and negative testing is
testing for programs that should be rejected by an ISO 7185 system (also called an "acceptance"
and "rejection" test protocol).
 
Although the difference sounds technical, an implementation can be considered ISO 7185
compatible (specifically by me) if it is positive tested only, meaning that it will accept any valid
ISO 7185 program.
 
Q. Goodness, my compiler (GPC, FPC, whatever) does not pass those tests. What's up with
that?
 
A. The ISO 7185 tests with Pascal-P5 are constantly updated with test for rules in ISO 7185.
Thus it is not a surprise that compiler X might fail them. In fact, pretty much by definition
compilers will fail the newer tests.
 
The compilers ============================================
 
Here is a roundup of currently available (and some not so available).
 
GPC
 
GPC is a good, high optimization compiler based on GCC. It passes, or did pass, my positive
ISO 7185 tests from several years ago. I have never performed negative testing on it, and assume
it would fail.
 
There are only a few select versions of it that are fully ISO 7185 compliant (and that work).
 
They include:
 
32 bit windows/mingw
 
64 bit Linux.
 
The Mac OS version used to work, but Mac OSx made changes to depreciate the GCC compiler
and thus also killed GPC.There may be ways to fix it, and there have been extensive discussions
on that in this list.
 
There is also a 32 bit GPC on linux, but I have not used or tested that for many years.
 
Note that I don't do testing on GPC (positive or negative) anymore simply because there is
no point. There is no development team there to fix the problems if I were to find them.
 
GPC disbanded its support group, but I note that they could fix their issues, by, say, recoding
for LLVM backends, so who knows?
 
FPC
 
The FPC group decided that they wanted ISO 7185 capability as part of their language abilities.
To that end, they made good strides and passed the last version of my positive ISO 7185 test.
They don't pass the new one, but note that I have added new tests since that time, and further,
they are working towards achieving positive compliance again.
 
FPC does not, as far as I know, do not do negative testing, nor is that their goal.
 
FPC (from what I have heard) couples to the LLVM toolset, meaning that it will generate
good code and be viable into the future.
 
Pascal-P5
 
P5 is a "model compiler", meaning that its basic mission is to be an example of how to build
a completely ISO 7185 compliant Pascal, in both negative and positive senses. It is also both in
itself and the tests it runs, a very complete test of ISO 7185 compliance. I regularly run those
tests on Pascal-P5 itself. I occasionally run the positive testing on other compilers that
interest me (FPC).
 
P5 does not generate actual machine code. It is an interpreter only, although it is a very good
one. For example it is the first of the Pascal-P series that can self compile (without extensions).
At some point in the Pascal-P series, I wish to have it generate code for real machines, but
note that the purpose of that work would never be to achieve a high optimization compiler.
As good as P5 is for a short demo/model compiler, it is not a good platform at all for a modern,
optimizing compiler.
 
In any case, I tried creating a real code generator for P5, but quit when I realized that it would
be useless without some minimal extensions (file handling by name for example). In fact, there
has never been an unextended Pascal compiler used to generate code. Even the original
CDC 6000 compiler from Zurich had extensions for CDC 6000/Scope.
 
Thus I realized that adding a code generator to P5 would do work on it that was redundant
with Pascal-P6, and so I have left it to the Pascal-P6 project to do that.
 
Pascal-P6
 
Pascal-P6 is Pascal-P5 with extensions. Its a rollup of extensions I used in IP Pascal for about
the last 20 years, with some new things added, mostly to do with parallel processing.
The good news is it is mostly complete. The bad news is it is still very much beta software.
 
The idea of P6 is to support at least Linux, Windows and Mac OS X. In fact, with the C
machine interpreter done some time ago, it could support all three systems now (because
the C interpreter only depends on your having working CLIB support). However, it is:
 
A. Beta software.
B. I am more interested in compiled machine code than interpreters.
 
Pascal-P6, even with code generation, is never going to be a high optimization production
compiler, nor is that a design goal. It is designed to be as simple as possible an implementation
of its source language, extended pascal, or as I name it, "Pascaline". I already have an
implementation for industrial level Pascal, which is IP Pascal.
 
However, P6 will be a "reasonable" compiler, and it's runtime library is already quite far
along.
 
IP Pascal
 
This compiler was started in 1987 and was meant to be a paidware compiler. However, not
long after that the "compiler apocalypse" occurred, and many or even most commercial users
standardized on open source compilers, especially GCC. Many compiler makers went out of
business during that time, including Watcom, Oregon, SVS and many others. I continued to
use the compiler through about 2003, at which time I organized a set of extended Pascal
language constructs known here as "Pascaline", and implemented them in IP Pascal.
 
I also worked to create Pascal-P5 in that time (approx 2010) and noticed that IP Pascal itself
had a lot of trouble passing the ISO 7185 test set I created. This was about the time GPC
group announced they were halting their project. I decided to modernize P4 to be fully
ISO 7185 compilant, as well as greatly increasing the ISO 7185 test facilities there,
with the idea that this would come back around and be a good test for IP Pascal, as
well as adding an open source Pascal to the world.
 
Will IP Pascal ever be open source? Possible. I'm 62, so its equally likely I could move on
to a dirt condo. If I am around, IP Pascal has one further task to perform, and that could
happen.
 
Regards,
 
Scott Franco