FC++: Functional Tools for Object-Oriented Tasks

Total Page:16

File Type:pdf, Size:1020Kb

FC++: Functional Tools for Object-Oriented Tasks FC++: Functional Tools for Object-Oriented Tasks Yannis Smaragdakis and Brian McNamara College of Computing Georgia Institute of Technology Atlanta, GA 30332 {yannis,lorgon}@cc.gatech.edu http://www.cc.gatech.edu/~yannis/fc++ Abstract straightforwardly many common functional opera- tors (a large part of the Haskell Standard Prelude FC++ is a library for programming functionally in [19]). The library is currently quite rich in func- C++. Compared to other C++ functional program- tionality and has an efficient implementation. ming libraries, FC++ is distinguished by its power- ful type system which allows manipulating In a previous paper [16], we introduced FC++ and parametrically polymorphic functions (e.g., pass- its innovative type system, showed the components ing them as arguments to other functions and of the library, and demonstrated how its implemen- returning them as results). tation is more efficient than previous similar attempts. In this paper we show how to leverage In this paper, we show how FC++ can be used in the library to create simple, efficient, and safe common OO programming tasks. We demonstrate implementations of common OO design patterns FC++ implementations of several common design [8]. patterns (Adapter, Builder, Command, and more). Compared to conventional C++ implementations Certainly a lot has been written about language of these patterns, our implementations are either support for implementing design patterns (e.g., simpler (in that fewer classes/dependencies are [4][6]), functional techniques in OO programming, needed), more efficient, or more type-safe (thanks etc. Some of the approaches in the literature are to parametric polymorphism and type-inference). even very close in philosophy to our work. For instance: 1 Introduction • Alexandrescu [2] demonstrates how the meta- Functional and object-oriented programming are programming capabilities of the C++ language the most active fields of research in programming can be used to yield elegant pattern implemen- languages and methodologies. Several pieces of tations. work have attempted to connect the two paradigms. • Kühne’s dissertation proposes several patterns Among them are the Pizza language [18], extend- inspired by functional programming [14]. ing Java, as well as libraries for programming func- • Using functional techniques (higher-order tionally in C++ [11][12][15][21]. FC++ [16] is one functions) to implement the Observer and such library, distinguished from all others by its Command patterns is common—in fact, even powerful type system: FC++ allows the program- standard practice in Java and Smalltalk. mer to define and fully manipulate parametrically • The benefits of polymorphic and higher-order polymorphic functions. The conventional C++ way functions have often been discussed in the of representing polymorphic functions is via func- functional programming literature [22]. tion templates (e.g., see the C++ Standard Library Therefore, by necessity, part of our material is not [20]). Nevertheless, function templates suffer conceptually novel. In particular, Section 3 shows severe limitations—e.g., they cannot be passed as that FC++ offers a rich framework for OO tasks, parameters to other functions or returned as results. but similar results can be obtained with other lan- FC++ polymorphic functions overcome these limi- tations. This allows FC++ to re-implement 1 guages or libraries (although, among C++ and return them as results—even if they are poly- approaches, FC++ is arguably the most complete). morphic. There are two kinds of functoids: direct and indirect. Direct functoids are the usual repre- Section 4, however, shows new implementations of sentation for functions in FC++. Direct functoids common patterns by concentrating on some of the can be either monomorphic or polymorphic. Indi- more novel elements of FC++—mainly type infer- rect functoids, on the other hand, must always be ence and its ability to manipulate polymorphic monomorphic but can express first-class functions. functions. We see how parametric polymorphism That is, with indirect functoids, we can define vari- can find its way into some design patterns, how ables that range over all functions with the same FC++ can handle such tasks, and how using para- type signature. Thus, indirect functoids can be metric polymorphism results into more generic viewed as indirect function references, much like code. [Note that we do not discuss improvements C/C++ function pointers. In addition to direct and in design patterns’ implementations by the mere indirect functoids, FC++ provides a number of use- addition of parametric typing (e.g., C++ class tem- ful operations for creating functoids, composing plates) in a language. These are well understood them, specializing them, etc. We shall now discuss and are even discussed in [8], as implementation a few of the key components of FC++ in more suggestions.] detail. Although some C++ background is required for Indirect functoids are represented as the FunN fam- much of the paper, we believe that the principles ily of classes. FunNs specify function signatures via are interesting even to non-C++ programmers. In template parameters; N is the number of arguments. particular, the paper offers insights for language For example, Fun2<int,char,string> is the type designers and shows a platform where both sub- of a two-argument indirect functoid which takes an type polymorphism and parametric polymorphism int and a char and returns a string. Note that the with type inference are readily available as com- first N template arguments comprise the argument plementary tools for problem solving. types of the function, and the last template argu- ment is the result type. Thus, the simplest kind of 2 Background: Functional Programming indirect functoid is a Fun0<void>—a function that with FC++ takes no arguments and returns no result. (As we show in Section 3, this simplest functoid plays a We begin by introducing FC++. We divide this significant role in a number of patterns.) introduction into two parts. Section 2.1 gives an overview of the FC++ library, from the perspective A common way to create indirect functoids is with of a user of the library components. Section 2.2 ptr_to_fun. ptr_to_fun transforms a normal describes a few of the important implementation C++ function into a functoid. Here is a simple techniques of the FC++ library. These will be example, which also demonstrates how indirect employed in Section 4 and are necessary for the functoids can range over different functions: user who intends to write polymorphic functions using FC++. The ability to manipulate polymor- int i_times( int x, inty){return x*y;} phic functions is what sets FC++ apart from all int i_plus( int x, int y ) { return x+y;} ... other functional programming libraries in C++. For Fun2<int,int,int> f; a more complete introduction to FC++, the reader f = ptr_to_fun(&i_times); should refer to [16]. f(3,4); // returns 12 f = ptr_to_fun(&i_plus); 2.1 FC++ Basics f(3,4); // returns 7 In FC++, we express functions as instances of Note that f’s behavior depends on which functoid classes that follow certain conventions. We call it is bound to. This may seem reminiscent of OO such classes functoids. The key advantage to using dynamic dispatch (where a method call depends functoids (rather than C++ functions or function upon the dynamic type of the object that the templates) is that we can pass them as parameters receiver is bound to), and rightly so! There is just 2 such a virtual method call buried inside the imple- the int 3, and whose second field is the char ‘c’. mentation of all indirect functoids. Indeed, the C++ standard defines a template func- tion for the same purpose, which goes by the name Indirect functoids are more versatile than function std::make_pair. However, compared to mk_pair, pointers: they employ automatically currying, they std::make_pair suffers extreme limitations, by can be bound to new function objects that are cre- virtue of being defined as a template function. ated on-the-fly, and they exhibit a form of subtype Template functions cannot be passed as parame- polymorphism (see [16]). What follows will dem- ters, which means we cannot use the functional onstrate some of these features, which have impor- techniques mentioned above (i.e., currying and tant applications in Section 3 and Section 4. composition) on templates. Direct functoids avoid Currying is a functional technique that allows us to these limitations. For example, we can say curry2( mk_pair, 3 ) bind a subset of a function’s arguments to specific to return a new direct functoid which takes one values. For example, we can use curry to bind the argument of any type T, and returns a first argument of f to the value 1, creating a new std::pair<int,T> whose first field is 3. one-argument function: 2.2 Expressing Polymorphic FC++ Functoids Fun1<int,int> inc = curry2(f,1); inc(4); // returns 5 — i.e., i_plus(1,4) In the previous example, we demonstrated passing (The 2 in curry2 refers to the number of arguments a polymorphic functoid to a higher-order function that f expects.) In fact, FC++ also allows the curry- which returned a polymorphic result. How is this ing to be implicit—when a functoid is called with accomplished using C++? The trick in FC++ is to fewer actual arguments than it expects, it returns a use a struct with nested template members for both curried functoid. For instance, the previous exam- the actual function as well as an explicit represen- ple can be written more simply as: tation of the type signature of functoid, so that we can exploit the language’s type inference of func- Fun1<int,int> inc = f(1); tion arguments. Thus in FC++ we would define inc(4); // returns 5 — i.e., i_plus(1,4) mk_pair as: Although this simpler form is what a typical FC++ struct MkPair { user would write, we will avoid it in this paper, in template <class T, class U> order to emphasize that currying is done through std::pair<T,U> operator()( T x, U y ) { polymorphic functions (e.g., curry2) that manipu- return std::pair<T,U>(x,y); late other (possibly polymorphic) functions.
Recommended publications
  • The Future of Embedded Software
    The Future of Embedded Software Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS UC Berkeley ARTEMIS 2006 Annual Conference Graz, Austria May 22-24, 2006 Why Embedded Software? Why Now? “Information technology (IT) is on the verge of another revolution. Driven by the increasing capabilities and ever declining costs of computing and communications devices, IT is being embedded into a growing range of physical devices linked together through networks and will become ever more pervasive as the component technologies become smaller, faster, and cheaper... These networked systems of embedded computers ... have the potential to change radically the way people interact with their environment by linking together a range of devices and sensors that will allow information to be collected, shared, and processed in unprecedented ways. ... The use of [these embedded computers] throughout society could well dwarf previous milestones in the information revolution.” National Research Council Report Embedded Everywhere Lee, Berkeley 2 The Key Obstacle to Progress: Gap Between Systems and Computing | Traditional dynamic systems theory needs to adapt to better account for the behavior of software and networks. | Traditional computer science needs to adapt to embrace time, concurrency, and the continuum of physical processes. Lee, Berkeley 3 The Next Systems Theory: Simultaneously Physical and Computational The standard model: Embedded software is software on small computers. The technical problem is one of optimization (coping with limited resources). The Berkeley model: Embedded software is software integrated with physical processes. The technical problem is managing time and concurrency in computational systems. Lee, Berkeley 4 Obstacles in Today’s Technology: Consider Real Time Electronics Technology Delivers Timeliness… … and the overlaying software abstractions discard it.
    [Show full text]
  • The Command Dispatcher Pattern Benoit Dupire and Eduardo B Fernandez {[email protected], [email protected]}
    The Command Dispatcher Pattern Benoit Dupire and Eduardo B Fernandez {[email protected], [email protected]} Department of Computer Science and Engineering. Florida Atlantic University Boca Raton, FL 33431 Can also be called: Command Evaluator Pattern. Intent This pattern increases the flexibility of applications by enabling their services to be changed, by adding, replacing or removing any command handlers at any point in time without having to modify, recompile or statically relink the application. By simulating the command-evaluation feature common in interpreted languages, this pattern supports the need for continual, incremental evolution of applications. Example Autonomous Underwater Vehicles (AUVs) are small, unmanned, untethered submersibles. There are numerous applications for AUVs, such as oceanographic surveys, operations in hazardous environments, underwater structure inspection and military operations. We implement the high level controller of this AUV as a Hierarchical Finite State Machine (Figure 1). A state of the Finite State Machine (FSM) represents a mode of the system, in which some tasks have to be executed, as described in the mission plan. The system takes transitions based on the results of these actions and the progression of the AUV. The system is programmed with high-level commands of the style "set depth 3" state1 state2 action 1.1 action 2.1 Figure 1: Simplified Finite State Machine for the AUV. The FSM must be able to fire any type of actions, without knowing anything about them. This problem is addressed by the Command Pattern [GOF95], which encapsulates an action as an object, thereby letting you parameterize clients with different actions.
    [Show full text]
  • Design Pattern Interview Questions
    DDEESSIIGGNN PPAATTTTEERRNN -- IINNTTEERRVVIIEEWW QQUUEESSTTIIOONNSS http://www.tutorialspoint.com/design_pattern/design_pattern_interview_questions.htm Copyright © tutorialspoint.com Dear readers, these Design Pattern Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Design Pattern. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer: What are Design Patterns? Design patterns represent the best practices used by experienced object-oriented software developers. Design patterns are solutions to general problems that software developers faced during software development. These solutions were obtained by trial and error by numerous software developers over quite a substantial period of time. What is Gang of Four GOF? In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software which initiated the concept of Design Pattern in Software development. These authors are collectively known as Gang of Four GOF. Name types of Design Patterns? Design patterns can be classified in three categories: Creational, Structural and Behavioral patterns. Creational Patterns - These design patterns provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new opreator. This gives program more flexibility in deciding which objects need to be created for a given use case. Structural Patterns - These design patterns concern class and object composition. Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionalities.
    [Show full text]
  • Reversible Programming with Negative and Fractional Types
    9 A Computational Interpretation of Compact Closed Categories: Reversible Programming with Negative and Fractional Types CHAO-HONG CHEN, Indiana University, USA AMR SABRY, Indiana University, USA Compact closed categories include objects representing higher-order functions and are well-established as models of linear logic, concurrency, and quantum computing. We show that it is possible to construct such compact closed categories for conventional sum and product types by defining a dual to sum types, a negative type, and a dual to product types, a fractional type. Inspired by the categorical semantics, we define a sound operational semantics for negative and fractional types in which a negative type represents a computational effect that “reverses execution flow” and a fractional type represents a computational effect that“garbage collects” particular values or throws exceptions. Specifically, we extend a first-order reversible language of type isomorphisms with negative and fractional types, specify an operational semantics for each extension, and prove that each extension forms a compact closed category. We furthermore show that both operational semantics can be merged using the standard combination of backtracking and exceptions resulting in a smooth interoperability of negative and fractional types. We illustrate the expressiveness of this combination by writing a reversible SAT solver that uses back- tracking search along freshly allocated and de-allocated locations. The operational semantics, most of its meta-theoretic properties, and all examples are formalized in a supplementary Agda package. CCS Concepts: • Theory of computation → Type theory; Abstract machines; Operational semantics. Additional Key Words and Phrases: Abstract Machines, Duality of Computation, Higher-Order Reversible Programming, Termination Proofs, Type Isomorphisms ACM Reference Format: Chao-Hong Chen and Amr Sabry.
    [Show full text]
  • Design and Implementation of Generics for the .NET Common Language Runtime
    Design and Implementation of Generics for the .NET Common Language Runtime Andrew Kennedy Don Syme Microsoft Research, Cambridge, U.K. fakeÒÒ¸d×ÝÑeg@ÑicÖÓ×ÓfغcÓÑ Abstract cally through an interface definition language, or IDL) that is nec- essary for language interoperation. The Microsoft .NET Common Language Runtime provides a This paper describes the design and implementation of support shared type system, intermediate language and dynamic execution for parametric polymorphism in the CLR. In its initial release, the environment for the implementation and inter-operation of multiple CLR has no support for polymorphism, an omission shared by the source languages. In this paper we extend it with direct support for JVM. Of course, it is always possible to “compile away” polymor- parametric polymorphism (also known as generics), describing the phism by translation, as has been demonstrated in a number of ex- design through examples written in an extended version of the C# tensions to Java [14, 4, 6, 13, 2, 16] that require no change to the programming language, and explaining aspects of implementation JVM, and in compilers for polymorphic languages that target the by reference to a prototype extension to the runtime. JVM or CLR (MLj [3], Haskell, Eiffel, Mercury). However, such Our design is very expressive, supporting parameterized types, systems inevitably suffer drawbacks of some kind, whether through polymorphic static, instance and virtual methods, “F-bounded” source language restrictions (disallowing primitive type instanti- type parameters, instantiation at pointer and value types, polymor- ations to enable a simple erasure-based translation, as in GJ and phic recursion, and exact run-time types.
    [Show full text]
  • Enterprise Development with Flex
    Enterprise Development with Flex Enterprise Development with Flex Yakov Fain, Victor Rasputnis, and Anatole Tartakovsky Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Enterprise Development with Flex by Yakov Fain, Victor Rasputnis, and Anatole Tartakovsky Copyright © 2010 Yakov Fain, Victor Rasputnis, and Anatole Tartakovsky.. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Mary E. Treseler Indexer: Ellen Troutman Development Editor: Linda Laflamme Cover Designer: Karen Montgomery Production Editor: Adam Zaremba Interior Designer: David Futato Copyeditor: Nancy Kotary Illustrator: Robert Romano Proofreader: Sada Preisch Printing History: March 2010: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Enterprise Development with Flex, the image of red-crested wood-quails, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein.
    [Show full text]
  • From Perl to Python
    From Perl to Python Fernando Pineda 140.636 Oct. 11, 2017 version 0.1 3. Strong/Weak Dynamic typing The notion of strong and weak typing is a little murky, but I will provide some examples that provide insight most. Strong vs Weak typing To be strongly typed means that the type of data that a variable can hold is fixed and cannot be changed. To be weakly typed means that a variable can hold different types of data, e.g. at one point in the code it might hold an int at another point in the code it might hold a float . Static vs Dynamic typing To be statically typed means that the type of a variable is determined at compile time . Type checking is done by the compiler prior to execution of any code. To be dynamically typed means that the type of variable is determined at run-time. Type checking (if there is any) is done when the statement is executed. C is a strongly and statically language. float x; int y; # you can define your own types with the typedef statement typedef mytype int; mytype z; typedef struct Books { int book_id; char book_name[256] } Perl is a weakly and dynamically typed language. The type of a variable is set when it's value is first set Type checking is performed at run-time. Here is an example from stackoverflow.com that shows how the type of a variable is set to 'integer' at run-time (hence dynamically typed). $value is subsequently cast back and forth between string and a numeric types (hence weakly typed).
    [Show full text]
  • Declare New Function Javascript
    Declare New Function Javascript Piggy or embowed, Levon never stalemating any punctuality! Bipartite Amory wets no blackcurrants flagged anes after Hercules supinate methodically, quite aspirant. Estival Stanleigh bettings, his perspicaciousness exfoliating sopped enforcedly. How a javascript objects for mistakes to retain the closure syntax and maintainability of course, written by reading our customers and line? Everything looks very useful. These values or at first things without warranty that which to declare new function javascript? You declare a new class and news to a function expressions? Explore an implementation defined in new row with a function has a gas range. If it allows you probably work, regular expression evaluation but mostly warszawa, and to retain the explanation of. Reimagine your namespaces alone relate to declare new function javascript objects for arrow functions should be governed by programmers avoid purity. Js library in the different product topic and zip archives are. Why is selected, and declare a superclass method decorators need them into functions defined by allocating local time. It makes more sense to handle work in which support optional, only people want to preserve type to be very short term, but easier to! String type variable side effects and declarations take a more situations than or leading white list of merchantability or a way as explicit. You declare many types to prevent any ecmascript program is not have two categories by any of parameters the ecmascript is one argument we expect. It often derived from the new knowledge within the string, news and error if the function expression that their prototype.
    [Show full text]
  • Parametric Polymorphism Parametric Polymorphism
    Parametric Polymorphism Parametric Polymorphism • is a way to make a language more expressive, while still maintaining full static type-safety (every Haskell expression has a type, and types are all checked at compile-time; programs with type errors will not even compile) • using parametric polymorphism, a function or a data type can be written generically so that it can handle values identically without depending on their type • such functions and data types are called generic functions and generic datatypes Polymorphism in Haskell • Two kinds of polymorphism in Haskell – parametric and ad hoc (coming later!) • Both kinds involve type variables, standing for arbitrary types. • Easy to spot because they start with lower case letters • Usually we just use one letter on its own, e.g. a, b, c • When we use a polymorphic function we will usually do so at a specific type, called an instance. The process is called instantiation. Identity function Consider the identity function: id x = x Prelude> :t id id :: a -> a It does not do anything with the input other than returning it, therefore it places no constraints on the input's type. Prelude> :t id id :: a -> a Prelude> id 3 3 Prelude> id "hello" "hello" Prelude> id 'c' 'c' Polymorphic datatypes • The identity function is the simplest possible polymorphic function but not very interesting • Most useful polymorphic functions involve polymorphic types • Notation – write the name(s) of the type variable(s) used to the left of the = symbol Maybe data Maybe a = Nothing | Just a • a is the type variable • When we instantiate a to something, e.g.
    [Show full text]
  • Let's Get Functional
    5 LET’S GET FUNCTIONAL I’ve mentioned several times that F# is a functional language, but as you’ve learned from previous chapters you can build rich applications in F# without using any functional techniques. Does that mean that F# isn’t really a functional language? No. F# is a general-purpose, multi paradigm language that allows you to program in the style most suited to your task. It is considered a functional-first lan- guage, meaning that its constructs encourage a functional style. In other words, when developing in F# you should favor functional approaches whenever possible and switch to other styles as appropriate. In this chapter, we’ll see what functional programming really is and how functions in F# differ from those in other languages. Once we’ve estab- lished that foundation, we’ll explore several data types commonly used with functional programming and take a brief side trip into lazy evaluation. The Book of F# © 2014 by Dave Fancher What Is Functional Programming? Functional programming takes a fundamentally different approach toward developing software than object-oriented programming. While object-oriented programming is primarily concerned with managing an ever-changing system state, functional programming emphasizes immutability and the application of deterministic functions. This difference drastically changes the way you build software, because in object-oriented programming you’re mostly concerned with defining classes (or structs), whereas in functional programming your focus is on defining functions with particular emphasis on their input and output. F# is an impure functional language where data is immutable by default, though you can still define mutable data or cause other side effects in your functions.
    [Show full text]
  • A Mathematical Approach to Object Oriented Design Patterns
    06.2006 J.Natn.Sci.FoundationObject oriented design Sripatterns Lanka 2008 36 (3):219-227 219 RESEARCH ARTICLE A mathematical approach to object oriented design patterns Saluka R. Kodituwakku1*and Peter Bertok2 1 Department of Statistics and Computer Science, Faculty of Science, University of Peradeniya, Peradeniya. 2 Department of Computer Science, RMIT University, Melbourne, Australia. Revised: 27 May 2008 ; Accepted: 18 July 2008 Abstract: Although design patterns are reusable design the distribution of responsibilities. For ease of learning elements, existing pattern descriptions focus on specific and reference, in1, design patterns are organized into a solutions that are not easily reusable in new designs. This paper catalogue. introduces a new pattern description method for object oriented design patterns. The description method aims at providing a The catalogue is formed by two criteria: purpose more general description of patterns so that patterns can be and scope. According to their purpose, design patterns readily reusable. This method also helps a programmer to are classified into creational, structural and behavioural, analyze, compare patterns, and detect patterns from existing software programmes. whereas the scope divides patterns into class patterns and object patterns. Class patterns capture relationships This method differs from the existing pattern description between classes and their subclasses; object patterns deal methods in that it captures both static and dynamic properties with relationships between objects. of patterns. It describes them in terms of mathematical entities rather than natural language narratives, incomplete graphical Software patterns provide reusable solutions to notations or programme fragments. It also helps users to recurring design problems. Even if we have reusable understand the patterns and relationships between them; and solutions they may not be effectively reused, because select appropriate patterns to the problem at hand.
    [Show full text]
  • The Scalable Adapter Design Pattern: Enabling Interoperability Between Educational Software Tools
    The Scalable Adapter Design Pattern: Enabling Interoperability Between Educational Software Tools Andreas Harrer, Catholic University Eichstatt-Ingolstadt,¨ Germany, Niels Pinkwart, Clausthal University of Technology, Germany, Bruce M. McLaren, Carnegie Mellon University, Pittsburgh PA, U.S.A., and DFKI, Saarbrucken,¨ Germany, and Oliver Scheuer, DFKI, Saarbrucken,¨ Germany Abstract For many practical learning scenarios, the integrated use of more than one learning tool is educationally beneficial. In these cases, interoperability between learning tools - getting the pieces to talk to one another in a coherent, well-founded manner - is a crucial requirement that is often hard to achieve. This paper describes a re-usable software design that aims at the integration of independent learning tools into one collaborative learning scenario. We motivate the usefulness and expressiveness of combining several learning tools into one integrated learning experience. Based on this we sketch software design principles that integrate several existing components into a joint technical framework. The feasibility of the approach, which we name the “Scalable Adapter” design pattern, is shown with several implementation examples from different educational technology domains, including Intelligent Tutoring Systems and collaborative learning environments. IEEE keywords: J.m Computer applications, H.5.3 Group and Organization interfaces, K.3.m Computers in Education A short version of this paper appeared in the Proceedings of the Conference on Intelligent Tutoring Systems 2008 1 The Scalable Adapter Design Pattern: Enabling Interoperability Between Educational Software Tools1 I. INTRODUCTION hypothesis and plans. In order to help the student or student In the field of educational technology, there have been groups during the different steps of this inquiry procedure, it numerous attempts in recent years to connect differently makes sense to enable them to have hypotheses, experimenta- targeted learning environments to one another.
    [Show full text]