SlideShare une entreprise Scribd logo
1  sur  35
uXML
An Experiment in Common Representation
of Different Programming Paradigms
                           Kunal S. Pathak
Outline

History              Extensibility

Objective            Drawbacks

Applications         Future Work

Architecture         Summary

Tools                Questions

Examples             Thank you
History

    Before UNCOL                After UNCOL

Programming                   Programming
                   Machines    languages        Machines
 languages


1                               1
                         1                                 1

2                               2           U
                        2                   N          2

3                               3           C
                         :
                                            O              :
:                               :
                        N
                                            L          N
M                               M
Examples of UNCOL

Sun’s Java framework


GNU Compiler Collection


Microsoft’s .NET and Phoenix
framework
Objective

Different from that of UNCOL
Design an XML schema (uXML) to
represent the semantics of different
programming paradigms
Test the uXML against various
programming languages
Develop tools that use uXML
Applications

Software Metric tool
Educational tool
Plug-n-play Programming Language
(specific paradigms)
Source language converter tool
Extract the program structure
Architecture

                             uXML format


C Program                <uXML language="abc"
                                  scope="static">
                                                                         Interpreter   Program
                                                                            (XV)        output
                        <function name="func">
P Program                  <returns type="void"/>
                           <block>
                           ...                       uXML
                           ...                      Schema
                                                     Valid-
                           </block>
J Program                                            ation
                        </function>
                           ...
                           ...


L Program               <call>
                          <variable name=”func” /                                      Software
                        >                                           Code Analysis      Metrics
                        </call>
Y Program                  ...
                        </uXML>


            Front end                                         Back end
Architecture cont.

Compiler framework - Activation record,
Symbol table, Display, Calling sequence,
Datatypes


Back end parser - uXML visitor


Front end parsers - C, P, J, L and Y
Tools in uXML


Code interpreter - xv
•   Visit uXML nodes and execute the
    respective code
Code analysis - xv, xsl
•   Count the appropriate uXML nodes
Why XML in uXML?

Program = Syntax tree = XML
Human understandable
Retains the semantics of the program
Many XML processing tools
- XSL, XSL-FO, XQuery, etc
Universally accepted
Few uXML elements

<var/>, <variable/>, <constant/>
<assign/>, <operator/>, <for-loop/>,
<iterate/>, <cast/>
<function/>, <class/>, <constructor/>,
<block/>, <call/>
‘scope’ and ‘var-declaration’ attribute of
<uXML/>
PL features handled by uXML

Iterations, if-else, arrays, pointers
Function definition/call, nested
procedures, functions as first-class
objects
Static vs. Dynamic Typing and Scoping
Classes, Constructors, Inheritance
Front end Parsers


C - Similar to Dennis Ritchie’s C
P - Similar to Niklaus Wirth’s Pascal
J - Similar to Sun Microsystem’s Java
L - Similar to John McCarthy’s Lisp
Y - Similar to Van Rossum’s Python
Features of C language


Imperative/Declarative language
Multi-dimensional arrays, type casting
Pointers and Function pointers (FP)
Passing/returning FP, Passing/returning
array of FP, FP within FP
Sample C code



1.Clike - Factorial calculation
1.uXML - uXML equivalent
2.Clike - Function pointer
Features of P language

Imperative/Declarative language
Features similar to those of C except
pointers
Nested procedures and procedure
parameters
Non-local variable access using static
and dynamic scoping
Sample P code



1.Plike - Static vs. Dynamic scoping
1.uXML - uXML equivalent
2.Plike - Procedure parameters
Features of J language


Object oriented language
Class and constructor definitions
Inheritance and hierarchical constructor
calls
Object instantiation prior to usage
Sample J code



1.Jlike - Inheritance
1.uXML - uXML equivalent
2.Jlike - Constructor Calls
Features of L language


Functional language
Functions as first-class objects
Operators are functions
defun / lambda functions
let, setq, map, reduce features
Sample L code


