Hong Zhu Dept of Computing and Communication Technologies Oxford Brookes University Oxford, OX33 1HX, UK TOWARDS.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

A Calculus of Design Patterns Hong Zhu Dept. of Computing and Electronics Oxford Brookes University Oxford OX33 1HX, Uk
Laws of Pattern Composition Hong Zhu and Ian Bayley Department of Computing and Electronics Oxford Brookes University Oxford OX33 1HX, Uk
Component Oriented Programming 1 Chapter 2 Theory of Components.
Architecture Representation
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Software Engineering COMP 201
2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Analysis Stage (Phase I) The goal: understanding the customer's requirements for a software system. n involves technical staff working with customers n.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Data and Process Modeling
Describing Syntax and Semantics
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
Course Instructor: Aisha Azeem
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Client/Server Software Architectures Yonglei Tao.
Chapter 7 Requirement Modeling : Flow, Behaviour, Patterns And WebApps.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
An Introduction to Software Architecture
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
Software Engineering General architecture. Architectural components:  Program organisation overview Major building blocks in a system Definition of each.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
1 Software Design Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13, 5 th edition and Ch. 10, 6 th edition.
Chapter 7 Applying UML and Patterns Craig Larman
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
 Three-Schema Architecture Three-Schema Architecture  Internal Level Internal Level  Conceptual Level Conceptual Level  External Level External Level.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Secure Systems Research Group - FAU SW Development methodology using patterns and model checking 8/13/2009 Maha B Abbey PhD Candidate.
Object-Oriented Software Engineering using Java, Patterns &UML. Presented by: E.S. Mbokane Department of System Development Faculty of ICT Tshwane University.
Hong Zhu Department of Computing and Communication Technologies Oxford Brookes University, Oxford OX33 1HX, UK COMPSAC 2012 PANEL.
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.
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
Basic Concepts of Component- Based Software Development (CBSD) Model-Based Programming and Verification.
Construction Planning and Prerequisite
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 21 November 2, 2004.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Slide 1 Service-centric Software Engineering. Slide 2 Objectives To explain the notion of a reusable service, based on web service standards, that provides.
UML Profile BY RAEF MOUSHEIMISH. Background Model is a description of system or part of a system using well- defined language. Model is a description.
Basic Concepts and Definitions
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Chapter 2 Database System Concepts and Architecture
Object-Oriented Software Engineering Using UML, Patterns, and Java,
Object-Oriented Database Management System (ODBMS)
Behavioral Design Patterns
APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN
OO Methodology OO Architecture.
Software Engineering (CSI 321)
Service-centric Software Engineering
CSc4730/6730 Scientific Visualization
An Introduction to Software Architecture
From Use Cases to Implementation
Software Architecture & Design
Presentation transcript:

Hong Zhu Dept of Computing and Communication Technologies Oxford Brookes University Oxford, OX33 1HX, UK TOWARDS A GENERAL THEORY OF PATTERNS

MOTIVATION  Much work on patterns in software engineering:  OO Design Patterns:  Identification, catalogues, formalisation, composition, tools  Other Design Patterns:  HCI designs, architectural designs, fault tolerance architecture, enterprise architecture, Security design patterns, etc.  Beyond design patterns:  Analysis patterns, Process patterns, Testing patterns, Attack patterns, Forensic patterns?, etc.  An Observation:  The notions of patterns in different subject areas carry a great deal of similarity  Lack of a general theory that applies to all types of patterns  Research Question:  Is it possible to have a general theory of patterns?  If yes, what are the benefit for such a theory?

WHAT DO OO DESIGN PATTERNS OFFER?  Identification and Catalogues of OO DPs:  Application of design patterns in OO software design helps designer to solve difficult design problems (with instantiation tools)  Detecting design errors at design stage and/or in the code by matching DPs against designs (e.g. in UML) and code (in Java, C++, etc.) (with recognition tools)  Reverse engineering, it greatly helps programmer to understand the design in legacy systems  Empirical studies have show that this can significantly improve software quality and productivity  Formalisation and Formal Reasoning about OO DPs:  Reducing the ambiguity in the definition of patterns, which is the main source of errors in the uses of design patterns.  Providing solid foundation for the construction of DP support tools, large differences in the tools have been observed.  Automating DP-based software design process, which is far beyond the applications of DP via instantiation and recognition.

EXAMPLE OF DP-BASED OO DESIGN  Example: design a request handling framework:  The requests issued by clients must be objectified => Command pattern  The independent requests from multiple clients must be coordinated => CommandProcessor pattern  It must support the undoing of actions performed in response to requests => Memento pattern  The requests must be logged. Different users may want to log the requests different => Strategy pattern  A request can be atomic, or a aggregate of other request, which must executed in certain order => Composite pattern Information about how these patterns are to be connected is omitted for the sake of space.

THE PATTERNS USED IN THE EXAMPLE The Command Pattern The Command Processor Pattern The Strategy Pattern The Composite Pattern The Memento Pattern

RESULT OF THE COMPOSITION [Buschmann et al., 2007]

HOW DOES A FORMAL THEORY HELP? Formal specification of the Composite pattern 1. FORMAL DEFINITION OF PATTERNS

2. FORMAL DESCRIPTION OF DESIGN DECISIONS  The requests issued by clients must be objectified => Command pattern  The independent requests from multiple clients must be coordinated => CommandProcessor pattern  It must support the undoing of actions performed in response to requests => Memento pattern  The requests must be logged. Different users may want to log the requests different => Strategy pattern  A request can be atomic, or a aggregate of other request, which must executed in certain order => Composite pattern

