Why don't large companies use Ada? 
Author Message
 Why don't large companies use Ada?


: > At the time, I recall speaking with engineers who walked away from
: > PL/1 _simply_ because it mapped multidimensional arrays row-major, so that
: > interfacing to old fortran codes required the programmer to tranpose
: > everything on the PL/1 side before passing it to the Fortran subroutine.

: I'll take your word for this, but I still find it difficult to understand.
: If you're writing new PL/I or Ada code to interface to existing Fortran
: libraries, all you should need to do is swap the indices; there should
: be no need to physically transpose the arrays themselves.  This should
: be only a small fraction of the effort required to interface to Fortran
: (for Ada, matching the types and writing the Interface pragmas; for
: PL/I, ???).  Could it be that the engineers were using this as an excuse
: to stick with Fortran, or am I missing something?

No you're not missing anything.  The practical problem is that
*only* difference is that the indices are swapped.

It's like using two pieces of software to do very similar things except
that they have slightly different sign conventions.  This is a trivial
difference, and thus a real nightmare.

Either your Fortran or your PL/I code will be using indices the
"wrong way".

You typically program an algorithm to follow an indexing convention
as defined in a textbook or other scientific document.  You really
need to get these completely right, so it's a major maintenance and
consistency problem that can cause very irritating bugs, if you
can't write the indices the same way everywhere.

Imagine a professor who changed his notation every other lecture, and
the confusion that causes.

The point is that this is something that is

* really utterly trivial for a compiler to do (allow matrices to go
whichever way), and

* an authentic pain in the ass to humans when you don't have it,

the fact that subsequent computer langauges and compilers have nonthetheless
given Fortran programmers the finger over and over for decades is really
galling.

I'm very glad to hear that Ada9x will finally stop this madness.

: --

: TeleSoft^H^H^H^H^H^H^H^H Alsys, Inc.
: 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718
: /user/kst/.signature: I/O error (core dumped)

--

-Institute for Nonlinear Science, University of California, San Diego
-*** AD: Archive for nonlinear dynamics papers & programs: FTP to
-***     lyapunov.ucsd.edu, username "anonymous".



Fri, 23 May 1997 08:03:59 GMT  
 Why don't large companies use Ada?
Mike, have you REALLY met engineers who walked away from PL/1 because of
the array subscripting order "problem". If so their behavior is peculiar
given the fact that PL/1 allows the specification of subscripting regimes
in full generality using ISUB (swapping indices is a trivial application).


Sat, 24 May 1997 06:59:32 GMT  
 Why don't large companies use Ada?

Quote:

>Mike, have you REALLY met engineers who walked away from PL/1 because of
>the array subscripting order "problem". If so their behavior is peculiar
>given the fact that PL/1 allows the specification of subscripting regimes
>in full generality using ISUB (swapping indices is a trivial application).

Yes.

But unless I mis-read the post from the IBM chap the other day,
ISUB does more than logically swap the indices, it actually
transposes the array. I don't think I kept that post, but I do
think that's what he said.

Has PL/1 supported ISUB all along? I do not remember it from my
PL/1 days 20 or so years ago.

Mike Feldman



Sat, 24 May 1997 10:51:12 GMT  
 Why don't large companies use Ada?

|>Yes, that's true. The transposition is mental.
|>In my experience, interfacing between languages - certainly for the
|>kind of fairly simple vector/matrix interfaces the typical Fortranner
|>would use (the _subprograms_ aren't simple but the _interfaces_
|>tend to be) - is, to a very large extent,a matter of getting the
|>data structures to agree.

|I haven't used many PL/I compilers, but they all had "iSUB defining".
|I never used that feature myself, but you could describe it as exposing
|the linear subscript mapping at the source level.  The result is that
|you could have a direct and a transposed view of the _same_ array.
|I would have thought that made it fairly easy to interface PL/I to Fortran.
|PL/I had, back in the 70's when I met it, a great many data types that
|would not have mapped onto Fortran, but every Fortran variable _could_ be
|mapped into PL/I more or less directly (with the aid of iSUB defining for
|>=2-dimensional arrays).

|--
|"The complex-type shall be a simple-type."  ISO 10206:1991 (Extended Pascal)
|Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.



Sun, 25 May 1997 08:49:11 GMT  
 Why don't large companies use Ada?

Quote:

> But unless I mis-read the post from the IBM chap the other day,
> ISUB does more than logically swap the indices, it actually
> transposes the array.

