[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

9/20 cards



1. Why do cardelli and wegner compare these concepts in a dead language like
   Ada?  (By dead, I mean unable to program in since no ada compiler has ever
   been built). [Ken Kendra]

Several (well, at least 2) ada compilers been built.  The problem with Ada is
not that *no* compilers existed for the language: the problem is that no
compiler that accepted the full language and was stable existed.  For a large
language that was growing, this is not too unusual.  For instance, until
recently (or even currently) C++ compilers did a very bad job of some
C++ features such as templates and exceptions.
Also, Ada was anything but dead at the time this paper was written.  One could
even say that Ada was a "hot" language.

2. Can you further explain/expand on the quote: "A type definition does not
   introduce a new type" from section 4.2 [Jill Kerschbaum]

This is basically saying that their language uses structural equivalence.
I.e., 
  IntPair1 = Int x Int  and
  IntPair2 = Int x Int

Are the same even though they have new names.  So the two type definitions do
not create new types, they just give names to a structure.

3. On page 495 it says: ".. there are problems in deciding in general when two
   parametric recursive type definitions represent the same type".  Can you
   give examples of these problems? [Johennie Helton, David Robb]

Unfortunately no ;-)  But Cardelli does give a reference for this!  SML has
parametric recursive type definitions but I guess it is some kind of a
restricted form that allows equality to be computed.

4. Syntax error? Universal quantification of functional forms sometimes uses
   all[a] (p. 491) and sometimes all a (p. 494). [Matthias Hauswirth]

Page 491 defines a parametric polymorphic function.  Page 494 defines a
generic value.  I don't know why they don't use the same all[a] except that
they may be using the two different forms to distinguish between functions and
non-functions.

5. How do the packages and modules discussed in this paper relate to packages
   and classes in another language such as Java? [Bryan Montross]

The packages in this paper are more general.  For example, every instance of a
package can give a different implementation of each method whereas each
instance of a particular class has the same implementation of each method.
Also, the packages in the paper are first class values (you can pass them
around as you wish) whereas packages in Java are not: you can not pass
packages around.

6. The sections on quantification seem nothing more than mental gymnastics.
   Of what PRACTICAL use is this in understanding programming languages?

Shortly we will look at how four different languages implement different
variations on the polymorphism.  None of them are as powerful as what the
Cardelli model allows yet all of them can be expressed as subsets of cardelli
model.  Thus, this model gives us an understanding of how different languages
compare with respect to the polymorphism they provide.  It also
correspondingly exposes weaknesses in existing languages.

7. How often is parametric used? and where? [Michael Foster]

SML (which we will look at in a few classes) uses parametric polymorphism.  It
is very cool.


8. What is a lattice? [Matthias Hauswirth]

A lattice is a set of values along with two operators (meet, join,
and two unique elements, top and bottom) that satisfy certain mathematical
properties.  Meet and join are often intersection and union or vice versa
depending on how the lattice is defined.  It is an absolutely crucial notion
in program analysis, for instance.  For more on this, you should look up any
compiler text or take my 7135 seminar!

9. What technical properties must a subset (of V) fulfill to be called an
   'ideal' [Jan Meseth]

"ideals" are a mathematical concept from lattice theory and while I used to
know precisely what they were, I can't remember right now.  I have a book at
home which most probably will define it: if I find it in the book, I'll send
out another message about this.