133,652 research outputs found
Covariance and Controvariance: a fresh look at an old issue (a primer in advanced type systems for learning functional programmers)
Twenty years ago, in an article titled "Covariance and contravariance:
conflict without a cause", I argued that covariant and contravariant
specialization of method parameters in object-oriented programming had
different purposes and deduced that, not only they could, but actually they
should both coexist in the same language.
In this work I reexamine the result of that article in the light of recent
advances in (sub-)typing theory and programming languages, taking a fresh look
at this old issue.
Actually, the revamping of this problem is just an excuse for writing an
essay that aims at explaining sophisticated type-theoretic concepts, in simple
terms and by examples, to undergraduate computer science students and/or
willing functional programmers.
Finally, I took advantage of this opportunity to describe some undocumented
advanced techniques of type-systems implementation that are known only to few
insiders that dug in the code of some compilers: therefore, even expert
language designers and implementers may find this work worth of reading
Maude: specification and programming in rewriting logic
Maude is a high-level language and a high-performance system supporting executable specification and declarative programming in rewriting logic. Since rewriting logic contains equational logic, Maude also supports equational specification and programming in its sublanguage of functional modules and theories. The underlying equational logic chosen for Maude is membership equational logic, that has sorts, subsorts, operator overloading, and partiality definable by membership and equality conditions. Rewriting logic is reflective, in the sense of being able to express its own metalevel at the object level. Reflection is systematically exploited in Maude endowing the language with powerful metaprogramming capabilities, including both user-definable module operations and declarative strategies to guide the deduction process. This paper explains and illustrates with examples the main concepts of Maude's language design, including its underlying logic, functional, system and object-oriented modules, as well as parameterized modules, theories, and views. We also explain how Maude supports reflection, metaprogramming and internal strategies. The paper outlines the principles underlying the Maude system implementation, including its semicompilation techniques. We conclude with some remarks about applications, work on a formal environment for Maude, and a mobile language extension of Maude
Multiparadigm programming: Novel devices for implementing functional and logic programming constructs in C++
Constructs for functional and logic programming can be smoothly integrated into an existing object-oriented language. We demonstrate this in the context of C++ (a statically-typed object-oriented language with effects and parametric polymorphism) via two libraries: FC++ and LC++. FC++ is a library for functional programming in C++; FC++ supports higher-order polymorphic functions, lazy lists, and a small lambda language; it also contains a large library of useful functions, datatypes, combinators, and monads. LC++ is a library for logic programming in C++; LC++ provides the same general functionality as Prolog, including the ability to return query results lazily (one at a time). Both
libraries are embedded in C++ so that they share C++'s static type system, and the library interfaces provide straightforward ways for
code from within one paradigm to ``call out' to another.
Our work describes the techniques used to implement these libraries in C++ and shows that the resulting multiparadigm language has useful
applications in real-world domains. We also describe how many of the implementation techniques can be generalized from C++ and applied to
other programming languages to yield similar results.Ph.D.Committee Chair: Yannis Smaragdakis; Committee Member: Mary Jean Harrold; Committee Member: Olin Shivers; Committee Member: Philip Wadler; Committee Member: Spencer Rugabe
Maude: specification and programming in rewriting logic
AbstractMaude is a high-level language and a high-performance system supporting executable specification and declarative programming in rewriting logic. Since rewriting logic contains equational logic, Maude also supports equational specification and programming in its sublanguage of functional modules and theories. The underlying equational logic chosen for Maude is membership equational logic, that has sorts, subsorts, operator overloading, and partiality definable by membership and equality conditions. Rewriting logic is reflective, in the sense of being able to express its own metalevel at the object level. Reflection is systematically exploited in Maude endowing the language with powerful metaprogramming capabilities, including both user-definable module operations and declarative strategies to guide the deduction process. This paper explains and illustrates with examples the main concepts of Maude's language design, including its underlying logic, functional, system and object-oriented modules, as well as parameterized modules, theories, and views. We also explain how Maude supports reflection, metaprogramming and internal strategies. The paper outlines the principles underlying the Maude system implementation, including its semicompilation techniques. We conclude with some remarks about applications, work on a formal environment for Maude, and a mobile language extension of Maude
Session Types in Concurrent Calculi: Higher-Order Processes and Objects
This dissertation investigates different formalisms, in the form of programming language calculi,
that are aimed at providing a theoretical foundation for structured concurrent programming based
on session types. The structure of a session type is essentially a process-algebraic style description
of the behaviour of a single program identifier serving as a communication medium (and usually
referred to as a channel): the types incorporate typed inputs, outputs, and choices which can be
composed to form larger protocol descriptions. The effectiveness of session typing can be attributed
to the linear treatment of channels and session types, and to the use of tractable methods
such as syntactic duality to decide if the types of two connected channels are compatible. Linearity
is ensured when accumulating the uses of a channel into a composite type that describes also
the order of those actions. Duality provides a tractable and intuitive method for deciding when
two connected channels can interact and exchange values in a statically determined type-safe way.
We present our contributions to the theory of sessions, distilled into two families of programming
calculi, the first based on higher-order processes and the second based on objects. Our work unifies,
improves and extends, in manifold ways, the session primitives and typing systems for the
Lambda-calculus, the Pi-calculus, the Object-calculus, and their combinations in multi-paradigm
languages. Of particular interest are: the treatment of infinite interactions expressed with recursive
sessions; the capacity to encapsulate channels in higher-order structures which can be exchanged
and kept suspended, i.e., the use of code as data; the integration of protocol structure directly
into the description of objects, providing a powerful and uniformly extensible set of implementation
abstractions; finally, the introduction of asynchronous subtyping, which enables controlled
reordering of actions on either side of a session. Our work on higher-order processes and on object
calculi for session-based concurrent programming provides a theoretical foundation for programming
language design integrating functional, process, and object-oriented features
Aspect-Oriented Programming
Aspect-oriented programming is a promising idea that can improve the quality of software by reduce the problem of code tangling and improving the separation of concerns. At ECOOP'97, the first AOP workshop brought together a number of researchers interested in aspect-orientation. At ECOOP'98, during the second AOP workshop the participants reported on progress in some research topics and raised more issues that were further discussed. \ud
\ud
This year, the ideas and concepts of AOP have been spread and adopted more widely, and, accordingly, the workshop received many submissions covering areas from design and application of aspects to design and implementation of aspect languages
- …