Hello, GPC group.
I have made a few additions to the standard Pascal (ISO 7185) web site:
That may interest some of you working on the GPC.
First of all, there is an extensively modernized version of the Pascal-P system from the days of Niklaus Wirth on the site, the P5 compiler, which I have just posted.
Second, there is a newly posted test file that goes with it, the PAT or Pascal Acceptance test, iso7185pat.pas.
Now, as to why anyone on the GPC should care.
THE PAT (PASCAL ACCEPTANCE TEST)
First, the PAT test is what I have used in the past to evaluate the GPC compiler for ISO 7185 compatibility. I decided that it would be more helpful if I released it into the public domain than if I held on to it.
To be fair, my main concern with releasing it was that if it became popular as a Pascal "proof" of standardization, some idiot would simply modify it to fit whatever non-standard Pascal was out there, post it, then people would start claiming ISO 7185 standard compatibility simply because they ran the modified copy. This actually happened with the Pascal-S program, so that is not far fetched.
I'm sure the GPC has its own compliance test for ISO 7185. However, the PAT has shown a few non-compliance items in the past, and you all may consider using it as part of your regressions.
THE BSI TESTS
I bought a dialing phone card and have been bothering the BSI directly by phone to encourage them to release the BSI tests, and the "model implementation" compiler. The BSI tests and the model compiler were programmed at various universities in combination with the ISO 7185 standard. It was all done off the payroll of the BSI, and the authors meant it to be freely available. Instead, the BSI tried to use it as a cash cow, charging $1000 per copy, and vastly more to "certify" implementations as compliant with the tests.
Anyways, a lot of time has passed, the BSI has both discontinued the Pascal standard, and long stopped distributing the programs. However, they never released the copyrights they (apparently) hold over the material. I have heard several folks opine that the programs may no longer exist at the BSI, perhaps thrown away.
In my calls to the BSI, they have just given me the runaround ("we are waiting for an answer from the committee".. for several months now). If some of you care about the BSI hiding and killing a historically important program, now would be a good time to call them:
(0)2089967004 in London, ask for Beth Carter or Lucy Ahmed
More voices might get them moving. Again, the BSI never programmed any of the tests, and it is highly debatable that the original authors would have agreed to the BSI's current actions.
The GPC group would be the biggest beneficiaries of a BSI release of the tests to public domain. This would give you all a rock solid and well researched series of tests to run.
Now that was a plug for my favorite cause. So how does that relate to the PAT test?
Well, some years back I took the trouble to OCR the original BSI tests from the PUG (Pascal News Group) newsletter where it was published (openly and freely). The authors even stated then that they published it for all to use.
So I have a copy of the tests, and I believe the right to use them. I just don't believe that translates to permission to post them online. As I have stated to the GPC group before, one answer is for you all to perform the OCR yourself.
In any case, it is my intent with the P5 project to also run P5 through the BSI tests, and add any failing tests back to the PAT test, without copying any of the original code. In this way, the PAT test will absorb the missing tests from the BSI tests, without needing to copy any of the BSI code.
P5
When Pascal was designed, Wirth commissioned his students to create a compiler for Pascal to be used as a porting example. This was the Pascal-P series, of which Pascal-P1, P2, P3 and finally P4 were created. This was a fairly widely used series. For example, the UCSD compiler/interpreter was a P2 compiler that was reworked for "bytecode" execution on 16 bit processors (or 8 bit CPUs emulating one).
P4 was never actually Pascal compliant. Rather it was deliberately designed to be a subset of Pascal, the minimum required to bootstrap Pascal on a new system. The implementors of new systems were supposed to finish out the other Pascal features after the bootstrap. The fact that UCSD originally left off all of the same features that P4 also lacked showed that some implementors did not feel the imperative :-)
Anyways, several folks realized that the original minimum memory, minimum bootstrap represented by P4 was not really necessary going into the 80's, and that it would be better to have a full, Wirth original and ISO 7185 Pascal compiler. This would not only be a better starting point for a bootstrap, but would also be a model for how to implement advanced Pascal features. For example, the way ISO 7185 checks for interprocedural goto's is non-trivial, as are procedure and function parameters.
A new, full Pascal and ISO 7185 Pascal machine independent compiler/interpreter was created in the early 1980's, the "model implementation of standard Pascal". Unfortunately it was turned over to the BSI, where it suffered a similar death to the verification suite.
With P5 I have accomplished a similar upgrade to the original P4. It runs the full ISO 7185 Pascal language. It is also converted to byte coding, as the UCSD compiler and Model Implementation were. This means that it runs efficiently for a change. The old P4 compiler was oriented towards the CDC 6000 machine, which made it very inefficient on other machines. Also, P4 allocated a full word to every character in a string, a 60 bit word on the CDC 6000, so that there was no machine that would have been able to use strings efficiently using P4. This was why P4 used few strings, and sharply limited their length.
Now, as to why the GPC group might care about P5. P5 is both an example compiler, and also a large and non-trivial program written in ISO 7185 standard Pascal. It also enables "stack up" verification. That is, a series of ISO 7185 tests can be run against the base compiler, then P5 is run, and then P5 itself is run against the ISO 7185 test suite.
In fact this can be run to any depth you wish, since you could run P5, then load P5 on that "pseudo machine", then run tests, etc. Limited only by the fact that it runs about 100 times slower each time you hoist it on itself.
This is one of the finishing tests I use for my own compiler.
Well, thank you for your attention to this rather long letter, and good luck.
Scott Moore