SIX OPERATORS ON DPs  Restriction P[C]:  to impose an additional constraint C to pattern P;  Superposition P 1 * P 2 :  to require the design to conform to both pattern P 1 and P 2 ;  Generalisation P  x:  to allow an element x in pattern P become a set of elements of the same type of x.  Flatten P  x:  to enforce a set x of element in the pattern P to be a singleton.  Lift P  x:  to duplicate the number of instances of pattern P in such a way that the set of components in each copy satisfies the relationship as in P and the copies are configured in the way that element x serves as the primary key as in a relational database.  Extension P#(V  C):  to add components in V into P and connect them to the existing components of P as specified by predicate C. See [Bayley, I. and Zhu, H. 2011] for the formal definitions of the operators.

3. APPLY ALGEBRAIC LAWS OF DP Zhu, H. and Bayley, I. An Algebra of DP, ACM TOSEM, (in press)

4. WORK OUT THE RESULTS FORMALLY An error is detected by comparing with the original solution.

CAN THE THEORY OF OO DP BE GENERALISED? The Structure of OO DP Theory Definition of UML abstract syntax in GEBNF (Graphic extension of BNF) Derivation of a Predicate Logic Language from GEBNF syntax definition Formal specification of DPs in the Predicate Logic Language Formal definition of operators on OO DPs based on GEBNF syntax definition using Predicate Logic Algebraic laws proved for Correctness: in predicate logic Completeness: existence of a normal form + a normalisation process Proposed Generalisation Definition of the design space using GEBNF Derivation of a Predicate Logic Language from GEBNF syntax definition. (This is a functor in category theory) Formal specification of DPs in the predicate logic language Generalise the definitions of the operators for all design spaces Re-prove the algebraic laws

DESIGN SPACE OF SECURITY DPs DESIGN SPACE SecuritySystems; TYPE Subsystem: name: STRING, content: [Value], description: [STRING]; InfoFlow: name: STRING, from, to: Subsystem, type: [STRING]; VIEW Structure; PROPERTY type: Subsystem -> {aataStore, computation}; mode: Subsystem -> {active, passive}; RELATION Is-a-part-of: Subsystem x Subsystem; END structure; VIEW Behaviour; … END Behaviour; END SecuritySystems Entity types Properties of the entities in a certain view of the system Relationships between the entities in a view There may be multiple different views of the system

SECURITY SYSTEM DESIGN PATTERNS  architecture of an indirect in-line authentication architecture Claimant Trusted Third party Claim AI Verify AI Claim AI Verifier AI Verified AI PATTERN Indirect-In-Line-Authentication IN SecuritySystem; COMPONENT Claimant, TrustedThirdParty, Verifier, ClaimAI1, VerifyAI, ClaimAI2: Subsystem; ClaimAI12VerifyAI, VerifyAI2ClaimAI2, ClaimAI22Verifier: InfoFlow; CONSTRAINT ClaimAI is-a-part-of Claimant; VerifyAI is-a-part-of TrustedThirdParty; ClaimAI2 is-a-part-of TrustedThirdParty; ClaimAI12VerifyAI.from = ClaimAI1; ClaimAI12VerifyAI.to = VerifyAI; VerifyAI2ClaimAI2.from= VerifyAI; VerifyAI2ClaimAI2.to = VerifyAI; ClaimAI22Verifier.from = ClaimAI2; ClaimAI22Verifier.to = Verifier; END

ENCRYPTION AND DECRYPTION PATTERN EncryptDecrypt IN SecuritySystem; COMPONENT encrypt, decrypt, source, ciphered, recovered, key1, key2: Subsystem; source2encrypt, encrypt2ciphered, ciphered2decrypt, decrypt2recovered, key12encript, key22decrypt: InfoFlow; CONSTRAINT encrypt.type=computation; decrypt.type=computation; source.type=dataStore; ciphered. type=dataStore; recovered. type=dataStore; key1.type=dataStore; Key2.type=dataStore; source2encrypt.from=source; source2encrypt.to= encrypt; encrypt2ciphered.from= encrypt; encrypt2ciphered.to= ciphered; ciphered2decrypt.from= ciphered; ciphered2decrypt.to= decrypt; decrypt2recovered.from= decrypt; decrypt2recovered.to= recovered; … END Source Text Ciphertext Encrypt Decrypt Recovered text Key1 Key2

SYMMETRIC AND ASYMMETRIC ENCRYPTION/ DECRYPTION PATTERN SymetricEnDEcryppt in SecuritySystem EQUALS EncryptDecrypt [key1.content = key2.content] END PATTERN AsymetricEnDEcryppt in SecuritySystem EQUALS EncryptDecrypt [not (key1.content = key2.content)] END Application of the restriction operator

OPEN QUESTIONS AND FURTHER RESEARCH  More details of the security design space and DPs must be worked out  Can attack patterns be specified in the same way?  Can composition of attack patterns be formally described in the same way?  To what extent will forensics of cybercrimes be performed as matching traces of behaviour against an attack pattern?  Problems not investigated in the research on OO DPs, but important for security:  Can we define formally what means by a security pattern is against an attack pattern? And how to prove that such a claim is true?  Can we prove a composition of two security patterns can prevent all compositions of the attack patterns that each is supposed to prevent by a security pattern?

THANK YOU