271 research outputs found
Extrapolate: generalizing counterexamples of functional test properties
This paper presents a new tool called Extrapolate that automatically generalizes counterexamples found by property-based testing in Haskell. Example applications show that generalized counterexamples can inform the programmer more fully and more immediately what characterises failures. Extrapolate is able to produce more general results than similar tools. Although it is intrinsically unsound, as reported generalizations are based on testing, it works well for examples drawn from previous published work in this area
Recommended from our members
A Tool for Producing Verified, Explainable Proofs
Mathematicians are reluctant to use interactive theorem provers. In this thesis I argue that this is because proof assistants don't emphasise explanations of proofs; and that in order to produce good explanations, the system must create proofs in a manner that mimics how humans would create proofs. My research goals are to determine what constitutes a human-like proof and to represent human-like reasoning within an interactive theorem prover to create formalised, understandable proofs. Another goal is to produce a framework to visualise the goal states of this system.
To demonstrate this, I present HumanProof: a piece of software built for the Lean 3 theorem prover. It is used for interactively creating proofs that resemble how human mathematicians reason. The system provides a visual, hierarchical representation of the goal and a system for suggesting available inference rules. The system produces output in the form of both natural language and formal proof terms which are checked by Lean's kernel. This is made possible with the use of a structured goal state system which interfaces with Lean's tactic system which is detailed in Chapter 3.
In Chapter 4, I present the subtasks automation planning subsystem, which is used to produce equality proofs in a human-like fashion. The basic strategy of the subtasks system is break a given equality problem in to a hierarchy of tasks and then maintain a stack of these tasks in order to determine the order in which to apply equational rewriting moves. This process produces equality chains for simple problems without having to resort to brute force or specialised procedures such as normalisation. This makes proofs more human-like by breaking the problem into a hierarchical set of tasks in the same way that a human would.
To produce the interface for this software, I also created the ProofWidgets system for Lean 3. This system is detailed in Chapter 5. The ProofWidgets system uses Lean's metaprogramming framework to allow users to write their own interactive, web-based user interfaces to display within the VSCode editor and in an online web-editor. The entire tactic state is available to the rendering engine, and hence expression structure and types of subexpressions can be explored interactively. The ProofWidgets system also allows the user interface to interactively edit the proof document, enabling a truly interactive modality for creating proofs; human-like or not.
In Chapter 6, the system is evaluated by asking real mathematicians about the output of the system, and what it means for a proof to be understandable to them. The user group study asks participants to rank and comment on proofs created by HumanProof alongside natural language and pure Lean proofs. The study finds that participants generally prefer the HumanProof format over the Lean format. The verbal responses collected during the study indicate that providing intuition and signposting are the most important properties of a proof that aid understanding.EPSR
Proceedings of the ACM SIGPLAN Workshop on Approaches and Applications of Inductive Programming (AAIP 2009)
Inductive programming is concerned with the automated construction of declarative, often functional, recursive programs from incomplete specifications such as input/output examples. The inferred program must be correct with respect to the provided examples in a generalising sense: it should be neither equivalent to them, nor inconsistent. Inductive programming algorithms are guided explicitly or implicitly by a language bias (the class of programs that can be induced) and a search bias (determining which generalised program is constructed first). Induction strategies are either generate-and-test or example-driven. In generate-and-test approaches, hypotheses about candidate programs are generated independently from the given specifications. Program candidates are tested against the given specification and one or more of the best evaluated candidates are developed further. In analytical approaches, candidate programs are constructed in an example-driven way. While generate-and-test approaches can -- in principle -- construct any kind of program, analytical approaches have a more limited scope. On the other hand, efficiency of induction is much higher in analytical approaches. Inductive programming is still mainly a topic of basic research, exploring how the intellectual ability of humans to infer generalised recursive procedures from incomplete evidence can be captured in the form of synthesis methods. Intended applications are mainly in the domain of programming assistance -- either to relieve professional programmers from routine tasks or to enable non-programmers to some limited form of end-user programming. Furthermore, in the future, inductive programming techniques might be applied to further areas such as supporting the inference of lemmata in theorem proving or learning grammar rules. Inductive automated program construction has been originally addressed by researchers in artificial intelligence and machine learning. During the last years, some work on exploiting induction techniques has been started also in the functional programming community. Therefore, the third workshop on |Approaches and Applications of Inductive Programming| took place for the first time in conjunction with the ACM SIGPLAN International Conference on Functional Programming (ICFP 2009). The first and second workshop were associated with the International Conference on Machine Learning (ICML 2005) and the European Conference on Machine Learning (ECML 2007). AAIP´09 aimed to bring together researchers from the functional programming and the artificial intelligence communities, working in the field of inductive functional programming, and advance fruitful interactions between these communities with respect to programming techniques for inductive programming algorithms, the identification of challenge problems and potential applications. For everybody interested in inductive programming we recommend to visit the website: www.inductive-programming.org
The use of proof plans in tactic synthesis
We undertake a programme of tactic synthesis. We first formalize the notion of
a tactic as a rewrite rule, then give a correctness criterion for this by means of a
reflection mechanism in the constructive type theory OYSTER. We further formalize
the notion of a tactic specification, given as a synthesis goal and a decidability
goal. We use a proof planner. CIAM. to guide the search for inductive proofs
of these, and are able to successfully synthesize several tactics in this fashion.
This involves two extensions to existing methods: context-sensitive rewriting and
higher-order wave rules. Further, we show that from a proof of the decidability
goal one may compile to a Prolog program a pseudo- tactic which may be run to
efficiently simulate the input/output behaviour of the synthetic tacti
A supposedly fun thing i may have to do again : a HOAS encoding of Howe's method
We formally verify in Abella that similarity in the call-by-name lambda calculus is a pre-congruence, using Howe\u2019s method. This turns out to be a very challenging task for HOAS-based systems,
as it entails a demanding combination of inductive and coinductive reasoning on open terms, for which no other existing HOAS-based system is equipped for. We also o er a proof using a version of Abella supplemented with predicate quantification; this results in a more structured presentation that is largely independent of the operational semantics as well of the chosen notion of (bi)similarity.
While the end result is significantly more succinct and elegant than previous attempts, the exercise highlights some limitations of the two-level approach in general and of Abella in particular
A Deductive Verification Framework for Circuit-building Quantum Programs
While recent progress in quantum hardware open the door for significant
speedup in certain key areas, quantum algorithms are still hard to implement
right, and the validation of such quantum programs is a challenge. Early
attempts either suffer from the lack of automation or parametrized reasoning,
or target high-level abstract algorithm description languages far from the
current de facto consensus of circuit-building quantum programming languages.
As a consequence, no significant quantum algorithm implementation has been
currently verified in a scale-invariant manner. We propose Qbricks, the first
formal verification environment for circuit-building quantum programs,
featuring clear separation between code and proof, parametric specifications
and proofs, high degree of proof automation and allowing to encode quantum
programs in a natural way, i.e. close to textbook style. Qbricks builds on best
practice of formal verification for the classical case and tailor them to the
quantum case: we bring a new domain-specific circuit-building language for
quantum programs, namely Qbricks-DSL, together with a new logical specification
language Qbricks-Spec and a dedicated Hoare-style deductive verification rule
named Hybrid Quantum Hoare Logic. Especially, we introduce and intensively
build upon HOPS, a higher-order extension of the recent path-sum symbolic
representation, used for both specification and automation. To illustrate the
opportunity of Qbricks, we implement the first verified parametric
implementations of several famous and non-trivial quantum algorithms, including
the quantum part of Shor integer factoring (Order Finding - Shor-OF), quantum
phase estimation (QPE) - a basic building block of many quantum algorithms, and
Grover search. These breakthroughs were amply facilitated by the specification
and automated deduction principles introduced within Qbricks
- …