XDR in Compilers

download XDR in Compilers

of 20

Transcript of XDR in Compilers

  • 8/8/2019 XDR in Compilers

    1/20

    Implementing xDR inIncremental Compilers

    By

    Mahalingam.P.RSemester 1 - CSIS

  • 8/8/2019 XDR in Compilers

    2/20

  • 8/8/2019 XDR in Compilers

    3/20

    What is xDR?

    The term is similar for those who have usedRPC

    Stands for External Data Representation Defines a common format for communication

    between two machines or even domainswithin the same machine...

    One of the best methods to implementplatform independence and overcomehetrogenity...

  • 8/8/2019 XDR in Compilers

    4/20

    Why use xDR?

    As discussed in previous sessions,incremental compilers shouldn't go throughthe entire reverse engineering process...

    XDR provides some level of stoppage for thisprocess

    Instead of implementing a decompiler as such,

    limit till the xDR

  • 8/8/2019 XDR in Compilers

    5/20

    Need of the hour...

    Incremental compilation is catching up fast There have been such designs as early as

    1979!!! And , it was used then in safety-critical

    applications like nuclear data acquiringprocessors

    Reliability was the keywordReference: IEEE Transactions on Nuclear Science, Vol. NS-26, No. 4, August 1979 An

    Incremental Compiler for Data Acquisition L. M. Taff and F. Sporrel

  • 8/8/2019 XDR in Compilers

    6/20

    So, what is the differencenow? But now, the processing has diversified

    further... Quite a lot of hetrogeneous applications used

    now Integration is the keyword!!!

  • 8/8/2019 XDR in Compilers

    7/20

    How it works...

    Generate a xDR for all the source languages Patch up the required places and recompile To remove, just remove that portion of the

    xDR

    SOUNDS EASY... DOESNT IT???

    WELL... IT IS NOT!!!

  • 8/8/2019 XDR in Compilers

    8/20

    Design issues

    Tracing the portions to be edited is not as simple asit sounds

    The sources are actually merged by the compiler

    creating support issues Also, there are quite a lot of combinations taking into

    account the number of source languages and targetarchitectures and OS available

    Reference: Ambiguity resolution analysis in incremental parsing of natural languageFabrizio Costa, Paolo Frasconi, Vincenzo Lombardo, Patrick Sturt and GiovanniSoda, Department of Information Systems, Universit`a di Firenze. Italy

    IEEE TRANSACTIONS ON NEURAL NETWORKS, VOL. 16, NO. 4, JULY 2005

  • 8/8/2019 XDR in Compilers

    9/20

    Earlier suggested solutions

    Use of Recursive neural networks for selectiveinterpretation

    Problems faced then:

    Complicated tree building mechanismsModular design difficult to integrate

    RNN somewhat difficult to train, and can stillgenerate errors

    Reference: Ambiguity resolution analysis in incremental parsing of natural languageFabrizio Costa, Paolo Frasconi, Vincenzo Lombardo, Patrick Sturt and GiovanniSoda, Department of Information Systems, Universit`a di Firenze. ItalyIEEE TRANSACTIONS ON NEURAL NETWORKS, VOL. 16, NO. 4, JULY 2005

  • 8/8/2019 XDR in Compilers

    10/20

    Some implementations Incremental Hope

    Reference: IncH: an Incremental Compiler for a Functional LanguageJames Gil de Lamadrid, Jill Zimmerman

  • 8/8/2019 XDR in Compilers

    11/20

    Code generator sample Incremental Hope

    Reference: IncH: an Incremental Compiler for a Functional LanguageJames Gil de Lamadrid, Jill Zimmerman

  • 8/8/2019 XDR in Compilers

    12/20

    A flexible back-end UQ*compilers

    Reference: Building a flexible incremental compiler back-end Phil Cook, Jim Welsh,

    Ian J. Hayes, University of Queensland, Australia - May 2005

  • 8/8/2019 XDR in Compilers

    13/20

    More on UQ* systems

    Reference: Building a flexible incremental compiler back-end Phil Cook, Jim Welsh,

    Ian J. Hayes, University of Queensland, Australia - May 2005

  • 8/8/2019 XDR in Compilers

    14/20

    Possible solutions

    Use traceable xDRs... We have seen such an xDR and have been using

    it quite often - XML

    Split the compiler to two parts A compiler to generate the xDR, which is source

    language dependent An interpreter to execute the xDR, which is target

    architecture and OS dependent

  • 8/8/2019 XDR in Compilers

    15/20

    Final skeleton of operation

  • 8/8/2019 XDR in Compilers

    16/20

    Conclusion

    We have seen that incremental compilers arecatching up fast, and diversifying into a varietyof applications

    Hetrogenity has to be tackled so that thewhole concept doesn't freeze as such

    We are also able to arrive at a wonder xDR

    in a daily-used representation - XML

  • 8/8/2019 XDR in Compilers

    17/20

    Applications

    Parallel Incremental Compilation

    - Like distributed compilation, here, wefragment the whole code to parts and compile

    them in parallel

    - If co-located, extremely effective

    - On a network, the network bandwidth is an

    overhead

    Reference: Parallel Incremental Compilation Neal M Gaffer, University of Rochester

  • 8/8/2019 XDR in Compilers

    18/20

    So, what next???

    Try to implement this concept of xDR withlanguages like XML, which provide universaldata transfer opportunities...

    USE OF XML BASED xDR IN

    INCREMENTAL COMPILERS

  • 8/8/2019 XDR in Compilers

    19/20

    QUESTIONS???

  • 8/8/2019 XDR in Compilers

    20/20

    THANK YOU...THANK YOU...