Results 1 - 10
of
10
Operational Semantics for Declarative Multi-Paradigm Languages
- Journal of Symbolic Computation
, 2005
"... Abstract. In this paper we define an operational semantics for functional logic languages covering notions like laziness, sharing, concurrency, non-determinism, etc. Such a semantics is not only important to provide appropriate language definitions to reason about programs and check the correctness ..."
Abstract
-
Cited by 48 (22 self)
- Add to MetaCart
Abstract. In this paper we define an operational semantics for functional logic languages covering notions like laziness, sharing, concurrency, non-determinism, etc. Such a semantics is not only important to provide appropriate language definitions to reason about programs and check the correctness of implementations but it is also a basis to develop languagespecific tools, like program tracers, profilers, optimizers, etc. First, we define a "big-step " semantics in natural style to relate expressions and their evaluated results. Since this semantics is not sufficient to cover concurrency, search strategies, or to reason about costs associated to particular computations, we also define a "small-step " operational semantics covering the features of modern functional logic languages.
Implementing Functional Logic Languages Using Multiple Threads and Stores
- In Proc. of the Ninth International Conference on Functional Programming (ICFP 2004
, 2004
"... Abstract Recent functional logic languages such as Curry and Toy combinelazy functional programming with logic programming features including logic variables, non-determinism, unification, narrowing,fair search, concurrency, and residuation. In this paper, we show how to extend a conventional interp ..."
Abstract
-
Cited by 10 (5 self)
- Add to MetaCart
Abstract Recent functional logic languages such as Curry and Toy combinelazy functional programming with logic programming features including logic variables, non-determinism, unification, narrowing,fair search, concurrency, and residuation. In this paper, we show how to extend a conventional interpreter for a lazy functional lan-guage to handle these features by adding support for reference cells, process-like and thread-like concurrency mechanisms, and a novelform of multi-versioned store. Our interpretation scheme is practical, and can be easily extended to perform compilation. The lan-guage specified by our interpreter is designed so that programs are deterministic in a novel and useful sense.
Forward Slicing of Multi-Paradigm Declarative Programs Based on Partial Evaluation
- In Proc. of LOPSTR 2002
, 2003
"... Abstract. Program slicing has been mainly studied in the context of imperative languages, where it has been applied to many software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This paper introduces the first forward slicing technique for multi-pa ..."
Abstract
-
Cited by 7 (5 self)
- Add to MetaCart
Abstract. Program slicing has been mainly studied in the context of imperative languages, where it has been applied to many software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This paper introduces the first forward slicing technique for multi-paradigm declarative programs. In particular, we show how program slicing can be defined in terms of online partial evaluation. Our approach clarifies the relation between both methodologies and provides a simple way to develop program slicing tools from existing partial evaluators. 1
A Monadic Semantics for Core Curry
, 2003
"... We give a deterministic, big-step operational semantics for the essential core of the Curry language, including higher-order functions, call-by-need evaluation, nondeterminism, narrowing, and residuation. The semantics is structured in modular monadic style, and is presented in the form of an execut ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
We give a deterministic, big-step operational semantics for the essential core of the Curry language, including higher-order functions, call-by-need evaluation, nondeterminism, narrowing, and residuation. The semantics is structured in modular monadic style, and is presented in the form of an executable interpreter written in Haskell. It uses monadic formulations of state, non-determinism, and resumptionbased concurrency.
Cost-Augmented Partial Evaluation of Functional Logic Programs
- Higher-Order and Symbolic Computation
, 2004
"... We enhance the narrowing-driven partial evaluation scheme for lazy functional logic programs with the computation of symbolic costs. The enhanced scheme allows us to estimate the e#ects of the program transformer in a precise framework and, moreover, to quantify these e#ects. The considered costs ar ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
We enhance the narrowing-driven partial evaluation scheme for lazy functional logic programs with the computation of symbolic costs. The enhanced scheme allows us to estimate the e#ects of the program transformer in a precise framework and, moreover, to quantify these e#ects. The considered costs are "symbolic " in the sense that they measure the number of basic operations performed during a computation rather than actual execution times. Our scheme may serve as a basis to develop speedup analyses and cost-guided transformers. A cost-augmented partial evaluator, which demonstrates the usefulness of our approach, has been implemented in the multi-paradigm language Curry.
Free Theorems for Functional Logic Programs
- SUBMITTED TO PLPV’10
, 2010
"... Type-based reasoning is popular in functional programming. In particular, parametric polymorphism constrains functions in such a way that statements about their behavior can be derived without consulting function definitions. Is the same possible in a strongly, and polymorphically, typed functional ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
Type-based reasoning is popular in functional programming. In particular, parametric polymorphism constrains functions in such a way that statements about their behavior can be derived without consulting function definitions. Is the same possible in a strongly, and polymorphically, typed functional logic language? This is the question we study in this paper. Logical features like nondeterminism and free variables cause interesting effects, which we examine based on examples and address by identifying appropriate conditions that guarantee standard free theorems or inequational versions thereof to hold.
Architecture of a virtual machine for functional logic computations
, 2003
"... Abstract. We describe the architecture of a virtual machine for executing functional logic programming languages. A distinguishing feature of our machine is that it preserves the operational completeness of non-deterministic programs by concurrently executing a pool of independent computations. Each ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Abstract. We describe the architecture of a virtual machine for executing functional logic programming languages. A distinguishing feature of our machine is that it preserves the operational completeness of non-deterministic programs by concurrently executing a pool of independent computations. Each computation executes only root-needed sequential narrowing steps. We describe the machine’s architecture and instruction set; and show how to compile overlapping inductively sequential programs, represented as definitional trees, to sequences of machine instructions. The machine has been implemented in Java and in Standard ML. 1
Forward Slicing by Partial Evaluation
, 2002
"... Program slicing has been mainly studied in the context of imperative languages, where it has been applied to many software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This paper introduces the first forward slicing technique for multi-paradigm dec ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Program slicing has been mainly studied in the context of imperative languages, where it has been applied to many software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This paper introduces the first forward slicing technique for multi-paradigm declarative programs. In particular, we show how program slicing can be defined in terms of online partial evaluation. Our approach
Program Specialization Based on Dynamic Slicing
- In Proceedings of Workshop on Software Analysis and Development for Pervasive Systems (SONDA’04
, 2004
"... Within the imperative programming paradigm, program slicing has been widely used as a basis to solve many software engineering problems, like program understanding, debugging, testing, differencing, specialization, and merging. In this work, we present a lightweight approach to program slicing in la ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Within the imperative programming paradigm, program slicing has been widely used as a basis to solve many software engineering problems, like program understanding, debugging, testing, differencing, specialization, and merging. In this work, we present a lightweight approach to program slicing in lazy functional logic languages and discuss its potential applications in the context of pervasive systems where resources are limited. In particular, we show how program slicing can be used to achieve a form of program specialization that cannot be achieved with other, related techniques like partial evaluation.
Run-Time Profiling of
- In Proceedings of the International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR’04
, 2005
"... In this work, we introduce a profiling scheme for modern functional logic languages covering notions like laziness, sharing, and non-determinism. Firstly, we instrument a natural (big-step) semantics in order to associate a symbolic cost to each basic operation (e.g., variable updates, function ..."
Abstract
- Add to MetaCart
In this work, we introduce a profiling scheme for modern functional logic languages covering notions like laziness, sharing, and non-determinism. Firstly, we instrument a natural (big-step) semantics in order to associate a symbolic cost to each basic operation (e.g., variable updates, function unfoldings, case evaluations). While this cost semantics provides a formal basis to analyze the cost of a computation, the implementation of a cost-augmented interpreter based on it would incur into a huge overhead. Therefore, we also introduce a sound transformation that instruments a program such that its execution---under the standard semantics---outputs not only the corresponding results but also the associated costs. Finally, we describe a prototype implementation of a profiler based on the developments in this paper.

