: I remember I read in the faq that someone at ETH Z"urich would be developing
: an Oberon brother (or sister) for numerical computation, called seneca
: and soon to be renamed.
: What Happened to it?
: Released? Books? Language reports? References? (PD) compilers?
Oberon-V ( previously called Seneca ) is an experimental language
( ie. not likely to become generally available ) for Vector computers.
It is covered in a thesis by Robert Griesmer, Dissertation ETH Nr. 10277
and includes a description of the implementation of the compiler.
The language is similar to Oberon. It introduces two statements
related to vector computing : the ALL statement and array constructors.
Both of these statements use range declarations and range
indentifiers. Range indentifiers are declared at the point
where they are used. They not declared in the VAR section
of a procedure or module block.
k = 0..99
The ALL statement is used to specify the independent execution
of sequential assignment statements. It is different from the
FOR statement which is sequential and deterministic.
Array Constructors are used to contruct new arrays consisting
of elements of other arrays.
Here is an example of how to scale the diagonal elements
of a matrix by a constant. In this example the formal
parameter a[0] corresponds to A[0,0] of the actual parameter,
a[1] to A[1,1], etc.
PROCEDURE Scale( VAR a : ARRAY OF REAL; c : REAL );
BEGIN
ALL i = 0..LEN(a)-1 DO
a[i] := a[i]*c;
END;
END Scale;
PROCEDURE do*;
VAR A : ARRAY 10,10 OF REAL;
BEGIN
(* array constructor for the diagonal of a matrix *)
Scale( [ k = 0..LEN(A)-1: A[k,k] ] );
END do;
Other points in thesis ( and differences with Oberon ).
1) LOOP statements are considered harmful since the
sematics of statement can not be defined. The behavior
of the loop statement is dependent on the EXIT statement.
2) Side effect free function procedures.
eg.PROCEDURE do( VAR val : INTEGER):INTEGER; is not permitted.
3) The rules for POINTERs are generalized and the notation
simplified (using the Pascal style ). Pointers are equal if
their base types are equal. Pointers maybe used in recursive
type declarations. Pointers maybe declared in formal arguments
of a procedure.
TYPE
Tree = ^ RECORD
left, right : Tree
END;
PROCEDURE fft( VAR p : ^ARRAY OF REAL );
: I wanna get rid of FORTRAN!
Griesmer notes in his thesis that vectorization in Fortran-77
is acheived through dependency analysis. With technique the compiler
attempts to restructure the program to allow vectorized operation
in place of scalar operations and that a Fortran programmer
must take care to avoid contructs which prohibits vectorization.
This in turn means that a Fortran progammer must be familiar
with how the compiler vectorizes code. He also notes that Fortran-90
reduces the problem at bit but that expensive array expressions
are possible.
Whitney