1.Llike - Reduce
1.uXML - uXML equivalent
2.Llike - Let
3.Llike - Defun
Features of Y language

Imperative/Dynamic language
No variable declaration required,
Dynamic typing
Multi-dimensional mix arrays
lambda function definition
map, reduce features
Sample Y code



1.Ylike - Map
1.uXML - uXML equivalent
2.Ylike - Mix Arrays, lambda
Features of Code Analysis tool

 Name/count of function, variable, class,
 constructor definitions
 Count of function/constructor calls
 Count of methods overridden
 McCabe Cyclomatic complexity
 Helstead Metrics, Maintainability index
Software Metrics
     Function defined : 1
void main()
____________________________________________
                                               function void main() { 
Function calls : 1                               int i = 2 * 2 + 2, j = 1;
main                                               do {
____________________________________________           i = i - 1;
Variables defined : 2
i : int                                                print("i=",i,(j+2));
j : int                                            }while(i);
____________________________________________       
Constants used: 8
int : 2                                            i = 5;
int : 2                                          }
int : 2
int : 1
int : 1
string : i=
int : 2
int : 5
____________________________________________
McCabe Cyclomatic Complexity : 3
____________________________________________
Classes defined : 0
____________________________________________
Functions overriden : 0
_____________________________________
Nested Block Depth : 1
Helstead Metrics

function void main() { 
  int i = 2 * 2 + 2, j = 1;
    do {
        i = i - 1;
        print("i=",i,(j+2));
    }while(i);
    
    i = 5;
  }

 
Helstead Metrics :
N1 = 9, n1 = 7, N2 = 16, n2 = 7
Program Length N => N1 + N2 = 25
Vocabulary Size n => n1 + n2 = 14
Program Volume V => N * log2(n) = 95.18387305144009
Difficulty Level D => (n1 / 2) * (N2 / n2) = 8.0
Program Level L => 1/D = 0.125
Effort to implement E => V*D = 761.4709844115207
Time to implement T = E/18 = 42.303943578417815
No. of bugs delivered B => E^(2/3)/3000 = 3.333333333333333E-4
Extensibility of uXML

uXML schema - Add new programming
language feature
Front end compilers - Write a new
language
Software Metric tool - Add new metrics
to measure the software
Drawbacks


uXML code has larger code size
All / Advanced features of languages not
covered
Many programming paradigms not
included in uXML schema
Future Work

Update uXML schema to incorporate
different paradigms
Make uXML compiler more efficient
Robust programming language
converter tool
Source code as part of comments in
equivalent uXML code
Misc. details of uXML


Developed in Java
Used Eclipse, JavaCC and xv tools
Source code version control
Approximately 150 test programs written
Approximately 6 months of time
Summary

uXML schema represents OO,
procedural and functional paradigms
Room to add more programming
paradigms
Common representation helps develop
powerful code analysis tools
All features of PL can’t be covered
uXML mentors

Dr. James Heliotis
•   Idea of uXML
•   Programming language features
Dr. Axel Schreiner
•   xv tool
•   XML processing tools
References

XV, XPath, JavaCC
The dragon book - Compilers
UNCOL, Phoenix, MSIL
C, Pascal, CLOS, Java, Python,
Smalltalk, Scheme, Modula-2
λ, Types, Scope, Subprograms, Metrics
Questions or Suggestion?
Thank you!!

Contenu connexe

Tendances

User defined Functions in MATLAB Part 1
User defined Functions in MATLAB Part 1User defined Functions in MATLAB Part 1
User defined Functions in MATLAB Part 1Shameer Ahmed Koya
 
User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4Shameer Ahmed Koya
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programsKranthi Kumar
 
Multiple inheritance in c++
Multiple inheritance in c++Multiple inheritance in c++
Multiple inheritance in c++Saket Pathak
 
Julia - Easier, Better, Faster, Stronger
Julia - Easier, Better, Faster, StrongerJulia - Easier, Better, Faster, Stronger
Julia - Easier, Better, Faster, StrongerKenta Sato
 
