advertisement

PLUG code generation tool

50 %
50 %
advertisement
Information about PLUG code generation tool

Published on October 6, 2007

Author: elfuchs

Source: slideshare.net

Description

IDL template based code generation tool
advertisement

PLUG Presentation Layer Universal Generator P&D/SSD/TCE/TFP/AST- 28/09/98 A joint company of Thomson-CSF Airsys and Siemens

OVERVIEW ATC requirements : Plug & Play (flexibility) Object Oriented Design to automatic code generation Compiler & Parser PLUG (Presentation Layer Universal Generator) through applications : Stub generation : PATIO API Coder generation : Object Message Passing Future * PATIO : Platform for ATM Tools Integration to Pre-operation

ATC requirements : Plug & Play (flexibility)

Object Oriented Design to automatic code generation

Compiler & Parser

PLUG (Presentation Layer Universal Generator) through applications :

Stub generation : PATIO API

Coder generation : Object Message Passing

Future

ATC processus Adjacent Air Traffic Control Cente r Airports Flight Data Processing METEO Data Radar Data Processing Flight Plan Radar Data Tracks Primary and secondary RADAR WAN LAN + - transmetter Receiver HF/VHF

ATC centre Architecture Radar Data Processing Flight Plan Processing Supervisory Control Simulator Recording Replay Controler Working Position Voice control and communications Radar Front Processing Dual LAN FDDI AFTN/CIDIN ATFM ADJACENT FIR'S/TWR'S MET Centres RADAR Intercom Priority Public RADIO A/G Controler Working Position Controler Working Position Controler Working Position

Intercom

Priority

Public

RADIO A/G

PLUG : Presentation Layer Universal Generator OSI layer 6 & 7 services Manages heterogeneous programming languages and hardware Provides Plug & Play (flexibility) => Automatic code generation => Object Oriented Design Application Presentation Session ASN.1* 7 6 5 ASE* ASE ASE ASE

OSI layer 6 & 7 services

Manages heterogeneous programming languages and hardware

Provides Plug & Play (flexibility)

=> Automatic code generation

=> Object Oriented Design

Object analogy Implementation Interface A driver doesn't care of engine's internal working. He only knows the interface

Communication Object Design Specification Language Network Node A Node B IRS (IDL) Struct message1 Item1 : short; Item2 : long; Item3 : char; Item4 : Boolean; Item4 : Struct data Item1 : :char; Item2 : long; Item3 : char; Item4 : Boolean Item4 : char; end struct data; end struct message1 Communication Language Programming Language (C++) Programming Language (Ada)

Syntax and Language Abstract Syntax : specification language : ASN.1, IDL , (ADA ) Working Syntax : programming language : ADA, C, C++ Transfert (concrete) Syntax : communication language : BER/PER , XDR, CDR, ASTERIX, ADEXP, ICAO

Abstract Syntax : specification language :

ASN.1, IDL , (ADA )

Working Syntax : programming language :

ADA, C, C++

Transfert (concrete) Syntax : communication language :

BER/PER , XDR, CDR,

ASTERIX, ADEXP, ICAO

Compiler VS Parser Abstract Syntax is independent of Transfert syntax : Automatic code generation : Compilers If no Abstract Syntax (AS = TS) : Manual code generation : Parsers

Abstract Syntax is independent of Transfert syntax :

Automatic code generation : Compilers

If no Abstract Syntax (AS = TS) :

Manual code generation : Parsers

PLUG Compilers ABSTRACT SYNTAX PLUG Ada RPC : API PLUG ASN.1 : ATN PLUG IDL : CORBA Front End (FE) TRANSFERT SYNTAX PLUG XDR : API PLUG BER/PER : ATN PLUG CDR : CORBA, ESIOP Back End (BE)

ABSTRACT SYNTAX

PLUG Ada RPC : API

PLUG ASN.1 : ATN

PLUG IDL : CORBA

