[Prev][Next][Index]

FWD: Query on Larch and OOA



Keith, et al,

	I agree with Jim that there are no standard mappings to/from OO design
and analysis models.  I also agree that in principle there's no stopping that.
It would be interesting to do.

	There have been some interface specification languages for OO
programming languages.  LM3 has been developed at DEC SRC for Modula-3.
At Iowa State we have developed Larch/Smalltalk, which is actually
what the ACM TOSEM article Jeannette mentioned is about,
and Larch/C++.  Larch/C++ is still under development, but I have been
improving its documentation this past month.  You can find out more
on the WWW from the URLs:
  http://www.cs.iastate.edu/~leavens/larchc++.html
  http://www.cs.iastate.edu/~leavens/larchSmalltalk.html
or by anonymous ftp from ftp.cs.iastate.edu
(in pub/larchc++ and pub/larchSmalltalk).  You can also read the Larch/C++
reference manual from your favorite WWW browser!

	I agree with Jeannette's comments about specifying and checking
behavioral subtypes at the interface level; for a particular programming
language, such as C++, there will be interface details that will also
determine whether you can use one type of object in place of another.

	In respect to Jeannette and Jim's comments about subsorts,
adding to LSL a notion of subsorting as in OSA (where a subsort is a subset)
would only solve a small fraction of the cases
that arise in specification langauges such as Larch/C++ and Larch/Smalltalk.
Typically, you want to have a sort that *adds* information to the information
in the supersort.  So what we really need is a shorthand for definining
how to overload all the trait functions that apply to the supersort
so that they are defined on the subsort.  A good way to do this would be
with a coercion function.  I've suggested a syntax something like:

	subtrait of SupersTrait by coercionFun subsort subS supersort supS

in several places, as a way to automatically generate the needed overloadings.
This would just be syntactic sugar for a LSL trait in the current semantics,
although it would be nice if LSL supported it.  For more details see...

pages 171-173 of
@InCollection{Leavens-Cheon92b,
  Key = 	"Leavens \& Cheon",
  Author = 	"Gary T. Leavens and Yoonsik Cheon",
  Title = 	"Preliminary Design of {Larch/C++}",
  BookTitle =	"Proceedings of the First International Workshop on
		 Larch, July, 1992",
  Publisher =	"Springer-Verlag",
  Editor = 	"U. Martin and J. Wing",
  Series = 	"Workshops in Computing",
  Pages = 	"159-184",
  Address = 	NY,
  Year = 	1993,
  Annote = 	"26 references."
}

and

@Article{Leavens94a,
  Key = 	"Leavens",
  Author = 	"Gary T. Leavens",
  Title = 	"Inheritance of Interface Specifications (Extended Abstract)",
  Journal =     SIGPLAN,
  Year = 	1994,
  Volume =      29,
  Number =      8,
  Pages = 	"129-138",
  Month = 	Aug,
  Note = 	"Proceedings of the Workshop on Interface Definition
		 Languages.
		 Also ISU CS TR93-23, which is available by anonymous ftp from
		 ftp.cs.iastate.edu or by e-mail from almanac@cs.iastate.edu.",
  Annote = 	"28 references."
}

	Gary Leavens
	229 Atanasoff Hall, Department of Computer Science
	Iowa State Univ., Ames, Iowa 50011-1040 USA / leavens@cs.iastate.edu
	phone: (515)294-1580 fax: (515)294-0258 ftp site: ftp.cs.iastate.edu
	URL: http://www.cs.iastate.edu/~leavens/main.html