Formal Methods. What Are Formal Methods Formal methods refers to a variety of mathematical modeling techniques that are applicable to computer system.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

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.
Pontus Boström and Marina Waldén Åbo Akademi University/ TUCS Development of Fault Tolerant Grid Applications Using Distributed B.
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Software system modeling
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.
Copyright © 2006 Addison-Wesley. All rights reserved. 3.5 Dynamic Semantics Meanings of expressions, statements, and program units Static semantics – type.
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
SD3049 Formal Methods Module Leader Dr Aaron Kans Module website
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
AI - Week 13 Knowledge Representation, Logic, Semantic Web Lee McCluskey, room 2/07
Formal Methods: Z CS 415, Software Engineering II Mark Ardis, Rose-Hulman Institute March 18, 2003.
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
Software Testing and Quality Assurance
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Formal Methods.
C SC 520 Principles of Programming Languages 1 C SC 520: Principles of Programming Languages Peter J. Downey Department of Computer Science Spring 2006.
Formal methods Basic concepts. Introduction  Just as models, formal methods is a complement to other specification methods.  Standard is model-based.
Describing Syntax and Semantics
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
MCA –Software Engineering Kantipur City College. Topics include  Formal Methods Concept  Formal Specification Language Test plan creation Test-case.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
PROGRAMMING LANGUAGES The Study of Programming Languages.
An Introduction to Programming and Object-Oriented Design Using Java By Jaime Niño and Fred Hosch Slides by Darwin Baines and Robert Burton.
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
Invariant Based Programming in Education Tutorial, FM’08 Linda Mannila
MATH 224 – Discrete Mathematics
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Korea Advanced Institute of Science and Technology, Dept. of EECS, Div. of CS, Information Systems Lab. 1/10 CS204 Course Overview Prof.
Model Based Testing Group 7  Nishanth Chandradas ( )  George Stavrinides ( )  Jeyhan Hizli ( )  Talvinder Judge ( )  Saajan.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
CS 363 Comparative Programming Languages Semantics.
Formal Methods in Software Engineering
Verification of behavioural elements of UML models using B Truong, Ninh-Thuan and Souquieres, Jeanine In Proceedings of the 2005 ACM Symposium on.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
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,
1 Levent Yilmaz COMP7730: Formal Methods in Software Engineering.
CS6133 Software Specification and Verification
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
Formal Specification: a Roadmap Axel van Lamsweerde published on ICSE (International Conference on Software Engineering) Jing Ai 10/28/2003.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)
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.
Knowledge Representation Lecture 2 out of 5. Last Week Intelligence needs knowledge We need to represent this knowledge in a way a computer can process.
Sub-fields of computer science. Sub-fields of computer science.
Introduction to Formal Methods
Formal Techniques (CS340 © John C. Knight 2004)
Software Design Methodology
Introduction Artificial Intelligent.
UML profiles.
Department of Computer Science Abdul Wali Khan University Mardan
Software system modeling
Motivation for Language Specification
Representations & Reasoning Systems (RRS) (2.2)
Activities of Formal Methods
Presentation transcript:

Formal Methods

What Are Formal Methods Formal methods refers to a variety of mathematical modeling techniques that are applicable to computer system design. They include activities such as system specification, specification analysis and proof, transformational development, and program verification.

Definition “ Formal methods are mathematical approaches to software and system development which support the rigorous specification, design and verification of computer systems.” [Fme04] “[they] … exploit the power of mathematical notation and mathematical proofs. “ [Gla04]

Seven Myths of Formal Methods 1.Formal methods can guarantee that software is perfect. 2.Work by proving that programs are correct. 3.Only highly critical systems benefit from their use. 4.They involve complex math. 5.They increase the cost of development. 6.They are incomprehensible to clients. 7.Nobody uses them for real projects.

History Formal specifications have been in use since the early days of computing. –1940's: Turing annotated the properties of program states to simplify the logical analysis of sequential programs. –1960's: Floyd, Hoare and Naur recommended using axiomatic techniques to prove programs meet their specifications. –1970's: Dijkstra used formal calculus to aid to develop of non- deterministic programs. The interest in the use of formal methods in software engineering has continued to grow.

Definition "Formal is often confused with precise". A formal specification consists of three components: i.Syntax - grammatical rules to determine if sentences are well formed ii.Semantics - rules for interpreting the sentences in a precise, meaningful way within the domain iii.Proof Theory - rules for inferring useful information from the specification

What are Formal Methods?  Notation with precise syntax and semantics  Doesn’t necessarily involve mathematics  Although mathematics is a formal notation  There are levels of formulization.  Techniques, methods, procedures, tools can support levels

Types of Formal Methods A variety of formal methods exist: –Abstract State Machines - The Abstract State Machine (ASM) thesis implies that any algorithm can be modeled by an appropriate ASM. –B-Method - B is a formal method for the development of program code from a specification in the Abstract Machine Notation. –Z – A specification language used for describing computer-based systems; based set theory and first order predicate logic –“Unified Modeling Language (UML) provides system architects…with one consistent language for specifying, visualizing, constructing, and documenting the artifacts of software systems..” Visual notation for OO modeling Extensible Independent of programming languages Formal basis for understanding the modeling language

Other Types of Formal Methods Others types include: –CommUnity –Estelle –Esterel –Lotos –Overture Modeling Language –Petri Nets –RAISE –SDL –TRIO, Unity, and VDM –Any programming language

Predicate Calculus The first order predicate calculus is a formal language for expressing propositions. A properly-formed predicate calculus expression is called a well-formed formula or WFF (pronounced wiff).

Predicate Calculus Constant Variable Predicate Function Connective Quantifier

Predicate Calculus

1.Whoever can read is literate. 2.Dogs are not literate. 3.Some dogs are intelligent. 4.Some who are intelligent cannot read. 1.  x [R(x)  L(x)] 2.  x [D(x)  R(x)] 3.  x [D(x)  I(x)] 4.  x [I(x)  R(x)]

Do we really need Formal Methods? Design errors "Digital systems can fail in catastrophic ways leading to death or tremendous financial loss.“ [Nas03] Potential causes of failure include: –physical failure –human error –environmental factors –design errors - Design errors are the major culprit.

The promise of Formal Methods Formal methods are needed to: –Improve SW Quality –Reduce cost of verifying system –Improve quality and rigor of entire development process –Reduce specification errors and provide a rational basis for choosing test data –Explore the properties of a design architecture

Weaknesses in Formal Methods Weaknesses: – Low-level ontologies – Limited Scope – Isolation – Cost – Poor tool feedback

Success of Formal Methods There are many examples of successful and cost-effective systems implemented using formal methods. –Mainly in domain of transportation systems –Also in domains such as: information systems telecommunication systems power plant control security