Formalism and Intuition in Software Development



Similar documents
Introducing Formal Methods. Software Engineering and Formal Methods

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

LIFT CONTROL SYSTEMS CATALOGUE 2007

Specification and Analysis of Contracts Lecture 1 Introduction

LIFT CONTROL SYSTEMS CATALOGUE 2007

Theory of Automated Reasoning An Introduction. Antti-Juhani Kaijanaho

Python Programming: An Introduction to Computer Science

Bypass transfer switch mechanisms

Mathematics Georgia Performance Standards

Introduction to formal semantics -

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

DSX-Soft I/O Integration Software

Structure and Reasoning in Software Development

CSE4213 Lecture Notes

LIFT CONTROL SYSTEMS CATALOGUE 2009

Fixed-Point Logics and Computation

Robotics and Automation Blueprint

SYMMETRY WHITE PAPER. Destination Dispatch Elevator Integration. Adam Shane

The Role of Function Points in Software Development Contracts

LEVERAGE EXCEL. AVOID THE PITFALLS. How to embrace and extend Excel for Enterprise Planning

CHAPTER 7 GENERAL PROOF SYSTEMS

Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.

Chapter II. Controlling Cars on a Bridge

Interfacing Elevators with Fire Alarm and Sprinklers

Summary Last Lecture. Automated Reasoning. Outline of the Lecture. Definition sequent calculus. Theorem (Normalisation and Strong Normalisation)

LCS 11: Cognitive Science Chinese room argument

1/9. Locke 1: Critique of Innate Ideas

Trust but Verify: Authorization for Web Services. The University of Vermont

Lecture 13 of 41. More Propositional and Predicate Logic

Lecture 9: Requirements Modelling

The Basics of Graphical Models

Foundational Proof Certificates

THEME Competence Matrix - Electrical Engineering/Electronics with Partial competences/ Learning outcomes

Is load testing during initial acceptance inspection still the contemporary method?

DELAWARE MATHEMATICS CONTENT STANDARDS GRADES PAGE(S) WHERE TAUGHT (If submission is not a book, cite appropriate location(s))

Positive Philosophy by August Comte

Basic Testing Concepts and Terminology

The History of Logic. Aristotle ( BC) invented logic.

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

Learning is a very general term denoting the way in which agents:

The Classes P and NP

Certified PHP Developer VS-1054

Understanding Emergency Power Off (EPO)

E-Business Technologies for the Future

Rigorous Software Development CSCI-GA

S WORK CATALOGUE FAA29100H_BWC

On-line PD Monitoring Makes Good Business Sense

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Adversary Modelling 1

(AA12) QUANTITATIVE METHODS FOR BUSINESS

THE REASONING ART: or, The Need for an Analytical Theory of Architecture

The Business case for monitoring points... PCM architecture...

INTELLIGENT BUILDINGS BUS SYSTEMS, MyHOME. Ján Cigánek, Martin Janáček, Stanislav Števo

Introduction to Formal Methods. Các Phương Pháp Hình Thức Cho Phát Triển Phần Mềm

Business Intelligence and Decision Support Systems

CpSc810 Goddard Notes Chapter 7. Expert Systems

Hardware Assisted Virtualization

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

ENERGY CONSERVATION: SMART METERS AND BIG DATA ANALYTICS TO THE RESCUE. A White Paper May 2014

An Introduction to Fault Tree Analysis (FTA)

54 Robinson 3 THE DIFFICULTIES OF VALIDATION

P vs NP problem in the field anthropology

ABET General Outcomes. Student Learning Outcomes for BS in Computing

NOT AN OFFICIAL SCORE REPORT. Summary of Results

Exhibit memory of previously-learned materials by recalling facts, terms, basic concepts, and answers. Key Words

CS Master Level Courses and Areas COURSE DESCRIPTIONS. CSCI 521 Real-Time Systems. CSCI 522 High Performance Computing

