際際滷

際際滷Share a Scribd company logo
2017-05-10
Alexander Much
Legacy Software
Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPIC | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
2Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Legacy from Websters dictionary:
1. a gift by will especially of money or other personal property : BEQUEST She left us a legacy of a million dollars.
2. something transmitted by or received from an ancestor or predecessor or from the past the legacy of the ancient philosophers The
war left a legacy of pain and suffering.
Legacy System from wikipedia (emphasis added):
In computing, a legacy system is an old method, technology, computer system, or application program, "of, relating to, or being a
previous or outdated computer system.
Often a pejorative term, referencing a system as "legacy" means that it paved the way for the standards that would follow it.
This can also imply that the system is out of date or in need of replacement.
Legacy?
Gate4SPICE: Legacy Software
3Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
 Business models will change
 The SOP is not the central mile-stone anymore
 Being able to operate and maintain the system
is the key factor for business as well as quality
 New software eco-systems, SW platforms
 Security >> safety!
Consequences for quality and for processes
Weak points:
 PLC-like process models
 Missing service and operations in Automotive
SPICE (-> SPICE for DevOps?)
DevOps, OTA: from product to service
Gate4SPICE: Legacy Software
Future
Sensor
Actuator
Standard
ECU
Base Function
Services &
Operation
Updates
Critical Update
Content
Critical Update
@SOP
Features
OTA:
Over
Lifetime
Operator,
Mobility-Provider
Backend
InfrastructureAnalysis,
Data
collection
& Fleet
Management
4Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Driving Forces behind OTA
Gate4SPICE: Legacy Software
Analysis,
Data
collection
& Fleet
Management
Future
Driving not possible when
data connection missing
Sensor
Actuator
Standard
ECU
Base Function
Services &
Operation
Updates
Critical Update
Content
Critical Update
@SOP
Features
OTA:
Over
Lifetime
Operator,
Mobility-Provider
(OEM or a service provider
without own vehicle
production like UBER)
Backend
Infrastructure






Service Provider
(new services)
??
5Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
 Software in essence is the design of a machine abstracted from its physical
realization1.
 The most complex systems ever built are all software systems.
 The design of software needs to be controlled. There is no process variability
in the manufacturing. We only have the construction.
 Software is often changed and adapted?  less rigor in control?
 The FDA: [i]n fact, the opposite is true. Because of its complexity the
