DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦2040b3712⟧ TextFile

    Length: 15360 (0x3c00)
    Types: TextFile
    Names: »ptoarap2«

Derivation

└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
    └─⟦4334b4c0b⟧ 
        └─⟦this⟧ »ptoarap2« 

TextFile

mode list.yes
rapport=set 200
scope user rapport
rapport=typeset check.no
*se #* #pl ,30,235,,10##lw160##ld18##pn 5,1#
#rh 1,PASCAL TO ALGOL#
#ps0#
#ns1,4,_«bs»1_«bs».__«bs»W_«bs»a_«bs»y__«bs»o_«bs»f__«bs»P_«bs»r_«bs»e_«bs»s_«bs»e_«bs»n_«bs»t_«bs»i_«bs»n_«bs»g__«bs»t_«bs»h_«bs»e__«bs»P_«bs»r_«bs»o_«bs»b_«bs»l_«bs»e_«bs»m_«bs»s_«bs».#
#np15#
  A Chinaman called Yu Song Yu has September 1981 been living two
years in Copenhagen, where he has made a lots og programs on DIKU
(Institute of Computer Science of Copenhagen) in the programming
language Pascal.
#np#
  Now the problem is that Yu Song Yu, when he is returning to China, 
he has no possibility to go on working at his programs, because he
onlyy can get programs in the programmeringlanguage Algol executed, and Yu Song Yu dont know anything about Algol.
#np#
  We are now trying to make a translater, whivh can translate Pascal
to Algol. The translater is written in Algol, because it is the
language Yu Son Yu have on the machine DJS-6 in Shanghai.
#np#
  Some of the things we are going to concider in connection with
drawing up the translater are following:
#lm20#
#nl#

   a) which of the three following things are going to have the
      highest priority
#lm25#
#nl#
      1) the likeness between the Algol and the Pascal version
         of a program is as great as possible
#nl#
      2) the translation from Pascal to Algol of a program is as fast
         as possible
#nl#
      3) the executing time of the Algolversion of the program is as
         low as possible
#lm20#
#nl#

   b) how is the precise syntax for Algol in China and which Pascal-
      version should be translated
#nl#
  
   c) which input-, output- and storage possibilitys are there on the
      machine in China
#nl#

   d) which possibility do we have for testing the translater (look
      section    )
#nl#

   e) beside the syntax's differens between Pascal and Algol, there
      are in Pascal some facilitetes (heap, pointer, set, case, repeat -
      while, type) , which do not exist in Algol. How are they going
      to be translated
#nl#
      
   f) which possibilitys do we have to get information about the circum-
      stances in China
#nl#

   g) must the translation and the syntaxcheck be done at the same time
      or is the translation going to be in steps
#lm0#
#ns1,4,_«bs»2__«bs»P_«bs»r_«bs»o_«bs»b_«bs»l_«bs»e_«bs»m_«bs»a_«bs»n_«bs»a_«bs»l_«bs»y_«bs»s_«bs»i_«bs»s_«bs».#
#nl4#
2.1 The Possibility to Getting Information about the Circumstances in China.
#np#

  As mentioned in section 1 Way of Presenting the Problems, we have to know
the precise Algolversion in China, which  external devices there are on the
machine in China, and how much storage there is, wordsize and so on.
#np#

  Yu Song Yu, the Chinaman for whom we are making the translater, have no
particular knowledge about Algol on the topical machine in Shanghai, on
the other hand he has a friend in Aarhus, who had told us a little bit 
about the machine but nothing about the Chinese Algol. Therefore we have
made some questions on English, which Yu Song Yu and his friend have trans-
lated to Chinese and sent to their place of work in Shanghai. One of the
question was, is it possible to get a manual in Algol.
#np#
  So we have possibility by letters to get information about the Chinese
machine and the language, but because it takes about two mouths, before
we get an answer on a letter, it is limited, how many letters we can get answered
during the periode the projekt is running.
#np#
  After about three months we have got an Algol manual on Chinese, but never
the less we can study the programexamples and realize, how the programming-
language is, and Yu Song Yu is ready to try to translate parts of the manual.
#ns1,4,_«bs»2_«bs»._«bs»2__«bs»T_«bs»h_«bs»e__«bs»A_«bs»l_«bs»g_«bs»o_«bs»l_«bs»v_«bs»e_«bs»r_«bs»s_«bs»i_«bs»o_«bs»n_«bs».#
#np#
  The Algol, Which is used on the machine in China, we are going to make
