54 research outputs found

    A type-theoretic framework for software component synthesis

    Get PDF
    A language-agnostic approach for type-based component-oriented software synthesis is developed from the fundamental principles of abstract algebra and Combinatory Logic. It relies on an enumerative type inhabitation algorithm for Finite Combinatory Logic with Intersection Types (FCL) and a universal algebraic construction to translate terms of Combinatory Logic into any given target language. New insights are gained on the combination of semantic domains of discourse with intersection types. Long standing gaps in the algorithmic understanding of the type inhabitation question of FCL are closed. A practical implementation is developed and its applications by the author and other researchers are discussed. They include, but are not limited to, vast improvements in the context of synthesis of software product line members. An interactive theorem prover, Coq, is used to formalize and check all the theoretical results. This makes them more reusable for other developments and enhances confidence in their correctness.Es wird ein sprachunabhängiger Ansatz für die typbasierte und komponentenorientierte Synthese von Software entwickelt. Hierzu werden grundlegende Erkenntnisse über abstrakte Algebra und kombinatorische Logik verwendet. Der Ansatz beruht auf dem enumerativen Typinhabitationsproblem der endlichen kombinatorischen Logik mit Intersektionstypen, sowie einer universellen algebraischen Konstruktion, um Ergebnisterme in jede beliebe Zielsprache übersetzen zu können. Es werden neue Einblicke gewonnen, wie verschiedene semantische Domänen des Diskurses über Softwareeigenschaften miteinander verbunden werden können. Offene Fragestellungen im Zusammenhand mit der Algorithmik des Typinhabitationsproblems für Intersektionstypen werden beantwortet. Eine praktische Implementierung des Ansatzes wird entwickelt und ihre bisherigen Anwendungen durch den Autor und andere Wissenschaftler werden diskutiert. Diese beinhalten starke Verbesserungen im Zusammenhang mit der Synthese von Ausprägungen von Software Produktlinien. Ein interaktiver Theorembeweiser wir genutzt, um alle Ergebnisse der Arbeit zu formalisieren und mechanisch zu überprüfen. Dies trägt zum einen zur Wiederverwendbarkeit der theoretischen Ergebnisse in anderen Kontexten bei, und erhöht zum andern das Vertrauen in ihre Korrektheit

    Safe and scalable parallel programming with session types

    Get PDF
    Parallel programming is a technique that can coordinate and utilise multiple hardware resources simultaneously, to improve the overall computation performance. However, reasoning about the communication interactions between the resources is difficult. Moreover, scaling an application often leads to increased number and complexity of interactions, hence we need a systematic way to ensure the correctness of the communication aspects of parallel programs. In this thesis, we take an interaction-centric view of parallel programming, and investigate applying and adapting the theory of Session Types, a formal typing discipline for structured interaction-based communication, to guarantee the lack of communication mismatches and deadlocks in concurrent systems. We focus on scalable, distributed parallel systems that use message-passing for communication. We explore programming language primitives, tools and frameworks to simplify parallel programming. First, we present the design and implementation of Session C, a program ming toolchain for message-passing parallel programming. Session C can ensure deadlock freedom, communication safety and global progress through static type checking, and supports optimisations by refinements through session subtyping. Then we introduce Pabble, a protocol description language for designing parametric interaction protocols. The language can capture scalable interaction patterns found in parallel applications, and guarantees communication-safety and deadlock-freedom despite the undecidability of the underlying parameterised session type theory. Next, we demonstrate an application of Pabble in a workflow that combines Pabble protocols and computation kernel code describing the sequential computation behaviours, to generate a Message-Passing Interface (MPI) parallel application. The framework guarantees, by construction, that generated code are free from communication errors and deadlocks. Finally, we formalise an extension of binary session types and new language primitives for safe and efficient implementations of multiparty parallel applications in a binary server-client programming environment. Our exploration with session-based parallel programming shows that it is a feasible and practical approach to guaranteeing communication aspects of complex, interaction-based scalable parallel programming.Open Acces

    Programming Languages and Systems

    Get PDF
    This open access book constitutes the proceedings of the 28th European Symposium on Programming, ESOP 2019, which took place in Prague, Czech Republic, in April 2019, held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2019

    Regular Expression Types for XML

    Get PDF
    We propose regular expression types as a foundation for statically typed XML processing languages. Regular expression types, like most schema languages for XML, introduce regular expression notations such as repetition (*), alternation (|), etc., to describe XML documents. The novelty of our type system is a semantic presentation of subtyping, as inclusion between the sets of documents denoted by two types. We give several examples illustrating the usefulness of this form of subtyping in XML processing. The decision problem for the subtype relation reduces to the inclusion problem between tree automata, which is known to be EXPTIME-complete. To avoid this high complexity in typical cases, we develop a practical algorithm that, unlike classical algorithms based on determinization of tree automata, checks the inclusion relation by a top-down traversal of the original type expressions. The main advantage of this algorithm is that it can exploit the property that type expressions being compared often share portions of their representations. Our algorithm is a variant of Aiken and Murphy\u27s set-inclusion constraint solver, to which are added several new implementation techniques, correctness proofs, and preliminary performance measurements on some small programs in the domain of typed XML processing

    A Type Checker for a Logical Framework with Union and Intersection Types

    Get PDF
    International audienceWe present the syntax, semantics, typing, subtyping, unification, refinement, and REPL of Bull, a prototype theorem prover based on the ∆-Framework, i.e. a fully-typed Logical Framework à la Edinburgh LF decorated with union and intersection types, as described in previous papers by the authors. Bull also implements a subtyping algorithm for the Type Theory Ξ of Barbanera-Dezani-de'Liguoro. Bull has a command-line interface where the user can declare axioms, terms, and perform computations and some basic terminal-style features like error pretty-printing, subexpressions highlighting, and file loading. Moreover, it can typecheck a proof or normalize it. These terms can be incomplete, therefore the typechecking algorithm uses unification to try to construct the missing subterms. Bull uses the syntax of Berardi's Pure Type Systems to improve the compactness and the modularity of the kernel. Abstract and concrete syntax are mostly aligned and similar to the concrete syntax of Coq. Bull uses a higher-order unification algorithm for terms, while typechecking and partial type inference are done by a bidirectional refinement algorithm, similar to the one found in Matita and Beluga. The refinement can be split into two parts: the essence refinement and the typing refinement. Binders are implemented using commonly-used de Bruijn indices. We have defined a concrete language syntax that will allow user to write ∆-terms. We have defined the reduction rules and an evaluator. We have implemented from scratch a refiner which does partial typechecking and type reconstruction. We have experimented Bull with classical examples of the intersection and union literature, such as the ones formalized by Pfenning with his Refinement Types in LF and by Pierce. We hope that this research vein could be useful to experiment, in a proof theoretical setting, forms of polymorphism alternatives to Girard's parametric one

    Generic Ownership Types for Java and the Collections Framework

    No full text
    Generic programming has turned out very useful in the development of reusable software. With the Java programming language, genericity is not only meant for reusability, but also for type-safety. Java generics constrain a container object (e.g., list, hash table) to store objects of a pre-specified data type. Nevertheless, safe programming with aliasing (multiple pointers in a program may point to the same object) is still a concern in object-oriented programming language research. A pointing object can mutate the state of the aliased object, reflecting the changes to all of the other pointers (aka aliases) thus affecting their behaviour. As programs grow larger and more complex, such changes in behaviour can be undesirable and difficult to detect and reason about. With respect to container objects, the iterator pattern critically violates encapsulation, allowing aliases to the state (and thereof the components) of its container. Object ownership is one of the well-researched paradigms in the area of alias management. Ownership types support hierarchical object encapsulation rather than the traditional class-level encapsulation. This thesis introduces an extension of Java 6 with support for ownership types as supplementary generic types. That is, Java generics are extended with the ability of carrying ownership information. This extension provides generic ownership support for all of Java; that is, all major language features are addressed so that programs can safely manage and express their aliasing properties. The resulting language is expressive enough to support common programming idioms, with little programming and runtime overhead. We evaluated the programmability of the language by refactoring a major (the most essential) portion of the Java Collections Framework. We also evaluated the performance impact of our refactoring by conducting a small micro-benchmark study to measure the performance time overhead the refactored collections may impose

    Thermal Inactivation of Shiga Toxin-Producing \u3ci\u3eEscherichia coli\u3c/i\u3e in Foods

    Get PDF
    Emerging non-O157 Shiga toxin-producing Escherichia coli (STEC) were recently added to the zero tolerance policy by the USDA-FSIS. Therefore, the precise characterization of their thermal inactivation kinetics in different foods and the effect of stress on thermal inactivation are needed. This research aimed at determining the heat inactivation kinetics of non-O157 and O157 STECs in buffer and model food matrices and the effects of DnaK levels on thermal resistance after acid and heat-shock. Thermal inactivation was carried out in either in 2-ml glass vials or nylon vacuum-sealed bags for buffer and food (spinach, ground-beef, turkey deli-meat, pasta) samples, respectively. Vials or bags were immersed in a re-circulating water bath at various set temperatures for fixed time-intervals. Surviving bacteria were enumerated using Tryptic Soy Agar plates. D-values were calculated using first-order linear and Weibull (for pasta only) models. Total bacterial protein (using Bicinchonic acid assay) and the heat-shock protein (DnaK) concentration were measured (using competitive ELISA) before and after treating overnight-grown cells in Tryptic Soy Broth with either acid- (acetic acid pH 5.5 for 1 h) or heat-shock (46°C for 15 min). All experiments were performed in duplicate and replicated thrice, data were analyzed using SAS (pE. coli O157 and non-O157 in all tested samples, at 56°C D-values ranged from 5.57±0.38 to 15.39±0.14 min; at 58°C D -values ranged from 1.99±0.9 to 7.20±0.55 min and at 60°C D–values ranged from 0.99±0.07 to 2.86±0.22 min. Higher levels of DnaK were detected after sub-lethal injury with heat- or acid-shock that corresponded to enhanced thermal tolerance of all strains, except E. coli O111. D-values in buffer for un-shocked cells ranged from 1.49±0.35 to 2.21±0.17 min, heat-shocked cells from 2.04±0.35 to 2.83±0.35 min and acid-shocked cells from 2.32±0.29 to 4.09±0.29 min. Thus, acid- or heat-shock conditions that might occur during food processing need to be considered during design of thermal inactivation processes and product-formulation to prevent food-borne outbreaks. This study provides insights on the thermal inactivation parameters of O157 and non-O157 STEC in foods that would be beneficial to the food industry
    corecore