Software engineering Geant4 rigorous approach to software

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

UML an overview.
Maria Grazia Pia, INFN Genova Maria Grazia Pia INFN Genova, Italy Advanced software engineering in simulation development and.
Lecture # 2 : Process Models
Ch 3 System Development Environment
Chapter 1 Object-Oriented System Development
Introduction To System Analysis and Design
Object Oriented System Development with VB .NET
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Introduction To System Analysis and design
Chapter 2: Approaches to System Development
CSCI-383 Object-Oriented Programming & Design Lecture 9.
Chapter 1: The Object-Oriented Systems Development Environment Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
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.
Introduction To System Analysis and Design
Maria Grazia Pia, INFN Genova 1 Part II Software engineering Geant4 rigorous approach to software.
Systems Analysis and Design in a Changing World, 3rd Edition
CSE 303 – Software Design and Architecture LECTURE 4.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 11 Slide 1 Design.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 05. Review Software design methods Design Paradigms Typical Design Trade-offs.
1 COMP 350: Object Oriented Analysis and Design Lecture 1Introduction References: Craig Larman Chapter 1.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
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.
System Development 1 u Systems development life cycle (SDLC) l Provides overall framework for managing system development process u Two main approaches.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Unified Modeling Language, Version 2.0 Chapter 2.
Component Design Elaborating the Design Model. Component Design Translation of the architectural design into a detailed (class-based or module- based)
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
Basic Characteristics of Object-Oriented Systems
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Design Concepts ch-8
Object Oriented Systems Design
Cmpe 589 Spring 2006.
Chapter 1: Introduction to Systems Analysis and Design
UNIT 1.
Business System Development
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Business System Development
Object-Oriented Analysis and Design
What is UML? What is UP? [Arlow and Neustadt, 2005] October 5, 2017
Systems Analysis and Design With UML 2
Contents Why should I consider OOA&D OO analysis OO design
Software Engineering: A Practitioner’s Approach, 6/e Chapter 11 Component-Level Design copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc.
Business System Development
The Object Oriented Approach to Design
Chapter 1 Object-Oriented Analysis and Design. Disclaimer Slides come from a variety of sources: –Craig Larman-developed slides; author of this classic.
Object-Oriented Analysis
Object-Oriented Design
Chapter 20 Object-Oriented Analysis and Design
Object oriented analysis and design
Software engineering -1
Need for the subject.
Design Tips.
Software Design Lecture : 14.
An Introduction to Software Architecture
SOFTWARE LIFE-CYCLES Beyond the Waterfall.
Chapter 1: Introduction to Systems Analysis and Design
Systems development life cycle (SDLC)
Object-Oriented Programming
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Chapter 1: Introduction to Systems Analysis and Design
Chapter 10 – Component-Level Design
Presentation transcript:

Software engineering Geant4 rigorous approach to software Part II Software engineering Geant4 rigorous approach to software

Part II: outline Motivations for software engineering in HEP The software process Components of the software life-cycle Object Oriented technologies Brief digression on basic OO concepts OOAD in Geant4 Quality Assurance Standards

Why software engineering in HEP? Software engineering is somewhat new to the HEP environment other engineering branches more consolidated in this environment (mechanics, electronics, accelerators etc.) Benefits derive from a rigorous approach to software the lesson can be learned from the world of software professionals! even the most talented professionals need an organized environment to do cooperative work advanced technology cannot be fully effective without an organizational framework The question I am always asked at this point: Is there any room for creativity? Yes! Also in other disciplines a rigorous approach can be combined with creativity: architecture, music etc.

Software engineering strategies in Geant4 Software engineering plays a fundamental role in Geant4 The software process Requirements Analysis and Design Object Oriented methodologies Quality Assurance Testing Physics validation

The software process It is the set of actions, tasks and procedures involved in producing a software system, through its life-cycle Complex domain, evolving, with many types of models available; some examples of software process models are, for instance: the Waterfall model the Iterative Incremental Development model The Waterfall model analysis  design  coding each phase starts following the completion of the previous one The Iterative Incremental Development model cycles of analysis  design  coding, with incremental refinement

The software process in Geant4 Based on the Booch methodology choice resulting from a thorough study of various models critically evaluated and adapted to the Geant4 peculiar environment Spiral-type software process: cycles of incremental analysis design  implementation  testing iterations

Requirements User requirements Software requirements Requirements are the quantifiable and verifiable behaviours that a system must possess constraints that a system must work within User requirements this phase defines the scope of the system Software requirements this is the analysis phase of a software project builds a model describing what the software has to do (not how to do it) Requirements are subject to evolution in the lifetime of a software project! ability to cope with the evolution of the requirements

Geant4 requirements Geant4 has adopted a rigorous approach to requirements user requirements collected from the user communities in the initial phase coded according the PSS-05 standard Geant4 User Requirements Document continuously updated