Python Programming: An Introduction to Computer Science

TECH. Requirements. Why are requirements important? The Requirements Process REQUIREMENTS ELICITATION AND ANALYSIS. Requirements vs.

Ontologies for Enterprise Integration

General Philosophy. Dr Peter Millican, Hertford College. Lecture 3: Induction

Prentice Hall Algebra Correlated to: Colorado P-12 Academic Standards for High School Mathematics, Adopted 12/2009

DHL CARGO INSURANCE RELAX. YOU RE IN SAFE HANDS

Teaching & Learning Plans. Plan 1: Introduction to Probability. Junior Certificate Syllabus Leaving Certificate Syllabus

Effective Techniques for Risk Measurement. Agenda

Basic manual: Contents ELECTRONICALLY CONTROLLED HYDRAULIC SYSTEMS

Job Qualifications, Position Descriptions & Performance Reviews

Diablo Valley College Catalog

Control System Definition

AIR CONDITIONING SYSTEM 1. FFH SPECIFICATION AIR CONDITIONING SYSTEM RODIUS

Data Quality in Information Integration and Business Intelligence

2.4 Protected Elevators For Egress And Access During Fires In Tall Buildings

Safety and Environmental Information for External Companies

Access Code: RVAE4-EGKVN Financial Aid Code: 6A9DB-DEE3B-74F

Security Issues with Integrated Smart Buildings

How To Handle An Emergency At A Strata Corporation

A UML Documentation for an Elevator System. Distributed Embedded Systems, Fall 2000 PhD Project Report

JANUS INTERNATIONAL CORPORATION INSTALLATION INSTRUCTIONS Pantheon Mini Operator

MATH. ALGEBRA I HONORS 9 th Grade ALGEBRA I HONORS

PROCEDURES AND CARE FOR ASSEMBLY AND DAILY INSPECTION OF THE APPORT ELECTRIC MINI PLATFORM A-50 Model

Reality in the Eyes of Descartes and Berkeley. By: Nada Shokry 5/21/2013 AUC - Philosophy

Set-Based Design: A Decision-Theoretic Perspective

CS510 Software Engineering

Transcription:

Formalism and Intuition in Software Development... intuition and deduction, on which alone we rely in the acquisition of knowledge. René Descartes Michael Jackson The Open University jacksonma@acm.org FME Meeting CWI Amsterdam March 8 2013 07/03/2013 FME2013CWI 1 of 30

What do I mean by formalism and intuition? 07/03/2013 FME2013CWI 2 of 30

Formalism is using calculi of symbols Reasoning over symbol structures according to the rules of a strict calculus, to deduce certain conclusions from axioms... decisive step of mathematical abstraction... forget what the symbols stand for... many operations to carry out without having to look at the things they stand for. Hermann Weyl, 1940 Intuition is comprehension of the world before us Comprehending worldly truths by direct observation and past experience, without appeal to conscious reasoning Intuition is the way we translate our experiences into judgments and decisions... using patterns to recognize what s going on in a situation. Gary Klein; Intuition at Work, Doubleday, 2003 07/03/2013 FME2013CWI 3 of 30

What do I mean by software development? Here s an example 07/03/2013 FME2013CWI 4 of 30

Lift-control system: a development problem A normal design task Mitsubishi, Thyssen, Otis, Schindler, Fuji, Kone,... System behaviour must satisfy all of the stakeholders requirements!??? Diamond Trac Elevator (Mitsubishi): >50 Computer-Controlled Features But I ll consider it as a radical design task 07/03/2013 FME2013CWI 5 of 30

What are the development activities inviting possible use of formalism and/or intuition? 07/03/2013 FME2013CWI 6 of 30

