Animated Logic: Correct Functional Conversion to Conjunctive Normal Form
×
As proof of concept, we present a mathematical definition of the algorithm to convert propositional formulae to conjunctive normal form, implementations in WhyML (the Why3 language, very similarto OCaml), and proofs of correctness of the implementations. We apply our proposal on two variantsof this algorithm: one in direct-style and another with an explicit stack structure. Being bothfirst-order versions, Why3 processes the proofs naturally.
Formally Verified Bug-free Implementations of (Logical) Algorithms
×
Computational Logic is an essential field of Computer Science. Courses on this subject are either too informal (only providing pseudo-codes) or too formal when describing algorithms. In either case, there is an emphasis on paper-and-pencil proofs rather than on computational approaches. It is seldom the case that there are running algorithms (executable programs). Implementations of algorithms and tools that help students go through the resolutions of exercises are crucial, as they are an important pedagogical object.
Most courses make only a small or no effort on showing the presented algorithms correction, although this is an important aspect of software development that should be natural for Computer Science students. For instance, the Integrated Master in Computer Science course of the Faculty of Science and Technology of NOVA University of Lisbon only starts referring to program verification in the 4th year. Students often make wrong assumptions over the correction of their programs basing themselves in tests, which are not enough to prove that a program is completely bug-free. Tests only discover the presence of bugs. To assure that a program is correct we must use formal verification instead.
The purpose of this dissertation is to contribute to the formalization and assisted- verification of standard and classical algorithms of Computational Logic, through the de- velopment of step-by-step implementations of those algorithms in a functional language (the nature of these languages offers a closer relationship to mathematical definitions) and posterior verification of such implementations using the Why3 program verification plat- form. These implementations and soundness proofs will serve as pedagogical material to Computational Logic students.
Visualização e animação de autómatos em Ocsigen Framework
×
OCaml-FLAT on the Ocsigen Framework
×
his project aims at the development of an interactive web tool in Portuguese to help in an assisted and intuitive way to understand the concepts and algorithms in question, seeing them work step-by-step, through typical examples preloaded or built by the user (an original aspect of our platform). The tool should therefore enable the creation and edition of an automata, as well as execute the relevant classical algorithms such as word acceptance, model conversions, etc. It is also intended to visualize not only the process of construction of the automaton, but also all the steps of applying the given algorithm.
This tool uses the Ocsigen Framework because it provides the development of complete and interactive web tools written in OCaml, a functional language with a strong type checking system and therefore perfect for a web page without errors. Ocsigen was also chosen because it allows the creation of dynamic pages with a singular client-server system.
This document presents de project proposal and the first phase of it’s development. It is already possible to create automata, check the nature of its states and verify step-bystep (with undo) the acceptance of a word.
OCaml-Flat - An OCaml Toolkit for experimenting with formal languages theory
×
Despite the existence of a considerable number of them, occasionally a new tool emerges that contributes with something new, or some existing tools are extended with new functionalities.
We propose to develop a library of functions in OCaml that support various concepts of FLAT, namely the definition of finite automata, regular expressions, pushdown automata, context-free grammars and Turing machines. We want to provide code that, whenever possible, follows closely the formalization of the concepts studied by the students.
Another goal is to provide support for using this system inside Mooshak.
Finally, an interesting technical problem we will need to handle is the nondeterminism and nontermination in parts of the code.
In this report, first we discuss the properties of functional languages and why they are indicated for our project. Next, we give a small introduction to the FLAT concepts and discuss some issues about their implementation. Finally, there is a small review on the existing FLAT pedagogical tools.
Defuncionalize to proof
×
Functional Programming with style and costless: CPS transformation "à la carte"
×
A mechanized proof of correctness of the Hornalgorithm
×
Rewinding functions through CPS
×
Publications
Computational Logic
- Animated Logic I: Correct Functional Conversion to Conjunctive Normal Form - Pedro Barroso, Mário Pereira and António Ravara - [Abstract] - [English Version] - [Portuguese Version] - Presented at INForum 2019 - Computer Symposium
- Formally Verified Bug-free Implementations of (Logical) Algorithms (report to support the intermediate evaluation of the dissertation) - Pedro Barroso - [Abstract] - [pdf]
- Defunctionalize to prove [text in Portuguese] - Mário Pereira - [Abstract] - [pdf]
Formal Languages & Automata Theory
- Visualization and Animation of Automata on Ocsigen Framework [text in Portuguese] - Rita Macedo, Artur Miguel Dias, Antonio Ravara - [Abstract] - [Extended Abstract] - [pdf] - Presented at INForum 2019 - Computer Symposium
- OCaml-Flat on the Ocsigen Framework (report to support the intermediate evaluation of the dissertation) [text in Portuguese] - Rita Macedo - [Abstract] - [pdf]
- OCaml-Flat - An OCaml Toolkit for experimenting with formal languages theory (report to support the intermediate evaluation of the dissertation) - João Gonçalves - [Abstract] - [pdf]
Advanced Programming
- A mechanized proof of correctness of the Hornalgorithm - Marco Giunti - [Background] - [pdf]
- Compiling linear and static channels in Go - Marco Giunti - [pdf]
- Rewinding functions through CPS - Marco Giunti - [Background] - [pdf]
- Functional Programming with style and costless: CPS transformation "à la carte" [text in Portuguese] - Tiago Roxo, Mário Pereira, and Simão Melo de Sousa - [Abstract] - [pdf]