1 / 33

SMUG 2001 Execution in UML

SMUG 2001 Execution in UML. May 7-9, 2001 Westward Look Resort Tucson, Arizona. Implicit Bridging: From Theory into Practice. Campbell McCausland Director, Research and Development Project Technology. Objects have delivered Reuse !. . . . . or have they ?

jamesksmith
Download Presentation

SMUG 2001 Execution in 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. SMUG 2001Execution in UML May 7-9, 2001 Westward Look Resort Tucson, Arizona

  2. Implicit Bridging:From Theory into Practice Campbell McCausland Director, Research and Development Project Technology

  3. Objects have delivered Reuse ! • . . . . or have they ? • In practice, the statistics don’t look so good. • . . . . except in areas with large user bases such as GUI and Container classes. • In particular, companies are not able to reuse their own Intellectual Property. • Why is this ?

  4. Why Objects don’t deliver Reuse (on their own) ? • Without a process which focuses on delivering Reuse through Subject Matter Separation . . . • . . . Reuse requires the best, most disciplined engineers . . . • . . . and it takes longer . . . • . . . to date, the preserve of the specialists who make class libraries for mass use.

  5. Existing Bridging Strategies • Use explicit Bridge Calls between domains. • . . . not always necessary . . . • . . . only required when temporal causality is involved . . . • . . . but even then, why should the Analyst be made aware anything special is going on ?

  6. What’s right with Explicit Bridges ? • Easy to Understand • Easy to Use • Easy to Document

  7. What’s wrong with Explicit Bridges ? • Coupling, that’s what. • Any time an explicit interface is used a small amount of coupling is created . . . • . . . even where tools go to great lengths to support the separation of subject matters.

  8. Conclusion: Avoid Explicit Bridging ! • BUT, Q: What do we do instead ? • A: The Architecture/Translator automatically inserts the necessary Bridging implementation. • Q: Excuse me? How ? • A: By following either a mapping rule or an enumerated mapping table called a Half Table.

  9. Abstract Example • The code automation process generates get{attribute.Name} and set{attribute.Name} accessor functions. • These normally just set or return the appropriate value in the memory allocated to the instance. • But we have control over the translator, it could read a table and sometimes generate something different if we wished.

  10. Domain Types • Application • Service • Architecture • Implementation

  11. Application • Uses Bridges to other Domains to interface with concrete technology and the real world. • Code is generated purely through the Architecture.

  12. Service • Two types, ‘Pure’ and ‘Hybrid’ • ‘Pure’; has code generated only through the Architecture. Example:- Alarms • ‘Hybrid’; has code generated via the Architecture from its models, but it also has ‘Impedance Matching’ archetypes which generate code to interface with a particular technology. Example:- AUI Domain

  13. Architecture and Implementation • Architecture • Defines the Structure for Data and Control of the System. • Implementation • Inherently simple. • Modeled structure, but typically no modeled behavior. • All code is generated by ‘Impedance Matching’ archetypes.

  14. Pure and Impedance Matched Bridging • Implicit bridging works differently depending on the type of Domains being mapped:- • Mappings between ‘Pure’ or ‘Hybrid’ Domains; necessary code is generated by extensions to the Architecture. • Mappings between a ‘Pure’ or ‘Hybrid’ and an Implementation Domain; ‘Impedance Matching’ code generates Architecture compatible code which accepts or initiates required threads of control.

  15. A Concrete Example from ODMS • The Robot in the ODMS uses stepper motors to control its movement. • We would like to map the X, Y, Z and Theta position attributes to PIO Registers for Stepper Motor Control. • In this simple example, PIO will be treated as a ‘Hybrid’ Service Domain.

  16. In Use:- The ODMS

  17. A Simple PIO Domain

  18. PIO Domain Instances

  19. How to Bridge . . . . Client Client.Server.brg Requirements Server.ifc Capabilities Server

  20. PIO.ifc .include “ARCH.ifc” .// .function FieldAsAttribute .param frag_ref Field .param frag_ref Attr .param frag_ref NavSpec .// Body Elided .end function .// .// .function VectoredInterruptAsEvent .param frag_ref Interrupt .param frag_ref Event .param frag_ref NavSpec .// Body Elided .end function

  21. ODMS.PIO.brg .include “ARCH.ifc” .include “ODMS.pei” .include “PIO.ifc” .// .// Locate Client Domain Objects .invoke clDom = get_domain(“ODMS”) .invoke robot = get_object(clDom, “Robot”) .invoke x_posn = get_attribute(robot, “X Position”) .// .// Create Pre-existing Instances .invoke robot1 = createrobot() .invoke stepReg1 = createregister(“Stepper1”, “0xFFF1”, 16, “IO”) .invoke XFld = createfield(stepReg1, “X”, 8, 0, FALSE, “WO”) .invoke YFld = createfield(stepReg1, “Y”, 8, 0, FALSE, “WO”) .// .// Map interrupt ‘X Positon’ and ‘Y Position’ onto ‘Stepper 1’ .invoke NavSpec = createnavigationSpecification() .invoke idr = PreExstCtptObj(“stepRegister 1 to Robot”, robot1, stepReg1) .invoke createinterDomainReference(NavSpec, idr) .invoke FieldAsAttribute(XFld, x_posn, NavSpec) .invoke FieldAsAttribute(YFld, y_posn, NavSpec)

  22. Unmapped Architectural Code /******************************************************************** Function name : D_R_set_Actual_x_coordinate Author : Date : Return Desc. : Description : *********************************************************************/ void D_R_set_Actual_x_coordinate(robot_c * robot, unsigned int value) { robot->Actual_x_coordinate = value ; }

  23. Mapped Architectural Code /******************************************************************** Function name : D_R_set_Actual_x_coordinate Author : Date : Return Desc. : Description : *********************************************************************/ void D_R_set_Actual_x_coordinate(robot_c * robot, unsigned int value) { set_pio_stepper_1_x(value) ; }

  24. Another Example from ODMS • A hardware interrupt signals that the stepper motor deltas are all zero. • We would like to map this interrupt to the UML event; ‘Robot Move Complete’.

  25. Client Domain State Chart

  26. PIO Domain Instances

  27. PIO.ifc .include “ARCH.ifc” .// .function FieldAsAttribute .param frag_ref Field .param frag_ref Attr .param frag_ref NavSpec .// Body Elided .end function .// .// .function VectoredInterruptAsEvent .param frag_ref Interrupt .param frag_ref Event .param frag_ref NavSpec .// Body Elided .end function

  28. ODMS.PIO.brg .include “ARCH.ifc” .include “ODMS.pei” .include “PIO.ifc” .// .// Locate Client Domain Objects .invoke clDom = get_domain(“ODMS”) .invoke robot = get_object(clDom, “Robot”) .invoke robot_done = get_event(robot, “Robot Done”) .// .// Create Pre-existing Instances .invoke robot1 = createrobot() .invoke robotHW = createinterrupt(“0x0F7”) .invoke intReg = createregister(“Data5”, “0xFFF9”, 16, “IO”) .invoke intVecFld = createField(intReg, “Interrupt Vector”, 16, 0, FALSE, “RO”) .invoke regZero = createvector(robot_HW, intVecFld, “Registers Zero”) .// .// Map interrupt ‘Registers Zero’ onto ‘Robot Done’ .invoke NavSpec = createnavigationSpecification() .invoke idr = PreExstCtptObj(“IntF7 to Robot”, robot1, robotHW) .invoke createinterDomainReference(NavSpec, idr) .invoke VectoredInterruptAsEvent(regZero, robot_done, nullNavSpec)

  29. Unmapped Impedance Matching Code /******************************************************************** Function name : Vector::Registers Zero Author : MC-2020 PIO Impedance Matcher Date : April 26 2001 Description : Interrupt Handler for Registers Zero *********************************************************************/ static void Vector::Registers_Zero(void) { /* No Mapping */ }

  30. Mapped Impedance Matching Code /******************************************************************** Function name : Vector::Registers_Zero Author : MC-2020 PIO Impedance Matcher (PIOImpMatch.arc) Date : April 26 2001 Description : Interrupt Handler for Registers Zero *********************************************************************/ static void Vector::Registers_Zero(void) { // GENERATE R_5:‘robot done'() TO robot PTC_BPAL_STMT_TRACE( 1, "GENERATE R_5:‘robot_done'() TO robot" ) odms_R_Event5_c * event1 = new odms_R_Event5_c(IntF7_to_Robot_idr); event1->Send( odms_PIO_V_OBJECT_ID, pio_interdom_event_priority ); }

  31. Process • The domain interface is provided by the Service Domain Analysts. • The interface elements are selected by the Client Domain Designers. • The selected interface elements are invoked in the .brg file to create required instances in the Bridging Metamodel. • To port or reuse, the .brg files are discarded.

  32. And Finally . . . • Using Implicit Bridging concentrates coupling in the Bridge where it belongs. • There is NO coupling in the models. • Bridge and Interface files allow Domain information hiding. • This technology has now moved from theory to practise.

  33. SMUG 2001Execution in UML May 7-9, 2001 Westward Look Resort Tucson, Arizona

More Related