We report on our experience using functionalprogramming languages in the development of a commercial GNU/Linux distribution, discussing features of several significant systems: hardware detection and system configura...
详细信息
the control software for robotics applications is usually written in a low-level imperative style, intertwining the program sequence and commands for motors and sensors. To describe the program's behavior, it is t...
详细信息
ISBN:
(纸本)9798400710995
the control software for robotics applications is usually written in a low-level imperative style, intertwining the program sequence and commands for motors and sensors. To describe the program's behavior, it is typically divided into different states, each representing a specific system condition. this way of programming complicates the comprehension of the code, making changes to the program flow a tedious task. functional Reactive programming (FRP) offers a composable, modular approach for developing reactive applications. To examine the strengths and limitations of FRP compared to the conventional imperative style, the control software for a robotic artwork was implemented using a form of FRP in the Haskell programming language. the resulting design separates the control of the hardware from the implementation of its behavior. In addition, state transitions are presented more clearly, resulting in code that is more understandable, especially for people with little programming experience.
Developing software for robot control often is tedious, difficult and error prone. this is more so for people without a computer science background, such as artists. functional Reactive programming (FRP) aims to make ...
详细信息
ISBN:
(纸本)9798400710995
Developing software for robot control often is tedious, difficult and error prone. this is more so for people without a computer science background, such as artists. functional Reactive programming (FRP) aims to make reactive programs, such as those used for robotics control, more modular, composable, and aesthetically pleasing. We present the results of a collaboration withthe art studio Pors & Rao, specializing in robotic artwork. the aim of this collaboration was to explore the use of FRP in this application area to allow artists to express their intentions for robot control in a more effective manner. We demonstrate the artworks that we jointly worked on, as well as our impressions of the acceptance and potential of FRP for artists without a computer science background.
C-Rules is a business rules management system developed by Constraint Technologies international(1) (CTI), designed for use in transportation problems. Users define rules describing various aspects of a problem, such ...
详细信息
ISBN:
(纸本)9781595938152
C-Rules is a business rules management system developed by Constraint Technologies international(1) (CTI), designed for use in transportation problems. Users define rules describing various aspects of a problem, such as solution costs and legality, which are then queried from a host application, typically an optimising solver. At its core, C-Rules provides a functional expression language which affords users both power and flexibility when formulating rules. In this paper we will describe our experiences of using functionalprogramming both at the end-user level, as well as at the implementation level. We highlight some of the benefits we, and the product's users, have enjoyed from the decision to base our rule system on features such as: higher-order functions, referential transparency, and static, polymorphic typing. We also outline some of our experiences in using Haskell to build an efficient compiler for the core language.
We present a user-friendly approach to unifying program creation and execution, based on a notion of "tangible values" (TVs), which are visual and interactive manifestations of pure values, including functio...
详细信息
ISBN:
(纸本)9781595938152
We present a user-friendly approach to unifying program creation and execution, based on a notion of "tangible values" (TVs), which are visual and interactive manifestations of pure values, including functions. programming happens by gestural composition of TVs. Our goal is to give end-users the ability to create parameterized, composable content without imposing the usual abstract and linguistic working style of programmers. We hope that such a system will put the essence of programming into the hands of many more people, and in particular people with artistic/visual creative style. In realizing this vision, we develop algebras for visual presentation and for "deep" function application, where function and argument may both be nested within a structure of tuples, functions, etc. Composition gestures are translated into chains of combinators that act simultaneously on statically typed values and their visualizations.
We present a series of CPS-based intermediate languages suitable for functional language compilation, arguing that they have practical benefits over direct-style languages based on A-normal form (ANF) or monads. Inlin...
详细信息
ISBN:
(纸本)9781595938152
We present a series of CPS-based intermediate languages suitable for functional language compilation, arguing that they have practical benefits over direct-style languages based on A-normal form (ANF) or monads. Inlining of functions demonstrates the benefits most clearly: in ANF-based languages, inlining involves a re-normalization step that rearranges let expressions and possibly introduces a new 'join point' function, and in monadic languages, commuting conversions must be applied;in contrast, inlining in our CPS language is a simple substitution of variables for variables. We present a contification transformation implemented by simple rewrites on the intermediate language. Exceptions are modelled using so-called 'double-barrelled' CPS. Subtyping on exception constructors then gives a very straightforward effect analysis for exceptions. We also show how a graph-based representation of CPS terms can be implemented extremely efficiently, with linear-time term simplification.
functionalprogramming languages are well-suited for developing compilers, and compilers for functional languages are often themselves written in a functional language. functional abstractions, such as monads, allow a...
详细信息
ISBN:
(纸本)9781450369817
functionalprogramming languages are well-suited for developing compilers, and compilers for functional languages are often themselves written in a functional language. functional abstractions, such as monads, allow abstracting away some of the repetitive structure of a compiler, removing boilerplate code and making extensions simpler. Even so, functional languages are rarely used to implement compilers for languages of other paradigms. this paper reports on the experience of a four-year long project where we developed a compiler for a concurrent, object-oriented language using the functional language Haskell. the focus of the paper is the implementation of the type checker, but the design works well in static analysis tools, such as tracking uniqueness of variables to ensure data-race freedom. the paper starts from a simple type checker to which we add more complex features, such as type state, with minimal changes to the overall initial design.
We present work-in-progress on RTG, a domain specific language embedded in Haskell designed to explore the affordances of geometry as a means to generate and manipulate rhythmic patterns in live coded music. Examples ...
详细信息
ISBN:
(纸本)9798400710995
We present work-in-progress on RTG, a domain specific language embedded in Haskell designed to explore the affordances of geometry as a means to generate and manipulate rhythmic patterns in live coded music. Examples of how simple geometry is capable of producing interesting rhythms are shown to support our use of binary lists as a pattern representation. We introduce Erlangen's Program notion of geometry as encoded in groups, using such structure as the focus of a combinator interface based on an archetypal RhythmicPattern type implemented using a type class. Examples of the interface usage are provided. Future work targets the definition of Group instances for the rhythmic pattern types such that the group laws are fulfilled and its operations lift to the interface in a musically coherent and engaging way.
this article defines the semantics of maquettes in the visual programming language OpenMusic (OM) using monads. A maquette can be seen as a sequencer of functions. Although maquettes have been widely used, their seman...
详细信息
ISBN:
(纸本)9798400710995
this article defines the semantics of maquettes in the visual programming language OpenMusic (OM) using monads. A maquette can be seen as a sequencer of functions. Although maquettes have been widely used, their semantic have never been formalized. Formalizing maquettes has multiple benefits;primarily, we aim to provide a better understanding for composers through the use of a mathematical language rather than discursive semantics. In this work, we use a particular case of the state monad and show with examples how this monad is visualized in OpenMusic. the use of these advanced concepts in the field of music and their availability to composers aligns with our intention to bridge the gap between the theoretical and practical aspects of the intersection between mathematics and music.
Pattern matching of algebraic data types (ADTs) is a standard feature in typed functionalprogramming languages, but it is well known that it interacts poorly with abstraction. While several partial solutions to this ...
详细信息
ISBN:
(纸本)9781595938152
Pattern matching of algebraic data types (ADTs) is a standard feature in typed functionalprogramming languages, but it is well known that it interacts poorly with abstraction. While several partial solutions to this problem have been proposed, few have been implemented or used. this paper describes an extension to the. NET language F# called active patterns, which supports pattern matching over abstract representations of generic heterogeneous data such as XML and term structures, including where these are represented via object models in other. NET languages. Our design is the first to incorporate both ad hoc pattern matching functions for partial decompositions and "views" for total decompositions, and yet remains a simple and lightweight extension. We give a description of the language extension along with numerous motivating examples. Finally we describe how this feature would interact with other reasonable and related language extensions: existential types quantified at data discrimination tags, GADTs, and monadic generalizations of pattern matching.
暂无评论