You are on page 1of 4

Course Overview

 Course Overview
– Introduce Software Engineering
– Introduce Formal Design Principles
Software Engineering  Object Oriented Approach Addressed
– Using the Unified Modeling Language (UML)
 Assessment
Lecture 1 – Wk 6: Examples Class
What can computers do?  Goal: To give a general overview of principles
and problems
Gareth Howells

Recommended Reading A Simple Problem


 Using UML: Software Engineering with  Programmers often make mistakes which cause
Objects and Components, Stevens / Pooley their programs to enter an infinite loop and
never terminate
 Developing Software with UML, Oestereich
 Useful to build a program which tests to see if
 Classical and Object-Oriented Software
such a loop exists
Engineering Schach
 That is: Can we devise an algorithm which
 Applying UML and Patterns, Larman
 The Unified Modeling Language User Guide
analyses a program P and its input data D and
Booch, Rumbaugh, Jacobson determines if P will halt on input D
 Object-Oriebted Software Engineering, Lethbridge  One of the possibilities must occur:
/ Laganiere Program P must either halt or loop forever
Analysis of Problem Analysis of Problem
 Assume program halttester exists to solve problem---shown  Amend newhalttester so that it halts for a negative answer
in (a)
and loops forever for a positive answer (funny)
 P itself is just data.
 Apply funny using its own algorithm as data!
 Therefore, may refine halttester to consider whether P halts
 funny(funny) halts if it loops forever and loops forever if it
when applied to itself (newhalttester)
halts!!

Non-Computable Problems A Turing Machine


 Program Funny cannot exist
 But funny is a simple extension to newhalttester
which in turn is a simple extension of halttester
 Therefore halttester cannot exist
Infinitely long tape on
 This proof arose in the 1930’s and caused many which can be written a
problems for logicians sequence of symbols

 Many problems are non-computable


– totality (halts on all inputs) Control device that can read and write to a
given symbol position and, depending on current
– equivalence (two programs the same)
State, move one position right or left
Programming a Turing Machine What are Algorithms?
 Various definitions of algorithms have been made
– Lambda Calculus
– Turing Machines
 All have proved equivalent!! (Church - Turing Thesis)
 An Algorithm describes the method by which a
1. Overwrite the
If the machine is in
Symbol with this 3. Enter this state task is to be accomplished
this state…
symbol  Algorithms exist for:-
2. move the head – Knitting a Sweater, Baking a Cake, Controlling Traffic Lights,
…and this symbol Controlling Robots, Payroll / Booking, Many Mathematical / Data
is written on the tape one step in
this direction Processing tasks

Infeasible Problems Software Engineering


 Other problems are computable but consume such
enormous resources such as time or memory that
they are not feasibly computable  Software Engineering is a discipline whose aim
 Complexity theory studies the resources required by is the production of algorithmic solutions to
an algorithm problems which are fault-free, delivered on-time,
All within budget, satisfy the user’s needs and be
problems easy to modify to incorporate future needs
Computable Problems

 Term dates from 1967 comparing programming


Feasibly Computable Problems with Civil, Mechanical Engineering etc.
Software Engineering Meeting the Goals
 However, Software is often late, over budget  Due to the many and varied requirements,
and contains residual faults (bugs) modern software systems are often
 Complexity of large software systems is deficient in some respects
beyond one person’s ability to comprehend  Techniques are required to minimise these
 Social as well as technical task deficiencies and simplify the mechanisms of
 Encompasses mathematics, computer science, software construction
economics, management and psychology – Evolve a methodology which begins by
 Essentially concerned with the design of algorithms ascertaining the nature of the problem and
ends with a working solution

Early Evolution of Programming Summary


Machine Code

Assembler LISP  Software Engineering encompasses a


FORTRAN

ALGOL 60 1960
number of disciplines
COBOL
Prolog  Algorithms exist for many useful problems
PL/1 BASIC
but not all problems
Smalltalk 1970
C  Only certain algorithms may be feasibly
Pascal
computed
1980
Ada
 Software Engineering needs to take
Haskell
C++ account of algorithm complexity to meet
Visual Basic
Java resource constraints

You might also like