Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Luis Sosa

High Level Haskell Concepts and Applications


This annotated bibliography contains an overview of high level implementations for the functional programming language, Haskell. I chose this topic because functional programming languages are becoming very popular these days and I think that people should be aware of its potential. The type of sources that I chose are all research papers that were submitted to journals, which ScienceDirect journal is the one that I use the most because is a very established journal in various technical fields having more than 12 million articles. Since this bibliography is very technical in its own field, is only intended for people that have programming knowledge and that are familiar with the functional programming paradigm and that want to extend their knowledge of high level applications for functional programming languages; specifically for the Haskell programming language. The purpose of this bibliography is to give an overview of different high level implementations like, parallel programming architecture, automatic list comprehension, type-safe code transformation, among others intended to be used with the programming language Haskell. This annotated bibliography is not intended to be a guide for learning functional programming language in Haskell. Instead it should be used as a reference for people that have some knowledge with Haskell and that want to know what some of the high level applications for Haskell are. Aswad, M. KH., P. W. Trinder and H. W. Loidl. "Architecture Aware Parallel Programming in Glasgow Parallel Haskell (GPH)." SciVerse ScienceDirect (2012): 1807-1816. The authors, researchers at School of Mathematics and Computer Sciences, Heriot-Watt University,Edinburgh, UK, propose four new architecture-aware constructs for the

parallel Haskell extension GpH that should have better performance than the default construct used for parallel programming (par and pseq). The new four architecture-aware constructs that the authors present are: parDist, parBound, parAtLeast, and parExact. This constructs will reduce the task size and minimize the communication for small tasks. The authors compare these four constructs with par and pseq on machines with 8, 16, and 32, up to 224 cores. The authors find that by using the four construct propose by them, there is an increase in performance by a factor of 2.5 and 10.2 depending on the number of cores. The authors state that the reason that par and pseq are slow is because the number of messages that par exchanges between threads is around 13360 messages as oppose to 2292 messages that the constructs propose in the article. When dealing with threads the authors say that there are two main issues associated with thread complexity. The first one being granularity, which is how much to break a task and give it to a thread to execute it. There has to be a balance with how much granularity there is because if there is too much the amount of overhead caused by this is worse than making the thread in the first place, which will cause slowdowns. The second issue is to determine in what level of the architecture a particular task is going to be executed given a thread granularity. Erwing, Martin and Steve Kollmansberger. "Probabilistic Functional Programming in Haskell." (1999): 1-14. The authors, researchers at Oregon State University department of electrical enginering and computer science describe and explain the use of a probabilistic Functional Programming (PFP) library for Haskell. The authors create the distribution functions as monads to be able to declare functions that are capable of selecting elemtns from a collection, which is a mayor part of the PFP library. The whole article focuses

extensively on how to express probabilistic programs in Haskell and how to describe them in terms of high level functions like `map`. This library that the authors present contains modules for queueing simulations, bayesian networks, and mudules to produce plots and figures that can be helpful for probabilistic algorithms like machine learning algorithms. With this library, simulations can be declared independently from the function that exucutes them, which is something not implemented in the standar prelude library. This characteristic of the PFP library is important because it allows for fully simulation or randomization of any simulation without altering the code which defines the function. Guillemette, Louis-Julien and Stefan Monnier. "Type-Safe Code Transformations in Haskel." ScienceDirect (2007): 23-39. The authors, researchers at University of Montreal department of informatics propose a higher-order abstract syntax (HOAS) for the Haskell language. The authors present something called type intermediate language, which is the language used by abstract machines that are designed to help with the analysis of computer programs. This is not the first paper that talks about intermediate languages, other works on intermediate languages have been done by David Tarditi (TIL) and by Zhong Shao (FLINT). The authors talk about the benefits of type-checking and how it could catch bugs that would otherwise be hard to find. Type-checking is similar to when someone is checking the units of a physics problem to see if the equation makes sense even before finding a result. Hinze, Ralf, Johan Jeuring and Andres Loh. "Comparing Approaches to Generic Programming in Haskell." (2007). The authors, researchers at the University of Germany and the Department of Information and Computing Sciences in Utrecht University compare the

various approaches to datatype-generic programming in Haskell. The article discusses different libraries that implement generic programming, some examples are: Generic Haskell, Clean, PolyP, SYB, DrIFT. In conclusion the programmer should use Generic Haskell if they want to experiment with type-indexed functions with kind-indexed types and/or type-indexed data types, in particular if they want to play with higher-kinded and/or nested data types. Use Clean if they want to use an approach to generic programming that is similar to Generic Haskell, is fully integrated into its underlying programming language, and generates nearly optimal code for generic functions. Use PolyP if they want to define generic functions that use the recursive structure of data types, such as a generalization of the foldr function on lists, the catamorphism. Launchbury, John and Simon L Peyton Jones. "Lazy Functional State Threads." (1994): 1-17. The authors, researchers at the University of Glasgow present a way of securely encapsulating stateful computations. The authors use stateful to represent computations that someone would want to manipulate or update the state. The authors describe a way to express stateful algorithms in non-strict purely-functional languages. The approach is a development of their earlier work on monadic I/O and state encapsulation (Launchbury [1993]; Peyton Jones & Wadler [1993]), but with an important technical innovation: they use parametric polymorphism to achieve safe encapsulation of state. Lesniak, Michael. "A Comparison of Lock-based and Lock-free Taskpool Implementations in Haskell." ScienceDirect (2011): 2317-2326. The author, researcher at the University of Kassel in the department of research and programming languages proposes a way of synchronization of shared data structures in multithreaded software. The authors mention that software Transactional Memory allows lock-free concurrent programming by