a translater to, is extended Algol 60 with some small differenses. The
machine is called DJS-6, in the rest of the report we use the name DJS-6
Algol or Chinaalgol, when we referer to the programming language, which
we are going to make a translater to.
#np#
  In Algol 60 there are no input/output procedures, so these are of
couse added in DJS-6 Algol. These procedures can only read an integer
or a real and write them again. There is no possibility for input/output
of characters - more about that in section 3.3.1.
#np#
  The reserved words in DJS-6 Algol are surrounded by apostrophes in
sted of as in Algol 60 to be underlined.
#sj#

  Example:
            DJS-6 Algol          Algol 60
            'BEGIN'              BEGIN
                                 -----

  Ruthermore some of the symbols are changed viz following:

            DJS-6 Algol          Algol 60
              'LS'                 <
              'LQ'                 <
              'GQ'                  >
              'GR'                  >

              'NQ'                 =
#rj#
#np#

  At last it should be mentioned, that the wort COMMENT does not exist in
DJS-6 Algol.
#ns1,4,_«bs»2_«bs»._«bs»3__«bs»W_«bs»h_«bs»i_«bs»c_«bs»h__«bs»P_«bs»a_«bs»s_«bs»c_«bs»a_«bs»l_«bs»v_«bs»e_«bs»r_«bs»s_«bs»i_«bs»o_«bs»n__«bs»M_«bs»u_«bs»s_«bs»t__«bs»B_«bs»e__«bs»T_«bs»r_«bs»a_«bs»n_«bs»s_«bs»l_«bs»a_«bs»t_«bs»e_«bs»d_«bs».#
#np#

  Yu Song Yu works with the version of Pascal, which is implemented on
PDP-11/45 also named "sequentiel Pascal".
#np#
  This version have some restrictions in proportion to "standard Pascal"
because there are no labels, jumpstatements, and only to levels global
and routine, in sted of there are in sequentiel Pascal universal types
and prefix
#ns1,4,3_«bs»._«bs»4__«bs»E_«bs»x_«bs»t_«bs»e_«bs»r_«bs»n_«bs»a_«bs»l__«bs»d_«bs»e_«bs»v_«bs»i_«bs»c_«bs»e_«bs»s__«bs»a_«bs»n_«bs»d__«bs»m_«bs»e_«bs»m_«bs»o_«bs»r_«bs»y__«bs»s_«bs»i_«bs»z_«bs»e_«bs».#
#np#
  The manual, we have got from China, says that there is a papertape-
reader, a papertapepuncher, a printer and a drum. The manual is from 
1974 so may be, there is some new external devices, but it had been im-
possible for us to be enlightened about, there is any modification in
proportion to the manual.
#np#
  Our possibilities to utilize the external devices are the following:
#np#
  The Pascalprogram is read on papertapereader, the syntaxchecked
Pascalprogram is printed on the printer together with errors if any.
On the papertapepuncher the DJS-6 Algol program(i.e. the translated
Pascalprogram) is printed, so if there is no errors the papertape can
be read, and the program executed.
#np#
  The drum is our only possibility for storing other places than in
the machine, the drum is ? K word and one word is 48 bit.
#nl4#

2.5 The Priority between the Quickness in the Translater, Executing
Time of the Algolprogram and the Likeness between the DJS-6 Algol
Program and the Pascalprogram.
#np#

  As mentioned in the heading, there is three drifferent things, you
can mortgage highly, when you are going to make a translater namely:
#lm20#
#nl#

1) The likeness between the aboriginal programtext and the translated
   program should be as great as possible among other things to keep
   as many identifiernames at all as possible.
#nl#

2) The quickness in translating from Pascal to DJS-6 Algol should be
   as great as possible.
#nl#

3) The executing time on the the translated Pascalprogram, that is the 
   DJS-6 Algolprogram should be as little as possible.
#lm0#
#np#

  Of couse it would be lovely, if all three things are fill up, but some 
times the three things would counteract each other, and which of the things
should then have the highest priority.
#lm20#
#nl#

  This mortgage would depend at:
#nl#

  a) On the present Pascalprograms should be translated one time after
     which all modifications are maked in the DJS-6 Algolversions, and 
     you never make new Pascalprograms.
