Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.

Similar presentations


Presentation on theme: "Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used."— Presentation transcript:

1 Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used in other course settings outside of Kansas State University in their current form or modified form without the express written permission of one of the copyright holders. During this course, students are prohibited from selling notes to or being paid for taking notes by any person or commercial firm without the express written permission of one of the copyright holders. CIS 842: Specification and Verification of Reactive Systems Lecture 9: Introduction to FCL – A simple FlowChart Language

2 The FlowChart Language (FCL) FCL Syntax –An example program –Flowchart diagrams FCL semantics –Traces –Operational Semantics (Evaluator) FCL is our vehicle for studying the internals of a simple explicit state model-checker

3 FCL Example Computing the power function (m n) (init) init: result := 1; goto test; test: if <(n 1) then end else loop; loop: result := *(result m); n := -(n 1); goto test; end: return result;

4 FCL Syntax Syntax Domains Grammar

5 Statement-level Control Flow Graph Computing the power function (m n) (init) init: result := 1; [init.1] goto test; [init.2] test: if <(n 1) [test.1] then end else loop; loop: result := *(result m); [loop.1] n := -(n 1); [loop.2] goto test; [loop.3] end: return result; [end.1] [init.1] [init.2] [test.1] [loop.1] [loop.2] [loop.3] [end.1] Unique labels for each statement

6 FCL Semantics: Execution Traces Computing 5 2 (m=5, n=2): (m n) (init) init: result := 1; [init.1] goto test; [init.2] test: if <(n 1) [test.1] then end else loop; loop: result := *(result m); [loop.1] n := -(n 1); [loop.2] goto test; [loop.3] end: return result; [end.1] Store State (Configuration)

7 FCL Semantics: Execution Traces An execution traces out a path in CFG [init.1] [init.2] [test.1] [loop.1] [loop.2] [loop.3] [end.1]

8 Assessment So far… –FCL describes flowcharts visualized as statement level control-flow graphs –Execution traces follow paths through CFG Next… –We will formalize FCL semantics in terms of traces using an operational semantics –This will yield an abstract formal specification for an FCL interpreter –This specification will guide in implementing an interpreter for FCL (e.g., in Java, SML, etc.) –We will build on this specification when considering parallel languages, model-checking, abstraction, etc.

9 Operational Semantics Main idea evaluating with store  and expression e yields value v Values: natural numbers Stores: computer memory …(abstractly) mapping variables to value …(concretely) lookup table (variables as keys)

10 Expressions Rules Example derivation

11 Assignments Rules Example derivation

12 Jumps

13 Transitions

14 Conclusion The operational semantics rules present an abstract formulation of an FCL interpreter In the next lecture, we will extend the rules to define a model-checker


Download ppt "Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used."

Similar presentations


Ads by Google