Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)

Slides:



Advertisements
Similar presentations
May 24, 2004 SWSL outbrief 1 Outbrief from SWSL group at SWSI F2F May 24, 2004.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Semantics Static semantics Dynamic semantics attribute grammars
PZ03D Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ03D - Program verification Programming Language Design.
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.
© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
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.
1/22 Programs : Semantics and Verification Charngki PSWLAB Programs: Semantics and Verification Mordechai Ben-Ari Mathematical Logic for Computer.
CS 355 – Programming Languages
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
Lecture 3: Requirements Modeling Intro Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of Wollongong.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Chapter 3 Describing Syntax and Semantics Sections 1-3.
Chapter 3 Describing Syntax and Semantics Sections 1-3.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Describing Syntax and Semantics
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.
Requirements Expression and Modelling
Knowledge Interchange Format Michael Gruninger National Institute of Standards and Technology
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
SOFTWARE DESIGN.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Advanced Topics in SE Spring Process Algebra Hossein Hojjat Formal Methods Lab University of Tehran.
Framework for the Development and Testing of Dependable and Safety-Critical Systems IKTA 065/ Supported by the Information and Communication.
Chapter 25 Formal Methods Formal methods Specify program using math Develop program using math Prove program matches specification using.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
1 Introduction to Software Engineering Lecture 1.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Requirements Specification. Welcome to Software Engineering: “Requirements Specification” “Requirements Specification”  Verb?  Noun?  “Specification”
Formal Semantics of Programming Languages 虞慧群 Topic 1: Introduction.
Program Analysis and Verification Spring 2014 Program Analysis and Verification Lecture 4: Axiomatic Semantics I Roman Manevich Ben-Gurion University.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
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.
COP4020 Programming Languages Introduction to Axiomatic Semantics Prof. Robert van Engelen.
Formal Methods.
CS6133 Software Specification and Verification
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
Secure Composition of Untrusted Code: Wrappers and Causality Types Kyle Taylor.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
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.
Formal Methods. What Are Formal Methods Formal methods refers to a variety of mathematical modeling techniques that are applicable to computer system.
Introduction to Formal Methods
(One-Path) Reachability Logic
Formal Methods in Software Engineering 1
Chapter 10: Mathematical proofs
Logical architecture refinement
Lecture 5 Floyd-Hoare Style Verification
Unified Modeling Language
Semantics In Text: Chapter 3.
Project Management: Inspections and Reviews Formal Specifications
Predicate Transformers
Department of Computer Science Abdul Wali Khan University Mardan
Towards a Unified Theory of Operational and Axiomatic Semantics
Programming Languages and Compilers (CS 421)
Presentation transcript:

Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)

Duminda WijesekeraSWSE 623: Introduction2 Formal and Semi-formal Methods Formal = Have a well defined mathematical basis Can apply to any stage of the life cycle –Recast every thing in mathematics and prove relevant properties Can be used for: –Syntactic analysis –Semantic analysis –The issue here is of computational complexity

Duminda WijesekeraSWSE 623: Introduction3 Semi Formal Methods Semi-formal= Only partly mathematical Could mean –Only some aspects formalized –Only syntactic methods available

Duminda WijesekeraSWSE 623: Introduction4 Specification Languages Syntax, Semantics, Satisfaction, deduction system, soundness and consistency Examples: –First Order Logic –BNF Differences in specification languages –Syntactic –Semantic –Satisfaction

Duminda WijesekeraSWSE 623: Introduction5 Programming languages vs. Specification languages Programming languages are executable. –Have operational semantics. –Have denotational semantics also. Specification languages do not have to be executable. –Programming Language => Specification Language –Specification Languages =/=> Programming Language

Duminda WijesekeraSWSE 623: Introduction6 Programming languages vs. Specification languages – Cont. Why have more abstract specification Languages? –Specification languages are at a higher level –May want to specify non-computable facts –Separate specification from implementation One specification and many implementations in many languages and operational environments Specifications have a life independent of implementational optimizations

Duminda WijesekeraSWSE 623: Introduction7 Using a Programming Language as a Specification Language Cons: –Not able to verify before compiling –Low level, no logical derivations –Specification tied to one language Pros: –No gap between specification and code –Correctness is not an issue – NuPrl.

Duminda WijesekeraSWSE 623: Introduction8 Semantic Domains Programming language have operational and denotational semantics. Can use satisfaction relation as implementation. Semantic abstraction function –Divide semantic domain into equivalence classes. –Extend satisfaction relation into equivalence classes. Can have many semantic abstraction functions Can impose different constraints Can specify and verify different aspects

Duminda WijesekeraSWSE 623: Introduction9 Many Specification Languages for Same System Can specify and verify complementary properties Specification types –Structure of system –Behavior Semantic Domain Specification 1Specification 2

Duminda WijesekeraSWSE 623: Introduction10 Structural Specifications Constraints on internal composition –Class diagrams –Modula interconnection diagrams Captures –Hierarchies –Associations –Usage –Data and control dependencies

Duminda WijesekeraSWSE 623: Introduction11 Behavioral Specifications Constraints on observable behavior Example: –Input-output behavior of modules –Interactions between modules, message passing Captures –Fault tolerance –Safety, security, –Timing, resource consumption patterns –Quality of service

Duminda WijesekeraSWSE 623: Introduction12 Properties of Specifications Unamibiguity: Satisfaction relation maps each object in the syntactic domain to a unique object in the semantic domain Consistency: Satisfaction relation maps each object in the syntactic domain to a non-empty object in the semantic domain Completeness: If every sentence or its negation is implied by the specification. Difficult to get –Relative completeness –Over-specification Vs. Design freedom –Semantic Bias Vs. Implication Bias

Duminda WijesekeraSWSE 623: Introduction13 Specifications and Proofs Have a deduction system with proof rules and (possibly) assumptions. –Can be partially automated Can predict system behavior without execution –Increases confidence and assurance

Duminda WijesekeraSWSE 623: Introduction14 Refinement Divide and conquer –A higher level specification can be divided into a set of lower level specifications. –Prove components correct, combine them and prove larger specification correct –Breaks down a proof with a goal into sub-proofs with sub-goals Examples we discuss: –Predicate transformers Dijkstra –Hoare triples for weakest preconditions etc.

Duminda WijesekeraSWSE 623: Introduction15 Types of Formal Methods Model Oriented: Construct a model of the system behavior using mathematical objects like sets, sequences etc. –Statecharts, SCR, VDM, Z –Petri Nets, CCS, CSP, Automata theoretic models Property Oriented: Use a set of necessary properties to describe system behavior, such as axioms, rules etc. –Larch, Algebraic semantics –Temporal logic models.