This paper presents a theoretical foundation for functional language implementations of Behaviour -Interaction -Priority (BIP). We introduce a set of connector combinators describing synchronisation, data transfer, pr...
详细信息
This paper presents a theoretical foundation for functional language implementations of Behaviour -Interaction -Priority (BIP). We introduce a set of connector combinators describing synchronisation, data transfer, priorities and dynamicity in a principled way. A static type system ensures the soundness of connector semantics. Based on this foundation, we implemented BIP as an embedded domain specific language (DSL) in Haskell and Scala. The DSL embedding allows programmers to benefit from the full expressive power of high-level languages. The clear separation of behaviour and coordination inherited from BIP leads to systems that are arguably simpler to maintain and reason about, compared to other approaches. (C) 2017 Elsevier Inc. All rights reserved.
This second installment picks up where Konrad Hinsen's article "The Promises of functional programming" from the July/August 2009 issue left off, covering static type inference and lazy evaluation in fun...
详细信息
This second installment picks up where Konrad Hinsen's article "The Promises of functional programming" from the July/August 2009 issue left off, covering static type inference and lazy evaluation in functional programming languages.
functional languages belong to a neat and very high-level programming paradigm. A functional program is a set of function definitions. The λ-Calculus, a theory of functions under recursion, offers a solid theoretic b...
详细信息
Underlying many, if not all, areas of mathematics is category theory, an alternative to set theory as a foundation that formalizes mathematical structures and relations between them. These relations abstract the idea ...
详细信息
Underlying many, if not all, areas of mathematics is category theory, an alternative to set theory as a foundation that formalizes mathematical structures and relations between them. These relations abstract the idea of a function, an abstraction used throughout mathematics as well as throughout programming. However, there is a disparity between the definition of a function used in mathematics from that used in mainstream programming. For mathematicians to utilize the power of programming to advance their mathematics, there is a demand for a paradigm of programming that uses mathematical functions, as well as the mathematical categories that support them, as the basic building blocks, enabling programs to be built by clever mathematics. This paradigm is functional programming. We wish to use functional programming to represent our mathematical structures, especially those used in computational algebra.
The Lisp programming language is often described as the first functional programming language and also as an important early AI language. In the history of functional programming, however, it occupies a rather anomalo...
详细信息
The Lisp programming language is often described as the first functional programming language and also as an important early AI language. In the history of functional programming, however, it occupies a rather anomalous position, as the circumstances of its development do not fit well with the widely accepted view that functional languages have been developed through a theoretically-inspired project of deriving practical programming languages from the lambda calculus. This paper examines the origins of Lisp in the early AI programming work of the mid-to-late 1950s, and in particular in the work of Allen Newell, Cliff Shaw and Herbert Simon. Their 1956 program, the Logic Theory Machine, introduced new ideas about data and program structures that were articulated in response to perceived limitations in existing programming technique. Later writers, notably John Backus, have described these features as constituting a "programming language style" distinct from the traditional style that preceded it. The paper examines the origins of the earlier style in practices of manual computation, analyses the key technical differences between it and the style first manifested in the Logic Theory Machine, and concludes that programming practice and experience play a large and underappreciated role in the development of programming styles and languages.
Morris-style contextual equivalence - invariance of termination under any context of ground type - is the usual notion of operational equivalence for deterministic functional languages such as PCF. Contextual equivale...
详细信息
Morris-style contextual equivalence - invariance of termination under any context of ground type - is the usual notion of operational equivalence for deterministic functional languages such as PCF. Contextual equivalence is hard to establish directly. Instead, we define a labelled transition system for call-by-name PCF (and variants) and prove that CCS-style bisimilarity equals contextual equivalence. Using co-induction we establish equational laws. By considering variations of Milner's 'bisimulations up to similar to' we obtain a second co-inductive characterisation of contextual equivalence in terms of reduction behaviour and production of values. Hence we use co-induction to establish contextual equivalence in a series of stream-processing examples. We show that Milner's context lemma may be extended to our variants of PCF, but in fact our form of bisimilarity supports simpler co-inductive proofs. We sketch how these results extend to variants, including eager evaluation and the addition of sums, pairs and recursive types. (C) 1999 Elsevier Science B.V. All rights reserved.
This article reports on an action research project on improving a functional programming course by moving toward a practical and flexible study environment-flipped and blended classroom. Teaching the topic of function...
详细信息
This article reports on an action research project on improving a functional programming course by moving toward a practical and flexible study environment-flipped and blended classroom. Teaching the topic of functional programming was found to be troublesome using a traditional lectured course format. The need to increase students' amount of practice emergedwhile subsequent challenges relating to students' independent practical coursework were observed. Particular concerns relating to group work, learning materials, and the attribute of flexibility were investigated during the third action research cycle. The research cycle was analyzed using a qualitative survey on students' views, teacher narrative, and students' study activity data. By this third research cycle, we found that (i) the "call for explanation" is an apt conceptualization for supporting independent work, and in particular for the design of learning materials;(ii) use of student-selected groups that can be flexibly resized or even disbanded enables spontaneous peer support and can avoid frustration about group work;and (iii) students greatly appreciate the high degree of flexibility in the course arrangements but find that it causes them to slip from their goals. The project has improved our understanding of a successful implementation of the target course based on group work and learning materials in the context of independent study, while the attribute of flexibility revealed a contradiction that indicates the need for further action.
Correct handling of names and binders is an important issue in meta-programming. This paper presents an embedding of constraint logic programming into the alpha ML functional programming language, which provides a pro...
详细信息
Correct handling of names and binders is an important issue in meta-programming. This paper presents an embedding of constraint logic programming into the alpha ML functional programming language, which provides a provably correct means of implementing proof search computations over inductive definitions involving names and binders modulo alpha-equivalence. We show that the execution of proof search in the alpha ML operational semantics is sound and complete with regard to the model-theoretic semantics of formulae, and develop a theory of contextual equivalence for the subclass of alpha ML expressions which correspond to inductive definitions and formulae. In particular, we prove that alpha ML expressions, which denote inductive definitions, are contextually equivalent precisely when those inductive definitions have the same model-theoretic semantics. This paper is a revised and extended version of the conference paper (Lakin, M. R. & Pitts, A. M. (2009) Resolving inductive definitions with binders in higher-order typed functional programming. In Proceedings of the 18th European Symposium on programming (ESOP 2009), Castagna, G. (ed), Lecture Notes in Computer Science, vol. 5502. Berlin, Germany: Springer-Verlag, pp. 47-61) and draws on material from the first author's PhD thesis (Lakin, M. R. (2010) An Executable Meta-Language for Inductive Definitions with Binders. University of Cambridge, UK).
The characteristics of functional programming languages recommend them for web development. We checked that in practice, by customizing the functional programming language Wall for web development. Customizations incl...
详细信息
The characteristics of functional programming languages recommend them for web development. We checked that in practice, by customizing the functional programming language Wall for web development. Customizations include support for web document types, web data access functions, textual templates, web dialogs and extension of transactional mechanisms to web session data. Prototype implementations of Wall are developed. Our experience shows that application of Wail in the web development domain is fully justified and that web development may benefit from functional programming languages in both education and production. (C) 2010 Elsevier Ltd. All rights reserved.
暂无评论