Lift-control system: development activities M Lift Controller Lobby Display Lift Equip t Floors Building Manager Buttons Users W System Behaviour R??? (Behaviour R must satisfy stakeholder requirements) In some order / interleaving... Identify stakeholders, discover and describe requirements Discover, describe and analyse problem world properties W Design a satisfying system behaviour R Ensure R satisfies requirements (and stakeholders agree) Invent and specify a feasible machine behaviour M Formally demonstrate that M,W = R Convince the regulator that system is safe... How do formalism and intuition apply to these activities? 07/03/2013 FME2013CWI 7 of 30

Formalism and intuition have a common pattern, but differ in their basic characteristics 07/03/2013 FME2013CWI 8 of 30

The common pattern of describing and reasoning description A names reasoning description B names interpretation phenomena interpretation phenomena Describe, reason, conclude, interpret Phenomena Reality Names Language Types Connectives Logic Inference Precise Vague 07/03/2013 FME2013CWI 9 of 30

Formalism emphasises correct reasoning It must be possible to replace in all geometric statements the words point, line, plane, by table, chair, mug. David Hilbert, quoted by Hermann Weyl, 1944 I look at a formal description of a reality: the symbolic text appears as a new reality in its own right description A interpretation names reasoning interpretation description B names 07/03/2013 FME2013CWI 10 of 30

Intuition emphasises the subject reality Uttering a word is like striking a note on the keyboard of the imagination. Ludwig Wittgenstein; Philosophical Investigations, I.6 I look at an informal description: the language does not present a second reality: I see the described reality description A interpretation names reasoning description B interpretation names 07/03/2013 FME2013CWI 11 of 30

How formalism and intuition differ description A interpretation reasoning names interpretation description A names reasoning interpretation description B names interpretation description B names Intuition allows Flexible language definition Phenomena of any types Flexible description syntax Extensible reasoning logic Partial inconsistent models Intuition presents understanding Reasoning is unreliable Conclusion is unreliable in reality! Formalism demands Exact language definition Phenomena language types Predefined description syntax Predefined reasoning logic One fully consistent model Formalism presents theorems Description A => description B Conclusion is unreliable in reality! 07/03/2013 FME2013CWI 12 of 30

Formalism is for proving theorems, intuition is for learning, exploring, approximating and inventing 07/03/2013 FME2013CWI 13 of 30

Formalism and intuition: what they are for Thus logic and intuition have each their necessary rôle. Each is indispensable. Logic, which alone can give certainty, is the instrument of demonstration; intuition is the instrument of invention. Henri Poincaré, 1908 A practical description combines some of both eg: non-formal main structure of a formal text eg: local use of FSM, FOPL,... in non-formal text So: how can we use formalism to best advantage? Where do its disadvantages hurt most? How can we benefit from its certainties? 07/03/2013 FME2013CWI 14 of 30

A paradox? Formalism can t handle the real difficulties of software complexity 07/03/2013 FME2013CWI 15 of 30

Complexity of requirements Train control system Never 2 trains in one segment Assembling a train? Crash rescue? Lift control system Door_Open => Car_At_Floor Firefighter mode? Maintenance mode? Car_Stopped => Car_At_Floor Free-fall prevention on broken cable? Access control system In_Room (p,r) => Authorised(p,r) Forbidden by fire regulations! 07/03/2013 FME2013CWI 16 of 30

Complexity of the problem world Fuzzy phenomena Lamp_Lit Dim bulb? Bulb failed? Dirty glass? Lift_At_Floor[f] Within 1cm of floor f home position? Lift car stationary at floor f? What if sensor actuator is broken? Dubious physical properties Switch-On => Lamp_Lit Switch failure? No power? Circuit interrupted? Motor_On => Lift_Rising Motor burnout? Relay failure? Gearbox failure? Hoist cable broken? 07/03/2013 FME2013CWI 17 of 30

Formalism is used most effectively when the context of application is restricted 07/03/2013 FME2013CWI 18 of 30