Efficient Model Partitioning for Distributed Model Transformations
Efficient Model Partitioning for Distributed Model TransformationsEfficient Model Partitioning for Distributed Model Transformations
Efficient Model Partitioning for Distributed Model TransformationsAmine Benelallam
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language samt7
 
Storage Classes and Functions
Storage Classes and FunctionsStorage Classes and Functions
Storage Classes and FunctionsJake Bond
 
Review of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iiiReview of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iiiNico Ludwig
 
Java concepts and questions
Java concepts and questionsJava concepts and questions
Java concepts and questionsFarag Zakaria
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ programmatiur rahman
 

Tendances (20)

C programming language
C programming languageC programming language
C programming language
 
User defined Functions in MATLAB Part 1
User defined Functions in MATLAB Part 1User defined Functions in MATLAB Part 1
User defined Functions in MATLAB Part 1
 
User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
LISP:Control Structures In Lisp
LISP:Control Structures In LispLISP:Control Structures In Lisp
LISP:Control Structures In Lisp
 
overview of c#
overview of c#overview of c#
overview of c#
 
Multiple inheritance in c++
Multiple inheritance in c++Multiple inheritance in c++
Multiple inheritance in c++
 
Interface in java
Interface in javaInterface in java
Interface in java
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
 
Handout#06
Handout#06Handout#06
Handout#06
 
Course1
Course1Course1
Course1
 
Julia - Easier, Better, Faster, Stronger
Julia - Easier, Better, Faster, StrongerJulia - Easier, Better, Faster, Stronger
Julia - Easier, Better, Faster, Stronger
 
Efficient Model Partitioning for Distributed Model Transformations
Efficient Model Partitioning for Distributed Model TransformationsEfficient Model Partitioning for Distributed Model Transformations
Efficient Model Partitioning for Distributed Model Transformations
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
 
Storage Classes and Functions
Storage Classes and FunctionsStorage Classes and Functions
Storage Classes and Functions
 
Review of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iiiReview of c_sharp2_features_part_iii
Review of c_sharp2_features_part_iii
 
Java concepts and questions
Java concepts and questionsJava concepts and questions
Java concepts and questions
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
 
Storage class in C Language
Storage class in C LanguageStorage class in C Language
Storage class in C Language
 

En vedette

Vencendo a competição terry orlick
Vencendo a competição   terry orlickVencendo a competição   terry orlick
Vencendo a competição terry orlickJanaina Braga
 
correspondencia uno a uno
correspondencia uno a unocorrespondencia uno a uno
correspondencia uno a unoMTRO. REYNALDO
 
Wareheim Insurance Consultants2
Wareheim Insurance Consultants2Wareheim Insurance Consultants2
Wareheim Insurance Consultants2Wareheim
 
Filoi Logismikou Anoiktou Kwdika
Filoi Logismikou Anoiktou KwdikaFiloi Logismikou Anoiktou Kwdika
Filoi Logismikou Anoiktou KwdikaM B
 
Ranathambhore with Jungle Lore - Balmohan Vidya Mandir
Ranathambhore with Jungle Lore - Balmohan Vidya MandirRanathambhore with Jungle Lore - Balmohan Vidya Mandir
Ranathambhore with Jungle Lore - Balmohan Vidya MandirHemant Phanse
 
Lee Clark 7th June 2010
Lee Clark 7th June 2010Lee Clark 7th June 2010
Lee Clark 7th June 2010leewclark
 
45lesonsinlife 091118003935 Phpapp02
45lesonsinlife 091118003935 Phpapp0245lesonsinlife 091118003935 Phpapp02
45lesonsinlife 091118003935 Phpapp02lnkngirl
 
20100105 Atope Sosmataatlantica V2.0
20100105 Atope Sosmataatlantica V2.020100105 Atope Sosmataatlantica V2.0
20100105 Atope Sosmataatlantica V2.0OUVI Ltda
 
Lee Clark 7th June 2010
Lee Clark 7th June 2010Lee Clark 7th June 2010
Lee Clark 7th June 2010leewclark
 
