• Keine Ergebnisse gefunden

University of Kaiserslautern Department of Computer Science Software Technology Group

N/A
N/A
Protected

Academic year: 2022

Aktie "University of Kaiserslautern Department of Computer Science Software Technology Group"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Prof. Dr. A. Poetzsch-Heffter Dipl.-Inf. P. Michel

Dipl.-Inf. C. Feller

University of Kaiserslautern

Department of Computer Science Software Technology Group

Exercise Sheet 7: Specification and Verification with Higher-Order Logic (Summer Term 2010)

Date: 09.06.2010

Exercise 1 Case Study: Quicksort

Download the “Quicksort.thy” theory from our website. It contains all the definitions and properties seen in the lecture.

Complete the following proofs:

• qsplit_length: In the lecture, this lemma was split into numerous specialized versions. You can of course state additional auxiliary lemmas like these if you want/need to.

• termination qsort(shown in the lecture)

• counts_app(lemma 2 from the blackboard)

• qsplit_counts(lemma 1 from the blackboard)

• qsort_counts(shown in the lecture)

• sorted_prop: You have seen this lemma at the end of the lecture. It will help with proving the main theorem in the lecture.

Exercise 2 Case Study: Mergesort

In this exercise we take a look at another sorting algorithm, namelymergesort. We are thereby changing the model, but keep the properties we already specified and validated for quicksort.

Download the “Mergesort.thy” theory from our website, which contains all the necessary definitions and properties.

Complete all the missing proofs like you did for quicksort. For mergesort you will of course need a different lemma capturing the basic idea of the algorithm.

Referenzen

ÄHNLICHE DOKUMENTE

The scaling mechanisms of Mesosphere, regarding scaling up the number of instances of applications and scaling up the available resources of an application, within the meaning

The difference to the usual induction over natural numbers is, that one can assume, that the hypothesis holds for all numbers smaller than n, whereas in the usual induction rule it

Download the file Sheet4_exprsimp.hs from the website. This Haskell program parses expressions given by the user and simplifies them. You do not have to understand the other parts

b) We now want to proof a more general property of this program which is not fixed to vn being 3. As the first step towards this goal, prove that the execution of the loop body adds

This file contains the Imp language with additional constructs for working with Arrays. The program se- mantics is defined in terms of a Big Step Semantics, similar to Sheet 7.

Peter

Exercise Sheet 6: Specification and Verification with Higher-Order Logic (Summer Term 2012)..

c) Optimize your proof by using the custom wphoare method, like done in the splitcorrect lemmas... d) The splitcorrect lemma does not prove that split does not change the content of