Results 1 - 10
of
16
Introduction to functional programming
, 1995
"... The use of monads to structure functional programs is described. Monads provide a convenient framework for simulating e ects found in other languages, such as global state, exception handling, output, or non-determinism. Three case studies are looked at in detail: how monads ease the modi cation of ..."
Abstract
-
Cited by 1224 (37 self)
- Add to MetaCart
The use of monads to structure functional programs is described. Monads provide a convenient framework for simulating e ects found in other languages, such as global state, exception handling, output, or non-determinism. Three case studies are looked at in detail: how monads ease the modi cation of a simple evaluator; how monads act as the basis of a datatype of arrays subject to in-place update; and how monads can be used to build parsers.
Functional Programming in C++
, 2000
"... This paper describes FC++: a rich library supporting functional programming in C++. Prior approaches to encoding higher order functions in C++ have suffered with respect to polymorphic functions from either lack of expressiveness or high complexity. In contrast, FC++ offers full and concise support ..."
Abstract
-
Cited by 29 (3 self)
- Add to MetaCart
This paper describes FC++: a rich library supporting functional programming in C++. Prior approaches to encoding higher order functions in C++ have suffered with respect to polymorphic functions from either lack of expressiveness or high complexity. In contrast, FC++ offers full and concise support for higher-order polymorphic functions through a novel use of C++ type inference.
Another new element in FC++ is that it implements a subtype polymorphism policy for functions, in addition to the more common parametric polymorphism facilities. Subtype polymorphism is common in object oriented languages and ensures that functions in FC++ fit well within the C++ object model.
Apart from these conceptual differences, FC++ is also an improvement in technical terms over previous efforts in the literature. Our function objects are reference-counted and can be aliased without needing to be copied, resulting in an efficient implementation. The reference-counting mechanism is also exported to the user as a general-purpose replacement of native C++ pointers. Finally, we supply a number of useful functional operators (a large part of the Haskell Standard Prelude) to facilitate programming with FC++. The end result is a library that is usable and efficient, while requiring no extensions to the base C++ language. 1
On the interaction of object-oriented design patterns and programming languages
, 1996
"... Design patterns are distilled from many real systems to catalog common programming practice. We have analyzed several published design patterns and looked for patterns of working around constraints of the implementation language. Some object-oriented design patterns are distorted or overly complic ..."
Abstract
-
Cited by 26 (1 self)
- Add to MetaCart
Design patterns are distilled from many real systems to catalog common programming practice. We have analyzed several published design patterns and looked for patterns of working around constraints of the implementation language. Some object-oriented design patterns are distorted or overly complicated because of the lack of supporting language constructs or mechanisms. Welay a groundwork of generalpurpose language constructs and mechanisms that, if provided by a statically typed, object-oriented language, would better support the implementation of design patterns and, thus, benefit the construction of many real systems. In particular, our catalog of language constructs includes subtyping separate from inheritance, lexically scoped closure objects independent of classes, and multimethod dispatch. The proposed constructs and mechanisms are not radically new, but rather are adopted from a varietyof languages and combined in a new, orthogonal manner. We argue that by describing design patterns in terms of the proposed constructs and mechanisms, pattern descriptions become simpler and, therefore, accessible to a larger number of language communities. Constructs and mechanisms lacking in a particular language can be implemented using paradigmatic idioms.
UMLAUT: an Extendible UML Transformation Framework
, 1999
"... Many UML CASE tools allow software engineers to draw diagrams and generate code skeletons from them. But often advanced users want to do more with their UML models, e.g., apply specific design patterns, generate code for embedded systems, simulate the functional and non-functional behavior of the sy ..."
Abstract
-
Cited by 25 (2 self)
- Add to MetaCart
Many UML CASE tools allow software engineers to draw diagrams and generate code skeletons from them. But often advanced users want to do more with their UML models, e.g., apply specific design patterns, generate code for embedded systems, simulate the functional and non-functional behavior of the system, run validation tools on the model, etc. which are very difficult to do with the scripting facilities offered in most UML case tools. In this paper, we describe UMLAUT, a freely available UML Transformation Framework allowing complex manipulations to be applied to a UML model. These manipulations are expressed as algebraic compositions of reified elementary transformations. They are thus open to extensions through inheritance and aggregation. To illustrate the interest of our approach, we show how the model of an UML distributed application can be automatically transformed into a labeled transition system validated using advanced protocol validation technology. Key-words: Object-oriented F...
A Toolkit for Weaving Aspect Oriented UML Designs
- In: Proceedings of the 1 st International Conference on AspectOriented Software Development (AOSD), ACM
, 2002
"... Separation of concerns is a basic engineering principle that is also at the core of object-oriented analysis and design methods in the context of the Unified Modeling Language (UML). The UML gives the designer a rich, but somehow disorganized, set of views on her model as well as many features, such ..."
Abstract
-
Cited by 20 (2 self)
- Add to MetaCart
Separation of concerns is a basic engineering principle that is also at the core of object-oriented analysis and design methods in the context of the Unified Modeling Language (UML). The UML gives the designer a rich, but somehow disorganized, set of views on her model as well as many features, such as design pattern occurrences, stereotypes or tag values, allowing her to add nonfunctional information to a model. Aspect-oriented concepts are applied to manage the multitude of design constraints. However, it can then be an overwhelming task to reconcile the various aspects of a model into a working implementation. In this paper, we present our UMLAUT framework as a toolkit for easily building application specific "weavers" for generating detailed design models from high level, aspect oriented UML models. This is illustrated with a toy example of a distributed multimedia application with a weaving generating an implementation model. More ambitious applications are briefly outlined in the conclusion. 1.
From Contracts to Aspects in UML Designs
- In AOSD Workshop on Aspect-Oriented Modeling with UML
, 2002
"... Separation of concerns is a basic engineering principle that is often applied in object-oriented analysis and design by dissociating functional aspects (business objects) from non-functional ones, such as persistency, fault-tolerance and so on. The Unified Modeling Language (UML) then gives the desi ..."
Abstract
-
Cited by 11 (2 self)
- Add to MetaCart
Separation of concerns is a basic engineering principle that is often applied in object-oriented analysis and design by dissociating functional aspects (business objects) from non-functional ones, such as persistency, fault-tolerance and so on. The Unified Modeling Language (UML) then gives the designer a rich, but somehow disorganized, set of views on her model as well as many features, such as design pattern occurrences, stereotypes or tag values to add non-functional annotations to a model. In this paper, we explore a possibility to organize all of these features around the central notions of (1) quality of service contracts (for specifying non-functional properties a la QML) and (2) aspects for describing how they can be implemented. We propose to model contracts in UML with a small set of stereotypes, and to represent aspects a bit like design pattern occurrences, that is using parameterized collaborations equipped with transformation rules expressed with meta-level OCL2. The design level aspect weaver is then just a meta-level OCL2 interpreter, that takes a UML model as entry point, processes the various aspect applications as specified by the designers, and outputs another (detailed design level) UML model that can serve as a basis for code generation.
The Lambda Library: unnamed functions in C++
- SOFTWARE—PRACTICE AND EXPERIENCE
, 2003
"... The Lambda Library (LL) adds a form of lambda functions to C++, which are common in functional programming languages. The LL is implemented as a template library using standard C++; thus no language extensions or preprocessing is required. The LL consists of a rich set of tools for defining unnamed ..."
Abstract
-
Cited by 10 (3 self)
- Add to MetaCart
The Lambda Library (LL) adds a form of lambda functions to C++, which are common in functional programming languages. The LL is implemented as a template library using standard C++; thus no language extensions or preprocessing is required. The LL consists of a rich set of tools for defining unnamed functions. Particularly, these unnamed functions work seamlessly with the generic algorithms in the C++ Standard Library. The LL offers significant improvements, in terms of generality and ease of use, compared to the current tools in the C++ Standard Library.
Functional Programming with the FC++ Library
- Journal of Functional Programming
, 2004
"... this paper, "polymorphism" means parametric polymorphism by default ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
this paper, "polymorphism" means parametric polymorphism by default
Specifying behavior in C++
- IN PROCEEDINGS OF THE IEEE INTL. CONF. ON ROBOTICS AND AUTOMATION (ICRA ’02
, 2002
"... Most robot programming takes place in the “time domain.” That is, the goal is to specify the behavior of a system that is acquiring a continual temporal stream of inputs, and is required to provide a continual, temporal stream of outputs. We present a reactive programming language, based on the Func ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Most robot programming takes place in the “time domain.” That is, the goal is to specify the behavior of a system that is acquiring a continual temporal stream of inputs, and is required to provide a continual, temporal stream of outputs. We present a reactive programming language, based on the Functional Reactive Programming paradigm, for specifying such behavior. The major attributes of this language are: 1) it provides for both synchronous and asynchronous definitions of behavior, 2) specification is equational in nature, 3) it is type safe, and 4) it is embedded in C++. In particular the latter makes it simple to “lift” existing C++ libraries into the language.
Bridging Functional and Object-Oriented Programming
"... Proponents of the functional programming paradigm contend that higher-order functions combined with (parametric) polymorphism result in much more reusable code. Object-oriented (OO) programming has independently followed a parallel approach to reusability. Objects can be used instead of higher-order ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Proponents of the functional programming paradigm contend that higher-order functions combined with (parametric) polymorphism result in much more reusable code. Object-oriented (OO) programming has independently followed a parallel approach to reusability. Objects can be used instead of higher-order functions and subtype polymorphism partially substitutes parametric polymorphism. In this paper, we draw strong analogies between the object-oriented and functional programming paradigms. We show that several common OO design patterns (Visitor, Virtual Proxy, Command, Observer, and more) are closely related to functional programming patterns. Additionally, we show how better support for functional programming in OO languages can result in improvements for many design patterns (Command, Virtual Proxy, Builder, Abstract Factory, and more). The context for demonstrating our ideas is the FC++ library. FC++ adds to C++ many of the capabilities of modern functional programming languages, without...