Dr. D on Case Acceptance
Dr. D on Case AcceptanceDr. D on Case Acceptance
Dr. D on Case AcceptanceSelf-employed
 
Ranthambore With Jungle Lore Balmohan
Ranthambore With Jungle Lore BalmohanRanthambore With Jungle Lore Balmohan
Ranthambore With Jungle Lore BalmohanHemant Phanse
 
IDS5 - House Project
IDS5 - House ProjectIDS5 - House Project
IDS5 - House Projectarchituna311
 
Mark Prikazsky’s Architecture Portfolio
Mark Prikazsky’s Architecture PortfolioMark Prikazsky’s Architecture Portfolio
Mark Prikazsky’s Architecture PortfolioMark Prikazsky
 
Charles River Ecosystem
Charles River EcosystemCharles River Ecosystem
Charles River EcosystemMark Thompson
 

En vedette (17)

Vencendo a competição terry orlick
Vencendo a competição   terry orlickVencendo a competição   terry orlick
Vencendo a competição terry orlick
 
correspondencia uno a uno
correspondencia uno a unocorrespondencia uno a uno
correspondencia uno a uno
 
Wareheim Insurance Consultants2
Wareheim Insurance Consultants2Wareheim Insurance Consultants2
Wareheim Insurance Consultants2
 
Filoi Logismikou Anoiktou Kwdika
Filoi Logismikou Anoiktou KwdikaFiloi Logismikou Anoiktou Kwdika
Filoi Logismikou Anoiktou Kwdika
 
Ranathambhore with Jungle Lore - Balmohan Vidya Mandir
Ranathambhore with Jungle Lore - Balmohan Vidya MandirRanathambhore with Jungle Lore - Balmohan Vidya Mandir
Ranathambhore with Jungle Lore - Balmohan Vidya Mandir
 
Framing and reframing team Vikilinks
Framing and reframing team VikilinksFraming and reframing team Vikilinks
Framing and reframing team Vikilinks
 
Lee Clark 7th June 2010
Lee Clark 7th June 2010Lee Clark 7th June 2010
Lee Clark 7th June 2010
 
45lesonsinlife 091118003935 Phpapp02
45lesonsinlife 091118003935 Phpapp0245lesonsinlife 091118003935 Phpapp02
45lesonsinlife 091118003935 Phpapp02
 
20100105 Atope Sosmataatlantica V2.0
20100105 Atope Sosmataatlantica V2.020100105 Atope Sosmataatlantica V2.0
20100105 Atope Sosmataatlantica V2.0
 
Lee Clark 7th June 2010
Lee Clark 7th June 2010Lee Clark 7th June 2010
Lee Clark 7th June 2010
 
Dr. D on Case Acceptance
Dr. D on Case AcceptanceDr. D on Case Acceptance
Dr. D on Case Acceptance
 
Go Go Travel
Go Go TravelGo Go Travel
Go Go Travel
 
Ranthambore With Jungle Lore Balmohan
Ranthambore With Jungle Lore BalmohanRanthambore With Jungle Lore Balmohan
Ranthambore With Jungle Lore Balmohan
 
IDS5 - House Project
IDS5 - House ProjectIDS5 - House Project
IDS5 - House Project
 
Mark Prikazsky’s Architecture Portfolio
Mark Prikazsky’s Architecture PortfolioMark Prikazsky’s Architecture Portfolio
Mark Prikazsky’s Architecture Portfolio
 
Ciclo de aprendizaje
Ciclo de aprendizajeCiclo de aprendizaje
Ciclo de aprendizaje
 
Charles River Ecosystem
Charles River EcosystemCharles River Ecosystem
Charles River Ecosystem
 

Similaire à U Xml Defense presentation

IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeSAFAD ISMAIL
 
fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...
fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...
fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...Luca Berardinelli
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java scriptmichaelaaron25322
 
Digital design with Systemc
Digital design with SystemcDigital design with Systemc
Digital design with SystemcMarc Engels
 
