home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / func-lang-faq < prev    next >
Encoding:
Text File  |  1999-07-30  |  56.9 KB  |  1,443 lines

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!howland.erols.net!newsfeed.fast.net!uunet!ffx.uu.net!news1-gui.server.ntli.net!news5-gui.server.ntli.net!ntli.net!server4.netnews.ja.net!server2.netnews.ja.net!sun-cc204.lboro.ac.uk!nott-cs!nott-cs!not-for-mail
  2. From: gmh@cs.nott.ac.uk (Graham M Hutton)
  3. Newsgroups: comp.lang.functional,comp.answers,news.answers
  4. Subject: comp.lang.functional Frequently Asked Questions (monthly posting)
  5. Supersedes: <7lf911$2sb$1@marian.cs.nott.ac.uk>
  6. Followup-To: comp.lang.functional
  7. Date: 30 Jul 1999 08:11:59 -0000
  8. Organization: University of Nottingham, School of Computer Science and IT
  9. Lines: 1423
  10. Approved: news-answers-request@MIT.EDU
  11. Expires: Tue, 31 August 1999 18:00:00 GMT
  12. Message-ID: <7nrmof$hel$1@marian.cs.nott.ac.uk>
  13. NNTP-Posting-Host: marian.cs.nott.ac.uk
  14. Summary: This document is a Frequently Asked Questions list (FAQ) for
  15.          comp.lang.functional, and provides brief answers to a number of
  16.          common questions concerning functional programming languages, and
  17.          some pointers to relevant literature and internet resources.
  18. Xref: senator-bedfellow.mit.edu comp.lang.functional:14685 comp.answers:37098 news.answers:163454
  19.  
  20. Archive-name: func-lang-faq
  21. Url: http://www.cs.nott.ac.uk/Department/Staff/gmh/faq.html
  22. Last-modified: August 1, 1999
  23.  
  24. ----------------------------------------------------------------------------
  25.  
  26.              Frequently Asked Questions for comp.lang.functional
  27.  
  28.              Edited by Graham Hutton, University of Nottingham
  29.  
  30.                          Version of 1st August 1999
  31.  
  32.          0. New this month                  5. Languages
  33.                                                  5.1. ASpecT
  34.          1. This document                        5.2. Caml
  35.                                                  5.3. Clean
  36.          2. General topics                       5.4. Erlang
  37.               2.1. Functional languages          5.5. FP
  38.               2.2. History and motivation        5.6. Gofer
  39.               2.3. Textbooks                     5.7. Haskell
  40.               2.4. Journals and conferences      5.8. Hope
  41.               2.5. Schools and workshops         5.9. Hugs
  42.               2.6. Education                     5.10. Id
  43.                                                  5.11. J
  44.          3. Technical topics                     5.12. Miranda(TM)
  45.               3.1. Purity                        5.13. Mercury
  46.               3.2. Currying                      5.14. ML
  47.               3.3. Monads                        5.15. NESL
  48.               3.4. Parsers                       5.16. OPAL
  49.               3.5. Strictness                    5.17. Oz
  50.               3.6. Performance                   5.18. Pizza
  51.               3.7. Applications                  5.19. Scheme
  52.                                                  5.20. Sisal
  53.          4. Other resources
  54.               4.1. Web pages
  55.               4.2. Research groups
  56.               4.3. Newsgroups
  57.               4.4. Bibliographies
  58.               4.5. Translators
  59.  
  60. ----------------------------------------------------------------------------
  61.  
  62. 0. New this month
  63.  
  64.    * No changes this month.
  65.  
  66. ----------------------------------------------------------------------------
  67.  
  68. 1. This document
  69.  
  70. Comp.lang.functional is an unmoderated usenet newsgroup for the discussion
  71. of all aspects of functional programming languages, including their design,
  72. application, theoretical foundation, and implementation. Articles posted to
  73. this (and other) newsgroups are archived on the web at:
  74.  
  75.      http://www.dejanews.com/.
  76.  
  77. This document is a Frequently Asked Questions list (FAQ) for
  78. comp.lang.functional, and provides brief answers to a number of common
  79. questions concerning functional programming languages, and some pointers to
  80. relevant literature and internet resources. The latest version of this
  81. document is available on the web from:
  82.  
  83.      http://www.cs.nott.ac.uk/Department/Staff/gmh/faq.html.
  84.  
  85. Much of the information in this document has been taken from public sources,
  86. mostly from articles posted to comp.lang.functional. Because of the way that
  87. this document was compiled, a complete list of contributors is not
  88. available. Any opinions expressed in this document are those of the
  89. individual contributors, and may not be representative of views of the
  90. editor, or of others in the functional programming community. Every effort
  91. has been made to ensure that the content of this document is correct and
  92. up-to-date, but no guarantees are given for the accuracy of the information
  93. provided here. Your corrections and contributions are encouraged!
  94.  
  95. The original version of this Frequently Asked Questions list was compiled
  96. and edited by Mark P. Jones. All questions, comments, corrections, and
  97. suggestions regarding this document should be addressed to the current
  98. editor, Graham Hutton (email: gmh@cs.nott.ac.uk.)
  99.  
  100. ----------------------------------------------------------------------------
  101.  
  102. 2. General topics
  103.  
  104. This section gives brief answers to a number of general questions concerning
  105. functional programming languages, and some pointers to relevant literature
  106. and internet resources.
  107.  
  108. ----------------------------------------------------------------------------
  109.  
  110. 2.1. Functional languages
  111.  
  112. What is a "functional programming language"?
  113.  
  114. Opinions differ, even within the functional programming community, on the
  115. precise definition of what constitutes a functional programming language.
  116. However, here is a definition that, broadly speaking, represents the kind of
  117. languages that are discussed in comp.lang.functional:
  118.  
  119.      Functional programming is a style of programming that emphasizes
  120.      the evaluation of expressions, rather than execution of commands.
  121.      The expressions in these language are formed by using functions to
  122.      combine basic values. A functional language is a language that
  123.      supports and encourages programming in a functional style.
  124.  
  125. For example, consider the task of calculating the sum of the integers from 1
  126. to 10. In an imperative language such as C, this might be expressed using a
  127. simple loop, repeatedly updating the values held in an accumulator variable
  128. total and a counter variable i:
  129.  
  130.      total = 0;
  131.      for (i=1; i<=10; ++i)
  132.         total += i;
  133.  
  134. In a functional language, the same program would be expressed without any
  135. variable updates. For example, in Haskell, the result can be calculated by
  136. evaluating the expression:
  137.  
  138.      sum [1..10]
  139.  
  140. Here, [1..10] is an expression that represents the list of integers from 1
  141. to 10, while sum is a function that can be used to calculate the sum of an
  142. arbitrary list of values.
  143.  
  144. The same idea could also be used in (strict) functional languages such as
  145. SML or Scheme, but it is more common to find such programs written with an
  146. explicit loop, often expressed recursively. Nevertheless, there is still no
  147. need to update the values of the variables involved:
  148.  
  149. SML:
  150.  
  151.      let fun sum i tot = if i=0 then tot else sum (i-1) (tot+i)
  152.      in sum 10 0
  153.      end
  154.  
  155. Scheme:
  156.  
  157.      (define sum
  158.         (lambda (from total)
  159.             (if (= 0 from)
  160.                 total
  161.                 (sum (- from 1) (+ total from)))))
  162.      (sum 10 0)
  163.  
  164. It is often possible to write functional-style programs in an imperative
  165. language, and vice versa. It is then a matter of opinion whether a
  166. particular language can be described as functional or not.
  167.  
  168. ----------------------------------------------------------------------------
  169.  
  170. 2.2. History and motivation
  171.  
  172. Where can I find out more about the history and motivation for functional
  173. programming?
  174.  
  175. Here are two useful references:
  176.  
  177.    * "Conception, Evolution, and Application of Functional Programming
  178.      Languages", Paul Hudak, ACM Computing Surveys, Volume 21, Number 3,
  179.      pp.359-411, 1989.
  180.  
  181.    * "Why functional programming matters", John Hughes, The Computer
  182.      Journal, Volume 32, Number 2, April 1989. Available on the web from:
  183.  
  184.           http://www.cs.chalmers.se/~rjmh/Papers/whyfp.html.
  185.  
  186. ----------------------------------------------------------------------------
  187.  
  188. 2.3. Textbooks
  189.  
  190. Are there any textbooks about functional programming?
  191.  
  192. Yes, here are a selection:
  193.  
  194. Programming:
  195.  
  196.    * "Introduction to functional programming using Haskell", 2nd edition,
  197.      Richard Bird, Prentice Hall Europe, 1998. ISBN 0-13-484346-0.
  198.  
  199.    * "Haskell: The craft of functional programming", 2nd edition, Simon
  200.      Thompson, Addison-Wesley, 1999. ISBN 0-201-34275-8. Further information
  201.      is available on the web from:
  202.  
  203.           http://www.cs.ukc.ac.uk/people/staff/sjt/craft2e.
  204.  
  205.    * "ML for the working programmer", 2nd Edition, L.C. Paulson, Cambridge
  206.      University Press, 1996. ISBN 0-521-56543-X. Further information is
  207.      available on the web from:
  208.  
  209.           http://www.cl.cam.ac.uk/users/lcp/MLbook/.
  210.  
  211. Algorithms and data structures:
  212.  
  213.    * "Purely functional data structures", Chris Okasaki, Cambridge
  214.      University Press, 1998. ISBN 0-521-63124-6.
  215.  
  216.    * "Algorithms: A functional programming approach", Fethi Rabhi and Guy
  217.      Lapalme, Addison-Wesley, 1999. ISBN 0-201-59604-0. Further information
  218.      is available on the web from:
  219.  
  220.           http://www.iro.umontreal.ca/~lapalme/Algorithms-functional.html.
  221.  
  222. Implementation:
  223.  
  224.    * "The implementation of functional programming languages", Simon Peyton
  225.      Jones, Prentice Hall, 1987. ISBN 0-13-453333-X.
  226.  
  227.    * "Compiling with continuations", Andrew Appel, Cambridge University
  228.      Press, 1992. ISBN 0-521-41695-7. Further information is available on
  229.      the web from:
  230.  
  231.           http://www.cup.org/Titles/416/0521416957.html.
  232.  
  233. There are several other textbooks available, particularly in the programming
  234. and implementation categories. A comparison of a number of functional
  235. programming textbooks is made in the following article:
  236.  
  237.    * "Comparative review of functional programming textbooks (Bailey, Bird
  238.      and Wadler, Holyer, Paulson, Reade, Sokoloski, Wikstrom)", Simon
  239.      Thompson, Computing Reviews, May 1992 (CR number 9205-0262).
  240.  
  241. ----------------------------------------------------------------------------
  242.  
  243. 2.4. Journals and conferences
  244.  
  245. Are there any journals and conferences about functional programming?
  246.  
  247. Yes, here are a selection:
  248.  
  249. Journals:
  250.  
  251.    * The Journal of Functional Programming (JFP), published by Cambridge
  252.      University Press. Further information is available on the web from:
  253.  
  254.           http://www.dcs.gla.ac.uk/jfp/.
  255.  
  256.    * The Journal of Functional and Logic Programming (JFLP), an electronic
  257.      journal published by MIT Press, and available on the web from:
  258.  
  259.           http://www.cs.tu-berlin.de/journal/jflp/.
  260.  
  261.    * Lisp and Symbolic Computation, published by Kluwer.
  262.  
  263. Conferences:
  264.  
  265.    * The International Conference on Functional Programming (ICFP). This
  266.      conference combines and replaces the earlier conferences on Lisp and
  267.      Functional Programming (LFP), and Functional Programming Languages and
  268.      Computer Architecture (FPCA). Further information about the next ICFP
  269.      conference (September 1999 at the time of writing) is available on the
  270.      web from:
  271.  
  272.           http://pauillac.inria.fr/pli/icfp/.
  273.  
  274.    * Mathematics of Program Construction (MPC). Further information about
  275.      the most recent MPC conference (June 1998 at the time of writing) is
  276.      available on the web from:
  277.  
  278.           http://www.md.chalmers.se/Conf/MPC98/.
  279.  
  280.    * Principles of Programming Languages (POPL). Further information about
  281.      the next POPL conference (January 1999 at the time of writing) is
  282.      available on the web from:
  283.  
  284.           http://www.cs.princeton.edu/~appel/popl99/index.html.
  285.  
  286.    * European Symposium on Programming (ESOP). Further information about the
  287.      next ESOP conference (March 1999 at the time of writing) is available
  288.      on the web from:
  289.  
  290.           http://www.daimi.aau.dk/~hrn/ESOP/esop.html.
  291.  
  292. Most of these conferences have proceedings published by the ACM press, or in
  293. the Springer Verlag LNCS (Lecture Notes in Computer Science) series.
  294.  
  295. In addition to the above, Philip Wadler edits a column on functional
  296. programming for the Formal Aspects of Computer Science Newsletter, which is
  297. published by the British Computing Society Formal Aspects of Computing group
  298. and Formal Methods Europe.
  299.  
  300. ----------------------------------------------------------------------------
  301.  
  302. 2.5. Schools and workshops
  303.  
  304. Are there any schools and workshops on functional programming?
  305.  
  306. Yes, here are a selection:
  307.  
  308. Schools:
  309.  
  310.    * The Third International Summer School on Advanced Functional
  311.      Programming Techniques, September 12-19, 1998, Braga, Portugal. Further
  312.      information is available on the web from:
  313.  
  314.           http://www.di.uminho.pt/~afp.
  315.  
  316.    * Spring School on Advanced Functional Programming Techniques, May 24-31,
  317.      1995, Baastad, Sweden. The proceedings of the school were published in
  318.      the Springer Verlag LNCS (Lecture Notes in Computer Science) series,
  319.      number 925.
  320.  
  321.    * The Second International Summer School on Advanced Functional
  322.      Programming Techniques, August 25-30, 1996, Washington, USA. The
  323.      proceedings of the school were published in the Springer Verlag LNCS
  324.      (Lecture Notes in Computer Science) series, number 1129. Further
  325.      information is available on the web from:
  326.  
  327.           http://www.cse.ogi.edu/PacSoft/summerschool96.html.
  328.  
  329. Workshops:
  330.  
  331.    * Third Haskell Workshop, October 1, 1999, Paris, France. Held in
  332.      conjunction with ICFP'99. Further information is available on the web
  333.      from:
  334.  
  335.           http://www.haskell.org/HaskellWorkshop.html
  336.  
  337.    * Workshop on Algorithmic Aspects of Advanced Programming Languages,
  338.      September 29-30, 1999, Paris, France. Further information is available
  339.      on the web from:
  340.  
  341.           http://www.cs.columbia.edu/~cdo/waaapl.html.
  342.  
  343.    * 1st Scottish Functional Programming Workshop, August 29-September 1,
  344.      1999, Stirling, Scotland. Further information is available on the web
  345.      from:
  346.  
  347.           http://www.cee.hw.ac.uk/~gjm/sfp/.
  348.  
  349.    * From 1988 to 1998 the Glasgow functional programming group organised a
  350.      yearly workshop in Scotland. Further information is available on the
  351.      web from:
  352.  
  353.           http://www.dcs.gla.ac.uk/fp/workshops/.
  354.  
  355.    * The 9th International Workshop on the Implementation of Functional
  356.      Languages, Sept 10-12, 1997, St. Andrews, Scotland. Further information
  357.      is available on the web from:
  358.  
  359.           http://www.dcs.st-and.ac.uk/~ifl97.
  360.  
  361.    * The Haskell Workshop, June 7, 1997, Amsterdam, The Netherlands. Held is
  362.      conjunction with ICFP'97. Further information is available on the web
  363.      from:
  364.  
  365.           http://www.cse.ogi.edu/~jl/ACM/Haskell.html.
  366.  
  367.    * The 2nd Fuji International Workshop on Functional and Logic
  368.      Programming, November 1-4, 1996, Shonan Village, Japan. Further
  369.      information is available on the web from:
  370.  
  371.           http://www.kurims.kyoto-u.ac.jp/~ohori/fuji96.html.
  372.  
  373.    * The 1st Workshop on Functional Programming in Argentina, September 12,
  374.      1996, Buenos Aires, Argentina. Further information is available on the
  375.      web from:
  376.  
  377.           http://www-lifia.info.unlp.edu.ar/~lambda/first/english/.
  378.  
  379. ----------------------------------------------------------------------------
  380.  
  381. 2.6. Education
  382.  
  383. Are functional programming languages useful in education?
  384.  
  385. Functional languages are gathering momentum in education because they
  386. facilitate the expression of concepts and structures at a high level of
  387. abstraction. Many university computing science departments now make use of
  388. functional programming in their undergraduate courses; indeed, a number of
  389. departments teach a functional language as their first programming language.
  390. Further information about the use of functional programming languages in
  391. education (including links to relevant conferences and workshops) is
  392. available on the web from:
  393.  
  394.      http://www.cs.kun.nl/fple/.
  395.  
  396. ----------------------------------------------------------------------------
  397.  
  398. 3. Technical topics
  399.  
  400. This section gives brief answers to a number of technical questions
  401. concerning functional programming languages, and some pointers to relevant
  402. literature and internet resources.
  403.  
  404. ----------------------------------------------------------------------------
  405.  
  406. 3.1. Purity
  407.  
  408. What is a "purely functional" programming language?
  409.  
  410. This question has been the subject of some debate in the functional
  411. programming community. It is widely agreed that languages such as Haskell
  412. and Miranda are "purely functional", while SML and Scheme are not. However,
  413. there are some small differences of opinion about the precise technical
  414. motivation for this distinction. One definition that has been suggested is
  415. as follows:
  416.  
  417.      The term "purely functional" is often used to describe languages
  418.      that perform all their computations via function application. This
  419.      is in contrast to languages, such as Scheme and Standard ML, that
  420.      are predominantly functional but also allow `side effects'
  421.      (computational effects caused by expression evaluation that
  422.      persist after the evaluation is completed).
  423.  
  424.      Sometimes, the term "purely functional" is also used in a broader
  425.      sense to mean languages that might incorporate computational
  426.      effects, but without altering the notion of `function' (as
  427.      evidenced by the fact that the essential properties of functions
  428.      are preserved.) Typically, the evaluation of an expression can
  429.      yield a `task', which is then executed separately to cause
  430.      computational effects. The evaluation and execution phases are
  431.      separated in such a way that the evaluation phase does not
  432.      compromise the standard properties of expressions and functions.
  433.      The input/output mechanisms of Haskell, for example, are of this
  434.      kind.
  435.  
  436. See also:
  437.  
  438.    * "What is a purely functional language", Amr Sabry, Journal of
  439.      Functional Programming, 8(1):1-22, Cambridge University Press, January
  440.      1998.
  441.  
  442. ----------------------------------------------------------------------------
  443.  
  444. 3.2. Currying
  445.  
  446. What is "currying", and where does it come from?
  447.  
  448. Currying has its origins in the mathematical study of functions. It was
  449. observed by Frege in 1893 that it suffices to restrict attention to
  450. functions of a single argument. For example, for any two parameter function
  451. f(x,y), there is a one parameter function f' such that f'(x) is a function
  452. that can be applied to y to give (f'(x))(y) = f (x,y). This corresponds to
  453. the well known fact that the sets (AxB -> C) and (A -> (B -> C)) are
  454. isomorphic, where "x" is cartesian product and "->" is function space. In
  455. functional programming, function application is denoted by juxtaposition,
  456. and assumed to associate to the left, so that the equation above becomes f'
  457. x y = f(x,y).
  458.  
  459. Apparently, Frege did not pursue the idea further. It was rediscovered
  460. independently by Schoenfinkel, together with the result that all functions
  461. having to do with the structure of functions can be built up out of only two
  462. basic combinators, K and S. About a decade later, this sparked off the
  463. subject of combinatory logic, invented by Haskell Curry. The term "currying"
  464. honours him; the function f' in the example above is called the "curried"
  465. form of the function f. From a functional programming perspective, currying
  466. can be described by a function:
  467.  
  468.      curry : ((a,b) -> c) -> (a -> b -> c)
  469.  
  470. The inverse operation is, unsurprisingly, refered to as uncurrying:
  471.  
  472.      uncurry : (a -> b -> c) -> ((a,b) -> c)
  473.  
  474. For further reading, see:
  475.  
  476.    * "Highlights of the history of the lambda-calculus", J. Barkley Rosser,
  477.      ACM Lisp and Functional Programming, 1982.
  478.  
  479.    * "Ueber die Bausteine der mathematischen Logik", Moses Sch\"onfinkel,
  480.      Mathematische Annalen, 92, 1924. An English translation, "On the
  481.      building blocks of mathematical logic", appears in "From Frege to
  482.      G\"odel", Jean van Heijenoort, Harvard University Press, Cambridge,
  483.      1967.
  484.  
  485.    * "Combinatory logic", Haskell B. Curry and Robert Feys, North-Holland,
  486.      1958. This work also contains many references to earlier work by Curry,
  487.      Church, and others.
  488.  
  489. ----------------------------------------------------------------------------
  490.  
  491. 3.3. Monads
  492.  
  493. What is a "monad", and what are they used for?
  494.  
  495. The concept of a monad comes from category theory; full details can be found
  496. in any standard textbook on the subject. Much of the interest in monads in
  497. functional programming is the result of recent papers that show how monads
  498. can be used to describe all kinds of different programming language features
  499. (for example, I/O, manipulation of state, continuations and exceptions) in
  500. purely functional languages such as Haskell:
  501.  
  502.    * "Comprehending monads", Philip Wadler, Mathematical Structures in
  503.      Computer Science, Special issue of selected papers from 6th Conference
  504.      on Lisp and Functional Programming, 1992. Available on the web from:
  505.  
  506.           http://www.cs.bell-labs.com/~wadler/topics/monads.html#monads
  507.  
  508.    * "The essence of functional programming", Philip Wadler, Invited talk,
  509.      19th Symposium on Principles of Programming Languages, ACM Press,
  510.      Albuquerque, January 1992. Available on the web from:
  511.  
  512.           http://www.cs.bell-labs.com/~wadler/topics/monads.html#essence
  513.  
  514.    * "Imperative functional programming", Simon Peyton Jones and Philip
  515.      Wadler, 20th Symposium on Principles of Programming Languages, ACM
  516.      Press, Charlotte, North Carolina, January 1993. Available on the web
  517.      from:
  518.  
  519.           http://www.cs.bell-labs.com/~wadler/topics/monads.html#imperative
  520.  
  521.    * "How to declare an imperative", Philip Wadler, ACM Computing Surveys,
  522.      to appear. Available on the web from:
  523.  
  524.           http://www.cs.bell-labs.com/~wadler/topics/monads.html#monadsdeclare
  525.  
  526. ----------------------------------------------------------------------------
  527.  
  528. 3.4. Parsers
  529.  
  530. How can I write a "parser" in a functional programming language?
  531.  
  532. A parser is a program that converts a list of input tokens, usually
  533. characters, into a value of the appropriate type. A simple example might be
  534. a function to find the integer value represented by a string of digits. A
  535. more complex example might be to translate programs written in a particular
  536. concrete syntax into a suitable abstract syntax as the first stage in the
  537. implementation of a compiler or interpreter. There are two common ways to
  538. write a parser in a functional language:
  539.  
  540.    * Using a parser generator tool. Some functional language implementations
  541.      support tools that generate a parser automatically from a specification
  542.      of the grammar. See:
  543.  
  544.         o Happy: a parser generator system for Haskell and Gofer, similar to
  545.           the tool `yacc' for C. Available on the web from:
  546.  
  547.                http://www.dcs.gla.ac.uk/fp/software/happy/.
  548.  
  549.         o Ratatosk: a parser and scanner generator for Gofer. Available by
  550.           ftp from:
  551.  
  552.                 Host:      ftp.diku.dk;
  553.                 Directory: /pub/diku/dists.
  554.  
  555.         o ML-Yacc and ML-Lex: an LALR parser generator and a lexical
  556.           analyser generator for Standard ML. Included with SML/NJ,
  557.           available by ftp from:
  558.  
  559.                 Host:      ftp.research.bell-labs.com;
  560.                 Directory: /dist/smlnj.
  561.  
  562.    * Using combinator parsing. Parsers are represented by functions and
  563.      combined with a small set of combinators, leading to parsers that
  564.      closely resemble the grammar of the language being read. Parsers
  565.      written in this way can use backtracking. See:
  566.  
  567.         o "How to replace failure with a list of successes", Philip Wadler,
  568.           FPCA '85, Springer Verlag LNCS 201, 1985.
  569.  
  570.         o "Higher-order functions for parsing", Graham Hutton, Journal of
  571.           Functional Programming, Volume 2, Number 3, July 1992. Available
  572.           on the web from:
  573.  
  574.                http://www.cs.nott.ac.uk/Department/Staff/gmh/bib.html#parsing.
  575.  
  576. ----------------------------------------------------------------------------
  577.  
  578. 3.5. Strictness
  579.  
  580. What does it mean to say that a functional programming language is "strict"
  581. or "non-strict"?
  582.  
  583. Here's one (operational) way to explain the difference:
  584.  
  585.    * In a strict language, the arguments to a function are always evaluated
  586.      before it is invoked. As a result, if the evaluation of an expression
  587.      exp does not terminate properly (for example, because it generates a
  588.      run-time error or enters an infinite loop), then neither will an
  589.      expression of the form f(exp). ML and Scheme are both examples of this.
  590.  
  591.    * In a non-strict language, the arguments to a function are not evaluated
  592.      until their values are actually required. For example, evaluating an
  593.      expression of the form f(exp) may still terminate properly, even if
  594.      evaluation of exp would not, if the value of the parameter is not used
  595.      in the body of f. Miranda and Haskell are examples of this approach.
  596.  
  597. There is much debate in the functional programming community about the
  598. relative merits of strict and non-strict languages. It is possible, however,
  599. to support a mixture of these two approaches; for example, some versions of
  600. the functional language Hope do this.
  601.  
  602. ----------------------------------------------------------------------------
  603.  
  604. 3.6. Performance
  605.  
  606. What is the performance of functional programs like?
  607.  
  608. In some circles, programs written in functional languages have obtained a
  609. reputation for lack of performance. Part of this results from the high-level
  610. of abstraction that is common in such programs and from powerful features
  611. such as higher-order functions, automatic storage management, etc. Of
  612. course, the performance of interpreters and compilers for functional
  613. languages keeps improving with new technological developments.
  614.  
  615. Here are a selection of references for further reading:
  616.  
  617.    * Over 25 implementations of different functional languages have been
  618.      compared using a single program, the "Pseudoknot" benchmark, which is a
  619.      floating-point intensive application taken from molecular biology. See:
  620.  
  621.         o "Benchmarking implementations of functional languages with
  622.           'Pseudoknot', a float-intensive benchmark", Pieter H. Hartel et
  623.           al, Journal of Functional Programming, 6(4):621-655, July 1996.
  624.           Available on the web from:
  625.  
  626.                ftp://ftp.fwi.uva.nl/pub/computer-systems/functional/reports/.
  627.  
  628.    * The paper below compares five implementations of lazy functional
  629.      languages:
  630.  
  631.         o "Benchmarking implementations of lazy functional languages", P.H.
  632.           Hartel and K.G. Langendoen, FPCA 93, ACM, pp 341-349. Available by
  633.           ftp from:
  634.  
  635.                 Host:      ftp.fwi.uva.nl;
  636.                 Directory: pub/functional/reports.
  637.  
  638.    * Experiments with a heavily optimising compiler for Sisal, a strict
  639.      functional language, show that functional programs can be faster than
  640.      Fortran. See:
  641.  
  642.         o "Retire FORTRAN? A debate rekindled", D.C. Cann, Communications of
  643.           the ACM, 35(8), pp. 81-89, August 1992.
  644.  
  645.    * Postscript versions of a number of papers from the 1995 conference on
  646.      High Performance Functional Computing (HPFC) are available on the web
  647.      from:
  648.  
  649.           ftp://sisal.llnl.gov/pub/hpfc/index.html.
  650.  
  651. ----------------------------------------------------------------------------
  652.  
  653. 3.7. Applications
  654.  
  655. Where can I find out about applications of functional programming?
  656.  
  657. Here are a selection of places to look:
  658.  
  659.    * "Special issue on state-of-the-art applications of pure functional
  660.      programming languages", edited by Pieter Hartel and Rinus Plasmeijer,
  661.      Journal of Functional Programming, Volume 5, Number 3, July 1995.
  662.  
  663.    * "Applications of functional programming", edited by Colin Runciman and
  664.      David Wakeling, UCL Press, 1995. ISBN 1-85728-377-5.
  665.  
  666.    * An online list of real-world applications of functional programming is
  667.      maintained, which includes programs written in several different
  668.      functional languages. The main criterion for being considered a
  669.      real-world application is that the program was written primarily to
  670.      perform some task, rather than to experiment with functional
  671.      programming.
  672.  
  673.      Further details are available on the web from:
  674.  
  675.           http://www.cs.bell-labs.com/~wadler/realworld/.
  676.  
  677. ----------------------------------------------------------------------------
  678.  
  679. 4. Other resources
  680.  
  681. This section gives some pointers to other internet resources on functional
  682. programming.
  683.  
  684. ----------------------------------------------------------------------------
  685.  
  686. 4.1. Web pages
  687.  
  688.    * Philip Wadler's guide to functional programming on the web:
  689.  
  690.           http://cm.bell-labs.com/cm/cs/who/wadler/guide.html.
  691.  
  692.    * Philip Wadler's list of real-world application of functional
  693.      programming:
  694.  
  695.           http://www.cs.bell-labs.com/~wadler/realworld/.
  696.  
  697.    * The SEL-HPC WWW functional programming archive:
  698.  
  699.           http://hypatia.dcs.qmw.ac.uk/SEL-HPC/Articles/FuncArchive.html.
  700.  
  701.    * Jon Mountjoy's functional languages page:
  702.  
  703.           http://carol.wins.uva.nl/~jon/func.html.
  704.  
  705.    * Claus Reinke's functional programming bookmarks:
  706.  
  707.           http://www.cs.nott.ac.uk/~czr/FP.html.
  708.  
  709. ----------------------------------------------------------------------------
  710.  
  711. 4.2. Research groups
  712.  
  713.    * The Chalmers functional programming group:
  714.  
  715.           http://www.md.chalmers.se/Cs/Research/Functional/.
  716.  
  717.    * The Glasgow functional programming group:
  718.  
  719.           http://www.dcs.gla.ac.uk/fp.
  720.  
  721.    * The Nijmegen functional programming group:
  722.  
  723.           http://www.cs.kun.nl/~clean.
  724.  
  725.    * The Nottingham languages and programming group:
  726.  
  727.           http://www.cs.nott.ac.uk/Research/lap/index.html.
  728.  
  729.    * The St Andrews functional programming group:
  730.  
  731.           http://www-fp.dcs.st-and.ac.uk/.
  732.  
  733.    * The Yale functional programming group:
  734.  
  735.           http://www.cs.yale.edu/HTML/YALE/CS/haskell/yale-fp.html.
  736.  
  737.    * The York functional programming group:
  738.  
  739.           http://www.cs.york.ac.uk/fp/.
  740.  
  741. ----------------------------------------------------------------------------
  742.  
  743. 4.3. Newsgroups
  744.  
  745.    * For discussion about ML:
  746.  
  747.           comp.lang.ml.
  748.  
  749.    * For discussion about Scheme:
  750.  
  751.           comp.lang.scheme.
  752.  
  753.    * For discussion about Lisp:
  754.  
  755.           comp.lang.lisp.
  756.  
  757.    * For discussion about APL, J, etc:
  758.  
  759.           comp.lang.apl.
  760.  
  761. ----------------------------------------------------------------------------
  762.  
  763. 4.4. Bibliographies
  764.  
  765.    * Mike Joy's bibliography on functional programming languages, in
  766.      refer(1) format:
  767.  
  768.            Host:      ftp.dcs.warwick.ac.uk;
  769.            Directory: /pub/biblio.
  770.  
  771.    * Tony Davie's bibliography of over 2,600 papers, articles and books on
  772.      functional programming, available as a text file or a hypercard stack
  773.      by ftp from:
  774.  
  775.            Host:      tamdhu.dcs.st-and.ac.uk;
  776.            Directory: /pub/staple.
  777.  
  778.    * "State in functional programming: an annotated bibliography", edited by
  779.      P. Hudak and D. Rabin, available as a dvi or postscript file by ftp
  780.      from:
  781.  
  782.            Host:      nebula.cs.yale.edu;
  783.            Directory: /pub/yale-fp/papers.
  784.  
  785.    * Wolfgang Schreiner's annotated bibliography of over 350 publications on
  786.      parallel functional programming (most with abstracts), available on the
  787.      web from:
  788.  
  789.           http://www.risc.uni-linz.ac.at/people/schreine/papers/pfpbib.ps.gz.
  790.  
  791. ----------------------------------------------------------------------------
  792.  
  793. 4.5. Translators
  794.  
  795.    * The smugweb system for typesetting Haskell code in TeX, available from:
  796.  
  797.           http://www5.informatik.uni-jena.de/~joe/smugweb.html.
  798.  
  799.    * The miratex package for typesetting Miranda(TM) code in TeX, available
  800.      from:
  801.  
  802.           http://www.cs.tcd.ie/www/jgllgher/miratex/index.html.
  803.  
  804.    * Denis Howe's translators from Miranda(TM) to LML and Haskell, available
  805.      from:
  806.  
  807.           http://wombat.doc.ic.ac.uk/pub/mira2lml;
  808.  
  809.           http://wombat.doc.ic.ac.uk/pub/mira2hs.
  810.  
  811. ----------------------------------------------------------------------------
  812.  
  813. 5. Languages
  814.  
  815. This section gives a brief overview of a number of programming languages
  816. that support aspects of the functional paradigm, and some pointers to
  817. relevant literature and internet resources. The table below classifies the
  818. languages into strict/non-strict and sequential/concurrent, and may be
  819. useful when searching for suitable languages for particular applications.
  820. Some of the languages have multiple versions with different classifications
  821. (see the language overviews for further details), but for simplicity only
  822. the most common version of each language is considered in the table.
  823.  
  824.                   Sequential:  Concurrent:
  825.       Strict:     ASpecT       Erlang
  826.                   Caml         NESL
  827.                   FP           Oz
  828.                   J            Pizza
  829.                   Mercury      Sisal
  830.                   ML
  831.                   OPAL
  832.                   Scheme
  833.       Non-strict: Gofer        Clean
  834.                   Haskell      Id
  835.                   Hope
  836.                   Hugs
  837.                   Miranda
  838.  
  839. ----------------------------------------------------------------------------
  840.  
  841. 5.1. ASpecT
  842.  
  843. ASpecT is a strict functional language, developed at the University of
  844. Bremen, originally intended as an attempt to provide an implementation for
  845. (a subset of) Algebraic Specifications of Abstract Datatypes. The system was
  846. designed to be as user-friendly as possible, including overloading
  847. facilities and a source-level debugger. For reasons of efficiency, the
  848. system uses call-by-value evaluation and reference counting memory
  849. management.
  850.  
  851. Over the years more and more features have been added, including subsorting,
  852. functionals, and restricted polymorphism. The ASpecT compiler translates the
  853. functional source code to C, resulting in fast and efficient binaries.
  854. ASpecT has been ported to many different platforms, including Sun3, Sun4,
  855. Dec VAX, IBM RS6000, NeXT, Apple A/UX, PC (OS/2, Linux), Amiga and Atari
  856. ST/TT. The ASpecT compiler is available by ftp from:
  857.  
  858.       Host:      ftp.Uni-Bremen.DE;
  859.       Directory: /pub/programming/languages/ASpecT.
  860.  
  861. The most important application of ASpecT to date is the interactive graph
  862. visualization system daVinci; currently (September '96), version 2.0.x is
  863. composed of 34.000 lines of ASpecT code, 12.000 lines of C code and 8000
  864. lines of Tcl/Tk code. daVinci is an X11 program, and is available for UNIX
  865. workstations from Sun, HP, IBM, DEC, SGI, and for Intel PCs with a UNIX
  866. operating system. Further information about daVinci is available on the web
  867. from:
  868.  
  869.      http://www.Informatik.Uni-Bremen.DE/~davinci.
  870.  
  871. ----------------------------------------------------------------------------
  872.  
  873. 5.2. Caml
  874.  
  875. Caml is a dialect of the ML language developed at INRIA that does not comply
  876. to the Standard, but actually tries to go beyond the Standard, in particular
  877. in the areas of separate compilation, modules, and objects. Two
  878. implementations of Caml are available:
  879.  
  880.    * The older implementation, Caml Light, is distinguished by its small
  881.      size, modest memory requirements, availability on microcomputers,
  882.      simple separate compilation, interface with C, and portable graphics
  883.      functions. It runs on most Unix machines, on the Macintosh and on PCs
  884.      under Ms Windows and MSDOS. The current version at the time of writing
  885.      is 0.71.
  886.  
  887.    * A more ambitious implementation, Objective Caml (formerly known as Caml
  888.      Special Light), is also available. It adds the following extensions to
  889.      Caml Light:
  890.  
  891.         o Full support for objects and classes, here combined for the first
  892.           time with ML-style type reconstruction;
  893.  
  894.         o A powerful module calculus in the style of Standard ML, but
  895.           providing better support for separate compilation;
  896.  
  897.         o A high-performance native code compiler, in addition to a Caml
  898.           Light-style bytecode compiler.
  899.  
  900.      Objective Caml is available for Unix and Windows 95/NT, with the
  901.      native-code compiler supporting the following processors: Alpha, Sparc,
  902.      Pentium, Mips, Power, HPPA.
  903.  
  904. Both implementations of Caml are available by ftp from:
  905.  
  906.       Host:      ftp.inria.fr;
  907.       Directory: /lang/caml-light.
  908.  
  909. Further information about Caml is available on the web from:
  910.  
  911.      http://pauillac.inria.fr/caml/index-eng.html (English);
  912.  
  913.      http://pauillac.inria.fr/caml/index-fra.html (French).
  914.  
  915. ----------------------------------------------------------------------------
  916.  
  917. 5.3. Clean
  918.  
  919. The Concurrent Clean system is a programming environment for the functional
  920. language Concurrent Clean, developed at the University of Nijmegen in The
  921. Netherlands. The system is one of the fastest implementations of functional
  922. languages available at the time of writing. Through the use of uniqueness
  923. typing, it is possible to write purely functional interactive programs,
  924. including windows, menus, dialogs, etc. It is also possible to develop
  925. real-life applications that interface with non-functional systems. With
  926. version 1.0, the language emerged from an intermediate language to a proper
  927. programming language. Features provided by the language include:
  928.  
  929.    * Lazy evaluation;
  930.    * Modern input/output;
  931.    * Annotations for parallelism;
  932.    * Automatic strictness analysis;
  933.    * Annotations for evaluation order;
  934.    * Inferred polymorphic uniqueness types;
  935.    * Records, mutable arrays, module structure;
  936.    * Existential types, type classes, constructor classes;
  937.    * Strong typing, based on the Milner/Mycroft scheme.
  938.  
  939. Concurrent Clean is available for Machintoshs (Motorola, PowerPC), PCs (OS2,
  940. Linux), and Sun4s (Solaris, SunOS). The system is available by ftp from:
  941.  
  942.       Host:      ftp.cs.kun.nl;
  943.       Directory: /pub/Clean.
  944.  
  945. Further information about Concurrent Clean is available on the web from:
  946.  
  947.      http://www.cs.kun.nl/~clean.
  948.  
  949. A book describing the background and implementation of Concurrent Clean is
  950. also available:
  951.  
  952.    * "Functional programming and parallel graph rewriting", Rinus Plasmeijer
  953.      and Marko van Eekelen, Addison Wesley, International Computer Science
  954.      Series. ISBN 0-201-41663-8
  955.  
  956. ----------------------------------------------------------------------------
  957.  
  958. 5.4. Erlang
  959.  
  960. Erlang is a dynamically typed concurrent functional programming language for
  961. large industrial real-time systems. Features of Erlang include:
  962.  
  963.    * Modules;
  964.    * Recursion equations;
  965.    * Explicit concurrency;
  966.    * Pattern matching syntax;
  967.    * Dynamic code replacement;
  968.    * Foreign language interface;
  969.    * Real-time garbage collection;
  970.    * Asynchronous message passing;
  971.    * Relative freedom from side effects;
  972.    * Transparent cross-platform distribution;
  973.    * Primitives for detecting run-time errors.
  974.  
  975. Erlang is freely available on the web from:
  976.  
  977.      http://www.erlang.org.
  978.  
  979. Erlang is distributed together with full source code for a number of
  980. applications, including:
  981.  
  982.    * Inets - HTTP 1.0 server and FTP client;
  983.    * Orber - CORBA v2.0 Object Request Broker (ORB);
  984.    * ASN.1 - compile-time and runtime package for ASN.1;
  985.    * SNMP - extensible SNMP v1/v2 agent and MIB compiler;
  986.    * Mnesia - distributed real-time database for Erlang;
  987.    * Mnemosyne - optional query language for Mnesia.
  988.  
  989. See also:
  990.  
  991.    * "Concurrent programming in Erlang" (second edition), J. Armstrong, M.
  992.      Williams, R. Virding, and Claes WikstrĂ·m, Prentice Hall, 1996. ISBN
  993.      0-13-508301-X.
  994.  
  995. ----------------------------------------------------------------------------
  996.  
  997. 5.5. FP
  998.  
  999. FP is a side-effect free, combinator style language, described in:
  1000.  
  1001.    * "Can programming be liberated from the von Neumann style?", John
  1002.      Backus, Communications of the ACM, 21, 8, pp.613-641, 1978.
  1003.  
  1004. A interpreter and a compiler (to C) for FP are available by ftp from:
  1005.  
  1006.       Host:      gatekeeper.dec.com;
  1007.       Directory: pub/usenet/comp.sources.unix/volume13/funcproglang;
  1008.       Directory: pub/usenet/comp.sources.unix/volume20/fpc.
  1009.  
  1010. The Illinois FP system supports a modified version of FP that has a more
  1011. Algol-like syntax and structure, and is described in the following article:
  1012.  
  1013.    * "The Illinois functional programming interpreter", Arch D. Robison,
  1014.      Proceedings of the SIGPLAN '87 Symposium on Interpreters and
  1015.      Interpretive Techniques, SIGPLAN notices, Volume 22, Number 7, July
  1016.      1987.
  1017.  
  1018. ----------------------------------------------------------------------------
  1019.  
  1020. 5.6. Gofer
  1021.  
  1022. The Gofer system provides an interpreter for a small language based closely
  1023. on the current version of the Haskell report. In particular, Gofer supports
  1024. lazy evaluation, higher-order functions, polymorphic typing,
  1025. pattern-matching, support for overloading, etc.
  1026.  
  1027. The most recent version of Gofer, 2.30a, is available by ftp from:
  1028.  
  1029.       Host:      ftp.cs.nott.ac.uk;
  1030.       Directory: /nott-fp/languages/gofer.
  1031.  
  1032. Gofer runs on a wide range of machines including PCs, Ataris, Amigas, etc.
  1033. as well as larger Unix-based systems. A version for the Apple Macintosh is
  1034. also available, by ftp from:
  1035.  
  1036.       Host:      ftp.dcs.glasgow.ac.uk;
  1037.       Directory: /pub/haskell/gofer/macgofer.
  1038.  
  1039. Please note the spelling of Gofer, derived from the notion that functional
  1040. languages are GO(od) F(or) E(quational) R(easoning). This is not to be
  1041. confused with `Gopher', the widely used internet distributed information
  1042. delivery system.
  1043.  
  1044. ----------------------------------------------------------------------------
  1045.  
  1046. 5.7. Haskell
  1047.  
  1048. In the mid-1980s, there was no "standard" non-strict, purely-functional
  1049. programming language. A language-design committee was set up in 1987, and
  1050. the Haskell language is the result. At the time of writing, version 1.4 is
  1051. the latest version of the language. Further information about Haskell,
  1052. including the latest version of the Haskell report, is available on the web
  1053. from:
  1054.  
  1055.      http://www.haskell.org/;
  1056.  
  1057.      http://www-i2.informatik.rwth-aachen.de/Forschung/FP/Haskell/.
  1058.  
  1059. At the time of writing, there are three different Haskell systems available,
  1060. developed by groups at Chalmers, Glasgow and Yale. These systems are
  1061. available by ftp from the following sites:
  1062.  
  1063.       Host:      ftp.cs.chalmers.se;
  1064.       Directory: /pub/haskell.
  1065.  
  1066.       Host:      ftp.dcs.glasgow.ac.uk;
  1067.       Directory: /pub/haskell.
  1068.  
  1069.       Host:      haskell.cs.yale.edu;
  1070.       Directory: /pub/haskell.
  1071.  
  1072.       Host:      ftp.cs.nott.ac.uk;
  1073.       Directory: /haskell.
  1074.  
  1075.       Host:      src.doc.ic.ac.uk;
  1076.       Directory: /pub/computing/programming/languages/haskell.
  1077.  
  1078. You can join the Haskell mailing list by emailing majordomo@dcs.gla.ac.uk,
  1079. with a message body of the form: subscribe haskell Forename Surname
  1080. <email@address>.
  1081.  
  1082. ----------------------------------------------------------------------------
  1083.  
  1084. 5.8. Hope
  1085.  
  1086. Hope is a small polymorphically-typed functional language, and was the first
  1087. language to use call-by-pattern. Hope was originally strict, but there are
  1088. versions with lazy lists, or with lazy constructors but strict functions.
  1089. Further information is available on the web from:
  1090.  
  1091.      http://www.unl.ac.uk/~rpaterson/Hope/.
  1092.  
  1093. ----------------------------------------------------------------------------
  1094.  
  1095. 5.9. Hugs
  1096.  
  1097. Hugs, the Haskell User's Gofer System, is an interpreted implementation of
  1098. Haskell with an interactive development environment much like that of Gofer.
  1099. At the time of writing, the latest release of Hugs is largely conformant
  1100. with Haskell 1.4, including monad and record syntax, newtypes, strictness
  1101. annotations, and modules. In addition, it comes packaged with the libraries
  1102. defined in the most recent version of the Haskell library report.
  1103.  
  1104. Further information about Hugs is available on the web from:
  1105.  
  1106.      http://www.cs.nott.ac.uk/Department/Staff/mpj/hugs.html
  1107.  
  1108. or by ftp from:
  1109.  
  1110.       Host:      ftp.cs.nott.ac.uk;
  1111.       Directory: /haskell/hugs.
  1112.  
  1113. ----------------------------------------------------------------------------
  1114.  
  1115. 5.10. Id
  1116.  
  1117. Id is a dataflow programming language, whose core is a non-strict functional
  1118. language with implicit parallelism. It has the usual features of many modern
  1119. functional programming languages, including a Hindley/Milner type inference
  1120. system, algebraic types and definitions with clauses and pattern matching,
  1121. and list comprehensions.
  1122.  
  1123. ----------------------------------------------------------------------------
  1124.  
  1125. 5.11. J
  1126.  
  1127. J was designed and developed by Ken Iverson and Roger Hui. It is similar to
  1128. the language APL, departing from APL in using using the ASCII alphabet
  1129. exclusively, but employing a spelling scheme that retains the advantages of
  1130. the special alphabet required by APL. It has added features and control
  1131. structures that extend its power beyond standard APL. Although it can be
  1132. used as a conventional procedural programming language, it can also be used
  1133. as a pure functional programming language. Further information about J is
  1134. available on the web from:
  1135.  
  1136.      http://www.jsoftware.com.
  1137.  
  1138. ----------------------------------------------------------------------------
  1139.  
  1140. 5.12. Miranda(TM)
  1141.  
  1142. Miranda was designed in 1985-6 by David Turner with the aim of providing a
  1143. standard non-strict purely functional language, and is described in the
  1144. following articles:
  1145.  
  1146.    * "Miranda: a non-strict functional language with polymorphic types",
  1147.      D.A. Turner, Proceedings FPLCA, Nancy, France, September 1985 (Springer
  1148.      LNCS vol 201, pp 1-16).
  1149.  
  1150.    * "An overview of Miranda", D.A. Turner, SIGPLAN Notices, vol 21, no 12,
  1151.      pp 158-166, December 1986.
  1152.  
  1153. Miranda was the first widely disseminated language with non-strict semantics
  1154. and polymorphic strong typing, and is running at over 600 sites, including
  1155. 250 universities. It is widely used for teaching, often in conjunction with
  1156. "Introduction to Functional Programming", by Bird and Wadler, which uses a
  1157. notation closely based on Miranda. It has also had a strong influence on the
  1158. subsequent development of the field, and provided one of the main inputs for
  1159. the design of Haskell.
  1160.  
  1161. The Miranda system is a commercial product of Research Software Limited.
  1162. Miranda release two (the current version at the time of writing) supports
  1163. unbounded precision integers and has a module system with provision for
  1164. parameterized modules and a built in "make" facility. The compiler works in
  1165. conjunction with a screen editor and programs are automatically recompiled
  1166. after edits. There is also an online reference manual.
  1167.  
  1168. Further information about Miranda is available by email from:
  1169.  
  1170.      mira-request@ukc.ac.uk
  1171.  
  1172. or by post from:
  1173.  
  1174.      Research Software Ltd, 23 St Augustines Road, Canterbury CT1 1XP,
  1175.      ENGLAND. Phone: (+44) 227 471844, fax: (+44) 227 454458.
  1176.  
  1177. Miranda was awarded a medal for technical achievement by the British
  1178. Computer Society (BCS Awards, 1990). Note that the word "Miranda" is a
  1179. trademark (TM) of Research Software Limited. There are no public domain
  1180. versions of Miranda.
  1181.  
  1182. ----------------------------------------------------------------------------
  1183.  
  1184. 5.13. Mercury
  1185.  
  1186. Mercury is a logic/functional programming language, which combines the
  1187. clarity and expressiveness of declarative programming with advanced static
  1188. analysis and error detection facilities. It has a strong type system, a
  1189. module system (allowing separate compilation), a mode system, algebraic data
  1190. types, parametric polymorphism, support for higher-order programming, and a
  1191. determinism system --- all of which are aimed at both reducing programming
  1192. errors and providing useful information for programmers and compilers.
  1193.  
  1194. The Mercury compiler is written in Mercury itself, and compiles to C. The
  1195. compiler is available for a variety of platforms running Unix and Microsoft
  1196. operating systems.
  1197.  
  1198. Further information about Mercury is available on the web from:
  1199.  
  1200.      http://www.cs.mu.oz.au/mercury.
  1201.  
  1202. ----------------------------------------------------------------------------
  1203.  
  1204. 5.14. ML
  1205.  
  1206. ML stands for meta-language, and is a family of advanced programming
  1207. languages with (usually) functional control structures, strict semantics, a
  1208. strict polymorphic type system, and parameterized modules. It includes
  1209. Standard ML, Lazy ML, CAML, CAML Light, and various research languages.
  1210. Implementations are available on many platforms, including PCs, mainframes,
  1211. most models of workstation, multi-processors and supercomputers. ML has many
  1212. thousands of users, and is taught to undergraduates at many universities.
  1213.  
  1214. There is a moderated usenet newsgroup, comp.lang.ml, for discussion of
  1215. topics related to ML. A list of frequently asked questions for this
  1216. newsgroup (which includes pointers to many of the different implementations
  1217. and variants of ML) is available by ftp from:
  1218.  
  1219.       Host:      pop.cs.cmu.edu;
  1220.       Directory: /usr/rowan/sml-archive/.
  1221.  
  1222. The Standard ML language is formally defined by:
  1223.  
  1224.    * "The Definition of Standard ML - Revised", Robin Milner, Mads Tofte,
  1225.      Robert Harper, and David MacQueen, MIT, 1997. ISBN 0-262-63181-4.
  1226.  
  1227.      Further information is available on the web from:
  1228.  
  1229.           http://mitpress.mit.edu/promotions/books/MILDPRF97.
  1230.  
  1231.    * "Commentary on Standard ML", Robin Milner and Mads Tofte, MIT, 1990.
  1232.      ISBN 0-262-63137-7. Further information is available on the web from:
  1233.  
  1234.           http://mitpress.mit.edu/promotions/books/MILCPF90.
  1235.  
  1236. There is now a revised version of Standard ML, sometimes referred to as
  1237. "Standard ML '97" to distinguish it from the original 1990 version. The new
  1238. version combines modest changes in the language with a major revision and
  1239. expansion of the SML Basis Library. Further details about Standard ML '97
  1240. are available on the web from:
  1241.  
  1242.      http://cm.bell-labs.com/cm/cs/what/smlnj/sml97.html.
  1243.  
  1244. ----------------------------------------------------------------------------
  1245.  
  1246. 5.15. NESL
  1247.  
  1248. NESL is a fine-grained, functional, nested data-parallel language, loosly
  1249. based on ML. It includes a built-in parallel data-type, sequences, and
  1250. parallel operations on sequences (the element type of a sequence can be any
  1251. type, not just scalars). It is based on eager evaluation, and supports
  1252. polymorphism, type inference and a limited use of higher-order functions.
  1253. Currently, it does not have support for modules and its datatype definition
  1254. is limited. Except for I/O and some system utilities it is purely functional
  1255. (it does not support reference cells or call/cc).
  1256.  
  1257. The NESL compiler is based on delayed compilation and compiles separate code
  1258. for each type a function is used with (compiled code is monomorphic). The
  1259. implementation therefore requires no type bits, and can do some important
  1260. data-layout optimizations (for example, double-precision floats do not need
  1261. to be boxed, and nested sequences can be laid out efficiently across
  1262. multiple processors.) For several small benchmark applications on irregular
  1263. and/or dynamic data (for example, graphs and sparse matrices) it generates
  1264. code comparable in efficiency to machine-specific low-level code (for
  1265. example, Fortran or C.)
  1266.  
  1267. The current implementation of NESL runs on workstations, the Connection
  1268. Machines CM2 and CM5, the Cray Y-MP and the MasPar MP2.
  1269.  
  1270. Further information about NESL is available on the web from:
  1271.  
  1272.      http://www.cs.cmu.edu/afs/cs.cmu.edu/project/scandal/public/www/nesl.html
  1273.  
  1274. or by ftp from:
  1275.  
  1276.       Host:      nesl.scandal.cs.cmu.edu;
  1277.       Directory: nesl.
  1278.  
  1279. You can join to the NESL mailing list by emailing nesl-request@cs.cmu.edu.
  1280.  
  1281. ----------------------------------------------------------------------------
  1282.  
  1283. 5.16. OPAL
  1284.  
  1285. The language OPAL has been designed as a testbed for the development of
  1286. functional programs. Opal molds concepts from Algebraic Specification and
  1287. Functional Programming, which shall favor the formal development of large
  1288. production-quality software that is written in a purely functional style.
  1289. The core of OPAL is a strongly typed, higher-order, strict applicative
  1290. language that belongs to the tradition of Hope and ML. The algebraic flavour
  1291. of OPAL shows up in the syntactical appearance and in the preference of
  1292. parameterization to polymorphism.
  1293.  
  1294. OPAL is used for research on the highly optimizing compilation of
  1295. applicative languages. This has resulted in a compiler which produces very
  1296. efficient code. The OPAL compiler itself is entirely written in OPAL.
  1297. Installation is straightforward and has been successfully performed for
  1298. SPARCs, DECstations, NeXTs, and PCs running LINUX.
  1299.  
  1300. Further information about OPAL is available by ftp from:
  1301.  
  1302.       Host:      ftp.cs.tu-berlin.de;
  1303.       Directory: /pub/local/uebb/.
  1304.  
  1305. ----------------------------------------------------------------------------
  1306.  
  1307. 5.17. Oz
  1308.  
  1309. Oz is a concurrent constraint programming language designed for applications
  1310. that require complex symbolic computations, organization into multiple
  1311. agents, and soft real-time control. It is based on a new computation model
  1312. providing a uniform foundation for higher-order functional programming,
  1313. constraint logic programming, and concurrent objects with multiple
  1314. inheritance. From functional languages Oz inherits full compositionality,
  1315. and from logic languages Oz inherits logic variables and constraints
  1316. (including feature and finite domain constraints.) Search in Oz is
  1317. encapsulated (no backtracking) and includes one, best and all solution
  1318. strategies.
  1319.  
  1320. DFKI Oz is an interactive implementation of Oz featuring am Emacs
  1321. programming interface, a concurrent browser, an object-oriented interface to
  1322. Tcl/Tk, powerful interoperability features (sockets, C, C++), an incremental
  1323. compiler, a garbage collector, and support for stand-alone applications.
  1324. Performance is competitive with commercial Prolog and Lisp systems. DFKI Oz
  1325. is available for many platforms running Unix/X, including Sparcs and 486
  1326. PCs, and has been used for applications including simulations, multi-agent
  1327. systems, natural language processing, virtual reality, graphical user
  1328. interfaces, scheduling, placement problems, and configuration.
  1329.  
  1330. Further information about Oz is available on the web from:
  1331.  
  1332.      http://www.ps.uni-sb.de/oz/
  1333.  
  1334. or by ftp from:
  1335.  
  1336.       Host:      ftp.ps.uni-sb.de;
  1337.       Directory: /pub/oz.
  1338.  
  1339. Specific questions on Oz may be emailed oz@ps.uni-sb.de. You can join the Oz
  1340. users mailing list by emailing oz-users-request@ps.uni-sb.de.
  1341.  
  1342. ----------------------------------------------------------------------------
  1343.  
  1344. 5.18. Pizza
  1345.  
  1346. Pizza is a strict superset of Java that incorporates three ideas from
  1347. functional programming:
  1348.  
  1349.    * Parametric polymorphism;
  1350.    * Higher-order functions;
  1351.    * Algebraic data types.
  1352.  
  1353. Pizza is defined by translation into Java and compiles into the Java Virtual
  1354. Machine, requirements which strongly constrain the design space. Thus Pizza
  1355. programs interface easily with Java libraries, and programs first developed
  1356. in Pizza may be automatically converted to Java for ease of maintenance. The
  1357. Pizza compiler is itself written in Pizza, and may be used as a replacement
  1358. for Sun's Java compiler (except that the Pizza compiler runs faster).
  1359.  
  1360. Pizza was designed by Martin Odersky and Philip Wadler, and implemented by
  1361. Odersky. The design is described in the following paper:
  1362.  
  1363.    * "Pizza into Java: translating theory into practice", Martin Odersky and
  1364.      Philip Wadler, 24th ACM Symposium on Principles of Programming
  1365.      Languages, Paris, January 1997.
  1366.  
  1367. The paper, downloads, and other information on Pizza is available on the web
  1368. from any of the following locations (which mirror each other):
  1369.  
  1370.      http://www.cis.unisa.edu.au/~pizza;
  1371.  
  1372.      http://cm.bell-labs.com/cm/cs/who/wadler/pizza/welcome.html;
  1373.  
  1374.      http://wwwipd.ira.uka.de/~pizza;
  1375.  
  1376.      http://www.math.luc.edu/pizza/;
  1377.  
  1378.      ftp://ftp.eecs.tulane.edu/pub/maraist/pizza/welcome.html.
  1379.  
  1380. Pizza has received a `cool' award from Gamelan ( http://www-c.gamelan.com/.)
  1381.  
  1382. ----------------------------------------------------------------------------
  1383.  
  1384. 5.19. Scheme
  1385.  
  1386. Scheme is a dialect of Lisp that stresses conceptual elegance and
  1387. simplicity. It is specified in R4RS and IEEE standard P1178. Scheme is much
  1388. smaller than Common Lisp; the specification is about 50 pages. Scheme is
  1389. often used in computer science curricula and programming language research,
  1390. due to its ability to simply represent many programming abstractions.
  1391.  
  1392. Further information about Scheme is available on the web from:
  1393.  
  1394.      http://www-swiss.ai.mit.edu/scheme-home.html.
  1395.  
  1396. There is an unmoderated usenet newsgroup, comp.lang.scheme, for the
  1397. discussion of topics related to Scheme. A list of frequently asked questions
  1398. (which includes details of the many books and papers concerned with Scheme)
  1399. for this newsgroup is available by ftp from:
  1400.  
  1401.       Host:      ftp.think.com;
  1402.       Directory: /public/think/lisp/.
  1403.  
  1404. ----------------------------------------------------------------------------
  1405.  
  1406. 5.20. Sisal
  1407.  
  1408. Sisal (Streams and Iteration in a Single Assignment Language) is a
  1409. functional language designed with several goals in mind: to support clear,
  1410. efficient expression of scientific programs; to free application programmers
  1411. from details irrelevant to their endeavors; and, to allow automatic
  1412. detection and exploitation of the parallelism expressed in source programs.
  1413.  
  1414. Sisal syntax is modern and easy to read; Sisal code looks similar to Pascal,
  1415. Modula, or Ada, with modern constructs and long identifiers. The major
  1416. difference between Sisal and more conventional languages is that it does not
  1417. express explicit program control flow.
  1418.  
  1419. Sisal semantics are mathematically sound. Programs consist of function
  1420. definitions and invocations. Functions have no side effects, taking as
  1421. inputs only explicitly passed arguments, and producing only explicitly
  1422. returned results. There is no concept of state in Sisal. Identifiers are
  1423. used, rather than variables, to denote values, rather than memory locations.
  1424.  
  1425. The Sisal language currently exists for several shared memory and vector
  1426. systems that run Berkeley Unix(tm), including the Sequent Balance and
  1427. Symmetry, the Alliant, the Cray X/MP and Y/MP, Cray 2, and a few other less
  1428. well-known ones. Sisal is available on sequential machines such as Sparc,
  1429. RS/6000, and HP. Sisal also runs under MS-DOS and Macintosh Unix (A/UX).
  1430. It's been shown to be fairly easy to port the entire language system to new
  1431. machines.
  1432.  
  1433. Further information about Sisal is available on the web from:
  1434.  
  1435.      http://www.llnl.gov/sisal/SisalHomePage.html.
  1436.  
  1437. ----------------------------------------------------------------------------
  1438.  
  1439. The original version of this Frequently Asked Questions list (FAQ) was
  1440. compiled and edited by Mark P. Jones. All questions, comments, corrections,
  1441. and suggestions regarding this document should be addressed to the current
  1442. editor, Graham Hutton (email: gmh@cs.nott.ac.uk.)
  1443.