#nl#

  b) On the present Pascalprograms should be translated every time, they
     are going to be executed, if any modifications they are maked in the
     Pascalversion, after which the Pascalprogram is translated again. You
     make new programs in Pascal.
#lm0#
#np#

  If you chose solution a), that is translating the present Pascalprograms
once at all, if any modifications they are maked in the new DJS-6 Algol-
version you have got after the first translation, and you will never make
new programs in Pascal, it does not mean so much, if the translationtime
from Pascal to DJS-6 Algol is high, because it is only necessary to trans-
late every Pascalprogram once.
#np#
  If any modifications in the programs it should be done in the DJS-6 Algol
version. It is on the other hand important that the likeness between the Pas-
calprogram and the DJS-6 Algolprogram is as great as possible, so the program-

mer could recognise his own program again and have the possibility to make 
modifications whitout using a lot of time studing the "new" program.
#np#
  The speed in the executing of the DJS-6 Algolprogram will also have a high
priority, but wheather the speed of the executing at the DJS-6 Algolprogram 
or the likeness between the Pascal- and the DJS-6 Algolprogram is as great 
as possible should mortgage hieghest, is an individuel judgment.
#np#

  On the other hand if you should translate the Pascalprogram every time,
all modifications are made in the Pascalprogram
all modifications are made in the Pascalversion, and you make new Pascal-
programs, it does not mean so much, if the likeness between the Pascal-
program and the DJS-6 Algolprogram is particular great.
because the programmer never should look in the DJS-6 Algolversion  but
only have a necassary intermediate station to get the Pascalprogram
exequeted. On the other would the time, it takes to translate from
Pascal to DJS-6 Algol, have a great meaning, because it is a thing,
which should be made a lot of times. The exequting time of the DJS-6
Algolprogram will like before, be an important factor, and you do not
need to mortgage likeness between the two programs particular high,
it is easyer to get this demand fullfilled.
#np#
 
  Now when we know, that the decisive for, what we shoul give the hieghest
priority in the translation, is depending on, if the present Pascalprograms
should be translated once at all or every time you want to exequete the
programs, the next thing, we have to do, is to find, what Yu Song Yu, who
is going to use the translater, want.
#np#

  Yu Song Yu still wants to make Pascalprograms, when he is coming home to
China. He does not want to make modifications if any in the DJS-6 Algolver-
sion, because he does not know any thing about DJS-6 Algol, there for the
likeness between the Pascal- and the DJS-6 Algolversion does not mean so
much. On the other hand it is important, that the time it takes to translate
the Pascalprogram to DJS-6 Algol is small. These things we have taken care 
of in our solution.
#ns1,4,_«bs»3_«bs»._«bs»6__«bs»T_«bs»r_«bs»a_«bs»n_«bs»s_«bs»l_«bs»a_«bs»t_«bs»i_«bs»o_«bs»n_«bs»s_«bs»t_«bs»e_«bs»p_«bs»s_«bs».#
#np#

  Because the translater also should be used to translation of new
Pascalprograms, is it necessary, that there is a syntaxcheque of the
Pascalprogram in the translater.
#np#

  You can make the translater, so in the first phase you do a syntax-
cheque. The translation can be maked in two phases, where you in the
first construct the necessary tables with identifiernames, typedecla-
rations and similar things, while you in the next phase make the trans-
lation itself.
#np#

  The last two phases you can fold up in one, that is you have two
phases, one where the Pascalprogram would be syntaxchequed and one 
where the translation occur.
#np#
  An other possibility is to make syntaxcheque and translation in the
same phase, that is the translater only got one phase.
#np#
  The advantage of having many phases is if you find any syntaxerrors, is it 
unnecessary to translate the program to DJS-6 Algol, and then because the 
errors should be corrected in the Pascalprogram, you save the time the
translationsphases take.
#np#

  If you use multiphases translater, you have to store the hole program
in the machine, because we do not have exact information about how much
memory we have the disposol of, we find it necessary to make translation
and syntaxcheque in one phase.
#np#

  By this solution it is only necessary to store the tables, which will be
created, while the translation is made.
#np#
  The Pascalprogram would be read as far as possible statement by statement,