compiler design
compiler designcompiler design
compiler designIshwor2
 
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxrajkumar490591
 
U19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptU19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptManivannan837728
 
Lecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxLecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxKhurramKhan173
 
A Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKEA Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKEDaniel Wachtel
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1SURBHI SAROHA
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 

Similaire à U Xml Defense presentation (20)

venkatesh.pptx
venkatesh.pptxvenkatesh.pptx
venkatesh.pptx
 
Overview of c
Overview of cOverview of c
Overview of c
 
IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG Programme
 
C Tutorials
C TutorialsC Tutorials
C Tutorials
 
fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...
fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...
fUML-Driven Design and Performance Analysis of Software Agents for Wireless S...
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java script
 
Digital design with Systemc
Digital design with SystemcDigital design with Systemc
Digital design with Systemc
 
compiler design
compiler designcompiler design
compiler design
 
arrays.ppt
arrays.pptarrays.ppt
arrays.ppt
 
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
 
C notes.pdf
C notes.pdfC notes.pdf
C notes.pdf
 
U19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptU19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).ppt
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
 
Lecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxLecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptx
 
A Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKEA Project Based Lab Report On AMUZING JOKE
A Project Based Lab Report On AMUZING JOKE
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Scala qq
Scala qqScala qq
Scala qq
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
Qt
QtQt
Qt
 

Dernier

ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 

Dernier (20)

ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 

