Vous êtes sur la page 1sur 3

Quotes to remember:

Formal
Specifications

Of course, there is no fool-proof methodology or


magic formula that will ensure a good, efficient,
or even feasible design. For that, the designer
needs experience, insight, flair, judgement,
invention. Formal methods can only stimulate,
guide, and discipline our human inspiration,
clarify design alternatives, assist in exploring
their consequences, formalize and communicate
design decisions, and help to ensure that they
are correctly carried out.
C. A. R. Hoare

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 1

About the Instructor

Lecture 1 Introduction to Data Mining

Page 3

About the Instructor and the Students

Lecture 1 Introduction to Data Mining

Page 2

You are about years of age (unless


otherwise specified).
You are in your year of University
(unless otherwise specified).
You need to turn up to all lectures, do all the
course work, and understand this course as
it is delivered. No exceptions!
You need to complete and understand all
exercises during the course, and keep ut to
speed with the lectures.

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 4

About the Course

I am not going to teach you.


You are going to learn.
You are not at school. You have taken control of
your own learning.
It is up to you to take advantage of the exercises, the
internet, books in the library, your colleagues, and
your own intelligence, to learn.
My job is only to offer you an opportunity to learn.
Your job is to accept that opportunity.
My lectures will be clear but the material is going
to be difficult. Your job is to understand it.

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

About the Students

Who am I?
Academic qualification?
Professional experience?
Availability?
Mode of counseling?
Contacts?
Responsibilities?
At the end of the semester I will set the
exams, which I will mark.

Sunday, October 02, 2016

Sunday, October 02, 2016

Page 5

This course is about the FORMAL SPECIFICATION.


You should acquire the following personal abilities:

Understand syntax and informal and formal semantics of a


language.
Go from a real world example to a formal specification.
Reason with the specification.
Go from a specification to a discussion of what it models.
Understand various issues, including polymorphic types,
recursive functions, higher order functions, pattern
matching, structured types, etc.
Interpret a specification as operational requirement on a
software (program).
Refine a specification to a software (program).

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 6

Formal Specification is Challenging

Formal Specification is Challenging?

Suppose that we want to specify:


PUT A FLAG UP OUTSIDE YOUR
HOME UP ON THE 14TH OF
AUGUST

Looks pretty simple!


Lets think about it like a Software
Engineer or a Programmer!
Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 7

The Flag Problem

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 8

The Flag Problem (contd.)

Does the flag mean the cloth along with its holding
bar (or stick), or the piece of cloth only?
Does that mean midnight to midnight, or just during
the day?
Do you mean exactly midnight to midnight, at least
midnight to midnight, or at most midnight to midnight,
or dawn to dusk, or dawn to dawn?
What if you put it up and the flag falls down? Does
that count?
Are you authorized to put the flag up twice (e.g. if it
falls down)?

What does your home mean?


What if you have two homes? What if your
home is being redecorated and you are in a
hotel?
Do you put flags in all your homes, or just
your one?
Do you have to do it yourself, or can your
somebody else can do it for you?
Suppose you have a flag up all the year
around. Do you have to take it down so you
can put it up?

Sunday, October 02, 2016

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 9

The Flag Problem (contd.)

Lecture 1 Introduction to Data Mining

Page 10

The Flag Problem (contd.)

What is a flag?
What about its size?
What if the colors are faded, or it's
muddy?
Does it have to be somewhere people
can see it?
Does it have to be a country flag, or will
any flag do?
A flag you made up yourself?

What if you steal a flag? Does that


count? Can you borrow it from
someone?
What if you have bought the house
but you have not yet signed the
completion. Who is responsible for
the flag: the seller or the buyer?

Sunday, October 02, 2016

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 11

Lecture 1 Introduction to Data Mining

Page 12

The Flag Problem (contd.)

The Flag Problem (contd.)

You are a software engineer (or a


professional programmer) instructed to
write a program to put up a flag outside
the customer's house on the 14th of
August.
Do you have enough information?
Who decides on the answers to all the
questions above?

You have bought a software library.


Documentation states this
procedure puts up a flag outside the
customer's house on the 14th of
August. Can you use this
procedure without reading its code?
Do you have enough information?

Sunday, October 02, 2016

Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 13

The Flag Problem (contd.)

Lecture 1 Introduction to Data Mining

Page 15

FORMAL SPECIFICATION
Formal specification is part of a more general
collection of techniques known as formal
methods.
Based on the mathematical representations
and analysis of requirements and software.
Requirements
specification

Formal
specification

Requirements
definition

High-le vel
design
System
modelling

Sunday, October 02, 2016

Ar chitectural
design
Lecture 1 Introduction to Data Mining

Page 14

SOLUTION?

You are managing a software project.


Legacy code states this procedure puts
a flag outside the customer's house on
the 14th of August. You want to update
this to account for various days
throughout the year and/or for special
occasions/reasons, across the country.
Do you have enough information to
proceed?
Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 17

FORMAL
SPECIFICATION
Sunday, October 02, 2016

Lecture 1 Introduction to Data Mining

Page 16

Vous aimerez peut-être aussi