42 research outputs found
Towards A Practical High-Assurance Systems Programming Language
Writing correct and performant low-level systems code is a notoriously demanding job, even for experienced developers. To make the matter worse, formally reasoning about their correctness properties introduces yet another level of complexity to the task. It requires considerable expertise in both systems programming and formal verification. The development can be extremely costly due to the sheer complexity of the systems and the nuances in them, if not assisted with appropriate tools that provide abstraction and automation.
Cogent is designed to alleviate the burden on developers when writing and verifying systems code. It is a high-level functional language with a certifying compiler, which automatically proves the correctness of the compiled code and also provides a purely functional abstraction of the low-level program to the developer. Equational reasoning techniques can then be used to prove functional correctness properties of the program on top of this abstract semantics, which is notably less laborious than directly verifying the C code.
To make Cogent a more approachable and effective tool for developing real-world systems, we further strengthen the framework by extending the core language and its ecosystem. Specifically, we enrich the language to allow users to control the memory representation of algebraic data types, while retaining the automatic proof with a data layout refinement calculus. We repurpose existing tools in a novel way and develop an intuitive foreign function interface, which provides users a seamless experience when using Cogent in conjunction with native C. We augment the Cogent ecosystem with a property-based testing framework, which helps developers better understand the impact formal verification has on their programs and enables a progressive approach to producing high-assurance systems. Finally we explore refinement type systems, which we plan to incorporate into Cogent for more expressiveness and better integration of systems programmers with the verification process
Programming Languages and Systems
This open access book constitutes the proceedings of the 31st European Symposium on Programming, ESOP 2022, which was held during April 5-7, 2022, in Munich, Germany, as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022. The 21 regular papers presented in this volume were carefully reviewed and selected from 64 submissions. They deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems
Programming Languages and Systems
This open access book constitutes the proceedings of the 29th European Symposium on Programming, ESOP 2020, which was planned to take place in Dublin, Ireland, in April 2020, as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The actual ETAPS 2020 meeting was postponed due to the Corona pandemic. The papers deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems
Reversible Computation: Extending Horizons of Computing
This open access State-of-the-Art Survey presents the main recent scientific outcomes in the area of reversible computation, focusing on those that have emerged during COST Action IC1405 "Reversible Computation - Extending Horizons of Computing", a European research network that operated from May 2015 to April 2019. Reversible computation is a new paradigm that extends the traditional forwards-only mode of computation with the ability to execute in reverse, so that computation can run backwards as easily and naturally as forwards. It aims to deliver novel computing devices and software, and to enhance existing systems by equipping them with reversibility. There are many potential applications of reversible computation, including languages and software tools for reliable and recovery-oriented distributed systems and revolutionary reversible logic gates and circuits, but they can only be realized and have lasting effect if conceptual and firm theoretical foundations are established first
Extensions of Logic Programming for Preference Representation
Εξετάζουμε το πρόβλημα της αναπαράστασης προτιμήσεων με τη χρήση επεκτάσεων του λογικού προγραμματισμού. Η αποτελεσματική αναπαράσταση προτιμήσεων είναι ζωτικής σημασίας σε πολλά επιστημονικά πεδία και μπορεί να αποδειχθεί χρήσιμη σε πολλές πραγματικές εφαρμογές. Οι φορμαλισμοί αναπαράστασης προτιμήσεων στη βιβλιογραφία συνήθως εμπίπτουν σε δύο βασικές κατηγορίες: στην ποιοτική προσέγγιση (όπου οι προτιμήσεις εκφράζονται με διμερείς σχέσεις προτίμησης) και στην ποσοτική προσέγγιση (όπου οι προτιμήσεις αναπαριστώνται με τη χρήση αριθμητικών τιμών που εκφράζουν το βαθμό ενδιαφέροντος). Σε αυτή τη διατριβή, προτείνουμε δύο προσεγγίσεις για την έκφραση προτιμήσεων. Η πρώτη προσέγγιση χρησιμοποιεί μια απειρότιμη επέκταση του λογικού προγραμματισμού για την έκφραση ποσοτικών προτιμήσεων, ενώ η δεύτερη προσέγγιση χρησιμοποιεί τον λογικό προγραμματισμό υψηλής τάξης για την έκφραση ποιοτικών προτιμήσεων.
Προτείνουμε τη γλώσσα προγραμματισμού PrefLog, μια επέκταση του λογικού προγραμματισμού που χρησιμοποιεί ένα άπειρο σύνολο τιμών αλήθειας για να υποστηρίξει τον ορισμό τελεστών ποσοτικής προτίμησης. Ορίζουμε το συντακτικό και τη σημασιολογία της γλώσσας και προσδιορίζουμε ένα σύνολο από ιδιότητες τις οποίες πρέπει να ικανοποιούν οι διαθέσιμοι τελεστές προτίμησης έτσι ώστε η γλώσσα να έχει καλώς ορισμένη σημασιολογία. Επιπλέον, προτείνουμε μία «από-κάτω-προς-τα-πάνω» τεχνική υλοποίησης για ένα καλώς ορισμένο υποσύνολο της PrefLog που αντιστοιχεί στο προτιμησιακό αντίστοιχο της γλώσσας Datalog. Η εξασφάλιση της ιδιότητας του τερματισμού μιας τέτοιας στρατηγικής δεν είναι προφανής γιατί το σύνολο των τιμών αληθείας και το σύνολο των πιθανών ερμηνειών για τέτοια προγράμματα είναι και τα δύο άπειρα.
Προτείνουμε τη χρήση του λογικού προγραμματισμού υψηλής τάξης για την αναπαράσταση ποιοτικών προτιμήσεων. Σε αυτήν την προσέγγιση, σχέσεις, προτιμήσεις μεταξύ πλειάδων, προτιμήσεις μεταξύ συνόλων από πλειάδες και υπολογισμοί σχετικά με προτιμήσεις εκφράζονται στην ίδια γλώσσα υψηλής τάξης. Τα προγράμματα αυτά μπορούν να εκτελεστούν σε πραγματικά συστήματα λογικού προγραμματισμού υψηλής τάξης και η απόδοσή τους μπορεί να ενισχυθεί είτε με γενικές είτε με εξειδικευμένες τεχνικές βελτιστοποίησης. Ανάμεσα σε αυτές, προτείνουμε μια νέα τεχνική μετατροπής λογικών προγραμμάτων υψηλής τάξης σε κλασικά λογικά προγράμματα (πρώτης τάξης) και την εφαρμόζουμε στα προγράμματα της προσέγγισής μας. Τέλος, αποδεικνύουμε την εφαρμοσιμότητα της προσέγγισής μας παρουσιάζοντας μια υλοποίηση και μια πειραματική αξιολόγηση στη γλώσσα λογικού προγραμματισμού υψηλής τάξης HiLog.We consider the problem of preference representation using extensions of logic programming. The effective representation of preferences is crucial in many scientific disciplines and it can be proven useful in many real-world applications. Preference representation formalisms in the literature usually fall into two basic categories: in the qualitative approach (where preferences are expressed with binary preference relations) and in the quantitative approach (where preferences are represented with the use of numerical values that express the degree of interest). In this dissertation, we propose two approaches for expressing preferences. The first approach uses an infinite-valued extension of logic programming for expressing quantitative preferences, while the second approach uses higher-order logic programming for expressing qualitative preferences.
We propose PrefLog, a logic programming language which uses an underlying infinite-valued truth domain in order to support quantitative preference operators. We introduce the syntax and the semantics of the language, and we study the properties of the PrefLog operators that are needed in order for programs to behave well from a semantic point of view. In addition, we introduce a terminating bottom-up evaluation method for a well-defined class of function-free PrefLog programs. Ensuring termination is not a straightforward task, because the underlying truth domain of PrefLog and the set of all possible interpretations of a function-free PrefLog program are both infinite.
We propose the use of higher-order logic programming as a framework for representing qualitative preferences. In this approach, relations, preferences between tuples, preferences between sets of tuples and operations on preferences are expressed in the same, higher-order language. The programs can be evaluated by standard higher-order programming systems, and their performance can be enhanced with generic and specialized optimization techniques. Among these techniques, we propose a novel program transformation technique for translating higher-order programs into first-order ones and we use this technique for optimizing the higher-order programs of our interest. Finally, we demonstrate the feasibility of our approach by presenting an implementation and an experimental evaluation of all the proposed concepts in the higher-order logic programming language HiLog
Pattern discovery for parallelism in functional languages
No longer the preserve of specialist hardware, parallel devices
are now ubiquitous. Pattern-based approaches to parallelism,
such as algorithmic skeletons, simplify traditional low-level
approaches by presenting composable high-level patterns of
parallelism to the programmer. This allows optimal parallel
configurations to be derived automatically, and facilitates the
use of different parallel architectures. Moreover, parallel patterns
can be swap-replaced for sequential recursion schemes,
thus simplifying their introduction. Unfortunately, there is no
guarantee that recursion schemes are present in all functional
programs. Automatic pattern discovery techniques can be used
to discover recursion schemes. Current approaches are limited
by both the range of analysable functions, and by the range of
discoverable patterns. In this thesis, we present an approach
based on program slicing techniques that facilitates the analysis
of a wider range of explicitly recursive functions. We then
present an approach using anti-unification that expands the
range of discoverable patterns. In particular, this approach is
user-extensible; i.e. patterns developed by the programmer can
be discovered without significant effort. We present prototype
implementations of both approaches, and evaluate them on
a range of examples, including five parallel benchmarks and
functions from the Haskell Prelude. We achieve maximum
speedups of 32.93x on our 28-core hyperthreaded experimental
machine for our parallel benchmarks, demonstrating
that our approaches can discover patterns that produce good
parallel speedups. Together, the approaches presented in this
thesis enable the discovery of more loci of potential parallelism
in pure functional programs than currently possible.
This leads to more possibilities for parallelism, and so more
possibilities to take advantage of the potential performance
gains that heterogeneous parallel systems present
An Analytical Approach to Programs as Data Objects
This essay accompanies a selection of 32 articles (referred to in bold face in the text and marginally marked in the bibliographic references) submitted to Aarhus University towards a Doctor Scientiarum degree in Computer Science.The author's previous academic degree, beyond a doctoral degree in June 1986, is an "Habilitation à diriger les recherches" from the Université Pierre et Marie Curie (Paris VI) in France; the corresponding material was submitted in September 1992 and the degree was obtained in January 1993.The present 32 articles have all been written since 1993 and while at DAIMI.Except for one other PhD student, all co-authors are or have been the author's students here in Aarhus
Verification by Reduction to Functional Programs
In this thesis, we explore techniques for the development and verification of programs in a high-level, expressive, and safe programming language. Our programs can express problems over unbounded domains and over recursive and mutable data structures. We present an implementation language flexible enough to build interesting and useful systems. We mostly maintain a core shared language for the specifications and the implementation, with only a few extensions specific to expressing the specifications. Extensions of the core shared language include imperative features with state and side effects, which help when implementing efficient systems. Our language is a subset of the Scala programming language. Once verified, programs can be compiled and executed using the existing Scala tools. We present algorithms for verifying programs written in this language. We take a layer-based approach, where we reduce, at each step, the program to an equivalent program in a simpler language. We first purify functions by transforming away mutations into explicit return types in the functions' signatures. This step rewrites all mutations of data structures into cloning operations. We then translate local state into a purely functional code, hence eliminating all traces of imperative programming. The final language is a functional subset of Scala, on which we apply verification. We integrate our pipeline of translations into Leon, a verifier for Scala. We verify the core functional language by using an algorithm already developed inside Leon. The program is encoded into equivalent first-order logic formulas over a combination of theories and recursive functions. The formulas are eventually discharged to an external SMT solver. We extend this core language and the solving algorithm with support for both infinite-precision integers and bit-vectors. The algorithm takes into account the semantics gap between the two domains, and the programmer is ultimately responsible to use the proper type to represent the data. We build a reusable interface for SMT-LIB that enables us to swap solvers transparently in order to validate the formulas emitted by Leon. We experiment with writing solvers in Scala; they could offer both a better and safer integration with the rest of the system. We evaluate the cost of using a higher-order language to implement such solvers, traditionally written in C/C++. Finally, we experiment with the system by building fully working and verified applications. We rely on the intersection of many features including higher-order functions, mutable data structures, recursive functions, and nondeterministic environment dependencies, to build concise and verified applications