Front End (FE)

TRANSFERT SYNTAX

PLUG XDR : API

PLUG BER/PER : ATN

PLUG CDR : CORBA, ESIOP

Back End (BE)

PLUG Parsers PLUG ASTERIX : Radar, Meteo, Categorie XX PLUG ADEXP : Flight Plan, ATS, AIS , CFMU, IFPS, OLDI PLUG ICAO : Flight Plan, Meteo, Notam , ATS, OLDI Tracks Primary and secondary RADAR

PLUG ASTERIX :

Radar, Meteo, Categorie XX

PLUG ADEXP :

Flight Plan, ATS, AIS , CFMU, IFPS, OLDI

PLUG ICAO :

Flight Plan, Meteo, Notam , ATS, OLDI

PLUG Compilers through applications Distributed Object Design : API (IDL) PATIO UBSS based Ada RPC Stub generator Message passing object design XDR Coder generator Miscellanous Symbolic trace and debug functions Programming Language translator

Distributed Object Design : API (IDL) PATIO

UBSS based Ada RPC

Stub generator

Message passing object design

XDR

Coder generator

Miscellanous

Symbolic trace and debug functions

Programming Language translator

PATIO API paradigm Software components Plug & Play Vertical services, Frame work, Design Patterns Business Middleware = OSI layers 7,5,6 = ORB Core services Business APIs = OSI layer 7 ASEs = CORBA objects Business Middleware is also called API layer because it exhibits only application APIs. An API (as an ASE) is : A protocol and A logical interface (API = abstract syntax) : IRS * IRS : Interface Requirements Specification.

Software components Plug & Play

Vertical services, Frame work, Design Patterns

Business Middleware = OSI layers 7,5,6 = ORB Core services

Business APIs = OSI layer 7 ASEs = CORBA objects

Business Middleware is also called API layer because it exhibits only application APIs.

An API (as an ASE) is :

A protocol and

A logical interface (API = abstract syntax) : IRS

API protocol UBSS API (SKELETON) APPLI UBSS API (STUBS) APPLI Server Client API PROTOCOL UNIX LAN UNIX API

API : How it works API protocol is equivalent to Sun RPC (Remote Procedure Call) with asynchronous events Servers Publish service interface and clients subscribe to services Client invokes remote procedures executed by the server or receives asynchronous event Each server exports interfaces. RPC encapsulates network access : Send/Receive are hidden by Application functions call RPC protocol manages parameters passing between client to server. XDR (External Data Representation) manages heterogeneous programming language and hardware : Ada, C, C++.

API protocol is equivalent to Sun RPC (Remote Procedure Call) with asynchronous events

Servers Publish service interface and clients subscribe to services

Client invokes remote procedures executed by the server or receives asynchronous event

Each server exports interfaces.

RPC encapsulates network access :

Send/Receive are hidden by Application functions call

RPC protocol manages parameters passing between client to server.

XDR (External Data Representation) manages heterogeneous programming language and hardware : Ada, C, C++.

RPC principle Library Main Send Receive Unix process Client Server Marshalling Unmarshalling => XDR XDR Unix process S = A+ B A, B, + S Library Main Push Pop Unix process

API : Ada distributed Package Ada Package specificationc Ada Package Implementation Operations DATA and Operations Implementation Operations Empty Implementation Comms Operations DATA and Operations Implementation Client side Server side =>

Heterogeneous Distributed System : Language or Hardware Main API interface Ada Server Unix Process C Server Unix Process C++ Server Unix Process Ada or C or C++ Client Unix Process Operations DATA and Operations Implementation Operations DATA and Operations Implementation Operations DATA and Operations Implementation Operations DATA and Operations Implementation Operations DATA and Operations Implementation Operations DATA and Operations Implementation Operations DATA and Operations Implementation Operations DATA and Operations Implementation

