1 / 31

Executable Translatable UML

Executable Translatable UML. Stephen J. Mellor Chief Scientist. The Evolution of Software Development. Price Performance. System Complexity. High Level Language. Assembly. UML Models. Model Compiler. Assembler. Compiler. Machine Code. High Level Language. Assembly. 2000s.

laban
Download Presentation

Executable Translatable UML

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Executable Translatable UML Stephen J. MellorChief Scientist

  2. The Evolution of Software Development Price Performance System Complexity High Level Language Assembly UML Models Model Compiler Assembler Compiler Machine Code High Level Language Assembly 2000s 1980s 1990s Increased Productivity

  3. UML – The Next Language • UML is the industry-standard • Executable UML is: • Streamlined • Tractable • Subset of UML • Achieved by having defined execution rules • Moving to higher levels of abstraction can improve: • Time to market • Productivity • Understandability • Maintainability • Quality • Reuse • etc...

  4. xtUML • (X) Execute models • Allows for early verification • Pre-code interpretive execution • Integration of legacy code • (T) Translate models • Complete code generation from models • Customizable compilation rules • Optimized code Testing the model early bridges the verification gap

  5. Systems Development Flow

  6. Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); Checking Analysis Design Code // Shutter Class Class Shutter_c { ... } // Exposure Class Class Exposure_c { ... } Che cking Che Ckin Che cking g Che cking Che Ckin Che cking g Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Design Translation as a Process Until now, design translation has been: • carried out on a case-by-case basis, • over and over and over and over. This approach fails to: • leverage expertise of best designers, • capture that expertise.

  7. Che cking Che Ckin Che cking g Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); Checking Separation Application Design can be split between: • Subject matter experts who understand the application, and • Embedded experts who understand the architecture Each evolves at its own pace. Architecture

  8. Code Che cking Che Ckin Che cking g // Shutter Class Class Shutter_c { ... } // Exposure Class Class Exposure_c { ... } Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Automated Translation Design Translation as a Product Application Now design translation is a product. • constructed once, and • executed automatically over and over. This approach…. • leverages expertise of best architects, • captures that expertise. .select many classes from instances of Class; .for each class in classes Class ${class.name}_c { … Architecture

  9. Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); Checking Che cking Che Ckin Che cking g Analysis Design Code // Shutter Class Class Shutter_c { ... } // Exposure Class Class Exposure_c { ... } We Have a Choice Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Che cking Che Ckin Che cking g Che cking Che Ckin Che cking g .select many classes from instances of Class; .for each class in classes Class ${class.name}_c { … Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Checking Application Code Model Compiler Checking // Shutter Class Class Shutter_c { ... } // Exposure Class Class Exposure_c { ... } Checking Architecture

  10. Comprehensive software design flow Application Development LegacyCode Model Execution Model Debugging Instrumented native code Application Model Compiled Embedded Code (C, C++,Java ….) Models Application Software Model Compilation Application Definition Source Level Debugging Middle ware Architecture Definition RTOS Rules ArchitectureRules HW IP CPU System Prototyping Native code LegacyCode Rule Execution Architecture Development Design Compilation Debugging Deployment Verification Translation

  11. Application development • Build a model for each domain • Legacy and COTS code can also be integrated • Execute the models LegacyCode Model Execution Application Model Application Model Models LegacyCode Rules ArchitectureRules Rule Execution Legacy Code Model Execution

  12. Application Models Application Model • Class Diagram • Statechart Diagram • Action Language Exposure Exposure # {I} Shutter ID {R4} NumberOfBytes FileFolder {R5} Status Shutter Shutter ID {I} Aperture Zoom OpenTime Status R4 Action for Checking Settings Closed Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight( ); DetermineExposureTime( Mode ); Half ( ShutterID ) Defines Lifecycle for Shutter Released ( ShutterID ) Checking Settings Full( ShutterID ) Open Released( Shutter ID )

  13. State Name {I} Class {R7} isFinal Closed Shutter Shutter ID {I} Aperture Zoom OpenTime Status Checking Open Application Intelligent Model Capture Application Model Class Number {I} Name KeyLetters Description Metamodel Repository Intelligent model capture verifies models: • syntactically • semantically

  14. Model Execution Execute models with an interpreter to verify behavior. Vs. Model Execution Application Model

  15. Actions • Standard part of UML • Provide for complete code generation • 7-10 lines of generated code per line of action language • Allows “difficult”code to be generated reliably • Independence from Software platform • Ability to reorganize data and control structures

  16. Comprehensive software design flow Application Development LegacyCode Model Execution Model Debugging Instrumented native code Application Model Compiled Embedded Code (C, C++,Java ….) Models Application Software Model Compilation Application Definition Source Level Debugging Middle ware Architecture Definition RTOS Rules ArchitectureRules HW IP CPU System Prototyping Native code LegacyCode Rule Execution Architecture Development Design Compilation Debugging Deployment Verification Translation

  17. LegacyCode Model Execution Application Model Models Architecture Development • Select a set of rules that meet the requirements of the architecture • Legacy and COTS code can be integrated • Execute the rules Rules ArchitectureRules LegacyCode Rule Execution

  18. Select Architecture Rules • Different architecture rules target different software platforms • You may buy Architecture Rules • You may reuse Architecture Rules • You may modify Architecture Rules ArchitectureRules Target embedded systems using C ArchitectureRules Target embedded systems using C++ ArchitectureRules Target embedded systems using C with special properties

  19. State Name {I} Class {R7} isFinal Closed .select many classes from instances of Class; .for each class in classes Class ${class.name}_c { … Checking Open .select many states related by class->State[R7] where isFinal ==FALSE; .for each state in states void ${state.name}Action( ) { … Architecture rules Class Number {I} Name KeyLetters Description Metamodel Repository Shutter Shutter ID {I} Aperture Zoom OpenTime Status Application Rules

  20. Shutter Exposure R4 Closed Checking Open Architecture rules .select many classes from instances of Class; .for each class in classes Class ${class.name}_c { … Class Shutter_c { … Class Exposure_c { … Variable name From application .select many states related by class->State[R7] where isFinal == FALSE; .for each state in states void ${state.name}Action( ) { … void OpenAction() { … void CheckingAction() { … void ClosedAction() { … Clear text

  21. .select many invocations related by activity->Invocation[R17] where markDigitalOutput == True; .select many parameters related by invocation -> Parameter[R18] .for each invocation in invocations DigitalOutputFunction( .for each parameter in parameters .if (not Last) ${ parameter.Name } , .else ${ parameter.Name } ) ; .end for .end for Legacy Code and COTS • Legacy code, libraries, COTS, hand-written code etc can all be incorporated by building a wrapper in the architecture rules Mark Name of function in library

  22. LegacyCode Model Execution Application Model Models Rule Execution • If you change a rule, it needs to be verified by execution • On execution, the rules should continue to yield correct code • Verify using a Test Executable UML program Rules ArchitectureRules LegacyCode Rule Execution

  23. Instrumented native code Compiled Embedded Code (C, C++,Java ….) Compiled Embedded Code (C, C++,Java ….) Models Model Compilation Rules Native code Model compilation Application Models • Model compilation is the execution of the architecture rules over the application to produce text • (That is, code in any language the rules specify.) Architecture Rules

  24. Performance • If any dimension of system performance is inadequate, modify the rules • Each modification will improve to fit • Do not change the application models! LegacyCode Model Execution Application Model Models Rules ArchitectureRules LegacyCode Rule Execution

  25. Model Debugging • Allows you to verify the compiled model • Set model-level breakpoints • Halt execution • View model-level trace • Hyper-link to related instances for inspection Model Debugging Instrumented native code Compiled Embedded Code (C, C++,Java ….) Compiled Embedded Code (C, C++,Java ….) Model Compilation Source Level Debugging System Prototyping Native code

  26. Model debugging Model-level debugging 1. Set model-level breakpoint 2. Halt execution and view model-level trace 3. Hyper-link to related instances for inspection

  27. Comprehensive software design flow Application Development LegacyCode Model Execution Model Debugging Instrumented native code Application Model Compiled Embedded Code (C, C++,Java ….) Models Application Software Model Compilation Application Definition Source Level Debugging Middle ware Architecture Definition RTOS Rules ArchitectureRules HW IP CPU System Prototyping Native code LegacyCode Rule Execution Architecture Development Design Compilation Debugging Deployment Verification Translation

  28. Nucleus BridgePoint Product ModelCompilation Model Construction ModelDebugging Model Execution

  29. 4 requirements for effective code generation Every system is different, so we need complete control over the generated code. Not all code is equal, so we need specific and precise control over the generated code. No code is an island, so we needintegration of legacy and generated code. Partial generation requires synchronization, so we needcompleteness of code generation. These requirements are met by openModel Compilers.

  30. Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); Checking Che cking Che Ckin Che cking g Analysis Design Code // Shutter Class Class Shutter_c { ... } // Exposure Class Class Exposure_c { ... } We Have a Choice Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Che cking Che Ckin Che cking g Che cking Che Ckin Che cking g .select many classes from instances of Class; .for each class in classes Class ${class.name}_c { … Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Checking Checking Application Code Model Compiler Checking // Shutter Class Class Shutter_c { ... } // Exposure Class Class Exposure_c { ... } Checking Architecture

  31. Thank you Questions?

More Related