41 research outputs found
Conceptual Background for Symbolic Computation
This paper is a tutorial which examines the three major models of computation--the Turing Machine, Combinators, and Lambda Calculus--with respect to their usefulness to practical engineering of computing machines. While the classical von Neumann architecture can be deduced from the Turing Machine model, and Combinator machines have been built on an experimental basis, no serious attempts have been made to construct a Lambda Calculus machine. This paper gives a basic outline of how to incorporate a Lambda Calculus capability into a von Neumann type architecture, maintaining full backward compatibility and at the same time making optimal use of its advantages and technological maturity for the Lambda Calculus capability
A Semantic Framework to Debug Parallel Lazy Functional Languages
It is not easy to debug lazy functional programs. The reason is that laziness and higherorder 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
Preliminary proceedings of the 2001 ACM SIGPLAN Haskell workshop
This volume contains the preliminary proceedings of the 2001 ACM SIGPLAN Haskell Workshop,
which was held on 2nd September 2001 in Firenze, Italy. The final proceedings will
published by Elsevier Science as an issue of Electronic Notes in Theoretical Computer Science
(Volume 59).
The HaskellWorkshop was sponsored by ACM SIGPLAN and formed part of the PLI 2001
colloquium on Principles, Logics, and Implementations of high-level programming languages,
which comprised the ICFP/PPDP conferences and associated workshops. Previous Haskell
Workshops have been held in La Jolla (1995), Amsterdam (1997), Paris (1999), and Montr´eal
(2000).
The purpose of the Haskell Workshop was to discuss experience with Haskell, and possible
future developments for the language. The scope of the workshop included all aspects of the
design, semantics, theory, application, implementation, and teaching of Haskell. Submissions
that discussed limitations of Haskell at present and/or proposed new ideas for future versions
of Haskell were particularly encouraged. Adopting an idea from ICFP 2000, the workshop also
solicited two special classes of submissions, application letters and functional pearls, described
below
Graphical application and visualization of lazy functional computation.
Mere academic toys or the tools of the future? Lazy functional programming languages have undoubted attractive properties. This thesis explores their potential, from the programmer's point of view, for implementing interactive and graphical applications to which they do not seem immediately suited. The discussion is centred round two example applications. One is a graphical design program based on an idea of the artist M. C. Escher. The thesis argues that the graphical user interface may be encapsulated in an "interpret " function that when applied by a mouse click to an interface of appropriate type yields the required behaviour. The second example is a monitoring interpreter for a functional language. The idea is that if the mechanics of the reduction are presented at a suitable level of abstraction, this may be used to give insight into what is going on. On the basis of this the programmer might modify the code so that a program runs more efficiently in terms of speed and memory requirements. Problems of displaying the reduction are addressed, and solutions proposed for overcoming these: displaying the graph as a spanning tree, to ensure planarity, with extra leave
Foundations of Software Science and Computation Structures
This open access book constitutes the proceedings of the 23rd International Conference on Foundations of Software Science and Computational Structures, FOSSACS 2020, which took place in Dublin, Ireland, in April 2020, and was held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The 31 regular papers presented in this volume were carefully reviewed and selected from 98 submissions. The papers cover topics such as categorical models and logics; language theory, automata, and games; modal, spatial, and temporal logics; type theory and proof theory; concurrency theory and process calculi; rewriting theory; semantics of programming languages; program analysis, correctness, transformation, and verification; logics of programming; software specification and refinement; models of concurrent, reactive, stochastic, distributed, hybrid, and mobile systems; emerging models of computation; logical aspects of computational complexity; models of software security; and logical foundations of data bases.
Behavioural Types: from Theory to Tools
This book presents research produced by members of COST Action IC1201: Behavioural Types for Reliable Large-Scale Software Systems (BETTY), a European research network that was funded from October 2012 to October 2016. The technical theme of BETTY was the use of behavioural type systems in programming languages, to specify and verify properties of programs beyond the traditional use of type systems to describe data processing. A significant area within behavioural types is session types, which concerns the use of type-theoretic techniques to describe communication protocols so that static typechecking or dynamic monitoring can verify that protocols are implemented correctly. This is closely related to the topic of choreography, in which system design starts from a description of the overall communication flows. Another area is behavioural contracts, which describe the obligations of interacting agents in a way that enables blame to be attributed to the agent responsible for failed interaction. Type-theoretic techniques can also be used to analyse potential deadlocks due to cyclic dependencies between inter-process interactions.
BETTY was organised into four Working Groups: (1) Foundations; (2) Security; (3) Programming Languages; (4) Tools and Applications. Working Groups 1–3 produced “state-of-the-art reports”, which originally intended to take snapshots of the field at the time the network started, but grew into substantial survey articles including much research carried out during the network [1–3]. The situation for Working Group 4 was different. When the network started, the community had produced relatively few implementations of programming languages or tools. One of the aims of the network was to encourage more implementation work, and this was a great success. The community as a whole has developed a greater interest in putting theoretical ideas into practice. The sixteen chapters in this book describe systems that were either completely developed, or substantially extended, during BETTY. The total of 41 co-authors represents a significant proportion of the active participants in the network (around 120 people who attended at least one meeting). The book is a report on the new state of the art created by BETTY in
xv
xvi Preface
the area of Working Group 4, and the title “Behavioural Types: from Theory to Tools” summarises the trajectory of the community during the last four years. The book begins with two tutorials by Atzei et al. on contract-oriented design of distributed systems. Chapter 1 introduces the CO2 contract specifi- cation language and the Diogenes toolchain. Chapter 2 describes how timing constraints can be incorporated into the framework and checked with the CO2
middleware.
Part of the CO2 middleware is a monitoring system, and the theme
of monitoring continues in the next two chapters. In Chapter 3, Attard et al. present detectEr, a runtime monitoring tool for Erlang programs that allows correctness properties to be expressed in Hennessy-Milner logic. In Chapter 4, which is the first chapter about session types, Neykova and Yoshida describe a runtime verification framework for Python programs. Communication protocols are specified in the Scribble language, which is based on multiparty session types.
The next three chapters deal with choreographic programming. In Chap- ter 5, Debois and Hildebrandt present a toolset for working with dynamic condition response (DCR) graphs, which are a graphical formalism for choreography. Chapter 6, by Lange et al., continues the graphical theme with ChorGram, a tool for synthesising global graphical choreographies from collections of communicating finite-state automata. Giallorenzo et al., in Chapter 7, consider runtime adaptation. They describe AIOCJ, a choreographic programming language in which runtime adaptation is supported with a guarantee that it doesn’t introduce deadlocks or races.
Deadlock analysis is important in other settings too, and there are two more chapters about it. In Chapter 8, Padovani describes the Hypha tool, which uses a type-based approach to check deadlock-freedom and lock-freedom of systems modelled in a form of pi-calculus. In Chapter 9, Garcia and Laneve present a tool for analysing deadlocks in Java programs; this tool, called JaDA, is based on a behavioural type system.
The next three chapters report on projects that have added session types to functional programming languages in order to support typechecking of communication-based code. In Chapter 10, Orchard and Yoshida describe an implementation of session types in Haskell, and survey several approaches to typechecking the linearity conditions required for safe session implemen- tation. In Chapter 11, Melgratti and Padovani describe an implementation of session types in OCaml. Their system uses runtime linearity checking. In Chapter 12, Lindley and Morris describe an extension of the web programming
language Links with session types; their work contrasts with the previous two chapters in being less constrained by an existing language design.
Continuing the theme of session types in programming languages, the next two chapters describe two approaches based on Java. Hu’s work, presented in Chapter 13, starts with the Scribble description of a multiparty session type and generates an API in the form of a collection of Java classes, each class containing the communication methods that are available in a particular state of the protocol. Dardha et al., in Chapter 14, also start with a Scribble specification. Their StMungo tool generates an API as a single class with an associated typestate specification to constrain sequences of method calls. Code that uses the API can be checked for correctness with the Mungo typechecker.
Finally, there are two chapters about programming with the MPI libraries. Chapter 15, by Ng and Yoshida, uses an extension of Scribble, called Pabble, to describe protocols that parametric in the number of runtime roles. From a Pabble specification they generate C code that uses MPI for communication and is guaranteed correct by construction. Chapter 16, by Ng et al., describes the ParTypes framework for analysing existing C+MPI programs with respect to protocols defined in an extension of Scribble.
We hope that the book will serve a useful purpose as a report on the activities of COST Action IC1201 and as a survey of programming languages and tools based on behavioural types
Behavioural Types: from Theory to Tools
This book presents research produced by members of COST Action IC1201: Behavioural Types for Reliable Large-Scale Software Systems (BETTY), a European research network that was funded from October 2012 to October 2016. The technical theme of BETTY was the use of behavioural type systems in programming languages, to specify and verify properties of programs beyond the traditional use of type systems to describe data processing. A significant area within behavioural types is session types, which concerns the use of type-theoretic techniques to describe communication protocols so that static typechecking or dynamic monitoring can verify that protocols are implemented correctly. This is closely related to the topic of choreography, in which system design starts from a description of the overall communication flows. Another area is behavioural contracts, which describe the obligations of interacting agents in a way that enables blame to be attributed to the agent responsible for failed interaction. Type-theoretic techniques can also be used to analyse potential deadlocks due to cyclic dependencies between inter-process interactions.
BETTY was organised into four Working Groups: (1) Foundations; (2) Security; (3) Programming Languages; (4) Tools and Applications. Working Groups 1–3 produced “state-of-the-art reports”, which originally intended to take snapshots of the field at the time the network started, but grew into substantial survey articles including much research carried out during the network [1–3]. The situation for Working Group 4 was different. When the network started, the community had produced relatively few implementations of programming languages or tools. One of the aims of the network was to encourage more implementation work, and this was a great success. The community as a whole has developed a greater interest in putting theoretical ideas into practice. The sixteen chapters in this book describe systems that were either completely developed, or substantially extended, during BETTY. The total of 41 co-authors represents a significant proportion of the active participants in the network (around 120 people who attended at least one meeting). The book is a report on the new state of the art created by BETTY in
xv
xvi Preface
the area of Working Group 4, and the title “Behavioural Types: from Theory to Tools” summarises the trajectory of the community during the last four years. The book begins with two tutorials by Atzei et al. on contract-oriented design of distributed systems. Chapter 1 introduces the CO2 contract specifi- cation language and the Diogenes toolchain. Chapter 2 describes how timing constraints can be incorporated into the framework and checked with the CO2
middleware.
Part of the CO2 middleware is a monitoring system, and the theme
of monitoring continues in the next two chapters. In Chapter 3, Attard et al. present detectEr, a runtime monitoring tool for Erlang programs that allows correctness properties to be expressed in Hennessy-Milner logic. In Chapter 4, which is the first chapter about session types, Neykova and Yoshida describe a runtime verification framework for Python programs. Communication protocols are specified in the Scribble language, which is based on multiparty session types.
The next three chapters deal with choreographic programming. In Chap- ter 5, Debois and Hildebrandt present a toolset for working with dynamic condition response (DCR) graphs, which are a graphical formalism for choreography. Chapter 6, by Lange et al., continues the graphical theme with ChorGram, a tool for synthesising global graphical choreographies from collections of communicating finite-state automata. Giallorenzo et al., in Chapter 7, consider runtime adaptation. They describe AIOCJ, a choreographic programming language in which runtime adaptation is supported with a guarantee that it doesn’t introduce deadlocks or races.
Deadlock analysis is important in other settings too, and there are two more chapters about it. In Chapter 8, Padovani describes the Hypha tool, which uses a type-based approach to check deadlock-freedom and lock-freedom of systems modelled in a form of pi-calculus. In Chapter 9, Garcia and Laneve present a tool for analysing deadlocks in Java programs; this tool, called JaDA, is based on a behavioural type system.
The next three chapters report on projects that have added session types to functional programming languages in order to support typechecking of communication-based code. In Chapter 10, Orchard and Yoshida describe an implementation of session types in Haskell, and survey several approaches to typechecking the linearity conditions required for safe session implemen- tation. In Chapter 11, Melgratti and Padovani describe an implementation of session types in OCaml. Their system uses runtime linearity checking. In Chapter 12, Lindley and Morris describe an extension of the web programming
language Links with session types; their work contrasts with the previous two chapters in being less constrained by an existing language design.
Continuing the theme of session types in programming languages, the next two chapters describe two approaches based on Java. Hu’s work, presented in Chapter 13, starts with the Scribble description of a multiparty session type and generates an API in the form of a collection of Java classes, each class containing the communication methods that are available in a particular state of the protocol. Dardha et al., in Chapter 14, also start with a Scribble specification. Their StMungo tool generates an API as a single class with an associated typestate specification to constrain sequences of method calls. Code that uses the API can be checked for correctness with the Mungo typechecker.
Finally, there are two chapters about programming with the MPI libraries. Chapter 15, by Ng and Yoshida, uses an extension of Scribble, called Pabble, to describe protocols that parametric in the number of runtime roles. From a Pabble specification they generate C code that uses MPI for communication and is guaranteed correct by construction. Chapter 16, by Ng et al., describes the ParTypes framework for analysing existing C+MPI programs with respect to protocols defined in an extension of Scribble.
We hope that the book will serve a useful purpose as a report on the activities of COST Action IC1201 and as a survey of programming languages and tools based on behavioural types
Un Modèle basé sur les Grammaires Attribuées Gardées pour les Processus Dynamiques, Centrés sur l’Utilisateur, Distribués et Collaboratifs: Cas de la Surveillance Epidémiologique
Dynamic processes in which users need to work together and collaborate in myriad ways on process models defined on-the-fly are fast becoming the rule rather than the exception. This thesis presents the design of a purely declarative modelling approach for dynamic, collaborative, user-centred, and data-driven processes. First, we organize the work of a user into task hierarchies which we model as mindmaps, which are trees used to visualize, organize, and log information about tasks in which the user is involved. We introduce the model of guarded attribute grammars, or GAG, to help the automation of updating such maps. A GAG consists of an underlying grammar, that specifies the logical structure of the map, with semantic rules which are used both to govern the evolution of the tree structure (how an open node may be rened to a sub-tree) and to compute the values of some of its attributes. The map enriched with this extra information and with high-level constructs for task dependencies; collaborationand user-interactions is termed an active workspace or AW. Communication between AWs is essentially through the exchange of messages without a shared memory thus enabling convenient distribution on an asynchronous architecture. Lastly, we introduce a language syntax for GAG specification and design a prototype that includes an internal domain specific language (in Haskell) for their specification and a graphical user interface to simulate its execution in a distributed environment. We motivate our approach and illustrate its language syntax and features on a case study for a disease surveillance system.De plus en plus, les utilisateurs collaborent de multiples façons sur des processus dynamiques construit de manière progressive. Dans cette thèse, nous concevons une nouvelle approche d´déclarative de modélisation des processus dynamiques, centrés sur l’utilisateur et dirigés par les données. Tout d’abord, nous organisons le travail d’un utilisateur par des hiérarchies des taches, représentées par des cartes heuristiques (arbre de taches). Ces derniers sont utilisés pour visualiser, organiser, et sauvegarder les informations sur les tâches menés par l’utilisateur. Nous introduisons ensuite le modèle des grammaires attribuées gardées, ou GAG, pour faciliter l’automatisation de la manipulation de telles cartes. Une GAG consiste en une grammaire sous-jacente, qui spécifie la structure logique de la carte, avec des règles sémantiques qui servent à la fois a` gouverner l’évolution de l’arbre des taches (raffinement des nœuds ouverts) et a` calculer les valeurs de certains de ses attributs. La carte enrichie de ces informations supplémentaires et d’autres concepts de haut niveau pour les d´dépendances entre les taches, la collaboration et les interactions utilisateur est appelée Active Workspace ou AW. La communication entre AWs est essentiellement par échange des messages permettant ainsi une implémentation commode sur une architecture distribuée et asynchrone. Enfin, nous décrivons une syntaxe de langage pour la spécification des processus en utilisant les GAGs et concevons un prototype qui inclut un langage spécifique au domaine, interne `a Haskell, pour leur spécification et une interface utilisateur graphique pour la simulation de l’exécution dans un environnement distribué. Nous motivons notre approche et illustrons sa syntaxe et ses caractéristiques sur une étude de cas portant sur le processus de surveillance épidémiologique
Foundations of Software Science and Computation Structures
This open access book constitutes the proceedings of the 23rd International Conference on Foundations of Software Science and Computational Structures, FOSSACS 2020, which took place in Dublin, Ireland, in April 2020, and was held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The 31 regular papers presented in this volume were carefully reviewed and selected from 98 submissions. The papers cover topics such as categorical models and logics; language theory, automata, and games; modal, spatial, and temporal logics; type theory and proof theory; concurrency theory and process calculi; rewriting theory; semantics of programming languages; program analysis, correctness, transformation, and verification; logics of programming; software specification and refinement; models of concurrent, reactive, stochastic, distributed, hybrid, and mobile systems; emerging models of computation; logical aspects of computational complexity; models of software security; and logical foundations of data bases.
Profiling of parallel programs in a non-strict functional language
[Abstract]
Purely functional programming languages offer many benefits to parallel
programming. The absence of side effects and the provision for
higher-level abstractions eases the programming effort. In particular, nonstrict
functional languages allow further separation of concerns and provide
more parallel facilities in the form of semi-implicit parallelism. On
the other hand, because the low-level details of the execution are hidden,
usually in a runtime system, the process of debugging the performance
of parallel applications becomes harder. Currently available parallel profiling
tools allow programmers to obtain some information about the
execution; however, this information is usually not detailed enough to
precisely pinpoint the cause of some performance problems. Often, this
is because the cost of obtaining that information would be prohibitive for
a complete program execution. In this thesis, we design and implement
a parallel profiling framework based on execution replay. This debugging
technique makes it possible to simulate recorded executions of a program,
ensuring that their behaviour remains unchanged. The novelty of
our approach is to adapt this technique to the context of parallel profiling
and to take advantage of the characteristics of non-strict purely
functional semantics to guarantee minimal overhead in the recording
process. Our work allows to build more powerful profiling tools that do
not affect the parallel behaviour of the program in a meaningful way.We
demonstrate our claims through a series of benchmarks and the study
of two use cases.[Resumo]
As linguaxes de programación funcional puras ofrecen moitos beneficios
para a programación paralela. A ausencia de efectos secundarios e as abstraccións de alto nivel proporcionadas facilitan o esforzo de programación.
En particular, as linguaxes de programación non estritas permiten
unha maior separación de conceptos e proporcionan máis capacidades
de paralelismo na forma de paralelismo semi-implícito. Por outra
parte, debido a que os detalles de baixo nivel da execución están ocultos,
xeralmente nun sistema de execución, o proceso de depuración do
rendemento de aplicacións paralelas é máis difícil. As ferramentas de
profiling dispoñibles hoxe en día permiten aos programadores obter certa
información acerca da execución; non obstante, esta información non
acostuma a ser o suficientemente detallada para determinar de maneira
precisa a causa dalgúns problemas de rendemento. A miúdo, isto débese
a que o custe de obter esa información sería prohibitivo para unha
execución completa do programa. Nesta tese, deseñamos e implementamos
unha plataforma de profiling paralelo baseada en execution replay.
Esta técnica de depuración fai que sexa posible simular execucións previamente
rexistradas, asegurando que o seu comportamento se manteña
sen cambios. A novidade do noso enfoque é adaptar esta técnica para o
contexto do profiling paralelo e aproveitar as características da semántica
das linguaxes de programación funcional non estritas e puras para garantizar
unha sobrecarga mínima na recolección das trazas de execución.
O noso traballo permite construír ferramentas de profiling máis potentes
que non afectan ao comportamento paralelo do programa de maneira
significativa. Demostramos as nosas afirmacións nunha serie de benchmarks
e no estudo de dous casos de uso.[Resumen]Los lenguajes de programación funcional puros ofrecen muchos beneficios
para la programación paralela. La ausencia de efectos secundarios
y las abstracciones de alto nivel proporcionadas facilitan el esfuerzo de
programación. En particular, los lenguajes de programación no estrictos
permiten una mayor separación de conceptos y proporcionan más
capacidades de paralelismo en la forma de paralelismo semi-implícito.
Por otra parte, debido a que los detalles de bajo nivel de la ejecución están ocultos, generalmente en un sistema de ejecución, el proceso de
depuración del rendimiento de aplicaciones paralelas es más difícil. Las
herramientas de profiling disponibles hoy en día permiten a los programadores
obtener cierta información acerca de la ejecución; sin embargo,
esta información no suele ser lo suficientemente detallada para determinar
de manera precisa la causa de algunos problemas de rendimiento.
A menudo, esto se debe a que el costo de obtener esa información sería
prohibitivo para una ejecución completa del programa. En esta tesis, diseñamos
e implementamos una plataforma de profiling paralelo baseada
en execution replay. Esta técnica de depuración hace que sea posible simular
ejecuciones previamente registradas, asegurando que su comportamiento
se mantiene sin cambios. La novedad de nuestro enfoque es
adaptar esta técnica para el contexto del profiling paralelo y aprovechar
las características de la semántica de los lenguajes de programación funcional
no estrictos y puros para garantizar una sobrecarga mínima en la
recolección de las trazas de ejecución. Nuestro trabajo permite construir
herramientas de profiling más potentes que no afectan el comportamiento
paralelo del programa de manera significativa. Demostramos nuestras
afirmaciones en una serie de benchmarks y en el estudio de dos casos de
uso