skip to main content
Skip header Section
ML for the working programmerJanuary 1991
Publisher:
  • Cambridge University Press
  • 40 W. 20 St. New York, NY
  • United States
ISBN:978-0-521-39022-4
Published:01 January 1991
Pages:
420
Skip Bibliometrics Section
Bibliometrics
Abstract

No abstract available.

Cited By

  1. Larchey-Wendling D and Matthes R Certification of Breadth-First Algorithms by Extraction Mathematics of Program Construction, (45-75)
  2. BjØrner D and Havelund K 40 Years of Formal Methods Proceedings of the 19th International Symposium on FM 2014: Formal Methods - Volume 8442, (42-61)
  3. Oliveira M, Cavalcanti A and Woodcock J (2013). Unifying theories in ProofPower-Z, Formal Aspects of Computing, 25:1, (133-158), Online publication date: 1-Jan-2013.
  4. Abed S, Ait Mohamed O and Al Sammane G (2013). Automatic verification of reduction techniques in Higher Order Logic, Formal Aspects of Computing, 25:6, (971-991), Online publication date: 1-Nov-2013.
  5. ACM
    Pluquet F, Marot A and Wuyts R Fast type reconstruction for dynamically typed programming languages Proceedings of the 5th symposium on Dynamic languages, (69-78)
  6. ACM
    Pluquet F, Marot A and Wuyts R (2009). Fast type reconstruction for dynamically typed programming languages, ACM SIGPLAN Notices, 44:12, (69-78), Online publication date: 25-Dec-2009.
  7. Novak G (2018). Computer aided software design via inference and constraint propagation, Integrated Computer-Aided Engineering, 16:3, (181-191), Online publication date: 1-Aug-2009.
  8. Wirth C (2009). Shallow confluence of conditional term rewriting systems, Journal of Symbolic Computation, 44:1, (60-98), Online publication date: 1-Jan-2009.
  9. ACM
    Russo C and Vytiniotis D QML Proceedings of the 2009 ACM SIGPLAN workshop on ML, (3-14)
  10. Chalin P and James P Non-null references by default in java Proceedings of the 21st European conference on Object-Oriented Programming, (227-247)
  11. Morris F (2007). A few exercises in theorem processing, Theoretical Computer Science, 375:1-3, (335-345), Online publication date: 20-Apr-2007.
  12. Schmidt-Schauβ M and Schulz K (2005). Decidability of bounded higher-order unification, Journal of Symbolic Computation, 40:2, (905-954), Online publication date: 1-Aug-2005.
  13. Escardó M (2004). Synthetic Topology, Electronic Notes in Theoretical Computer Science (ENTCS), 87, (21-156), Online publication date: 1-Nov-2004.
  14. ACM
    Surazhsky V and Gil J Type-safe covariance in C++ Proceedings of the 2004 ACM symposium on Applied computing, (1496-1502)
  15. ACM
    Sridranop N and Stansifer R Adding polymorphic tuples and lists to the syntax of Java Proceedings of the 42nd annual Southeast regional conference, (255-260)
  16. Villapol M and Billington J Analysing properties of the resource reservation protocol Proceedings of the 24th international conference on Applications and theory of Petri nets, (377-396)
  17. Juszczyszyn K Verifying Enterprise 's Mandatory Access Control Policies with Coloured Petri Nets Proceedings of the Twelfth International Workshop on Enabling Technologies: Infrastructure for Collaborative Enterprises
  18. ACM
    Blanc J and Echahed R A generic operator over discrete time intervals Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programming, (145-155)
  19. Mattolini R and Nesi P (2001). An Interval Logic for Real-Time System Specification, IEEE Transactions on Software Engineering, 27:3, (208-227), Online publication date: 1-Mar-2001.
  20. ACM
    Gil J Subtyping arithmetical types Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (276-289)
  21. ACM
    Gil J (2001). Subtyping arithmetical types, ACM SIGPLAN Notices, 36:3, (276-289), Online publication date: 1-Mar-2001.
  22. Hagen C and Alonso G (2000). Exception Handling in Workflow Management Systems, IEEE Transactions on Software Engineering, 26:10, (943-958), Online publication date: 1-Oct-2000.
  23. ACM
    Desmet D, Verkest D and De Man H Operating system based software generation for systems-on-chip Proceedings of the 37th Annual Design Automation Conference, (396-401)
  24. Fegaras L (1999). Optimizing Queries with Object Updates, Journal of Intelligent Information Systems, 12:2-3, (219-242), Online publication date: 2-Apr-1999.
  25. Bundy A A survey of automated deduction Artificial intelligence today, (153-174)
  26. Philipps J and Slotosch O The Quest for Correct Systems Proceedings of the Sixth Asia Pacific Software Engineering Conference
  27. Tahar S and Kumar R (1998). A Practical Methodology for the Formal Verification of RISC Processors, Formal Methods in System Design, 13:2, (159-225), Online publication date: 1-Sep-1998.
  28. Matsuura S, Kuruma H and Honiden S (1997). EVA, IEEE Transactions on Software Engineering, 23:5, (296-313), Online publication date: 1-May-1997.
  29. Novak G (1997). Software Reuse by Specialization of Generic Procedures through Views, IEEE Transactions on Software Engineering, 23:7, (401-417), Online publication date: 1-Jul-1997.
  30. ACM
    Buchberger B, Jebelean T, Kriftner F, Marin M, Tomuţa E and Văsaru D A survey of the Theorema project Proceedings of the 1997 international symposium on Symbolic and algebraic computation, (384-391)
  31. ACM
    Odersky M and Wadler P Pizza into Java Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (146-159)
  32. ACM
    Gil J and Lorenz D Environmental acquisition Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (214-231)
  33. ACM
    Gil J and Lorenz D (1996). Environmental acquisition, ACM SIGPLAN Notices, 31:10, (214-231), Online publication date: 1-Oct-1996.
  34. ACM
    Pandey M, Raimi R, Beatty D and Bryant R Formal verification of PowerPC arrays using symbolic trajectory evaluation Proceedings of the 33rd annual Design Automation Conference, (649-654)
  35. Kindred D and Wing J Fast, automatic checking of security protocols Proceedings of the 2nd conference on Proceedings of the Second USENIX Workshop on Electronic Commerce - Volume 2, (5-5)
  36. ACM
    Fegaras L and Sheard T Revisiting catamorphisms over datatypes with embedded functions (or, programs from outer space) Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (284-294)
  37. Novak Jr. G (1995). Creation of Views for Reuse of Software with Different Data Representations, IEEE Transactions on Software Engineering, 21:12, (993-1005), Online publication date: 1-Dec-1995.
  38. ACM
    King D and Launchbury J Structuring depth-first search algorithms in Haskell Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (344-354)
  39. ACM
    Okasaki C Purely functional random-access lists Proceedings of the seventh international conference on Functional programming languages and computer architecture, (86-95)
  40. ACM
    Katiyar D, Luckham D and Mitchell J A type system for prototyping languages Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (138-150)
  41. ACM
    Tofte M and Talpin J Implementation of the typed call-by-value λ-calculus using a stack of regions Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (188-201)
  42. ACM
    Launchbury J and Peyton Jones S Lazy functional state threads Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, (24-35)
  43. ACM
    Reinhold M Cache performance of garbage-collected programs Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, (206-217)
  44. ACM
    Shao Z, Reppy J and Appel A Unrolling lists Proceedings of the 1994 ACM conference on LISP and functional programming, (185-195)
  45. ACM
    Shao Z, Reppy J and Appel A (2019). Unrolling lists, ACM SIGPLAN Lisp Pointers, VII:3, (185-195), Online publication date: 1-Jul-1994.
  46. ACM
    Chambers C and Leavens G Typechecking and modules for multi-methods Proceedings of the ninth annual conference on Object-oriented programming systems, language, and applications, (1-15)
  47. ACM
    Chambers C and Leavens G (2019). Typechecking and modules for multi-methods, ACM SIGPLAN Notices, 29:10, (1-15), Online publication date: 1-Oct-1994.
  48. ACM
    Launchbury J and Peyton Jones S (2019). Lazy functional state threads, ACM SIGPLAN Notices, 29:6, (24-35), Online publication date: 1-Jun-1994.
  49. ACM
    Reinhold M (2019). Cache performance of garbage-collected programs, ACM SIGPLAN Notices, 29:6, (206-217), Online publication date: 1-Jun-1994.
  50. ACM
    Passia J and Löhr K (1993). Fips, ACM SIGPLAN Notices, 28:5, (39-48), Online publication date: 1-May-1993.
  51. ACM
    Doligez D and Leroy X A concurrent, generational garbage collector for a multithreaded implementation of ML Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (113-123)
  52. ACM
    Pinci V and Shapiro R Work flow analysis Proceedings of the 25th conference on Winter simulation, (1122-1130)
  53. ACM
    Wadler P The essence of functional programming Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (1-14)
