Scotty's "guide to ISO 7185 languages"

"scott andrew franco" <[email protected]> Tue, 18 Aug 2020 15:02:18 -0700
Newsgroups gmane.comp.compilers.gpc
Message-ID <20200818150218.6c61c97e98fe7bb02193b2d6dca4a85a.607dd4b6d0.mailapi@email15.godaddy.com>
--===============4828024347710978257==
Content-Type: multipart/alternative;
 boundary="=_2e85e7e884ab0d24ce4ed075e704195a"

--=_2e85e7e884ab0d24ce4ed075e704195a
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
 charset=utf-8

Hi,
=20
Hopefully this information will answer some questions that have appeared on=
 this list.
=20
Q. What is ISO 7185?
=20
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.
=20
Q. Who follows it?
=20
A. GPC, FPC, and IP Pascal.
=20
Q. How do I find out if my compiler complies with ISO 7185?
=20
A. You can either get ahold of the BSI standards suite, or use Pascal-P5 te=
sting facillities.
The BSI test is defunct, BSI (British Standards Institute) no longer provid=
es it. It used to sell for
$1000. It bears copyrights. However, there is always that friend of a frien=
d who has it.
=20
Q. What is negative and positive testing?
=20
A. This is my own terminology, but I note that many others also use it. Pos=
itive testing is testing
for programs that will correctly compile/run on an ISO 7185 system, and neg=
ative testing is
testing for programs that should be rejected by an ISO 7185 system (also ca=
lled an "acceptance"
and "rejection" test protocol).
=20
Although the difference sounds technical, an implementation can be consider=
ed ISO 7185
compatible (specifically by me) if it is positive tested only, meaning that=
 it will accept any valid
ISO 7185 program.
=20
Q. Goodness, my compiler (GPC, FPC, whatever) does not pass those tests. Wh=
at's up with
that?
=20
A. The ISO 7185 tests with Pascal-P5 are constantly updated with test for r=
ules 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.
=20
The compilers =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
Here is a roundup of currently available (and some not so available).
=20
GPC
=20
GPC is a good, high optimization compiler based on GCC. It passes, or did p=
ass, my positive
ISO 7185 tests from several years ago. I have never performed negative test=
ing on it, and assume
it would fail.
=20
There are only a few select versions of it that are fully ISO 7185 complian=
t (and that work).
=20
They include:
=20
32 bit windows/mingw
=20
64 bit Linux.
=20
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 e=
xtensive discussions
on that in this list.
=20
There is also a 32 bit GPC on linux, but I have not used or tested that for=
 many years.
=20
Note that I don't do testing on GPC (positive or negative) anymore simply b=
ecause there is
no point. There is no development team there to fix the problems if I were =
to find them.
=20
GPC disbanded its support group, but I note that they could fix their issue=
s, by, say, recoding
for LLVM backends, so who knows?
=20
FPC
=20
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 posit=
ive ISO 7185 test.
They don't pass the new one, but note that I have added new tests since tha=
t time, and further,
they are working towards achieving positive compliance again.
=20
FPC does not, as far as I know, do not do negative testing, nor is that the=
ir goal.
=20
FPC (from what I have heard) couples to the LLVM toolset, meaning that it w=
ill generate
good code and be viable into the future.
=20
Pascal-P5
=20
P5 is a "model compiler", meaning that its basic mission is to be an exampl=
e of how to build
a completely ISO 7185 compliant Pascal, in both negative and positive sense=
s. It is also both in
itself and the tests it runs, a very complete test of ISO 7185 compliance=
=2E I regularly run those
tests on Pascal-P5 itself. I occasionally run the positive testing on other=
 compilers that
interest me (FPC).
=20
P5 does not generate actual machine code. It is an interpreter only, althou=
gh it is a very good
one. For example it is the first of the Pascal-P series that can self compi=
le (without extensions).
At some point in the Pascal-P series, I wish to have it generate code for r=
eal machines, but
note that the purpose of that work would never be to achieve a high optimiz=
ation 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.
=20
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 examp=
le). In fact, there
has never been an unextended Pascal compiler used to generate code. Even th=
e original
CDC 6000 compiler from Zurich had extensions for CDC 6000/Scope.
=20
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=
=2E
=20
Pascal-P6
=20
Pascal-P6 is Pascal-P5 with extensions. Its a rollup of extensions I used i=
n IP Pascal for about
the last 20 years, with some new things added, mostly to do with parallel p=
rocessing.
The good news is it is mostly complete. The bad news is it is still very mu=
ch beta software.
=20
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). Howeve=
r, it is:
=20
A. Beta software.
B. I am more interested in compiled machine code than interpreters.
=20
Pascal-P6, even with code generation, is never going to be a high optimizat=
ion production
compiler, nor is that a design goal. It is designed to be as simple as poss=
ible an implementation
of its source language, extended pascal, or as I name it, "Pascaline". I al=
ready have an
implementation for industrial level Pascal, which is IP Pascal.
=20
However, P6 will be a "reasonable" compiler, and it's runtime library is al=
ready quite far
along.
=20
IP Pascal
=20
This compiler was started in 1987 and was meant to be a paidware compiler=
=2E However, not
long after that the "compiler apocalypse" occurred, and many or even most c=
ommercial 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 ext=
ended Pascal
language constructs known here as "Pascaline", and implemented them in IP P=
ascal.
=20
I also worked to create Pascal-P5 in that time (approx 2010) and noticed th=
at IP Pascal itself
had a lot of trouble passing the ISO 7185 test set I created. This was abou=
t 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 facilit=
ies there,
with the idea that this would come back around and be a good test for IP Pa=
scal, as
well as adding an open source Pascal to the world.
=20
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.
=20
Regards,
=20
Scott Franco

--=_2e85e7e884ab0d24ce4ed075e704195a
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
 charset=utf-8

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

--=_2e85e7e884ab0d24ce4ed075e704195a--


--===============4828024347710978257==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc

--===============4828024347710978257==--