API Programming model : Client Register; Start Supervision API Register with supervisor; Subscribe to supervision events Program Main Loop Wait next event Case API Supervision : peek event from supervision : process supervision events : Initialise, start, stop, kill API1 : peek event from API 1 : process AP1 events : ............ API2 : peek event from API 2 : process AP2 events : ............ End loop Stop event processing Stop API1, API2 Stop supervision API Unregister Underlying code is the stub automatically generated by PLUG. Itallic code is written by application programmer.

Register;

Start Supervision API

Register with supervisor; Subscribe to supervision events

Program Main Loop

Wait next event

Case API

Supervision :

peek event from supervision :

process supervision events : Initialise, start, stop, kill

API1 :

peek event from API 1 :

process AP1 events : ............

API2 :

peek event from API 2 :

process AP2 events : ............

End loop

Stop event processing

Stop API1, API2

Stop supervision API

Unregister

Client state diagram

PLUG : Presentation Layer Universal Generator XDR Stub Generator Coder Generator C Ada Ada API C Ada (IDL) (CDR) (IDL, C++)

PLUG Stub Generator Program skeltons are automatically generated by PLUG. Stub generation is template driven. Templates are written with PLUG Template Description Language ( TDL ). Template All Technical Middelware details are hidden to the programmer : Registry, Supervision, Subscription. Register; Start Supervion API Register with supervisor; Subscribe to supervision events Program Main Loop Wait next event Case API Supervision : peek event from supervision : process supervision events : Initialise, start, stop, kill API1 : peek event from API 1 : process AP1 events : . API2 : peek event from API 2 : process AP2 events : ............ API3 : peek event from API 2 : process AP2 events : ............ End loop Stop event processing Stop API1, API2 Stop supervision API Unregister

Program skeltons are automatically generated by PLUG.

Stub generation is template driven.

Templates are written with PLUG Template Description Language ( TDL ).

PLUG Coder generator IFF XDR/C generated encoding source files Front End (lex/yacc) Back End XDR/ADA generated encoding source files Ada Grammar (BNF) grammar analyze XDR Templates expansion XDR Templates (TDL) Ada API Independant Format File Abstract Syntax Tree

Object message passing with PLUG UBSS manages pipes not the semantic of transported messages PLUG Coder are used to manage FIFO and CDC messages. Ada type specification is used as Specification input file (AS) IRS documents are replaced by Ada specification

UBSS manages pipes not the semantic of transported messages

PLUG Coder are used to manage FIFO and CDC messages.

Ada type specification is used as Specification input file (AS)

IRS documents are replaced by Ada specification

Plug coder use : FIFO encode/decode FIFO Enqueue Dequeue Type A Type B Type Simple 1 Type Simple 2 End Type B Type C Type Simple 1 Type Simple 3 Type D Type Simple 3 Type Simple 2 End Type D End Type C End Type A Type A Type B Type Simple 1 Type Simple 2 End Type B Type C Type Simple 1 Type Simple 3 Type D Type Simple 3 Type Simple 2 End Type D End Type C End Type A Type Ada Type C Call Back encoding routing XDR buffer Tools User Ada XDR XDR C Tools User

Plug coder use : CDC encode/decode Type A Type B Type Simple 1 Type Simple 2 End Type B Type C Type Simple 1 Type Simple 3 Type D Type Simple 3 Type Simple 2 End Type D End Type C End Type A Type A Type B Type Simple 1 Type Simple 2 End Type B Type C Type Simple 1 Type Simple 3 Type D Type Simple 3 Type Simple 2 End Type D End Type C End Type A Type Ada Type C Call Back encoding routing CDC_write() CDC_read() Ada XDR XDR C CDC

Ada CSCI C CSCI XDR Ada Compiler C Compiler XDR : How it works.

Coder : Structure Serialization Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G End struct Message type1 Ada or C structure XDR Stream XDR Convertor Elementary types are : Int, Char, float, Boolean Field 1 Field 2 Field 3 Field 4 Field 5 Header Type 1 A B C D E F G