Contributors

Recommendations

Simon John Thompson

Functional programming is of growing importance, especially in university computer science programs. In particular, it is taught at most British universities, and a functional programming language is the first language many British students study. In general, the subject has reached a mature point, having two bi-annual conferences, a number of journals, and implementations of a commercial quality. It is worth reviewing exactly what is meant by functional programming, since this phrase has meant different things at different times. Functional programming involves the definition of data objects, including functions, that can then be evaluated to give results. The definitions are explicit and usually resemble equations, in contrast to the implicit functions defined by commands in imperative languages. Because of this, functional languages tend to be higher-level, giving shorter, more readable code. More important, because the programs are equations, it is easy to see how proofs of correctness can be written: simply infer consequences of the equations given. In a similar way, programs can be transformed from inefficient to more efficient versions. In the last five years or so, a convergence of ideas has become manifest in the languages Haskell [1], Hope [2], Miranda [3], and Standard ML [4,5] (to name the most important). These languages allow functions to be first class citizens, or in other words, to be passed as arguments to or returned as results by functions. A simple example of such a higher order function is map, which takes a function f as its argument and returns the function that applies f to every member of a list. These languages are strongly and statically typed, with all errors reported before evaluation. This typing is not as restrictive as might first be thought because functions can have polymorphic type, meaning that they may be used over a collection of different types without compromising type security. The map function is an instance of this—the function f can be of any type, the only proviso being that map f is applied to a list of elements of the same type as the domain of f. To support large-scale programming, the languages contain module systems of varying degrees of sophistication. It would be wrong to think that these languages are all the same. Some, like Standard ML, contain non-functional features like assignment, although many authors lay stress on their functional subsets. A fundamental difference lies in their approach to evaluation. Traditionally, function arguments are evaluated before being passed to the body (the strict evaluation discipline), but this need not be done. Arguments can be evaluated when and as they are needed. If this is done efficiently, evaluation is lazy ; lazy languages like Haskell and Miranda allow novel methods of programming using infinite lists and the like. One language that is clearly not functional in the sense of this review is LISP. The LISP tradition is long and honorable, but quite distinct, as LISP is both weakly typed and used in an inherently imperative way. Despite the growing interest in functional programming, the number of books on programming in this style is small. Moreover, I find it curious that many of them devote substantial space to discussions of either implementations or the foundations of the subject, such as the lambda calculus; it would be unusual to open a book on imperative programming to find chapters on compiler construction or Turing machines. The books chosen for review here, however, concentrate on programming. Bailey Baileys introductory text gives a thorough treatment of functional programming in Hope. The book aims to start from scratch, and succeeds, taking the student slowly through topics like the development of simple recursive definitions of functions, which might receive a more rapid treatment in other texts. More novel ideas, such as functions as arguments and functions as results, are treated in the latter half of the book, with an early concentration on more concrete, first-order aspects. This focus has the disadvantage that only on page 187 can the author introduce examples of “true functional programming” in its entirety. Table 1: Quantitative data Bailey Bird & Wadler Holyer Paulson Reade Sokolowski Wikstrom Number of pages 300 300 225 420 600 250 450 Number of chapters 9 9 9 10 14 11 23 Number of exercises 109 272 49 301 240 41 232 Solutions to exercises All None None None 50% All All Bibliography (pages) 0 1 1 3 10 4 (annotated) 2 Another distinctive feature is the treatment of evaluation—the author gives a number of simulated evaluations that are useful both in creating an insight into this style of programming and in efficiency estimations. A drawback of this operational approach is that nothing is seen of program transformation or verification, which are among the distinctive features of the paradigm. The book also includes a summary of the Hope language. The main drawback of this text is its lack of larger examples, either in the text itself or in the exercises, which are mainly of the form “write a function to do…” and therefore can give little insight into the software engineering aspects of the topic. Nonetheless, this book is a clear and readable introduction to the basics of functional programming. Bird and Wadler This text introduces a notation that is close to the Miranda programming language (indeed closer than the appendix discussing the differences suggests, as Miranda has been modified somewhat since publication of the book). It is clearly written and covers all important aspects of lazy functional programming, as well as containing many relevant examples. One of its major advantages is that it is not always looking over its shoulder at the imperative paradigm, comparing approaches—it develops functional programming as a coherent approach to programming in itself. The authors approach is sophisticated: they state that their primary aim is “to convey a view of programming as a mathematical activity,” with mathematical reasoning (about programs) lying at the heart of the subject. In a number of places they emphasize the synthesis of programs from their specifications, using libraries of “laws” to guide their proofs. These methods are complex, and it could be argued that they belong more to a second course in programming than to an introduction. In other situations the authors go from the abstract to the concrete, the most obvious example being the introduction of the recursion operator over lists, foldr, before explicit recursion has been used. Clearly the foldr approach is elegant, but in my experience students only learn to use foldr properly after writing recursive definitions for themselves, moving from the concrete to the abstract. Some of the highlights of the book come in the examples, which exploit laziness to give strategies for game playing and so forth. The authors also make many perceptive comments on the novel ways in which programs can be modularized in lazy systems. Despite its more abstract approach, the book can be recommended as a course text that would nicely complement a more concrete approach taken in lectures and classes. Experienced functional programmers can also learn from this book, especially about the elegance and power of the transformational approach. Holyer Holyers text gives complete coverage of the Miranda programming language and system, including modules and the operating system interface as well as a useful list of Miranda standard definitions. He includes three interesting case studies—a personal notebook, a telephone exchange simulation, and a small expert system—which together show that functional programming is of wider than mathematical applicability. He also gives some good hints on program design and on how imperative and functional programming are related. He carefully explains how expressions are evaluated, which gives a clear insight into the different time and space behaviors of various functions. The final chapters discuss various implementation issues, semantics, and other functional languages. Holyer also provides a Miranda library. On the other hand, the book has a number of drawbacks. The second chapter is a feature-by-feature account of the language; it contains relatively few examples and exercises to illustrate the features as they are introduced. The reader is forced to wait until the third and later chapters to see anything substantial. Miranda is strongly typed and, as the author points out, can deduce the types of functions without their being specified. Unfortunately, the author seems to see this as a reason to omit types throughout the book, thereby sacrificing clarity for brevity. Table 2: Qualitative data Bailey Bird & Wadler Holyer Paulson Reade Sokolowski Wikstrom Prerequisites: Imperative programming No No Some Yes Yes Yes No Discrete math No Yes No Yes No Yes No Languages Hope Miranda Miranda Standard ML Miranda, Standard ML Standard ML Standard ML Clarity Good Good Good Good Good Reasonable Good Difficulty Easier Harder Easier Harder Easier Harder Easier Depth of coverage Introductory Full Full Full Full Deep but patchy Introductory Case studies 0 4 3 2 large 3 2 1 Another omission concerns the logical reading of functional programs and the ease with which programs can be proven to have certain properties: Holyer gives no proofs of correctness. Despite these drawbacks, this book is solid and could certainly be used as a textbook for a functional programming course that uses Miranda. Paulson Paulson has written a readable guide to functional programming, which will take the reader through all the features of Standard ML, including exceptions, the module system, and imperative reference types; he also takes pains to explain lazy data structures such as lists. The reader clearly needs previous exposure to programming, and the author adopts a cautious approach to novel ideas—for instance, higher-order functions are introduced relatively late. This approach has the drawback of making some of the earlier examples less elegant than they might be, but the author calls on his teaching experience to justify this delay. The exposition is cumulative, with two larger and well-presented case studies at the end of the book drawing on most of the material introduced. The book is also strong on program verification, with a detailed presentation of various program proofs and a realistic summary of the strengths and weaknesses of this approach to software development. A useful aspect of this book is the giant exclamation points that signal explanations of various pitfalls in the ML system: these are of great help to students trying to understand why the compiler has produced a particularly incomprehensible error message, for example. One drawback of this text is the treatment of efficiency. It is discussed throughout, but no tools are provided with which readers can estimate the efficiency of programs they write or see in the book. Syntax charts and predefined idents enhance the book. Finally, the authors style can be both elegant and caustic. Reade Although the notation used here is close to Standard ML, the authors primary aim is to teach functional programming, so he is happy to add features from other languages, such as list comprehensions and lazy evaluation, when the exposition requires it. The coverage of topics is clear and is supported well by three case studies, two of which are refreshingly nonmathematical in feel: a small graphics package and a “Game of Life” program. Functional languages are often stereotyped as mathematical, so it is good to see examples to the contrary. The author also notes how functional programming techniques can affect programming methodology: printing and processing are completely separate modules in the graphics package, for instance. Despite treating the elementary parts of the subject at a pace accessible to the beginner, the author manages to treat some complex aspects of functional programming, such as a lazy dictionary akin to a Prolog difference list program and general techniques of continuation-based programming. He also gives thorough coverage of program verification. Perhaps one drawback is the relatively late introduction of lists—this means that when higher-order functions and polymorphism are first discussed, many of the natural examples cannot be introduced. Efficiency is also discussed later than it might be, but this delay is partly because any discussion of efficiency must wait until a formal execution model has been described. Sokolowski This book is somewhat eccentric. In the introduction the author states that it is not a handbook, a reference guide, or a beginners guide. In fact, he states, “some prior experience with functional programming would also be an advantage.” It can be read as a second course in functional programming, which examines various aspects of this paradigm critically. The author begins with a long discussion of the relationship between functional and imperative programming, and then examines the type system of Standard ML (and implicitly other languages, including Miranda). He points out a number of drawbacks of the type system as it stands, and gives examples of how it might be extended. Finally, he gives a straightforward introduction to the module system before tersely discussing extended examples from the field of implementation. It would be difficult to recommend this book as a text for a first course, but to someone experienced in functional programming, it provides some interesting insights. Wikstro¨m The book is intended primarily for beginners, and as such succeeds. It contains enough of the general material found in first courses (what is a computer, what is syntax, and so on) that it could be used as the introductory text in most computing programs. It is based solely on Standard ML and omits the languages more complex features, such as exceptions, reference types, and modules. The author takes pains to explain new ideas as he introduces them; his treatment of higher-order functions as things that are “partially applicable” is especially clear. Evaluation is treated formally, through an axiomatic (or structured) operational semantics for the language. This treatment is rigorous and gives the system a sound basis. The only drawback is that the equational aspect of functional programming is treated late, and does not receive the emphasis given in other texts. A larger example appears at the end of the book. This example is well done, with the only disadvantage being its use of the ML IO system, which is neither referentially transparent nor simple to understand. Supplementary material includes an early version of the Standard ML language definition and a glossary of functional programming terms. Comparison For the complete beginner in computing, both Wikstro¨m and Bailey provide gentle introductions to the subject, even if they fail to cover some more advanced material. Bird and Wadler also provide a beginners text, but it is suitable only for those who have a strong mathematical background or at least will be happy with a more formal treatment. (Of course, a lecturer does not have to teach only in the style of the textbook used—a more concrete approach could use Bird and Wadler as an adjunct.) The advantage of Bird and Wadlers book is that they manage to convey some of the distinctive features of functional programming through their approach and examples. Even though Reade and Paulson both require some background in imperative programming, they write in different yet accessible styles, and either would be most suitable for an early course in functional programming. Reade gives slightly broader coverage of functional programming constructs, and Paulson gives slightly broader coverage of the non-functional aspects of ML, but both cover the basic material and their case studies competently. Holyer gives broad coverage of Miranda; the order of presentation is a drawback, but lecturers can decide how to use the book. Sokolowski provides an interesting perspective on functional programming, but only as a second course on the subject.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.