[PL-sem-jr] Traits references; follow-ups

Richard Cobbe cobbe at ccs.neu.edu
Thu Aug 11 21:26:26 EDT 2005


As promised, here are the BibTeX entries for the papers I covered today.

First, though, one or two follow-up items that occurred to me after I
finished the talk.

1) Felix asked why the method exclusion form, written T - (m : tau),
   requires the programmer to state the type of the removed method.  We
   agreed that this was unnecessary for the static semantics, and I
   theorized that this was necessary to make the soundness proof work.

   Turns out it's required for the *dynamic* semantics, which I didn't
   write out.  The reduction relation on traits maps trait values 
   <| M; theta; S |> to trait values; remember that theta is a row type
   containing the types of all required fields and methods.

   In evaluating the method exclusion, we have to move the excluded
   method and its type into this row type.  And this requires having the
   type in the program text---unless you want to re-type-check the
   method body, at run time (or at least at link time).

2) In the rule for type-checking traits, I'd stated that I believed that
   S must be a subset of M union R, where
     S is the set of all super method names used by the trait
     M is the set of all method names defined by the trait
     R is the set of all field/method names required by the trait

   In particular, the rule has the antecedent
     tau_super = <l : tau_l for all l in S>
   but we only produce types tau_l for all l in M, R.

   We said at the time that the subset restriction above was probably
   unnecessary, because unification would take care of things.  On
   reflection, I don't think that's true: you could allocate a new type
   variable for all t_l, l not in M or R, but unless you unify that type
   variable with something else, it'll never get a value.  And the way
   the rule is structured, type variables created by that antecedent
   never leak out past this particular inference rule, so they're never
   unified.

   So I'm not completely sure that my subset restriction is correct, but
   I think there's clearly something more going on there.

Finally, the papers.  I have soft copies of all of these if anyone is
interested in further reading.

(Oh, and if you ever cite ECOOP proceedings without saying which LNCS
volume they're in, I will personally hunt you down and hurt you.  Grrr.)

Richard

%% experience report from Xerox PARC
@article{curry-82-traits,
    author = "Gael Curry and Larry Baer and Daniel Lipkie and Bruce Lee",
    title = "Traits: An approach to multiple-inheritance subclassing",
    journal = "ACM SIGOA Newsletter",
    volume = 3,
    number = "1--2",
    year = 1982,
    pages = "1--9",
    doi = "\url{http://doi.acm.org/10.1145/966873.806468}",
    publisher = "ACM Press",
    address = "New York, NY, USA",
}

%% def'n of method provide & require
@techreport{scharli-02-traits,
    author = "Nathanael Sch{\"a}rli and Oscar Nierstrasz and St{\'e}phane
        Ducasse and Roel Wuyts and Andrew Black",
    title = "Traits: The Formal Model",
    institution = "Institut f{\"u}r Informatik, Universit{\"a}t Bern",
    year = 2002,
    number = "IAM-02-006",
    month = nov,
    url = "\url{http://homepages.ulb.ac.be/~rowuyts/publications.html}",
}

%% the main paper
@inproceedings{scharli-03-traits,
    author = "Nathanael Sch{\"a}rli and St{\'e}phane Ducasse and
        Oscar Nierstrasz and Andrew P. Black",
    title = "Traits: Composable Units of Behaviour",
    booktitle = "{ECOOP} 2003---Object-Oriented Programming: 17th European
        Conference ({LNCS} 2743)",
    year = 2003,
    isbn = "3-540-40531-3",
    pages = "248--274",
    location = "Darmstadt, Germany",
    mon = jul,
    publisher = "Springer-Verlag GmbH",
    address = "Berlin",
}

%% the full formal model and type system, from FOOL 2004
@inproceedings{fisher-04-typed,
    author = "Kathleen Fisher and John Reppy",
    title = "A typed calculus of traits",
    year = 2004,
    booktitle = "The Eleventh International Workshop on Foundations of
        Object Oriented languages (FOOL 11)",
    note = "Available from \url{http://www.doc.ic.ac.uk/~scd/
        FOOL11_Prelim_program.html}",
}

%% extended version of fisher-04-typed.
@techreport{fisher-03-statically,
    author = "Kathleen Fisher and John Reppy",
    title = "Statically typed traits",
    institution = "University of Chicago Computer Science Department",
    year = 2003,
    number = "TR-2003-13",
    url = "\url{http://www.cs.uchicago.edu/research/publications/
        techreports/TR-2003-13}",
}

Richard



More information about the Pl-sem-jr mailing list