IDL to TTCN-3 mapping issues

Slides:



Advertisements
Similar presentations
XMLSchema to TTCN-3 Mapping Importing XML schema based data types into TTCN-3.
Advertisements

Slides for Chapter 20: CORBA Case Study From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Addison-Wesley 2005.
Programming Languages and Paradigms
Programming Languages and Paradigms The C Programming Language.
Written by: Dr. JJ Shepherd
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
Enumerated data type & typedef. Enumerated Data Type An enumeration consists of a set of named integer constants. An enumeration type declaration gives.
ENUMERATED, typedef. ENUMERATED DATA TYPES An enumeration consists of a set of named integer constants. An enumeration type declaration gives the name.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 2: Distributed Software Engineering Using CORBA Dr. Michael R. Lyu.
CORBA IDL 1 Introduction to CORBA IDL Overview  OMG IDL is purely a descriptive language  OMG IDL obeys the same lexical rules as C++  OMG IDL grammar.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
Principles of Object-Oriented Software Development Interface Definition Language.
IDL Interface Definition Language. IDL products Interface repository Dynamic Interface Static skeletons Client IDL stubs Dynamic skeletons Server Object.
II. Middleware for Distributed Systems
PZ04A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ04A - Scalar and composite data Programming Language.
OOP Languages: Java vs C++
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 8: Distributed.
C Tokens Identifiers Keywords Constants Operators Special symbols.
Semantics CSE 340 – Principles of Programming Languages Fall 2015 Adam Doupé Arizona State University
Class Inheritance UNC-CHAPEL HILL COMP 401 BRIAN CRISTANTE 5 FEBRUARY 2015.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Programming Languages and Paradigms Imperative Programming.
Slides for Chapter 17: CORBA Case Study From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.
Data Structure and c K.S.Prabhu Lecturer All Deaf Educational Technology.
Semantics CSE 340 – Principles of Programming Languages Fall 2015 Adam Doupé Arizona State University
CORBA (Common Object Request Broker Architechture) Aniket Prabhune Varun Saini Balaprasuna Chennupati Lally Singh.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Functions, Scope, and The Free Store Functions Functions must be declared by a function prototype before they are invoked, return_type Function_name(type,
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
Structure A collection of values (members) struct date{ int day; char month[10]; int year; }; Declare a structure variable struct date today; struct struct_name.
1 Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Introduction to C++ programming Recap- session 1 Structure of C++ program Keywords Operators – Arithmetic – Relational – Logical Data types Classes and.
SCJP 5, 1/7 Declarations, Initialization and Scoping
Motivation for Generic Programming in C++
The C++ Data Types Fundamental Data Types
Test 2 Review Outline.
‘C’ Programming Structures and Commands
Module Road Map Refactoring Why Refactoring? Examples
Visibility, Accessibility, and Information Hiding
Chapter 6 – Data Types CSCE 343.
APPENDIX a WRITING SUBROUTINES IN C
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
Instructor : Ahmed Alalawi Slides from Chung –Ta King
Interface Definition Language
Methods Attributes Method Modifiers ‘static’
University of Central Florida COP 3330 Object Oriented Programming
CORBA (Common Object Request Broker Architecture)
Programmazione I a.a. 2017/2018.
Interfaces.
Compiler Design 18. Object Oriented Semantic Analysis (Symbol Tables, Type Checking) Kanat Bolazar March 30, 2010.
null, true, and false are also reserved.
Introduction to Java Programming
CSC 113: Computer programming II
PZ09A - Activation records
Prof. Bhushan Trivedi Director GLS Institute of Computer Technology
PZ04A - Scalar and composite data
Semantic Analysis Chapter 6.
ECE 103 Engineering Programming Chapter 8 Data Types and Constants
Overview of C++ Polymorphism
Exercises for Chapter 20: CORBA CASE STUDY
Chapter 9: Pointers and String
SQL – Constraints & Triggers
Programming Languages and Paradigms
C Language B. DHIVYA 17PCA140 II MCA.
Structures, Unions, and Enumerations
Presentation transcript:

IDL to TTCN-3 mapping issues due to practical experiences with e.g. Parlay IDLs some gaps identified major issue: missing modules scopes in TTCN-3 consider module declarations introduce prefixes for interface definitions discriminated unions: additional aux. record of type needed additional type definitions to express link bw. union and discr. types. sequence: max. size mapping missing name clashes due to added suffixes (“Type”, “Enum”, “Object”, “Interfaces”)

(1) consider module declarations to consider module scope to avoid name clashes -------------------------IDL------------------- module identifier1 { typedef long mylong1; module identifier2 { typedef string mystring2; typedef mylong1 mylong2; } -------------------------TTCN------------------- module identifier1 {type long mylong1;} module identifier1__identifier2 { import from identifier1 all; type iso8859string mystring2; type identifier1.mylong1 mylong2;

(2) interface related definitions introduce prefixes to consider IDL scopes to avoid name clashes -------------------------IDL------------------- interface identifier { attribute long attributeId ; void operationname (in string param_value ) raises ( ExceptionType ) ; //... other body definitions ... }; -------------------------TTCN------------------- group identifierInterface { signature identifier__attributeIdGet () return long; signature identifier__attributeIdSet (in long identifier__attributeId); signature identifier__operationname (in iso8859string identifier__param_value) exception ( ExceptionType ) ; //...other body definitions ... }

(3) discriminated unions: (a) additional aux. type needed in case of sequences used in discr. unions additional aux. record of type needed union MyUnion switch( long ) { case ‘0’ : boolean b; case ‘1’ : char c; case ‘2’ : octet o; case ‘3’ : sequence<char> h; case ‘4’ : short s; }; type union MyUnionType { boolean b, iso8859string c, octetstring o, MyUnion__3 h, short s } need to be introduced (generated): type record of iso8859char MyUnion__3;

(3) discriminated unions: (b) link bw. union and discr. types different IDL types map to same TTCN-3 definitions additional types to keep the link information (needed at runtime by CORBA adapter implementation) enum TpUIVariablePartType {P_UI_VARIABLE_PART_TIME, P_UI_VARIABLE_PART_DATE}; union TpUIVariableInfo switch(TpUIVariablePartType) { case P_UI_VARIABLE_PART_TIME: TpTime VariablePartTime; case P_UI_VARIABLE_PART_DATE: TpDate VariablePartDate;}; ------------------------------NEW in TTCN-3 ------------------------------- type TpUIVariablePartType TpUIVariableInfo__Switch; type enumerated TpUIVariableInfo__CasesType {case_P_UI_VARIABLE_PART_TIME, case_P_UI_VARIABLE_PART_DATE};

(4) mapping for IDL sequence Extend the mapping for IDL sequence if a maximum size is specified: We recommend a mapping to record of in TTCN-3 with limited number of elements: IDL Example: typedef sequence <NameComponent, maximum_size> Name; TTCN Example: type record length (0, maximum_size - 1) of NameComponent Name;

(5) name clases due suffixes aux. types are declared by adding suffixes: “Type”, “Enum”, “Object”, “Interfaces” name clashes may occur if constructed types are already defined e.g. introduce protected suffix: _ -------------------------IDL------------------- enum TpUIInfoType {P_UI_INFO_DATA,P_UI_INFO_ADDRESS}; union TpUIInfo switch(TpUIInfoType) { case P_UI_INFO_DATA: TpString InfoData; case P_UI_INFO_ADDRESS: TpURL InfoAddress;}; -------------------------TTCN------------------- type enumerated TpUIInfoType {P_UI_INFO_ID, P_UI_INFO_DATA, P_UI_INFO_ADDRESS} type union TpUIInfoType_ [instead of standard rule: TpUIInfoType] {org__csapi.TpString InfoData, org__csapi.TpURL InfoAddress} type enumerated TpUIInfoEnumType_ [instead of: TpUIInfoEnumType] {org__csapi_TpInt32_InfoID, org__csapi_TpString_InfoData, org__csapi_TpURL_InfoAddress} type record TpUIInfo {TpUIInfoEnumType__ETSI kind, TpUIInfoType__ETSI value_}