The paper presents and discusses our experience of teaching functional programming which has evolved during many years of teaching at different departments of Novosibirsk State University. We suggest students to learn...
详细信息
Serverless computing, also known as the Function-as-a-Service (FaaS) paradigm, has become a cornerstone of modern cloud-based applications, enabling developers to build and execute workflows by composing serverless fu...
详细信息
This paper reports on the experiences of using an early assessment intervention, specifically employing a Use-Modify-Create scaffold, to teach first-year undergraduate functional programming. The particular interventi...
详细信息
This paper reports on the experiences of using an early assessment intervention, specifically employing a Use-Modify-Create scaffold, to teach first-year undergraduate functional programming. The particular intervention that was trialled was the use of an early assessment instrument, in which students had to use code given to them, or slightly modify it, to achieve certain goals. The intended outcome was that the students would thus engage earlier with the functional language, enabling them to be better prepared for the second piece of assessment, where they create code to solve given problems. This intervention showed promise: the difference between a student's score on the Create assignment improved by an average of 9% in the year after the intervention was implemented, a small effect.
Modern functional programming languages, such as Haskell, Scala, ML, and F#, have properties that make it possible to implement logically complicated algorithms relatively easily. Among such properties is the composit...
详细信息
Modern functional programming languages, such as Haskell, Scala, ML, and F#, have properties that make it possible to implement logically complicated algorithms relatively easily. Among such properties is the composition of functions, currying, metafunctions (functions over functions), and some others. This makes it possible to obtain complex functions by combining simpler functions. An example of a complicated algorithm is a parser. In Haskell, there is a library called Parsec, which is a set of elementary parsers;by combining these parsers, one can create more complicated parsers. This fact makes the library relatively simple, yet powerful. The majority of these tools are not explicitly included in C++. However, C++ is sufficiently powerful for implementing many properties of functional programming languages. In this paper, an attempt is made to develop such a library.
This paper presents a dataflow functional computer (DFFC) developed at the Etablissement Technique Central de l'Armement (ETCA) and dedicated to real-time image processing. Two types of data-driven processing elem...
详细信息
This paper presents a dataflow functional computer (DFFC) developed at the Etablissement Technique Central de l'Armement (ETCA) and dedicated to real-time image processing. Two types of data-driven processing elements, dedicated respectively to low-level and mid-level processings are integrated in a regular 3D array. The design of the DFFC relies on a close integration of the dataflow-architecture principles and the functional programming concept. An image processing algorithm, expressed with a syntax similar to that of functional programming (FP) is first converted into a dataflow graph. The nodes of this graph are real-time operators that can be implemented on the physical processors of the dataflow machine. This dataflow graph is then mapped directly onto the processor array. The programming environment includes a complete compilation stream from the FP specification to hardware implementation, along with a global operator database. Apart from being a research tool for real-time image processing, the DFFC may also be used to perform the automatic synthesis of autonomous vision automata from a high-level functional specification. An experimental system, including 1024 low-level custom dataflow processors and 12 T800 transputers, was built and can perform up to 50 billion operations/s. Several image processing algorithms were implemented on this system and run in real-time at digital video speed.
functional programming has enormous potential for reducing the high cost of software development. Because of the simple mathematical basis of functional programming it is easier to design correct programs in a purely ...
详细信息
functional programming has enormous potential for reducing the high cost of software development. Because of the simple mathematical basis of functional programming it is easier to design correct programs in a purely functional style than in a traditional imperative style. The author argues here that functional programs combine the clarity required for the formal specification of software designs with the ability to validate the design by execution. As such they are ideal for rapidly prototyping a design as it is developed.
We describe the FC++ library, 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...
详细信息
We describe the FC++ library, 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. The FC++ library has a number of useful features, including a generalized mechanism to implement currying in C++, a "lazy list" class which enables the creation of "infinite data structures", a subtype polymorphism facility, and an extensive library of useful functions, including a large part of the Haskell Standard Prelude. The FC++ library has an efficient implementation. We show the results of a number of experiments which demonstrate the value of optimizations we have implemented. These optimizations have improved the run-time performance by about an order of magnitude for some benchmark programs that make heavy use of FC++ lazy lists. We also make an informal performance comparison with similar programs written in Haskell.
This paper complements our previous paper “functional programming with streams.” The purpose of this paper is two-fold: to further develop the concept of a stream, and to present an implementation aspect of stream p...
详细信息
This paper complements our previous paper “functional programming with streams.” The purpose of this paper is two-fold: to further develop the concept of a stream, and to present an implementation aspect of stream programming. Stream programming is decomposed into three phases, i.e. stream generation, stream transformation and stream reduction and for each phase we have (stream) generators, transformers and reducers, respectively. A linear recursive function equation, for example, is described as a composition of a stream generator and a reducer. We also give a listing of implemented stream processing functions in this paper.
How to integrate mathematical thinking more fully into the computer science curriculum is a perennial problem for CS educators. A key part of that integration is designing the discrete math course so that its relevanc...
详细信息
We present an architectural design of a library for Bayesian modelling and inference in modern functional programming languages. The novel aspect of our approach are modular implementations of existing state-of-the-ar...
详细信息
We present an architectural design of a library for Bayesian modelling and inference in modern functional programming languages. The novel aspect of our approach are modular implementations of existing state-of-the-art inference algorithms. Our design relies on three inherently functional features: higher-order functions, inductive data-types, and support for either type-classes or an expressive module system. We provide a performant Haskell implementation of this architecture, demonstrating that high-level and modular probabilistic programming can be added as a library in sufficiently expressive languages. We review the core abstractions in this architecture: inference representations, inference transformations, and inference representation transformers. We then implement concrete instances of these abstractions, counterparts to particle filters and Metropolis-Hastings samplers, which form the basic building blocks of our library. By composing these building blocks we obtain state-of-the-art inference algorithms: Resample-Move Sequential Monte Carlo, Particle Marginal Metropolis-Hastings, and Sequential Monte Carlo Squared. We evaluate our implementation against existing probabilistic programming systems and find it is already competitively performant, although we conjecture that existing functional programming optimisation techniques could reduce the overhead associated with the abstractions we use. We show that our modular design enables deterministic testing of inherently stochastic Monte Carlo algorithms. Finally, we demonstrate using OCand that an expressive module system can also implement our design.
暂无评论