SW: from Craftsmanship to Industry The role of code generation in the industrialisation of software development
The Market Situation Complexity grows Shorter TTM 15% - 25% of all software defects are delivered to customers. Approximately 40-50% of the effort is spent on avoidable work. Labor-intensive, requiring highly educated engineers. SASG - Oct.4-2011 2 marc.hamilton@nspyre.nl
The V-model: Current practice We live in uncertainty Plan Unexpected delay We do things wrong Detail level We re way slower Lead time We need more detail We don t get expected quality SASG - Oct.4-2011 3 marc.hamilton@nspyre.nl
Software Productivity Killers Poor design: Software specifications and designs are not verified before implementation Incomplete, incorrect and ambiguous specifications and designs are only discovered during the test phases High Complexity: Software designs are increasingly asynchronous, concurrent, reactive and event driven Complexity, Deadlocks, Races, Non-determinism, Multi-core CPUs Software architects can t oversee implications of design choices Poor Quality: Testing is an exercise in sampling Sample is small, population is very large A linear increase in the probability of finding a defect requires an exponential increase in the number of test cases Testing is the most expensive, least certain way to detect and remove defects and has the biggest impact on T2M SASG - Oct.4-2011 4 marc.hamilton@nspyre.nl
Software Engineering Challenge Product specification Highly variable, human language based dialects Design Gap Level of Automation Program code (C)OTS compilers, interpreters Limited variable, general applicable artificial dialects Machine code Limited variable, processor-family dependent dialects SASG - Oct.4-2011 5 marc.hamilton@nspyre.nl
Reduce the Design Gap Product specification Design Gap Product code Specific artificial dialect Specific compilers, interpreters Level of Automation Program code Machine code SASG - Oct.4-2011 6 marc.hamilton@nspyre.nl
This is Mechanical Engineering Automate Engineer Automate or Outsource Lead time Detail level SASG - Oct.4-2011 7 marc.hamilton@nspyre.nl
This is Software Engineering Evidence Lead time Detail level SASG - Oct.4-2011 8 marc.hamilton@nspyre.nl
sd move(postion) absposition = function(position) 1 1: Logical.Internal.UCrealizations.supporting.unlock ogca te a UC ea at o s suppo t g oc sg:ssfservogroup In case of a symbolic setpoint Software Engineering Should Be Evidence Rigorous Specification & Design: Model Driven Design using mathematics (formal verification) where possible Automated Construction Engineer Automated Construction Detail level Lead time SASG - Oct.4-2011 9 marc.hamilton@nspyre.nl
Model Streams DSL s, optimized for product development Increasing level of detail System (Software) Construction Code Code HW, SW Code Code HW, SW SASG - Oct.4-2011 10 marc.hamilton@nspyre.nl
Model Streams DSL s, optimized for product development Formal, executable languages Increasing level of detail System (Software) Construction Support of decisions Code Code HW, SW Code Code HW, SW SASG - Oct.4-2011 11 marc.hamilton@nspyre.nl
DSL Abstraction Levels Essential level: Specific DSL s -Problem related -Engineering efficiency -Relate to problem domain L-system ADL D-system Intermediate level: Generic DSL s -Solution specific -Early integration -Relate to formalisms L-target ADL D-target AVV system Real system Realization level: ADL GPL s L-code D-code SASG - Oct.4-2011 12 marc.hamilton@nspyre.nl
Generator Architecture: Overview Essential model Generator model Complete model Refine Verify Model to Model other models Target model Code Code Code Code Code Code Code Code Code Beautify Facility inputs Facility inputs Facility inputs SASG - Oct.4-2011 13 marc.hamilton@nspyre.nl
Model to Model mapping mapping SASG - Oct.4-2011 14 marc.hamilton@nspyre.nl
Model to Model: QVTO transformation SASG - Oct.4-2011 15 marc.hamilton@nspyre.nl
Generator Architecture: Overview Essential model Generator model Complete model Refine Verify other models Target model Model to Code Code Code Code Code Code Code Code Code Code Beautify Facility inputs Facility inputs Facility inputs SASG - Oct.4-2011 16 marc.hamilton@nspyre.nl
Model to Code SASG - Oct.4-2011 17 marc.hamilton@nspyre.nl
Current Software Environment Products X Y Z Technologies A B C D E SASG - Oct.4-2011 18 marc.hamilton@nspyre.nl
Decoupling from Technology Product Development Environment DSL Decoupling layer (Software) Technology Solutions SASG - Oct.4-2011 19 marc.hamilton@nspyre.nl
Industrialization: Factories! Primary Process Secondary Process Focus on building products in the factory Focus on building and maintaining the factory SASG - Oct.4-2011 20 marc.hamilton@nspyre.nl
Software Factory! X Products Y Z Decoupling Layer Technologies A B C D E SASG - Oct.4-2011 21 marc.hamilton@nspyre.nl
Vragen? www.nspyre.nl SASG - Oct.4-2011 22 marc.hamilton@nspyre.nl
BACKUP SASG - Oct.4-2011 23 marc.hamilton@nspyre.nl
Mechanical Engineering Processable models Formal models Generate Consistency! Engineer Generate Detail level Lead time SASG - Oct.4-2011 24 marc.hamilton@nspyre.nl
e self move(postion) absposition = function(position) Logical.Internal.UCrealizations.supporting.lock sg:ssfservogroup In case of a symbolic setpoint Engineering with models: Software MDE Processable models Formal models Generate Consistency? Engineer Generate Lead time Detail level SASG - Oct.4-2011 25 marc.hamilton@nspyre.nl
Analysis Models Design context Construction model Realization hints Analysis context Analysis model contribution Other Andere contributions bijdragen Aspect Analysis model Realization context Realization model Realization contribution (code/hw) predicts aspect of Other contributions Andere (code/hw) bijdragen Realization (systeem) SASG - Oct.4-2011 26 marc.hamilton@nspyre.nl
Embedding Proven Suites Construction model Analysis model development aspect Proven (generic) development suite Construction model Analysis model Other Andere contributions bijdragen predicts aspect of! Aspect Analysis model other aspects Realization contribution (code/hw) Realization contribution (code/hw) predicts aspect of? SASG - Oct.4-2011 27 marc.hamilton@nspyre.nl
sd ove ref absposition = function(position) lf move(postion) 1.1 * Logical.Internal.UCrealizations.supporting.unlock sg:ssfservogroup In case of a symbolic setpoint MDE approaches Evidence Contribution (Intermediate.Lang.) Runtime + configuration Consistency? Consistency! data? Property Preserving Code Generation? Construction SASG - Oct.4-2011 28 marc.hamilton@nspyre.nl
Tuinhuis (1) Garden shed Blokhut model: b x l x h = 4m x 4,5m x 2,5m. Houten frame 9cm op betonnen plaat 10cm. Dubbele deur aan voorkant: 1,40m Flat roof model: w x l x h = 4m x 4,5m x 2,5m. Wooden frame 9cm on concrete slab foundation Double door in front: 1,40m SASG - Oct.4-2011 29 marc.hamilton@nspyre.nl
Tuinhuis (2) SASG - Oct.4-2011 30 marc.hamilton@nspyre.nl
Domain Specific Modeling Awareness of Concepts in the target domain Meta-models define these concepts Domain Specific Language SASG - Oct.4-2011 31 marc.hamilton@nspyre.nl
Example: 3D Drawing SASG - Oct.4-2011 32 marc.hamilton@nspyre.nl
Example: 3D Drawing SASG - Oct.4-2011 33 marc.hamilton@nspyre.nl
Example: 3D Drawing SASG - Oct.4-2011 34 marc.hamilton@nspyre.nl
Example: 3D Drawing SASG - Oct.4-2011 35 marc.hamilton@nspyre.nl