January/February 2018 issue of acmqueue

The January/February issue of acmqueue is out now

Programming Languages

  Download PDF version of this article PDF

ITEM not available


Originally published in Queue vol. 13, no. 1
see this item in the ACM Digital Library



Robert C. Seacord - Uninitialized Reads
Understanding the proposed revisions to the C language

Carlos Baquero, Nuno Preguiça - Why Logical Clocks are Easy
Sometimes all you need is the right language.

Erik Meijer, Kevin Millikin, Gilad Bracha - Spicing Up Dart with Side Effects
A set of extensions to the Dart programming language, designed to support asynchrony and generator functions

Bo Joel Svensson, Mary Sheeran, Ryan Newton - Design Exploration through Code-generating DSLs
High-level DSLs for low-level programming


(newest first)

Andrew patterson | Wed, 15 Jun 2016 23:40:57 UTC

Continued..(it closed while correcting id. Please ignore I'd above)

Id .. alpha $('_' alphanum/alphanum);

The fact META II is lexerless parser is more important as later Schorre projects replaced builtin Lexing rules with programed token rules.

Tree transforming is programed. Thus we have semantic transformation to tree constructs programed in the parser language:

expr = term $(('+':ADD/'-':SUB) term !2);

Above we still have the META II syntax recognizing constructs bUT without the stack machine assembly output. Instead we have tree constructing that allows factoring the operation it to node and tree constructions. The node is created and pushed on the node stack when the operator is recognized. It is expected of the term rule to leave a well formed term tree on the parse stack. So when we get to the !2 tree making we expect to get an ADD[term_tree,term_tree] or a SUB[term_tree,term_tree].

I think is important to recognized Schorre's work as programming languages. One might say it was a conspiracy. That the terms compiler-compiler and metacompiler have been trashed over the years. But sit happens. How the advanced Schorre meta compiler technology has almost been forgotten doezn'the matter. This article barley scratches the surface. It's great the so many are rediscovering META II. However TREE-META and CWIC need even more attention and understanding.

I wrote SLICE (System of Languages for Implementing Languages) 1969 to 1974. SLIC is based on CWIC. Including it's SYNTAX and lisp 2 based GENERATER language. The generate changed to produce macro like PSEUDO code. PSEUDO istructionz are appended to lists. CWIC uses the terms planting and flushing. Planting is the forming of instructions. Instructions are planted into named sections. In CWIC instructions are formed with numeric expressions and placed into memory blocks associated with a section. A FLUSH statement wrote out the memory block. SLIC appends pseudo instructions to a list assimilated with a section. The pseudo instruction is a proceedure. It's entry and arguments form a plant object that is appended to the sections list. On flushing the pseudo list is executed calling each pseudo procedure. Actual machine code is produced by MACHOP proceedures called by pseudo procedures. MATCHOPs define target machine instructions and pseudo data instructions. The define a machine instruction or instruction family. It assembly format name and operands. Their transformation into numeric bit fields. Machine instructions are defined as a sequence of bit fields in a bit addressable memory. Modulo arithmetic is used to get target machine addresses. .MORG modular org is used to align to an addressabke boundry. With SLIC a compiler for different computer systems could easily be produced by coding the pseudo instructions and MACHOPs. One simply linked the SYNTAX,GENERATOR module with PSEUDO and MACHOP modules. An ISO could be directed to run on PSEUDO instructions when FLUSHING. ISO is a transforming language that looks for pseudo instruction pattern sequences and replace's them. These are all compiled languages. The compared to other compilers of the day as improving on lines compiled per time unit. Man years of development was substantialy less. Man years reduced to man months.

Andrew patterson | Wed, 15 Jun 2016 22:08:57 UTC

This is an interesting take on META II. I would like to make not that META II is a programming language. Like other programming laguages it's language features are what is important.

It is a language for writing compilers. It does not have a separate lexer. I do not if Schorre had any conetion with the development of TREE-META but Schorre was part of the CWIC development team at SDC.

Like TREE-META CWIC has a SYNTAX programming language abd a GENEATOR language. TREE-META used what it called unparse rules.

CWIC produced executable code modules. It was implemented on an IBM 360 machine and produced IBM-360 binary machine code. This was an important step. The CWIC SYNTAX language is much like META II. But instead of directly outputing stack-machine code as META II does it creates a tree using transform operators in the syntax language. CWIC incorporates a large part of LISP 2 into it's generator language. The inclusion of LISP 2 brings with it dynamic memory manager. Trees are lists who's first element is a node object. Nodes are created in the SYNTAX language by : which creates a node object and pushes it on to the node stack. The parse stack is were the tree is built. The ! construct in the syntax language creates a tree having branchs. The branches are pope of the parse stack. The resulting tree is pushed onto the parse stack. Token rules recognize tokens. The default action on recognizing a token is creating a symbol object and pushing it onto the parse stack. A symbol is cataloged into the dictionary. Symbols may have attributes. Supplied library function may intercede the cataloging and create other object types. MAKNUM[] for example creates an integer object. Character class rules define named character groups:

bin: '0'/'1'; oct: bin/'2'/'3'/'4'/'5'/'6'/'7'; dec: oct/'8'/'9'; hex: dec/'a'/'b'/'/'c'/"d'/'e'/'f'/'A'/'B'/'C'/'D'/'E'/'F';

integer .. ('0b'/'0B') bin $bin MAKBIN[]/ ('0o'/'0O') oct $oct MAKOCT[]/ ('0h'/'0H') hex $hex MACKEX[]/ dgt $dgt MACKUM[];

The above character classes and token rule recognizes an integer constant and creates an integer token. A token in CWIC is an object.

The token rule for an identifier in CWIC


Ira Baxter | Thu, 05 Mar 2015 03:15:41 UTC

We note that the article about MetaII is about the same size as the MetaII paper itself. It really *is* worth the reader's trouble to read the paper, and implement the metamachine Schorre defines in some low-level langauge. It is stunning to watch it reproduce itself.

This was my first compiler course, done in about 1971. I've loved it and metaprogramming, ever since.

-- IDB

Dave | Mon, 26 Jan 2015 10:18:50 UTC

An alert reader has suggested that ASCII predates APL .

My reasoning is as follows: X3.4 is dated 17 June 1963 (and one might reasonably expect the committee to have had points of contention until shortly before acceptance), while Iversons A Programming Language is dated 1962 (and was developed *largely in a graduate course given for several years at Harvard*, which implies the notation took shape prior to 1960).

But as all this was before my time, I welcome correction.

X3.4: http://worldpowersystems.com/J/codes/X3.4-1963/page1.JPG
APL: http://www.softwarepreservation.org/projects/apl/Books/APROGRAMMING%20LANGUAGE

Leave this field empty

Post a Comment:

© 2018 ACM, Inc. All Rights Reserved.