Formalizando el proceso de depuración en programación funcional paralela y perezosa.(Formalizing the debugging process in lazy functional parallel languages)
Under construction
Finally I finished my Thesis. Here you have my thesis in Spanish.
If you want to read the most important chapters in English here I present the relation between my thesis and the papers published. Of course these chapters on my thesis has more details, some corrections and includes some contents not appearing in the papers. Besides in my thesis I include the proofs of the theorems appearing in Chapter 8.
Chapter 4
Corresponds with the paper "Formalizing the Debugging Process in Haskell" published in "International Colloquium on Theoretical Aspects of Computing (ICTAC 2005)"
bib
Chapter 5
Corresponds with the paper "Introducing Debugging Capabilities to Natural Semantics" published in "International Andrei Ershov Memorial Conference Perspectives of System Informatics (PSI 2006)"
bib
Chapter 7
Corresponds with the papers:
"Testing Speculative Work in Lazy/Eager Parallel Functional Language" published in "International Workshop on Languages and Compilers for Parallel Computing (LCPC 2005)"
bib
"A Debugger for Parallel Haskell Dialects" published in "International Conference on Algorithms and Architectures for Parallel Processing (ICA3PP 2008)"
bib
Chapter 8
Corresponds with the paper "Observing Intermediate Structures in a Parallel Lazy Functional Language" published in "International Symposium on Principles and Practice of Declarative Programming (PPDP 2007)"
bib
Tools:
One of the result of my thesis consist in the extensión of Hood library to GpH and Eden.
This extension tries to mantain the original intentions of Hood library,
that is, that the only extensión nedeed is the function
unsafePerformIO, but it uses the C directives that manages the semaphores of
the system and because of that it is needed the _ccall_ function.
Recently some libraries have disappeared from version GHC 6.6, that is
the lang library. Now, some of the functions that are needed in this tool
that was in this package are in base package. Then, to compile the library Hood it is needed to import the base package. Because of that here there are two versions of this tool.
- Hood library extended to work in GpH and Eden. (GHC 5.XX)
To compile the library for a Haskell program:
"ghc -fvia-C -#include "semaforo.h" -fglasgow-exts -package lang -package concurrent -cpp Observe.lhs"
To compile the library for a GpH program:
"ghc -parallel -fvia-C -#include "semaforo.h" -fglasgow-exts -package lang -package concurrent -cpp Observe.lhs"
To compile the library for an Eden program:
"ghc -eden -fvia-C -#include "semaforo.h" -fglasgow-exts -package lang -package concurrent -cpp Observe.lhs"
- Hood library extended to work in GpH and Eden. (GHC 6.XX)
To compile the library for a Haskell program:
"ghc -fvia-C -#include "semaforo.h" -fglasgow-exts -package base -package concurrent -cpp Observe.lhs"
To compile the library for a GpH program:
"ghc -parallel -fvia-C -#include "semaforo.h" -fglasgow-exts -package base -package concurrent -cpp Observe.lhs"
To compile the library for an Eden program:
"ghc -eden -fvia-C -#include "semaforo.h" -fglasgow-exts -package base -package concurrent -cpp Observe.lhs"
When you use the library in GpH and Eden. A file with the observations is produced in every computer the program is evaluating. This observations are produced in file "/tmp/events.tmp". If you want to change that you should change the constant "eventsFile" in "semaforo.c".
When you are running the application in "real" parallel, that is with different machines, it is not very interesting to use the monad "RunO" as it only presents the annotations in file where the main thread has been created.
The speculation analysis in GpH and Eden
Another tool corresponds with a tool for speculation analysis. This tool receives one file with observations annotated with a time stamp.
To produce this time stamps you should use the following semaforo.c file.
This is a preliminar versión in Spanish and without comments. TOOL
To compile it I use the command "ghc -fvia-C -fglasgow-exts -package base -cpp -o trataFile trataFichero.hs".
GpH:
To produce the analysis of the speculation in GpH it is only needed to use the following using function:
- usingObs :: (Observable a)=> String -> String -> a -> Strategy a -> a
- usingObs strDemanded strNeeded x s = s (observe strDemanded x) `seq` (observe strNeeded) x)
Eden:
To produce the analysis of the speculation in Eden it is only needed to use the following process creation and instantiation functions:
- processObs :: (Trans b, Trans a, Observable b, Observable a)
=> String -> (a -> b) -> Process a b
- processObs str f = process $ observe (str++ ('_':(show selfPe))) f
- instProcessObs :: (Trans b, Trans a, Observable b, Observable a)
=> String -> Process a b -> a -> b
- instProcessObs str p = observe (str++ ('_':(show selfPe))) (\x -> p # x)
Other analysis