U Xml Defense presentation

  • 1. uXML An Experiment in Common Representation of Different Programming Paradigms Kunal S. Pathak
  • 2. Outline History Extensibility Objective Drawbacks Applications Future Work Architecture Summary Tools Questions Examples Thank you
  • 3. History Before UNCOL After UNCOL Programming Programming Machines languages Machines languages 1 1 1 1 2 2 U 2 N 2 3 3 C : O : : : N L N M M
  • 4. Examples of UNCOL Sun’s Java framework GNU Compiler Collection Microsoft’s .NET and Phoenix framework
  • 5. Objective Different from that of UNCOL Design an XML schema (uXML) to represent the semantics of different programming paradigms Test the uXML against various programming languages Develop tools that use uXML
  • 6. Applications Software Metric tool Educational tool Plug-n-play Programming Language (specific paradigms) Source language converter tool Extract the program structure
  • 7. Architecture uXML format C Program <uXML language="abc" scope="static"> Interpreter Program (XV) output <function name="func"> P Program <returns type="void"/> <block> ... uXML ... Schema Valid- </block> J Program ation </function> ... ... L Program <call> <variable name=”func” / Software > Code Analysis Metrics </call> Y Program ... </uXML> Front end Back end
  • 8. Architecture cont. Compiler framework - Activation record, Symbol table, Display, Calling sequence, Datatypes Back end parser - uXML visitor Front end parsers - C, P, J, L and Y
  • 9. Tools in uXML Code interpreter - xv • Visit uXML nodes and execute the respective code Code analysis - xv, xsl • Count the appropriate uXML nodes
  • 10. Why XML in uXML? Program = Syntax tree = XML Human understandable Retains the semantics of the program Many XML processing tools - XSL, XSL-FO, XQuery, etc Universally accepted
  • 11. Few uXML elements <var/>, <variable/>, <constant/> <assign/>, <operator/>, <for-loop/>, <iterate/>, <cast/> <function/>, <class/>, <constructor/>, <block/>, <call/> ‘scope’ and ‘var-declaration’ attribute of <uXML/>
  • 12. PL features handled by uXML Iterations, if-else, arrays, pointers Function definition/call, nested procedures, functions as first-class objects Static vs. Dynamic Typing and Scoping Classes, Constructors, Inheritance
  • 13. Front end Parsers C - Similar to Dennis Ritchie’s C P - Similar to Niklaus Wirth’s Pascal J - Similar to Sun Microsystem’s Java L - Similar to John McCarthy’s Lisp Y - Similar to Van Rossum’s Python
  • 14. Features of C language Imperative/Declarative language Multi-dimensional arrays, type casting Pointers and Function pointers (FP) Passing/returning FP, Passing/returning array of FP, FP within FP
  • 15. Sample C code 1.Clike - Factorial calculation 1.uXML - uXML equivalent 2.Clike - Function pointer
  • 16. Features of P language Imperative/Declarative language Features similar to those of C except pointers Nested procedures and procedure parameters Non-local variable access using static and dynamic scoping
  • 17. Sample P code 1.Plike - Static vs. Dynamic scoping 1.uXML - uXML equivalent 2.Plike - Procedure parameters
  • 18. Features of J language Object oriented language Class and constructor definitions Inheritance and hierarchical constructor calls Object instantiation prior to usage
  • 19. Sample J code 1.Jlike - Inheritance 1.uXML - uXML equivalent 2.Jlike - Constructor Calls
  • 20. Features of L language Functional language Functions as first-class objects Operators are functions defun / lambda functions let, setq, map, reduce features
  • 21. Sample L code 1.Llike - Reduce 1.uXML - uXML equivalent 2.Llike - Let 3.Llike - Defun
  • 22. Features of Y language Imperative/Dynamic language No variable declaration required, Dynamic typing Multi-dimensional mix arrays lambda function definition map, reduce features
  • 23. Sample Y code 1.Ylike - Map 1.uXML - uXML equivalent 2.Ylike - Mix Arrays, lambda
  • 24. Features of Code Analysis tool Name/count of function, variable, class, constructor definitions Count of function/constructor calls Count of methods overridden McCabe Cyclomatic complexity Helstead Metrics, Maintainability index
  • 25. Software Metrics Function defined : 1 void main() ____________________________________________ function void main() {  Function calls : 1   int i = 2 * 2 + 2, j = 1; main     do { ____________________________________________         i = i - 1; Variables defined : 2 i : int         print("i=",i,(j+2)); j : int     }while(i); ____________________________________________      Constants used: 8 int : 2     i = 5; int : 2 } int : 2 int : 1 int : 1 string : i= int : 2 int : 5 ____________________________________________ McCabe Cyclomatic Complexity : 3 ____________________________________________ Classes defined : 0 ____________________________________________ Functions overriden : 0 _____________________________________ Nested Block Depth : 1
  • 26. Helstead Metrics function void main() {    int i = 2 * 2 + 2, j = 1;     do {         i = i - 1;         print("i=",i,(j+2));     }while(i);          i = 5; }   Helstead Metrics : N1 = 9, n1 = 7, N2 = 16, n2 = 7 Program Length N => N1 + N2 = 25 Vocabulary Size n => n1 + n2 = 14 Program Volume V => N * log2(n) = 95.18387305144009 Difficulty Level D => (n1 / 2) * (N2 / n2) = 8.0 Program Level L => 1/D = 0.125 Effort to implement E => V*D = 761.4709844115207 Time to implement T = E/18 = 42.303943578417815 No. of bugs delivered B => E^(2/3)/3000 = 3.333333333333333E-4
  • 27. Extensibility of uXML uXML schema - Add new programming language feature Front end compilers - Write a new language Software Metric tool - Add new metrics to measure the software
  • 28. Drawbacks uXML code has larger code size All / Advanced features of languages not covered Many programming paradigms not included in uXML schema
  • 29. Future Work Update uXML schema to incorporate different paradigms Make uXML compiler more efficient Robust programming language converter tool Source code as part of comments in equivalent uXML code
  • 30. Misc. details of uXML Developed in Java Used Eclipse, JavaCC and xv tools Source code version control Approximately 150 test programs written Approximately 6 months of time
  • 31. Summary uXML schema represents OO, procedural and functional paradigms Room to add more programming paradigms Common representation helps develop powerful code analysis tools All features of PL can’t be covered
  • 32. uXML mentors Dr. James Heliotis • Idea of uXML • Programming language features Dr. Axel Schreiner • xv tool • XML processing tools
  • 33. References XV, XPath, JavaCC The dragon book - Compilers UNCOL, Phoenix, MSIL C, Pascal, CLOS, Java, Python, Smalltalk, Scheme, Modula-2 λ, Types, Scope, Subprograms, Metrics

