IS 2620: Developing Secure Systems Formal Verification/Methods Lecture 9 March 15, 2012.

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?
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.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
(c) 2007 Mauro Pezzè & Michal Young Ch 7, slide 1 Symbolic Execution and Proof of Properties.
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.
CS 330 Programming Languages 09 / 19 / 2006 Instructor: Michael Eckmann.
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.
Language Specfication and Implementation - PART II: Semantics of Procedural Programming Languages Lee McCluskey Department of Computing and Mathematical.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
Axiomatic Semantics Dr. M Al-Mulhem ICS
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Temporal Logic of Actions (TLA) Leslie Lamport
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
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
Propositional Calculus Math Foundations of Computer Science.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec17 1 Lecture 17: Formal Modeling Methods Formal Modeling Techniques.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
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.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Muhammad Idrees Lecturer University of Lahore 1. Outline Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
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,
COP4020 Programming Languages Introduction to Axiomatic Semantics Prof. Robert van Engelen.
CS6133 Software Specification and Verification
CSE Winter 2008 Introduction to Program Verification January 15 tautology checking.
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.
Requirements Engineering Methods for Requirements Engineering Lecture-31.
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.
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
IS 2935: Developing Secure Systems
IS 2150 / TEL 2810 Introduction to Security
Semantics In Text: Chapter 3.
Computer Security: Art and Science, 2nd Edition
IS 2150 / TEL 2810 Information Security & Privacy
Computer Security: Art and Science, 2nd Edition
Presentation transcript:

IS 2620: Developing Secure Systems Formal Verification/Methods Lecture 9 March 15, 2012

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 Boolean And Or Not Implies Propositional Axioms Inference rules

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/propositional 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 (Temporal logic) 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 released 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 Pre/Post-conditions of operations Non-Procedural Typical Examples: Propositional / Predicate Logic Temporal Logic (supports before/after conditions) Set-based models (e.g., formal Bell-LaPadula )

11 Example: Primitive commands (HRU) Create subject s Creates new row, column in ACM; s does not exist prior to this Create object o Creates new column in ACM o does not exist prior to this Enter r into a[s, o] Adds r right for subject s over object o Ineffective if r is already there Delete r from a[s, o] Removes r right from subject s over object o Destroy subject s Deletes row, column from ACM; Destroy object o Deletes column from ACM

12 Example: Primitive commands (HRU) Create subject s Creates new row, column in ACM; s does not exist prior to this Precondition: s  S Postconditions: S´ = S  { s }, O´ = O  { s } (  y  O´)[a´[s, y] =  ] (row entries for s) (  x  S´)[a´[x, s] =  ] (column entries for s) (  x  S)(  y  O)[a´[x, y] = a[x, y]] Precondition: s  S Postconditions: S´ = S  { s }, O´ = O  { s } (  y  O´)[a´[s, y] =  ] (row entries for s) (  x  S´)[a´[x, s] =  ] (column entries for s) (  x  S)(  y  O)[a´[x, y] = a[x, y]] Safety Theorems

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_Mode: {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() -> Accesses 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 / Control Tree Logic 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 BAN Logic Believes, sees, once said Assumes cryptography secure But cryptography is not enough