Object Oriented technology OO technology is built upon a sound engineering foundation, whose elements are called the object model The object model encompasses the principles of abstraction encapsulation modularity hierarchy typing concurrency persistence brought together in a synergistic way Geant4 is based on Object Oriented technology

What is an object? G. Booch (in OOAD with Applications): “An object has state, behaviour and identity; the structure and behaviour of similar objects are defined in their common class”.

Some fundamental concepts in OOD -1 The Open Closed Principle Open for extension, Closed for modification A software module that is designed to be reusable, maintainable and robust must be extensible without requiring modification new features are added by adding new code, rather than by changing old, already working, code The primary mechanisms behind are abstraction and polymorphism The Liskov Substitution Principle Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it Derived types must be substitutable for their base types It is an important feature for conforming to the OCP

Some fundamental concepts in OOD -2 The Dependency Inversion Principle Modules that implement high level policy should not depend on the modules that implement low level details Both high level policy and low level details should depend on abstractions This ensures reusability and maintainability The interdependence makes a design rigid, fragile and immobile: a single change triggers a cascade of changes in dependent modules The Interface Segregation Principle Clients should not be forced to depend on interfaces that they do not use Polluted interfaces generate unnecessary couplings We want to separate interfaces whenever possible to avoid the disadvantages of couplings

Analysis Webster definitions: separation or breaking up of a whole into its fundamental elements or component parts a detailed examination of anything complex the practice of proving a mathematical proposition by assuming the result and reasoning back to the data or already established principles In the software world: it is the decomposition of a problem into its constituent parts it is accomplished by beginning with a set of stated requirements, and reasoning back from those requirements to a set of established software components and structures OOA is the act of determining the abstractions that underlie the requirements In OOA the components are objects and their collaborations

Design Design embodies the set of decisions that determine how the components will look like In OOD typically class inheritance and composition hierarchies are among the decisions OOA and OOD cooperate synergically they are best done concurrently The output of OOAD is a set of class and object diagrams, showing the static structure the collaborations

UML: Unified Modeling Language UML has the goal to become a common language for creating models of OO software UML represents a unification of the concepts and notations previously in use (Booch, OMT) UML is comprised of two major components: a Meta-model a notation UML has a standard data representation, that is called the Meta-model the Meta-Model is a description of UML in UML it describes the objects, attributes and relationships necessary to represents the concepts of UML within a software application UML notation is comprised of two major subdivisions: a notation for modeling the static elements of a design (classes, attributes, relationships...) a notation for modeling the dynamic elements of a design (objects, messages, finite state machines...)

An example of a class diagram

Another example of a class diagram

C++ OO technology and C++ are not equivalent! OO methodologies can be implemented in a variety of languages, not only in C++ One can write procedural code in C++, that is not object oriented C++ provides many features that make it suitable for OO implementations of large scale software projects An overview of C++ language features and OO technology is beyond the scope of these lectures Many textbooks, courses and online material are available as learning aids; a few references: I. Pohl, OO programming using C++ S. B. Lippman, J. Lajoie, C++ primer B. Stroustrup, The C++ programming language G. Booch, OO analysis and design R. Martin, Designing OO C++ applications using the Booch method

OOAD in Geant4 Geant4 fully exploits the power of OOAD The basic principles of OOD described in the previous transparencies are applied in Geant4 They ensure a software that is reusable, maintainable, robust, extensible OOAD is fundamental in Geant4 for a distributed parallel approach every part can be developed, refined, maintained independently Problem domain decomposition and OOAD result in a unidirectional dependency of class categories Booch/UML notations CASE Tool: Rational Rose

Benefits from OO technology The OO technology provides various benefits to Geant4 Transparency decoupling from implementation Flexibility alternative models and implementations Openness to evolution extensibility, implementation of new models and algorithms without interfering with existing software possibility for the user to extend the toolkit with his/her model and data Interface to external software, without dependencies databases for persistency visualisation libraries tools for UI etc.

Geant4 class category diagram

Quality Assurance Extensive use of Quality Assurance systems fundamental for a toolkit of wide public use Commercial tools Insure++, Logiscope etc. C++ coding guidelines scripts to verify their applications automatically Code inspections within working groups and across groups Testing Unit testing in most cases down to class level granularity Integration testing sets of logically connected classes Test-bench for each category eg.: test-suite of 375 tests for hadronic physics parameterised models System testing exercising all Geant4 functionalities in realistic set-ups Physics testing comparisons with experimental data Performance Benchmarks

Standards Geant4 is based on standards (ISO and de facto) STEP ODMG engineering and CAD systems ODMG RD45 OpenGL e VRML for graphics CVS for code management C++ as programming language UML as modeling language

System of Units Geant4 is independent from any system of units All numerical quantities are expressed with their units explicitly The user is not constrained to using any specific system of units in his/her application Have you heard of the “incident” with NASA’s Mars Climate Orbiter ($125 million)?