ISUB lets you declare an array which is really a veiw of another
array.  For example:

        DCL A_FORTRAN(5, 7);
        DCL A(7, 5) DEFINED A_FORTRAN(2SUB, 1SUB);

declares the array A_FORTRAN, and then overlays the array A on top
of it with the subscripts in the opposite order.  This means that
A(3, 2) refers to the same element as A_FORTRAN(2, 3).

Now you can write:

        DCL FSUB ENTRY((5, 7) FLOAT) OPTIONS(FORTRAN NOMAP);
        FSUB(A_FORTRAN);

The FORTRAN option tells the PL/1 compiler that FSUB is a FORTRAN
routine (probably unnecessary, but a good precaution), and the NOMAP
option tells the compiler to pass the arguments directly even though
the routine is in FORTRAN.  Without the NOMAP option, the PL/1 compiler
would create a copy of the array with the subscripts swapped.

Quote:
> Has PL/1 supported ISUB all along? I do not remember it from my
> PL/1 days 20 or so years ago.

The information in this posting comes from a 1974 manual.
                                Kenneth Almquist


Sun, 25 May 1997 13:46:46 GMT  
 Why don't large companies use Ada?
If a compiler-maker really wanted to do it (yeah, right, with a gun to
their heads!) there's no reason why a compile-time switch couldn't
switch the order of subscripts in a Fortran array.  Of course, this
would break code that EQUIVALENCEd 2D arrays to 1D ones, but that's
a pretty  horrible thing to do, anyway.  It could even be regarded
as a different KIND by an F90 compiler.
--
- Kenneth G. Hamilton


Mon, 26 May 1997 10:00:33 GMT  
 Why don't large companies use Ada?
As far as I know ISUB was always in PL/1, it may not have been in the
G subset.


Mon, 26 May 1997 12:11:06 GMT  
 Why don't large companies use Ada?

writes:

|> As far as I know ISUB was always in PL/1, it may not have been in the
|> G subset.

In the museum section of my bookshelf (next to the July 1982 Ada RM that
Robert would have me burn :-) ), is a 1972 edition of the PL/I-F LRM, and
it includes iSUB.

--



Tue, 27 May 1997 01:52:21 GMT  
 Why don't large companies use Ada?
Not just EQUIVALENCE, but much more importantly in Fortran you can pass
a two dimensional array to a routine that treats it as a one dimensional
array, and also you can pass a single column (but not a single row) of
a two dimensional array as a one dimensional array. These features are
often used.

Since we have pragma convention in Ada 9X, I don't see much need for
Fortran to muck around.

Interesting note: if you are trying to convert FOrtran code to Ada, and
it does use the column slicing trick, then you are in trouble, or more
accurately, you will have to play low level games with unchecked
conversion of access types, because Ada does not allow slicing of
multi-dimensional arrays.

Note incidentally that the ability in Fortran to pass columns is exactly
what defines the requirement for array mapping in Fortran, whereas in
Ada there are no such semantics, so the array ordering is not specified
by the language (although it is slightly suggested by the form of array
aggregates for multi-dimensional arrays).



Tue, 27 May 1997 19:49:20 GMT  
 Why don't large companies use Ada?
Two ancient books in the same place!!!
My goodness we will have to send round the firemen :-)


Wed, 28 May 1997 09:36:31 GMT  
 Why don't large companies use Ada?


        |> As far as I know ISUB was always in PL/1, it may not have been in the
        |> G subset.

        In the museum section of my bookshelf (next to the July 1982 Ada RM that
        Robert would have me burn :-) ), is a 1972 edition of the PL/I-F LRM, and
        it includes iSUB.

---The first edition (1967) of the PL/I-F LRM had it in.
---The second edition (1968) of the PL/I-F LRM had it in.



Wed, 28 May 1997 22:07:14 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Why don't large companies use Ada?

2. Why don't large companies use Ada?

3. Why don't large companies use C/C++/OOP?

4. NEXTSTEP : Don't let your company miss it. Don't let your career miss it

5. NEXTSTEP : Don't let your company miss it. Don't let your career miss it

6. Why patterns don't suck

7. why awk don't display the results?

8. Why I don't Like HTML Help...

9. Animated Gifs Some work some don't why

10. Why don't Memo Entry Fields wrap?????

11. I don't understand why my haskell program works

 

 
Powered by phpBB® Forum Software