Abstract

It is not easy to debug lazy functional programs. The reason is that laziness and higher-order complicates basic debugging strategies. Although there exist several debuggers for sequential lazy languages, dealing with parallel languages is much harder. In this case, it is important to implement debugging platforms for parallel extensions, but it is also important to provide theoretical foundations to simplify the task of understanding the debugging process. In this work, we deal with the debugging process in two parallel languages that extend the lazy language Haskell. In particular, we provide an operational semantics that allows us to reason about our parallel extension of the sequential debugger Hood. In addition, we show how we can use it to analyze the amount of speculative work done by the processes, so that it can be used to optimize their use of resources.

Highlights

  • Pure functional languages provide advantages such as polymorphism, higher-order functions, and the absence of side-effects

  • One of the first approaches to the debugging process in lazy functional languages was based on the observation of the computation graph

  • We have introduced semantic rules to handle the introduction of observations that can be used to debug GpH and Eden programs

Read more

Summary

Introduction

Pure functional languages provide advantages such as polymorphism, higher-order functions, and the absence of side-effects. One of the first approaches to the debugging process in lazy functional languages was based on the observation of the computation graph One of these developed debuggers was ART (Advanced Redex Trails [41]). Hat has been modified during years to incorporate ideas appearing in other debuggers and can be considered as a set of tools to help in the debugging process It follows the spirit of ART, that is, to analyze the computation graph produced during the execution. Hood is a debugger that allows the programmer to observe the evaluation of any expression This expression can be considered as the lazy version of the typical imperative debugging techniques based on the use of printf–like sentences. We present a formal semantics allowing for dealing with Hood observations in the parallel languages GpH and Eden.

An Introduction to Hood
Implementation Details
Glasgow Parallel Haskell
GpH-Eden Core Language
Local Transitions
Local Rules with Observations
Example
GpH Formal Semantics
GpH Global Transitions
Eden Formal Semantics
Eden Global Transitions
Auxiliary Functions
Global Rules
Global System Evolution
Semantic Possibilities
Observing the channels and not modifying the observations
Not observing the channels and not modifying the observations
Eden Streams
Stream Communication in Eden via an Example
9: That can be flattened to obtain the following observation
Correctness and Equivalences
Analyzing Speculative Work in Eden
Discussion
10. Conclusions and Future Work
We will prove that the nh function produces equivalent heaps
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call