• Keine Ergebnisse gefunden

Exercise 1 Small Step Semantics

N/A
N/A
Protected

Academic year: 2022

Aktie "Exercise 1 Small Step Semantics"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Prof. Dr. A. Poetzsch-Heffter M.Sc. Peter Zeller

Dipl.-Inf. C. Feller

University of Kaiserslautern

Department of Computer Science Software Technology Group

Exercise Sheet 8: Specification and Verification with Higher-Order Logic (Summer Term 2014)

Exercise 1 Small Step Semantics

In this exercise we return to our small While-language based on the language IMP introduced in the lec- ture. In particular, we want to create and show properties about an adequate small step semantics for IMP.

Download the fileSheet8_smallstep.thyfrom our webpage.

a) Define a small step semantics for IMP within Isabelle/HOL. You should come up with a definition that describes what it means to execute one step as well as a definition that describes the execution ofksteps.

Hint: Remember that there are two different kinds of configurations: terminal and non-terminal ones.

The theory already contains a datatypeconfigfor such configurations, which also has an additional nice syntax defined.

b) Prove that terminal configurations are stuck w.r.t the semantics, i.e.

¬

hsi →1 y

c) Show that if you execute at least one step of the programIF b THEN c ELSE cand reach a statey then there exists a number of steps that you can execute the programcand reach the same state.

d) Show the following lemma from the lecture:

(hc1;c2, si →nhti)−→(∃m1m2r. n=m1 +m2∧ hc1, si →m1hri ∧ hc2, ri →m2 hti)

e) (optional)Consider the programWHILE 0 <= 0 DO x ::= x + 1. Show that for every number iyou can always find a numberkso that the value ofxis increased byiafter executing the program for ksteps.

Referenzen

ÄHNLICHE DOKUMENTE

These conferences and publications and the policy visions they propagated as “The Kenya We Want” represented the changing political background and the reality

In a phenomenological study identifying strategies used to support families in vulnerable circumstances, we conducted nine focus groups to examine how early interventionists (EIs)

If the indirect object is a pronoun, this word order is more common..  You'll give him

If the indirect object is a pronoun, this word order is more common.. Here are some other verbs that work the

If the indirect object is a pronoun, this word order is more common..  You'll give him

Change the word order and change the indirect object into a pronoun. We sent an application form to

Branded “DEFENDER 2020”, NATO is planning one of the largest land forces exercises seen in Europe since the end of the Cold War. Scheduled for April and May, the exercise aims

Underline all nouns green which are good for sea turtles.. Underline all nouns red which are bad for