Presentation is loading. Please wait.

Presentation is loading. Please wait.

Executable Translatable UML Stephen J. Mellor Chief Scientist.

Similar presentations


Presentation on theme: "Executable Translatable UML Stephen J. Mellor Chief Scientist."— Presentation transcript:

1 Executable Translatable UML Stephen J. Mellor Chief Scientist

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

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

4 xtUML n (X) Execute models — Allows for early verification — Pre-code interpretive execution — Integration of legacy code n (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 Until now, design translation has been: n carried out on a case-by-case basis, n over and over and over and over. This approach fails to: n leverage expertise of best designers, n capture that expertise. Design Translation as a Process Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Che cking Che Ckin Che cking g Analysis Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); DetermineExposureTime( Checking Che cking Che Ckin Che cking g Design Checking Checking Settings Entry/ OpenShutter( 0.5 ); MeasureLight(); Code // Shutter Class Class Shutter_c {... } // Exposure Class Class Exposure_c {... }

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

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

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

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

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

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

13 Intelligent Model Capture State Name {I} Class {R7} isFinal Class Number {I} Name KeyLetters Description Application Shutter Shutter ID {I} Aperture Zoom OpenTime Status Closed Checking Open Class NumberName 101Shutter 102Exposure State NameClassNumberisFinal Closed101973No Checking101974No Open101975No Metamodel Repository Intelligent model capture verifies models: — syntactically — semantically Application Model Application Model

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

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

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

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

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

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

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

21 Legacy Code and COTS n Legacy code, libraries, COTS, hand-written code etc can all be incorporated by building a wrapper in the architecture rules.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 Name of function in library Mark

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

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

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

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

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

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

28 Nucleus BridgePoint Product Model Construction Model Execution Model Compilation Model Debugging

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 need integration of legacy and generated code. Partial generation requires synchronization, so we need completeness of code generation. These requirements are met by open Model Compilers.

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

31 Thank you Questions?


Download ppt "Executable Translatable UML Stephen J. Mellor Chief Scientist."

Similar presentations


Ads by Google