C/XDR Coder (C) Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 C structure XDR Stream Ada/XDR Coder (Ada) Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 Ada structure Interface Specification Abstract Syntax Transfert Syntax Programming Syntax Programming Syntax Object Message Passing Syntax Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8 Field 9

C/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 C structure XDR Stream Ada/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 Ada structure Interface Specification C/XDR Coder Generator Ada to C Translator Ada/XDR Coder Generator Ada Package Specification (With) Code generation output Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8 Field 9

Coder context C/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 C structure Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8 Field 9 XDR Stream C/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 C structure C/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 C structure Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8 Field 9 XDR Stream Ada/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 Ada structure Ada/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 Ada structure Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8 Field 9 XDR Stream Ada/XDR Coder Struct Message Type 1 Field A Field B Field C Field D Field E Field F Field G Field H Field I End struct Message Type1 Ada structure

Plug other possible applications Symbolic trace and debug functions Complex structure symbolic dump Programming Language Translator Ada to C, Ada to C++ Off line and recording files management XDR standard file format

Symbolic trace and debug functions

Complex structure symbolic dump

Programming Language Translator

Ada to C, Ada to C++

Off line and recording files management

XDR standard file format

Sum Up Object Oriented Design is mandatory to manage heterogeneous programming language and hardware to provide P&P. Three kinds of services UBSS based Object Middleware : API Ada abstract syntax for Object Message Passing Handcrafted Parser for ATC specific Transfer Syntax

Object Oriented Design is mandatory to manage heterogeneous programming language and hardware to provide P&P.

Three kinds of services

UBSS based Object Middleware : API

Ada abstract syntax for Object Message Passing

Handcrafted Parser for ATC specific Transfer Syntax

Future IDL based ASTERIX compiler States chart based code generation for Object dymanic ASE Skelton automatic generation Business Object Skelton automatic generation Ada/C++ translator

IDL based ASTERIX compiler

States chart based code generation for Object dymanic

ASE Skelton automatic generation

Business Object Skelton automatic generation

Ada/C++ translator

Add a comment

Related pages

Code Generator for Eclipse download | SourceForge.net

Code Generator for Eclipse 2014-05-24 06:52:57 ... for Java code generation ... A tool-set that is highly configurable and yet easy to use for ...
Read more

What are the best Java code generation tools or plugins to ...

I'm aware of the built in code generation and refactoring one can do with the "Source" and "Refactor" menu items in Eclipse. I also use the Commonclipse ...
Read more

Code Generation Tools XML Processing Scripts Plug-in for ...

Introduction. The Code Generation Tools XML Processing Scripts Plug-in for CCS (CG_XML_CCS for short) is an addition to the CCSv4 menu and toolbar that ...
Read more

Create early bound entity classes with the code generation ...

Developer tools Create early bound entity classes with the code generation tool (CrmSvcUtil.exe)
Read more

Code Generator Wizard Guide for Eclipse Plug-in - Apache Axis2

Code Generator Wizard Guide for Eclipse Plug-in. ... [Download Plugin Tool] Introduction; ... You've successfully completed Axis2 code generation.
Read more

Code-Generation Techniques for Java - O'Reilly Media

Code-Generation Techniques for Java by Jack Herrington 09/03/2003 Working in Java either means writing a little bit of complex code or writing a lot of ...
Read more

Write a plug-in - msdn.microsoft.com

Write a Plug-in Constructor. ... Sample: Web access from a sandboxed plug-in Run the code generation tool Blog: Using Plug-Ins To Modify Views.
Read more

Products - MagicDraw

Since MagicDraw allows you to go further with code generation, it's the tool of choice in the world ... With this plugin, MagicDraw adds support for ...
Read more

CodeSmith Tools

A freeware template-based code generator that can generate code for any ASCII-based language. CodeSmith templates use a syntax nearly identical to ASP.NET ...
Read more