From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie)
Newsgroups: comp.lang.forth
Subject: ANS TC Magnet for ROMability
Date: 22 Aug 92 13:26:58 GMT
Organization: EIEI-U

Category 10,  Topic 22
Message 75        Fri Aug 21, 1992
B.RODRIGUEZ2 [Brad]          at 22:42 EDT
 
(split for Forthnet, part 1 of 2)

              ANSI X3J14 FORTH REQUEST FOR CLARIFICATION
                     (X3J14 dpANS-3, March 1992)

TITLE:  Can there be ANS Forth cross-compilers?

SUMMARY:  The dpANS is currently silent on the subject of cross-
     compilers, and the relevant sections of the document have
     ambiguous interpretations.  This is a request for clarifica-
     tion of the dpANS.

DISCUSSION:  Several informal comments by members of the Techni-
     cal Committee, at the 1992 Rochester Forth Conference and on
     the Forthnet, have indicated that the X3J14 effort specifi-
     cally excluded cross-compilers, and that no cross-compiler
     can possibly be an ANS Forth Standard System.

     The document itself makes no explicit statement about cross-
     compilers, and the relevant sections are ambiguous or
     contradictory:

     Section 1.1.1 Inclusions states:
          "The Standard specifies:
          the forms that a program written in the Forth language
          may take; the rules for interpreting the meaning of a
          program and its data."

     Section 1.1.2 Exclusions states:
          "The Standard does not specify:
          the mechanism by which program are transformed for use
          on computing systems."

     Section 4.1 ANS Forth Programming System states:
          "A programming language processor conforms to this
          Standard and may be labeled an 'ANS Forth System' if it
          is capable of compiling and executing, in accordance
          with this document, any ANS Forth Program whose
          environmental dependencies are compatible with the
          system's environmental restrictions."  [My emphasis]

          "An ANS Forth System implements the entire Core word
          set as defined in this document. ..."

     Section 4.2 ANS Forth Program defines:
          "A program conforms to this document and may be labeled
          an 'ANS Forth Program' if it is written using only
          words from the Core word set in ways allowed in this
          standard. ..."

     Section 2.0610 defines "program" as:
          "A complete specification of execution to achieve a
          specific function (application task) expressed in Forth
          source code form."

     Also, section 5.1 describing the Glossary identifies the "C"
     attribute, indicating that "the word may only be used during
     compilation of a definition."  This implies that any word
     lacking the "C" attribute may be used outside a definition;
     but this is not explicitly stated, and therefore may perhaps
     not be mandated by the dpANS.

     Sections 1.1 and 1.2 would appear to state that the dpANS
     does not prohibit cross-compilers.  However, Sections 4.1
     and 4.2 appear to imply that a cross-compiler must be capa-
     ble of executing the compiled code -- which is impossible,
     unless the compiler contains a full working simulation of
     the target system.

     It is this confusion and ambiguity which prompts this
     request for clarification.

     Please note: I am not asking whether a cross-compiler can
     itself be an ANS Forth Standard Program.  I am asking
     whether it can be an ANS Forth Standard System, i.e., a
     compiler that will accept any Standard Program.

-----
This message came from GEnie via willett.  You *cannot* reply to the author
using e-mail.  Please post a follow-up article, or use any instructions
the author may have included (USMail addresses, telephone #, etc.).
Report problems to: dwp@willett.pgh.pa.us