Context: source and solution of complexity M Lift Controller Lobby Display Lift Equip t Floors Building Manager Buttons Users W System Behaviour R??? (Behaviour R must satisfy stakeholder requirements) Many operational contexts Service demand patterns: daily, weekly, occasional,... Equipment maintenance, licensing inspection,... Fire in building, earthquake, flood,... Many possible equipment faults of varying severity Failure of one floor sensor, doors won t open / close, failure of hoist motor, hoist cable broken,... In each ensemble of concurrent contexts... Certain problem world assumptions hold well enough Certain associated requirements are to be satisfied 07/03/2013 FME2013CWI 19 of 30

We must identify, structure, and understand the many contexts informally 07/03/2013 FME2013CWI 20 of 30

Some candidate contexts Fault-free normal lift service Firefighter lift service Test mode behaviour Maintenance mode Failure-reduced service Maintain lobby display Door open and close Lift Svce Controller a b c Lift Equip t Floors d e f Emergency Brake Buttons g Users Fault-free Normal Lift Service Overloaded travel prevention (?) Fault detection and diagnosis Free fall prevention Editing priority scheme Managing priority schemes Safe lift parking Tycoon floor security (?)...?? FreeFall Machine a c Lift Car d e Floors g h Prevent High Falling Speed 07/03/2013 FME2013CWI 21 of 30

Behaviours in contexts are inventions (contrivances) Here s an example 07/03/2013 FME2013CWI 22 of 30

An example context: free fall prevention An identified context is invented A requirement to be satisfied a Emergency Brake d Properties holding well enough Invention begins with an idea FreeFall Machine c Lift Car e g Brake on High Falling Speed Unforeseen details come later Floors Invention can t be done by formalism! The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise. Edsger Dijkstra, Turing Award Lecture, 1972 Invention in the material world depends on imprecision Unforeseen details compel adjustment to any abstraction 07/03/2013 FME2013CWI 23 of 30

The role of formalism: to check the product of intuition FreeFall Machine a Emergency Brake d Lift Car g No Free Fall a: FFM! Apply_Brake c: Flrs! Sensor_On[f] d: EBr! Lock_Car_In_Shaft e: LCar! Arrive_Floor[f] g: Lift_Car_Falling_Speed c e Floors Operational principle explains how it works Traversal: g e c a g Not physics or mathematics, but logic of contrivance... parts combining to an overall operation which achieves the purpose of the machine (Polanyi) Formal mathematical and physical analysis Follows and evaluates causal links in traversal 07/03/2013 FME2013CWI 24 of 30

Two thoughts about software development method 07/03/2013 FME2013CWI 25 of 30

Development method 1 Method consists entirely in properly ordering and arranging the things to which we should pay attention. Rene Descartes; Works Volume X, p379: Rules for the Direction of the Mind, Rule V. Development must rest on rich understanding...... obtained by informal exploring, discovering, learning...... unconstrained by premature abstractions Any one formalism inherently compels many abstractions eg abstracting from agency and control eg abstracting from machine vs problem world distinction eg abstracting from given vs required distinction eg abstracting from non-truth-functional phenomena eg abstracting from the logic of contrivance (Polanyi) So: formalise late, formalise locally, formalise variously! 07/03/2013 FME2013CWI 26 of 30

Development method 2 Formalism s neglected roles Formalism too often aims at a unified consistent model Eventually the system must be (in some sense) unified...... but only once the local contexts are understood Tasks for formalism Formalising and verifying in each local context Analysing mutual consistency of local contexts Exploiting logic of contrivance for safety cases Reconciling heterogeneous local contexts Transforming reconciled contexts to software view... 07/03/2013 FME2013CWI 27 of 30

Envoi: one last word 07/03/2013 FME2013CWI 28 of 30

Envoi A formal method of system development has the same virtues and limitations as an arithmetic method of designing a house Anonymous 07/03/2013 FME2013CWI 29 of 30

Thank you! 07/03/2013 FME2013CWI 30 of 30