Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
Semantics Static semantics Dynamic semantics attribute grammars
ICE1341 Programming Languages Spring 2005 Lecture #6 Lecture #6 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
1 Mechanical Verification of Timed Automata Myla Archer and Constance Heitmeyer Presented by Rasa Bonyadlou 24 October 2002.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
CS 355 – Programming Languages
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
School of Computing and Mathematics, University of Huddersfield CAS2545: WEEK 11 LECTURE: n The meaning of Algebraic Specifications TUTORIAL/PRACTICAL:
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Temporal Logic of Actions (TLA) Leslie Lamport
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Software Verification Bertrand Meyer Chair of Software Engineering Lecture 2: Axiomatic semantics.
Describing Syntax and Semantics
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Propositional Calculus Math Foundations of Computer Science.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
1 Program Correctness CIS 375 Bruce R. Maxim UM-Dearborn.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
1 Inference Rules and Proofs (Z); Program Specification and Verification Inference Rules and Proofs (Z); Program Specification and Verification.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Pattern-directed inference systems
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
CS 363 Comparative Programming Languages Semantics.
Muhammad Idrees Lecturer University of Lahore 1. Outline Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
ISBN Chapter 3 Describing Semantics.
Chapter 3 Part II Describing Syntax and Semantics.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Semantics In Text: Chapter 3.
Syntax and Semantics CIS 331 Syntax: the form or structure of the expressions, statements, and program units. Semantics: the meaning of the expressions,
CS6133 Software Specification and Verification
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Verification & Validation By: Amir Masoud Gharehbaghi
Verification Formal Verification & Formal Evaluation Derived from Purdue: Cerias.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Faithful mapping of model classes to mathematical structures Ádám Darvas ETH Zürich Switzerland Peter Müller Microsoft Research Redmond, WA, USA SAVCBS.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
C HAPTER 3 Describing Syntax and Semantics. D YNAMIC S EMANTICS Describing syntax is relatively simple There is no single widely acceptable notation or.
IS 2620: Developing Secure Systems Formal Verification/Methods Lecture 9 March 15, 2012.
Advanced programming language theory. week 2. Attribute grammars and semantics.
COMP 412, FALL Type Systems C OMP 412 Rice University Houston, Texas Fall 2000 Copyright 2000, Robert Cartwright, all rights reserved. Students.
Artificial Intelligence Logical Agents Chapter 7.
Formal Verification/Methods
Propositional Calculus: Boolean Algebra and Simplification
IS 2935: Developing Secure Systems
Formal Methods in software development
Semantics In Text: Chapter 3.
Formal Methods in software development
Computer Security: Art and Science, 2nd Edition
Computer Security: Art and Science, 2nd Edition
Presentation transcript:

Formal Verification Lecture 9

Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems to be analyzed, and Verification techniques showing requirements are met by system description Rely on underlying mathematical logic system and the proof theory of that system

Formal Approach Formal Models use language of mathematics Specification languages For policies, models and system descriptions Well-defined syntax and semantics – based on maths Current trends - two general categories Inductive techniques Model checking techniques Differences based on  Intended use, degree of automation, underlying logic systems, etc.

Verification techniques – Criteria for classifying Proof-based vs model-based Proof: Formula define premises / conclusions Proof shows how to reach conclusions from premises Model-based: Premises and conclusions have same truth tables Degree of automation manual or automated (degree)

Propositional logic

Verification techniques – Criteria for classifying Full verification vs property verification Does methodology model full system? Or just prove certain key properties? Examples? Intended domain of application HW/SW, reactive, concurrent Predevelopment vs post development As design aid or after design

Inductive verification Typically more general Uses theorem provers E.g., uses predicate calculus A sequence of proof steps starting with premises of the formula and eventually reaching a conclusion May be used To find flaws in design To verify the properties of computer programs

Model-checking Systems modeled as state transition systems Formula may be true in some states and false in others Formulas may change values as systems evolve Properties are formulas in logic Truth values are dynamic Show: Model and the desired properties are semantically equivalent Model and properties express the same truth table Often used after development is complete but before a product is release to the general market Primarily for reactive, concurrent systems

Formal Verification: Components Formal Specification defined in unambiguous (mathematical) language Restricted syntax, and well-defined semantics based on established mathematical concepts  Example:? Implementation Language Generally somewhat constrained Formal Semantics relating the two Methodology to ensure implementation ensures specifications met

Specification Languages Specify WHAT, not HOW Valid states of system Postconditions of operations Non-Procedural Typical Examples: Propositional / Predicate Logic Temporal Logic (supports before/after conditions) Set-based models (e.g., formal Bell-LaPadula)

Specification Languages Must support machine processing Strong typing Model input/output/errors Example: SPECIAL First order logic based Strongly typed VFUN: describes variables (state) OFUN/OVFUN: describe state transitions

Example: SPECIAL MODULE Bell_LaPadula_Model Give_read Types Subject_ID: DESIGNATOR; Object_ID: DESIGNATOR; Access_Model: {READ, APPEND, WRITE}; Access: STRUCT_OF(Subject_ID subject; Object_ID object; Access_Mode mode); Functions VFUN active (Object_ID object) -> BOOLEAN active: HIDDEN; INITIALLY TRUE; VFUN access_matrix() -> Access accesses: HIDDEN; INITIALLY FORALL Access a: a INSET accesses => active(a.object); OFUN give_access(Subject_ID giver; Access access); ASSERTIONS active(access.object) = TRUE; EFFECTS `access_matrix() = access_matrix() UNION (access); END_MODULE

Example: Enhanced Hierarchical Development Methodology Based on HDM A general purpose design and implementation methodology Goal was To mechanize and formalize the entire development process Design specification and verification + implementation specification and verification Proof-based method Uses Boyer-Moore Theorem Prover

Example: Enhanced Hierarchical Development Methodology Hierarchical approach Abstract Machines defined at each level specification written in SPECIAL Mapping Specifications define functionality in terms of machines at higher layers Consistency Checker validates mappings “match” Compiler that maps a program into a theorem-prover understood form Successfully used on MLS systems Few formal policy specifications outside MLS domain

Levels of Abstraction

HDM Verification

Boyer-Moore Theorem Prover Fully automated No interface for comments or directions User provides all the theorems, axioms, lemmata, assertions LISP like notation Very difficult for proving complex theorems Key idea Used extended propositional calculus Efficiency – to find a proof.

Boyer-Moore Theorem Prover Steps: Simplify the formula Reformulate the formula with equivalent terms Substitute equalities Generalize the formula by introducing variables Eliminate irrelevant terms Induct to prove

Gypsy verification environment (GVE) Based on Pascal Formal proof and runtime validation support Specifications defined on procedures Entry conditions, Exit conditions, Assertions Proof techniques ensure exit conditions / assertions met given entry conditions Also run-time checking Examples:  Gypsy (in book) – uses theorem prover  CLU  Eiffel (and derivatives) – run-time checks

Other Examples Prototype Verification System (PVS) Based on EHDM Interactive theorem-prover Symbolic Model Verifier Temporal logic based Notion of “path” – program represented as tree Statements that condition must hold at a future state, all future states, all states on one path, etc.

Other Examples Formal verification of protocols Key management Protocol development Verification of libraries Entire system not verified But components known okay High risk subsystems

Protocol Verification Generating protocols that meet security specifications Assumes cryptography secure But cryptography is not enough