Title: SDL Based Auto Code Generation: A Multi Beneficial Approach
1- 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_at_miel.mot.com.
2Agenda
- 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.)
3Introduction to SDL and Benefits
4SDL, 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 ltAUTO CODE gt
- Unit and Integration Testing - Simulation
Validation - System Testing - TTCN/SDL
5Auto 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..
6SDL Usage Perspectives
- Design Language
- Implementation Methodology
- Infrastructure
- Handsets?
- Test Development Language
- Strong data features
- Better tool support compared to TTCN tools
7Range 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
8Experiences and Results
9Pilot Project Architecture
10Pilot 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
11SDL Architecture
Application Interface
Network Management Process
Controller
Controller
Transmit side (SL, TL)
Receive Side (SL, TL)
Controller
Network Layer
Driver Interface
12Features of the Architecture
- Layer independent architecture
- Adaptable to any changes
- Cadvanced Code Generator (Telelogic Tau)
- lt 1 year project
13Pilot Results
14Observations .
- 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
15Problems ...
- Code Size??????
- 3X
- System Testing
- Interpreted the AUTO CODE
- Less productive
16Reasons 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 gtgtgt GenHdr.c
17Optimization Results on one layer
18Optimization Features
- C code mix is increased to 65
- Pointers are used
- Negative impact on Productivity and Quality
- Effort increased to locate the error
19Plans After Pilot
- Used in Infrastructure projects
- Results are encouraging
- Code size is not CRITICAL
- Handsets?????
20Further study
- Try new tools
- Cmicro Code generator
- Proprietary generator
- Optimize with the help of the vendors
- Excellent help
21Optimization Results (UNIX)
22Optimization Results (UNIX) contd..
23Auto 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..
24Optimization 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.
25Size 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
26After 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
27Size analysis command
- Usage
- gt nm -f ltexec_file_namegt
- 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.
28Challenges Remaining
29No 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
30100 Real time Software Development with SDL
Methodology
VISION
VISION
31For Realizing the Vision
- Effective Algorithms for mapping SDL code to
implementation language - Effective Approaches to handle on-site testing
32Conclusions
- 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
33Q A
Q A
Q A
Q A
Q A
Q A
Q A
Q A
Q A
Q A
Q A
Q A
Q A
34Thank you
- Bhaskar Rao.G
- Motorola India Electronics Ltd.,
- SE Group,
- Banglore, India- 560 042
- gbr_at_miel.mot.com