handling the synchronization of shared variables implicitly. In this article the authors examine the performance of using two synthetic algorithms and LU decomposition and then report their observations about parallel performance and the complexity of the implementation. Marlow, Simon. "Developing High-Performance Server Applications in Haskell, Case Study: A Haskell Web Server." ScienceDirect (2001): 75-90. The author, researcher at Microsoft research proposes a lightweight concurrency and high I/O throughput server prototype written in Haskell. The author mentions that having concurrency (when operations are happening simultaneously) is fundamental, because servers cannot be stopped by a client that is downloading a big file or by a client that has a very slow connection. The author also emphasizes the importance of having operating system threads which make interprocess communication much easier. But operating system threads have the disadvantage of being heavy-weight causing a slowdown in performance. Marlow, Simon, et al. "Asynchronous Exceptions in Haskell." PLDI'01 (2006). The author, researcher at Microsoft research, Bells Labs, and Oregon Graduate Institute, propose a new way of handling synchronous and asynchronous exception in Haskell. The authors design introduces scoped combinators which are used for blocking and unblocking asynchronous interrupts. The authors mention that asynchronous exception model has several advantages over existing methods; for example, the compositional nature of their timeout function relies on true asynchronous exceptions. Synchronous exceptions just will not do since the authors mention that they dont want to modify the code that they are timing (which might even be unavailable) to include checkpoints.

Segura, Clara and Carmen Torrano. "Using Template Haskell for Abstract." ScienceDirect (2007): 201-217. The authors, researchers at University of Madrid present a way to writing programs that generate or manipulate other programs which is referred to as metaprogramming. There is a library out there called Template Haskell which is an extension added to Haskell, this extension is only implemented in the Glasgow Haskell Compiler. Using template Haskell gives the programmer support for metaprogramming at compile time. The authors use this idea to implement an abstract interpretation based strictness analysis and a let-to-case transformation that uses the results of the analysis. This article shows the advantages and disadvantages of the tool in order to incorporate new analyses and transformations into the compiler without modifying it. Sheard, Tim and Simon Peyton Jones. "Template Meta-programming for Haskell." (2002). The authors, researchers at Microsoft Research and the OGI School of Science and Engineering propose a new extension for Haskell that will supports compile-time metaprogramming. Metaprogramming is the idea of writing computer programs which manipulate other programs or themselves. Metaprogramming is a very powerful tool because it takes a lot work load away from the programmer (Imagine you could build factories that themselves build factories that build computers). Template Haskell is what actually allows a programmer to do compile-time meta-programming. Template Haskell is useful because it allows changing code while the code is being compiled. Shields, Mark and Simon Peyton Jones. "First-Class Modules for Haskell." Ninth International Conference on Foundations of Object-Oriented Languages (2002): 1-20. The authors, researcher at Microsoft Reasearch in Cambridg, modify Haskell's core language to support first-class modules with some of the features from ML-style modules. The

authors in this paper try to bring different pieces of work that have been done previously on first-class modules and to glue them together to form a coherent design. The authors mention that one of the biggest draw back of the system that they propose is that programs are suseptible to non-local changes when making some kind of concrete types abstract. Wadler, Philip. "Comprehending Monads." (n.d.). The author, researcher at the University of Glasgow shows in his paper how list comprehension may be generalized to an arbitrary monad and how the resulting programming feature can concisely express in a pure functional language some programs that manipulate state handle exceptions parse text or invoke continuations. Pure functional languages have an advantage over other paradigms like OOP in which functional programming all flow of data is made explicit. Explicit data flow ensures that the value of an expression depends only on its free variables. The author mentions that explicit data flow also ensures that the order of computation is irrelevant, making suck programs susceptible to lazy evaluations. Wadler, Philip. "The essence of functional programming." ACM SIGPLAN-SIGACT symposium on Principles of programming (1992). The author, researcher at the University of Glasgow shows in his paper the use of monads to structure functional programs. According to the author Monads increase the ease with which programs may be modified. Monads can mimic the effect of impure features such as exceptions state and continuations and also provide effects not easily achieved with such features. A monad according to the author and for the purpose of the article is a triple (M, unitM,bindM).

These functions must satisfy three laws for (M,unitM,bindM) to qualify as a monad, which are:

The author mentions that the styles presented in the article makes heavy use of data abstraction and higher-order functions. Therefore it remains to be seen what impact this has on efficiency. Wallace, Malcolm and Colin Runciman. "Heap Compression and Binary I/O in Haskell." (1999): 1-20. The authors, researchers at the department of computer science from the University of York, UK propose a way to compress data values that are in memory and a new way to do binary input and output in Haskell. One important point is that these two methods use the same binary values, therefore they can be combined instead of used individually. Heap compression is important because it allows programs to run on machines that dont have a lot of memory, it also allows for more data to be store using the same amount of memory. Binary I/O makes reading and writing to files fast because it uses low level functions which reduce overhead time. This paper brings the idea of putting binary I/O together with heap compression to have an even better performance overral. Wang, Qiushuang, et al. "Automatic Generation from List comprehension to C." SciVerse ScienceDirect (2012): 1657-1662. The authors, researchers at College of Computer Science, JiLin University, propose a way of transforming from List Comprehension of functional programming language Haskell to C programs. The authors chose to use Monad for a way of representing list because is concise and readability mainly and

because Monad extends List Comprehension to any Monad. The authors mention that Haskell is the only language that supports Monad, and that their research is helpful to the building of Monad researching environments.

You might also like