skills talk
Skip this Video
Download Presentation
Skills Talk

Loading in 2 Seconds...

play fullscreen
1 / 17

Skills Talk - PowerPoint PPT Presentation

  • Uploaded on

Skills Talk. Techniques for significant software engineering tasks. 21 st January 2008 Simon Fothergill 3 rd year PhD student. Outline. UML : What, why and how? Program verification : Theory and practise Typesetting code : in editor and in documents Questions

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Skills Talk' - fifi

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
skills talk
Skills Talk

Techniques for significant software engineering tasks

21st January 2008

Simon Fothergill

3rd year PhD student

  • UML : What, why and how?
  • Program verification : Theory and practise
  • Typesetting code : in editor and in documents
  • Questions
  • Vignettes, not technically challenging, but worth drawing ones attention to, even if not vigorously upheld!
uml what
UML : What?
  • Unified Modelling Language
  • Object orientated software analysis & design
  • Born out of 3 similar methodologies at OMG
  • Language, not process
  • Practical tools : Many Eclipse plug-ins


  • For modelling at different stages of the design process
  • E.g. use-case, design, deployment


  • For modelling at different aspects of the system
  • Behaviour
  • Structure
  • E.g. Sequence, class, object, state-chart
uml why
UML : Why?
  • Models : abstraction : cope with complexity & correct mistakes early
  • Standard : Communication, inter-operability, verification
  • Thorough : Useful, pre-defined levels of abstraction & model elements
uml example class diagram of decorator design pattern
UML : Example (class diagram of Decorator design pattern)

















uml example sequence interaction diagram
UML : Example (sequence interaction diagram)


: Order

: OrderLine *

: Customer





program verification
Program Verification
  • Invariants : Expressions that express a desired, “consistant” state, for a duration or at a specific point in an executing program.
  • If it is true, for/at this time, everything’s good!
  • By increasing the state space of a program with meta-data about the invariants, compilers can provide some automated verification.
program verification1
Program Verification
  • Immediate invariants, true every time a certain point in the code is reached. Can catch logical errors in algorithms.
  • Object invariants, true, if an expression involving the objects data, holds. Catches misuse of data.
program verification2
Program Verification
  • Previous, flawed methods

Callers concerns with

pre/post conditions

No information


Implicit pre and post

conditions of true

Recursive call could

cause assert to fail

Just establish invariant as post condition

program verification3
Program Verification
  • A Better approach

o :: T

public field = {Valid, Invalid} for use in specifications only

Can only alter using pack and unpack

Newly instantiated objects are Invalid

Invariant only uses members of its class

Can only update Invalid objects

program verification4
Program Verification
  • Example

Now the state is invalid, so recursive

call would not meet M’s preconditions

program verification practial advise
Program Verification : Practial advise
  • Java’s assert statement can be used for pre/post conditions and invariants
  • JML : Java Modelling Language has functionality for using ensures/requires and extensions on this idea. It also has a hack for information hiding.
typesetting code in the editor
Typesetting code : in the editor
  • Compound words
    • Underscore
    • Concatenation + capitalisation
  • Class / Variable / method names:
      • Classnames
      • CLASS/Instance variables
      • CLASS/Instance methods
      • localVariables
      • Iterators, counters, accumulators (i,j,k,count,acc)
  • Indentation
  • Brackets
  • Inlining / Compression of simple expressions

Catch (IOException e) {if (n<0) {e.getMsg();}}

  • Capitalisation
typesetting code in documents
Typesetting code : in documents


  • Part of the notation (quotes, line breaks, indentation)
  • Hyphenation can be misleading
  • Size of tabs
  • Number of characters per line
  • Monospacing for columnular languages
  • Case


  • Font
    • Stand out
    • No need for serif fonts
    • Differentiate comments and keywords
    • Don’t confuse 1,l,I,0,O,o
  • Justification can not be helpful
typesetting code example
Typesetting code : example

Taken from “On the typesetting of computer programs, Esmond Pitt, Melbourne Software Company”, page 10

  • Practical Object-Oriented Design with UML; Mark Priestley; McGraw Hill; ISBN: 0-07-709599-5
  • Design Patterns, Elements of Reusable Object-Oriented Software; Gamma, Helm, Johnson, Vlissides, Addison-Wesley, ISBN: 0-201-63361-2
  • Verification of object orientated programs with invariants; Barnett & co; JOT 2004, Vol. 3, No. 6
  • On the typesetting of computer programs, Esmond Pitt, Melbourne Software Company (
the end
The end!

Any questions?