development process for software should be even more tightly controlled
than for hardware.2
Why software is special
Gate4SPICE: Legacy Software
Software
General-Purpose
Computer
Special-Purpose
Machine+ =
1Nancy Leveson, Engineering a Safer World:
Systems Thinking Applied to Safety, MIT Press, 2011
(free at https://mitpress.mit.edu/books/engineering-safer-world)
2CDRH, General principles of software validation.
FDA, 2002.
Controlling software evolution is key
A complex software system is planned from
maintaining it, not from creating it
 Maintaining maintainability
6Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Legacy Software comes in different forms:
1. You created a system without enough project or technical
control (or understanding)
2. You are faced with maintaining or operating a system that
has been created only with the SOP in mind
3. You inherit a system, e.g. you bought another company
Such a software system is intangible:
 You dont know enough about it
 Process documents may be inaccurate or plainly false
Handling Legacy Software in Practice
Gate4SPICE: Legacy Software
What to do?
 Dont believe process documents:
The code is in the vehicle, not the documents
 Build hypotheses and test them (documents + code):
 Top-down by testing (in the sense of learning)
 Buttom-up by architectural reconstruction
 Both at the same time!
 See e.g.:
If your map doesnt match the terrain, its not the terrain thats wrong.
7Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
In file.h:
#define LOOP_END 0
In file.c:
int i;
for (i = MAX; i >= LOOP_END; i--)
{
/*  */
}
Beware: a MISRA-fication in practice
Gate4SPICE: Legacy Software
 A (stupid) MISRA checker is used
 Warns about a signed literal, should be suffixed with U
 Question: what happens if U is appended to LOOP_END?
 Remark: this happens in completely different files.
 Answer: usual arithmetic conversions turn the signed integer i
into an unsigned integer, cannot be negative
 an endless loop
8Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Background:
 AUTOSAR started ca. 15 years ago
 Millions of units on the road
 From QM to ASIL-D
 Complexity of the standard is increased rapidly with each
release
 ca 500 kLOC + > 20.000 configuration parameters
 OEM and Tier-1 quality demands evolved
 Standards evolved
-> anyone remembers MISRA 1998?
Example: AUTOSAR basic software
Gate4SPICE: Legacy Software
Approach:
 Strong focus on product quality instead of process quality
 everything that helps product quality helps the processes
 Daily measurement and build
 Code metrics
 V&V metrics
 Tracing metrics
 Permanent re-factoring, metrics are never violated
 Incremental approach:
 Each change-set is complete
 State of a component is ok before and after the change
 Build number of the night build from today: 155597
9Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Example: Process Metrics
Gate4SPICE: Legacy Software
Id Description Prototype Development Mass Production
PercReqImpl Percentage of implemented reqs n/a >= 0.85 == 1.0
PercReqTst Percentage of tested reqs n/a >= 0.75 == 1.0
NrReqNotImpl
Reqs that are not or partially
implemented
n/a n/a == 0
NrReqNotTst Reqs that are not or partially not tested n/a n/a == 0
NrTstNoReq
Specified tests that do not correctly trace
to a req
== 0 == 0 == 0
NrSpecNoReq
Sobjects that falsely claim coverage for a
req
== 0 == 0 == 0
NrTstNoSpec Implemented but not specified tests == 0 == 0 == 0
NrTstNotImpl Specified but not implemented tests n/a n/a == 0
NrRuleViolations
Number of static requirements rule
violations
n/a n/a == 0
10Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Trends and Impacts on EE Architecture
Gate4SPICE: Legacy Software
Clean Mobility
Electrification
Safe Mobility
Autonomous Driving
Intelligent Mobility
Connected Car
Trends Impact on EE SW Architecture Impact on Economy
HW Complexity Decrease
Safety & Security Needs
Connectivity
SW Complexity Increase
System Availability
Embedded Smart Device
Security Needs
Lower barrier for new OEMs
focusing on e-cars,
Enabler for mobility.
Growing complexity,
Change in architecture and
value chain,
Entry point for IT companies.
New user centric mobility
services and business models,
change in value chain
11Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
The system in the future
Gate4SPICE: Legacy Software
UI
Computing
Cluster
Central
Computing
Cluster
Smart Antenna
Gateway
Remote IO,
Actors, Sensors
Smart
Sensors
Smart
Sensors Steering
Braking Battery
Engine
Back-end
System
Gigabit
Ethernet
www.elektrobit.com
alexander.much@elektrobit.com
Get in touch!
Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPIC | Public | 息 Elektrobit Automotive GmbH 2017.
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.

More Related Content

2017-05-10 Gate4SPICE: "Legacy Software"

  • 1. 2017-05-10 Alexander Much Legacy Software Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPIC | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
  • 2. 2Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Legacy from Websters dictionary: 1. a gift by will especially of money or other personal property : BEQUEST She left us a legacy of a million dollars. 2. something transmitted by or received from an ancestor or predecessor or from the past the legacy of the ancient philosophers The war left a legacy of pain and suffering. Legacy System from wikipedia (emphasis added): In computing, a legacy system is an old method, technology, computer system, or application program, "of, relating to, or being a previous or outdated computer system. Often a pejorative term, referencing a system as "legacy" means that it paved the way for the standards that would follow it. This can also imply that the system is out of date or in need of replacement. Legacy? Gate4SPICE: Legacy Software
  • 3. 3Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Business models will change The SOP is not the central mile-stone anymore Being able to operate and maintain the system is the key factor for business as well as quality New software eco-systems, SW platforms Security >> safety! Consequences for quality and for processes Weak points: PLC-like process models Missing service and operations in Automotive SPICE (-> SPICE for DevOps?) DevOps, OTA: from product to service Gate4SPICE: Legacy Software Future Sensor Actuator Standard ECU Base Function Services & Operation Updates Critical Update Content Critical Update @SOP Features OTA: Over Lifetime Operator, Mobility-Provider Backend InfrastructureAnalysis, Data collection & Fleet Management
  • 4. 4Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Driving Forces behind OTA Gate4SPICE: Legacy Software Analysis, Data collection & Fleet Management Future Driving not possible when data connection missing Sensor Actuator Standard ECU Base Function Services & Operation Updates Critical Update Content Critical Update @SOP Features OTA: Over Lifetime Operator, Mobility-Provider (OEM or a service provider without own vehicle production like UBER) Backend Infrastructure Service Provider (new services) ??
  • 5. 5Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Software in essence is the design of a machine abstracted from its physical realization1. The most complex systems ever built are all software systems. The design of software needs to be controlled. There is no process variability in the manufacturing. We only have the construction. Software is often changed and adapted? less rigor in control? The FDA: [i]n fact, the opposite is true. Because of its complexity the development process for software should be even more tightly controlled than for hardware.2 Why software is special Gate4SPICE: Legacy Software Software General-Purpose Computer Special-Purpose Machine+ = 1Nancy Leveson, Engineering a Safer World: Systems Thinking Applied to Safety, MIT Press, 2011 (free at https://mitpress.mit.edu/books/engineering-safer-world) 2CDRH, General principles of software validation. FDA, 2002. Controlling software evolution is key A complex software system is planned from maintaining it, not from creating it Maintaining maintainability
  • 6. 6Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Legacy Software comes in different forms: 1. You created a system without enough project or technical control (or understanding) 2. You are faced with maintaining or operating a system that has been created only with the SOP in mind 3. You inherit a system, e.g. you bought another company Such a software system is intangible: You dont know enough about it Process documents may be inaccurate or plainly false Handling Legacy Software in Practice Gate4SPICE: Legacy Software What to do? Dont believe process documents: The code is in the vehicle, not the documents Build hypotheses and test them (documents + code): Top-down by testing (in the sense of learning) Buttom-up by architectural reconstruction Both at the same time! See e.g.: If your map doesnt match the terrain, its not the terrain thats wrong.
  • 7. 7Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. In file.h: #define LOOP_END 0 In file.c: int i; for (i = MAX; i >= LOOP_END; i--) { /* */ } Beware: a MISRA-fication in practice Gate4SPICE: Legacy Software A (stupid) MISRA checker is used Warns about a signed literal, should be suffixed with U Question: what happens if U is appended to LOOP_END? Remark: this happens in completely different files. Answer: usual arithmetic conversions turn the signed integer i into an unsigned integer, cannot be negative an endless loop
  • 8. 8Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Background: AUTOSAR started ca. 15 years ago Millions of units on the road From QM to ASIL-D Complexity of the standard is increased rapidly with each release ca 500 kLOC + > 20.000 configuration parameters OEM and Tier-1 quality demands evolved Standards evolved -> anyone remembers MISRA 1998? Example: AUTOSAR basic software Gate4SPICE: Legacy Software Approach: Strong focus on product quality instead of process quality everything that helps product quality helps the processes Daily measurement and build Code metrics V&V metrics Tracing metrics Permanent re-factoring, metrics are never violated Incremental approach: Each change-set is complete State of a component is ok before and after the change Build number of the night build from today: 155597
  • 9. 9Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Example: Process Metrics Gate4SPICE: Legacy Software Id Description Prototype Development Mass Production PercReqImpl Percentage of implemented reqs n/a >= 0.85 == 1.0 PercReqTst Percentage of tested reqs n/a >= 0.75 == 1.0 NrReqNotImpl Reqs that are not or partially implemented n/a n/a == 0 NrReqNotTst Reqs that are not or partially not tested n/a n/a == 0 NrTstNoReq Specified tests that do not correctly trace to a req == 0 == 0 == 0 NrSpecNoReq Sobjects that falsely claim coverage for a req == 0 == 0 == 0 NrTstNoSpec Implemented but not specified tests == 0 == 0 == 0 NrTstNotImpl Specified but not implemented tests n/a n/a == 0 NrRuleViolations Number of static requirements rule violations n/a n/a == 0
  • 10. 10Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Trends and Impacts on EE Architecture Gate4SPICE: Legacy Software Clean Mobility Electrification Safe Mobility Autonomous Driving Intelligent Mobility Connected Car Trends Impact on EE SW Architecture Impact on Economy HW Complexity Decrease Safety & Security Needs Connectivity SW Complexity Increase System Availability Embedded Smart Device Security Needs Lower barrier for new OEMs focusing on e-cars, Enabler for mobility. Growing complexity, Change in architecture and value chain, Entry point for IT companies. New user centric mobility services and business models, change in value chain
  • 11. 11Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPICE | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. The system in the future Gate4SPICE: Legacy Software UI Computing Cluster Central Computing Cluster Smart Antenna Gateway Remote IO, Actors, Sensors Smart Sensors Smart Sensors Steering Braking Battery Engine Back-end System Gigabit Ethernet
  • 12. www.elektrobit.com alexander.much@elektrobit.com Get in touch! Competence Centre Systems Engineering | Much | 2017-05-10 | Gate4SPIC | Public | 息 Elektrobit Automotive GmbH 2017. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.