340 likes | 532 Views
SDL Based Auto Code Generation: A Multi Beneficial Approach Bhaskar Rao.G Software Engineering Group, Motorola India Electronics Ltd. Banglore, India - 560 042. email: gbr@miel.mot.com. Agenda. Introduction to SDL and Benefits ( 3 min.) Experiences and Results (17 min.) Pilot Project
E N D
SDL Based Auto Code Generation: A Multi Beneficial Approach Bhaskar Rao.G Software Engineering Group, Motorola India Electronics Ltd. Banglore, India - 560 042. email: gbr@miel.mot.com.
Agenda • Introduction to SDL and Benefits ( 3 min.) • Experiences and Results (17 min.) • Pilot Project • GPRS Layer Study • Problems and Solutions • Challenges Remaining (3 min.) • Conclusions (2 min.)
SDL, Is it only Auto Code Generation? • Methodology • Integrated Methods and Tools for Software Development • Requirements - MSC • SAD - State Charts/UML/SDL • Coding - SDL, C, C++, Java <AUTO CODE > • Unit and Integration Testing - Simulation & Validation • System Testing - TTCN/SDL
Auto Code Generation from SDL SDL Code Manual C Code + env SDT Auto Code Tool C Compiler SDL Code Gen. code H2SDL Executable Run Time Library C Headers Simulation, Validation, UNIX, NT, pSOS, VxWorks etc..
SDL Usage Perspectives • Design Language • Implementation Methodology • Infrastructure • Handsets? • Test Development Language • Strong data features • Better tool support compared to TTCN tools
Range of Benefits Observed • Cycle Time Improvement: 1.2 to 2X • Productivity: 1.2 to 2X • Effort Reduction: 1.2 to 2X • Quality: 2 to 5X • Performance: PROBLEMS NOT NOTICED
Application Interface Network Management Layer Transport Layer Sessions Layer Network Layer Driver Interface Pilot Project Architecture
Pilot Project • EIA 709.1 Control Network Protocol • Network Management Layer • Provides services to the application • Uses either Transport layer or Session layer • Session Layer • Provides session services • Transport layer • Acknowledged/Un-acknowledged repeat data transfer • Network layer • Interacts with the driver • Driver • send and receive messages
SDL Architecture Application Interface Network Management Process Controller Controller Transmit side (SL, TL) Controller Receive Side (SL, TL) Network Layer Driver Interface
Features of the Architecture • Layer independent architecture • Adaptable to any changes • Cadvanced Code Generator (Telelogic Tau) • < 1 year project
Observations …. • Simulation based testing has been proved very effective • Less than average of the organization • Script language • Real Time Simulation • Traces • Automatic support of targeting for Windows, pSOS etc. • Significantly impacted customer satisfaction
Problems ... • Code Size?????? • 3X • System Testing • Interpreted the AUTO CODE • Less productive
Reasons for Code Bloat • Architecture • Too Modular • Layer independent • Tool translation of SDL support functions • Assignment, Equality etc. • StructVari := StructVar2 • if(StructVari = StructVar2) • Overhead is ~400 bytes per structure • Translation of Header files to C code • Hdr.h >>> GenHdr.c
Optimization Features • C code mix is increased to 65% • Pointers are used • Negative impact on Productivity and Quality • Effort increased to locate the error
Plans After Pilot • Used in Infrastructure projects • Results are encouraging • Code size is not CRITICAL • Handsets?????
Further study • Try new tools • Cmicro Code generator • Proprietary generator • Optimize with the help of the vendors • Excellent help
Auto Code Generation from SDL (Optimization) SDT Auto Code Tool SDL Code Manual C Code + env C Compiler SDL Code Gen. code SCRIPTS (Optimization) H2SDL Executable Run Time Library C Headers Simulation, Validation, UNIX, NT, pSOS, VxWorks etc..
Optimization of Code • Data Types defined only in SDL • NON OO • Minimize C Code Integration • Through common types between SDL and C (Octet = Unsigned Char) • Scripts • Script to convert C constants to SDL macros • Script to convert STRUCTURES to ADTs • Compilation Switches for Optimization • XNOUSEOFREAL, XNOUSEOFOBJECTIDENTIFIER etc.
Size of Utility Functions • Default Functions Size: 16 Type: FUNC yDef_zF_MyStruct1 Size: 16 Type: FUNC yDef_zG_MyStruct5 • Equal Functions Size: 192 Type: FUNC yEq_zF_MyStruct1 Size: 192 Type: FUNC yEq_zG_MyStruct5 • Make Functions Size: 152 Type: FUNC yMake_zF_MyStruct1 Size: 152 Type: FUNC yMake_zG_MyStruct5
After Optimization newtype MyStruct1 struct a1, a2, a3, a4, a5 Integer; /*#ADT(E(H) D(H) K(H) H) #TYPE #define yDef_#(MyStruct1)(yVar) #define yMake_#(MyStruct1)(yVar1, yVar2) #define yEq_#(MyStruct1) (E1, E2)*/ endnewtype;
Size analysis command • Usage $> nm -f <exec_file_name> • Displays Type, Size etc. of all symbols NOTYPE no type was specified OBJECT a data object such as an array or variable in bytes FUNC a function or other executable code in bytes SECTION a section symbol FILE name of the source file.
No Wider Acceptance?? • Not Part of Curriculum • Industry has to invest • Technical • Performance and Code Size issues • Debugging the generated code (off site and onsite) • Performance, Code Size VS READABILITY of SDL • Customer Related • Cost of the tools • Lack of familiarity and Expertise • Risk of failure
100% Real time Software Development with SDL Methodology VISION VISION
For Realizing the Vision • Effective Algorithms for mapping SDL code to implementation language • Effective Approaches to handle on-site testing
Conclusions • SDL is a Methodology but only tool for auto code • Positive impact on Cycle Time, Quality and Productivity • Code Size Overheads could be brought down with a few restrictions in SDL • Needs improvement for 100% usage
Q &A Q &A Q &A Q &A Q &A • Questions???? Q &A Q &A Q &A Q &A Q &A Q &A Q &A Q &A
Thank you Bhaskar Rao.G Motorola India Electronics Ltd., SE Group, Banglore, India- 560 042 gbr@miel.mot.com