Unix Command Notation Stalks a Toy Algebra
The Unix command notation, which uses the symbol "-" to indicate parameters of commands, can be used to express the associative law for a "multiplication" operation m, by saying that the following two expressions are equal:
      m -1 m -1 a -2 b -2 c
m -1 a -2 m -l b -2 c
where -1 and -2 indicate, respectively, that the first and second argument will follow. This notation is very flexible - in fact, it is too flexible, because it also allows us to write things like
      m -2 m -1 b -1 c -1 a
m -2 m -2 c -1 b -1 a
which, though each has the same meanings as the second expression above, are even more confusing.

The usual algebraic notation for the associative law, using * instead of m for multiplication, is

      (a * b) * c  =  a * (b * c) .
Another common algebraic notation is the so called Polish prefix form, in which the associative law for * would be written as
      * * a b c  =  * a * b c .
And here are the parse tree forms for the two expressions, again using * instead of m:

         *             *
        / \           / \
       *   c         a   *
      / \               / \
     a   b             b   c

Exercise: Say what's good and bad about each of these 4 notations, and why.

To UCSZ homepage.
To Tatami project homepage.
To UCSD Meaning and Computation Lab homepage.
To my homepage.
10 January 1998; version of 24 January 2000.