after which the necessary information for the tables, whish ar used for translation, is stored. There woild be made a syntaxcheque and the statement would
be translated to DJS-6 Algol, at last the Pascalversion and if any the
syntaxerrors are printed on the lineprinter. The DJS-6 Algolversion is
punched out on papertape.
#np#
  Above when we wrote, that we as far as possible would read  statement
by statement of the Pascalprogram, is it because of that the loopconstrution
could demand, that the hole loopconstrution is stored in the machine.
#np#
  So you should not use memory for the hole program at the same time,
which was exactly what we wanted, but the drawback with this solution is
that even when a syntaxerror had been found, you must use time to translate
the Pascalprogram to DJS-6 Algol. It is possible to cheque, if there has been
syntaxerrors and then stop the translation, if there have been syntaxerrors, 
but in the cases where there is no syntaxerrors, which probably are most of them, you will loose a lote of time asking if there have been any syntaxerrors in
the program.
#np#

  So our solution would be a one phase translater, where both the syntaxcheque
and the translation are made in the same phase, and the hole Pascalprogram
would be translated even, when some syntaxerrors have been found.
#ns1,4,_«bs»3_«bs».__«bs»C_«bs»o_«bs»m_«bs»p_«bs»a_«bs»r_«bs»i_«bs»s_«bs»o_«bs»n_«bs»s__«bs»b_«bs»e_«bs»t_«bs»w_«bs»e_«bs»e_«bs»n__«bs»t_«bs»h_«bs»e__«bs»P_«bs»r_«bs»o_«bs»g_«bs»r_«bs»a_«bs»m_«bs»m_«bs»i_«bs»n_«bs»g_«bs»l_«bs»a_«bs»n_«bs»g_«bs»u_«bs»a_«bs»g_«bs»e_«bs»s_«bs».#
#np#

  In this section we will describe the differences, there are between SequentielPascal and "Standard Pascal", between Sequentiel Pascal and Algol 60, and
between Algol 60 and DJS-6 Algol plus the limitations and extensions make
for the sake of the solution of the task.
#ns1,4,_«bs»3_«bs»._«bs»1__«bs»S_«bs»t_«bs»a_«bs»n_«bs»d_«bs»a_«bs»r_«bs»d__«bs»P_«bs»a_«bs»s_«bs»c_«bs»a_«bs»l__«bs»C_«bs»o_«bs»n_«bs»t_«bs»r_«bs»a__«bs»S_«bs»e_«bs»q_«bs»u_«bs»e_«bs»n_«bs»t_«bs»i_«bs»e_«bs»l__«bs»P_«bs»a_«bs»s_«bs»c_«bs»a_«bs»l_«bs».#
#ns1,4,_«bs»3_«bs»._«bs»1_«bs»._«bs»1__«bs»D_«bs»i_«bs»f_«bs»f_«bs»e_«bs»r_«bs»e_«bs»n_«bs»c_«bs»e_«bs»s__«bs»b_«bs»e_«bs»t_«bs»w_«bs»e_«bs»e_«bs»n__«bs»S_«bs»t_«bs»a_«bs»n_«bs»d_«bs»a_«bs»r_«bs»d_«bs»-__«bs»a_«bs»n_«bs»d__«bs»S_«bs»e_«bs»q_«bs»u_«bs»e_«bs»n_«bs»t_«bs»i_«bs»e_«bs»l__«bs»P_«bs»a_«bs»s_«bs»c_«bs»a_«bs»l_«bs».#
#np#

  By Sequentiel Pascal means the Pascal which is mean the Pascal written
for the machine PDP-11. Here there are some limitations in proportion
to Standard Pascal. The most important differences are, that you in
Sequentiel Pascal do not have jumpstatements and labels. Futher you
cannot in Sequentiel Pascal declare a variable of the type Files as you
can in Standard Pascal.
#ns1,4,_«bs»3_«bs»._«bs»1_«bs»._«bs»2__«bs»E_«bs»x_«bs»t_«bs»e_«bs»n_«bs»s_«bs»i_«bs»o_«bs»n_«bs»s__«bs»o_«bs»f__«bs»S_«bs»e_«bs»q_«bs»u_«bs»e_«bs»n_«bs»t_«bs»i_«bs»e_«bs»l__«bs»P_«bs»a_«bs»s_«bs»c_«bs»a_«bs»l_«bs».#

  In the Sequentiel Pascal report #np#
#ef#
scope user rapport
finis
▶EOF◀