Results 1 -
5 of
5
Code generation for Mercury
- In Proceedings of the Twelfth International Conference on Logic Programming
, 1995
"... Mercury is a new purely declarative logic programming language that requires programmers to write declarations for every predicate in the program. Although the main motivation for this requirement is that it allows the compiler to catch most programmer errors, it also allows the Mercury code generat ..."
Abstract
-
Cited by 13 (5 self)
- Add to MetaCart
Mercury is a new purely declarative logic programming language that requires programmers to write declarations for every predicate in the program. Although the main motivation for this requirement is that it allows the compiler to catch most programmer errors, it also allows the Mercury code generator to rely on the presence of type, mode and determinism information about every predicate in the program. The code generator exploits a new execution algorithm based on the availability of this information as well as some novel techniques (lazy code generation, follow-code migration, the use of a compile-time failure continuation stack) to produce very high quality code. This code is in C and is therefore quite portable. Benchmarks show that the Mercury implementation produces much faster code than wamcc, Quintus Prolog, SICStus Prolog and Aquarius Prolog.
Software Transactional Memory In Mercury
, 2007
"... Concurrent programming is now becoming more important than ever. But for concurrent programs to work deterministically, sections of the code must be synchronised. The most common method of synchronising code is to protect the code with locks. However, code which uses locks is difficult to write and ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Concurrent programming is now becoming more important than ever. But for concurrent programs to work deterministically, sections of the code must be synchronised. The most common method of synchronising code is to protect the code with locks. However, code which uses locks is difficult to write and even more difficult to debug. Locking also makes it difficult to compose large programs from smaller ones. A relatively new method of synchronisation, known as Software Transactional Memory, is promising to be a much easier method of synchronisation. This thesis describes the design and implementation of a Software Transactional
PhD Thesis Proposal
, 1996
"... This report reviews the current state of research in the amalgam of functional and logic languages, and proposes an area of further study. The approach proposed in this report maintains the syntax and semantics of standard Prolog, while allowing the declaration of functions in an upwards-compatible ..."
Abstract
- Add to MetaCart
This report reviews the current state of research in the amalgam of functional and logic languages, and proposes an area of further study. The approach proposed in this report maintains the syntax and semantics of standard Prolog, while allowing the declaration of functions in an upwards-compatible style. The research will advance the benefits of expressivity and efficiency of the extended paradigm, while maintaining compatibility with the Delphi principle ([Clo87]). ijl20@cl.cam.ac.uk Contents 1 Introduction 3 2 Summary of current research 5 2.1 Term evaluation : : : : : : : : : : : : : : : : : : : : : : : : : : 5 2.1.1 Motivation : : : : : : : : : : : : : : : : : : : : : : : : : 6 2.2 Mode and determinism declarations for relations : : : : : : : : 6 2.2.1 Motivation : : : : : : : : : : : : : : : : : : : : : : : : : 8 2.3 Predicates as set-valued functions : : : : : : : : : : : : : : : : 8 2.3.1 Motivation : : : : : : : : : : : : : : : : : : : : : : : : : 9 2.4 Predicates as Boo...
Reinventing Haskell Backtracking
"... Abstract: Almost ten years ago, Ralf Hinze has written a functional pearl on how to derive backtracking functionality for the purely functional programming language Haskell. In these notes, we show how to arrive at the efficient, two-continuation based backtracking monad derived by Hinze starting fr ..."
Abstract
- Add to MetaCart
Abstract: Almost ten years ago, Ralf Hinze has written a functional pearl on how to derive backtracking functionality for the purely functional programming language Haskell. In these notes, we show how to arrive at the efficient, two-continuation based backtracking monad derived by Hinze starting from an intuitive inefficient implementation that we subsequently refine using well known program transformations. It turns out that the technique can be used to build monads for non-determinism from modular, independent parts which gives rise to various new implementations. Specifically, we show how the presented approach can be applied to obtain new implementations of breadth-first search and iterative deepening depth-first search. We present a new method to implement monads for non-determinism in Haskell. With our approach, their implementation is split into two independent parts: one is identical for every implementation, the other captures the essence of the employed search strategy. The part that is identical for every implementation includes the monadic bind operation, which does not have to be reimplemented for every non-determinism monad. Programmers only need to define notions of failure and choice and can wrap these definitions in a parametrised type to obtain a monad for non-determinism. As the implementation of monadic bind is usually the most involved part in the implementation of non-determinism monads, our approach gives rise to simpler implementations of search strategies that required a more complex implementation before. For example, difference lists are a natural choice to represent non-deterministic computations efficiently but do not give rise to a natural implementation of monadic bind. We show that wrapping the type for difference lists in a continuation monad results in the well-known twocontinuation-based backtracking monad derived by Hinze in his influential pearl [Hin00]. Wrapping different base types—which both lack a natural implementation of monadic bind—we obtain novel implementations of breadth-first search and iterative deepening depth-first search. Our main contribution is the method used to obtain these strategies from modular parts, not the simplified implementation of established search strategies.
W www.accs.edu.auA Semantics for Behavior Trees
, 2007
"... The Behavior Tree notation is used as part of a framework for developing complex computer systems. The framework is designed to simplify the process of constructing a formal specification of a system from its informal functional requirements. To give a meaning to Behavior Trees, this paper describes ..."
Abstract
- Add to MetaCart
The Behavior Tree notation is used as part of a framework for developing complex computer systems. The framework is designed to simplify the process of constructing a formal specification of a system from its informal functional requirements. To give a meaning to Behavior Trees, this paper describes a lower-level language called Behavior Tree Process Algebra (BTPA) and its operational semantics, and defines a mechanical translation of Behaviour Trees into BTPA. The process algebra provides several methods by which processes may communicate with each other and interact with the environment: CSPlike synchronisation; send/receive message passing; and shared variables. The meaning of a BTPA process is defined with respect to the current state of the system (value of the components) and the active processes. 1