Notes de l'éditeur

  1. Name, Started in Dec 2007, Masters in CS (Languages and Tools)
  2. I would like to tell the Applications of uXML first so that audiences understand what is the significance of uXML before understanding the core of it. Tools - developed the tools that uses uXML. Examples - uXML nodes, Extensibility - how you can add new components easily and extend uXML, Drawbacks - everything has drawbacks, Future Work - Things that I might think of adding in uXML, Summary, Q&amp;A THANK YOU
  3. 1960 form intermediate between problem-oriented languages and machine language M*N to M+N Explain the advantage of having a UIL - compilers, machine, etc. Why UNCOL failed? - Ambitious, no advanced compilers, not enough memory, slow machines
  4. JVM - Bytecode is IL. Scala, JRuby, Jython, Groovy, Rhino. Small M, large N GNU - C, C++, Java converts to GENERIC, Small M, Large N .NET - CIL. VB, C#, F#, VC++, ASP. Large M, small N Phoenix - Framework for building compilers, CIL -&gt; IR, tools like memory tracing, code coverage, block counting, Large M, small N
  5. UNCOL - Already many tools Execution vs. Representation of semantics To prove - develop tools
  6. Explain these as applications of a universal intermediate language s/w metrics tool - A common tool that does the code analysis of programs written in different paradigm education tool - compile framework, programs can be compared by metrics language converter - ambitious idea program structure - Extract the structure of a program The idea is how quickly can you develop a tool that is handy for wide range of languages
  7. 2 tools so far - Interpreter and Code Analysis IR is validated against the uXML schema
  8. Activation record - Enter the block, Leave the block, Symbol table - Add/remove symbol (datatype, mutable, name) Display - Data structure containing list of activation records to access the non-local variables Calling Sequence - Steps to be taken while calling/returing a function. Prototype for static/dynamic access Datatypes - Function, Int, Char, String, Overloaded function type 2 parts - Backend and Front end
  9. Programs are syntax trees. XML is also represented as trees Understandable - semantics are retain, no for loops in bytecode Processing tools - Extracting the data is easy, formatting, translating, thus many end users as oppose to MSIL or bytecode that has just 1 user and that is interpreter itself
  10. Definition of each node Explain &amp;#x2018;scope&amp;#x2019; and &amp;#x2018;var-declaration&amp;#x2019; attributes in brief
  11. Scoping - Context where values and expr are associated, how local variables are bound Static scoping - variable association at compile time Dynamic scoping - variable association at runtime
  12. All languages contain if-else, while, for so won&amp;#x2019;t mention explicitly
  13. Alike Java instantiation of object is needed before usage, else compiler throws error.
  14. 1st parameter to the function/field is an object whose member is getting accessed. Parametric Polymorphism or Generics - Object as 1st parameter decides whose method to call
  15. Closures Why operators are function? Code metrics
  16. MCC - No. of linearly independent paths in the source code, control flow graph. Give eg. Helstead Metrics - Maintainability index - VS 2008 uses Helstead to calculate this factor.
  17. Operators : N1 = Total , n1 = distinct Operands : N2 = Total , n2 = distinct Analogy of a book - Difficulty - increases with repetitive operands Volume - How much information to be absorbed Effort - efforts to write the code Time - in secs and 18 is stroud number - humans detect 5 to 20 moments/discrete events /sec - not used much jeh pointed out, Compare the programs with respect to difficulty, efforts, etc.
  18. Advanced features - thread, read/write, file handling, interface, etc Missing programming paradigm - Logical, Aspect-oriented, Process oriented, etc.
  19. uXML compiler can be improved to make it execute faster Comments - Part of Y language
  20. There are lot of articles, however these points to some of the finest articles that helped me in developing the project.