SlideShare a Scribd company logo
Source­to­source 
transformations 
Supporting tools and infrastructure 
Nikolaos Kavvadias 
nkavv@uop.gr 
March 31st, 2009 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Source­to­source 
transformation (1) 
By the term ‘‘source­to­source 
transformation’’ we refer to 
any mechanism that when applied to a SOURCE program, a 
functionally equivalent TARGET program is produced 
Basic assumptions 
SOURCE and TARGET programs submit to the same 
programming language semantics 
A ‘‘database’’ of the source program is generated by 
translating to a form of high­level 
intermediate 
representation (HIR) 
The target program is produced by pretty­printing 
the HIR 
view of the source program 
Secondary assumptions 
Structural information (e.g. program layout, line numbers) 
may not be preserved when translating to the HIR form 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Source­to­source 
transformation (2) 
Potential uses of source­to­source 
(also termed as 
‘‘source­level’’) 
transformations 
Algebraic and other simplifications (e.g. matrix flattening) 
Data access improvements for enhancing data locality 
Enforcing the use of a data memory hierarchy (data reuse 
transformations) 
Conversion to a standard (canonicalized) form 
Enabling the application of lower level transformations 
(closer to the underlying machine model) 
High­level 
view of the source­to­source 
translation process 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Pragmatics of a source­to­source 
transformation 
framework 
Useful software facilities for implementing a 
source­to­source 
transformation framework 
AST builder and walker 
AST/HIR query engine 
Semantics checker and/or HIR validator 
AST2HIR and HIR2AST modules 
Z In general, comprehensive frontend facilities would be 
extremely useful to build upon 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
An overview of tools and infrastructure 
Existing software systems 
The C­to­C 
source code translator 
(ftp://theory.lcs.mit.edu/pub/c2c/), now defunct 
Memphis tree builder and walker tool 
(http://memphis.compilertools.net/index.html) 
EDG C/C++ frontend (http://www.edg.com) 
TXL (http://www.txl.ca) 
The Cetus project (http://cetus.ecn.purdue.edu/) 
ROSE compiler infrastructure 
(http://www.rosecompiler.org) 
. . . or ‘‘Roll Your Own’’ system/infrastructure 
Based on extensible text transformation technology: XML + 
XSLT (http://www.w3.org/2001/XMLSchema) 
Adapt to exactly fit your needs 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
The C­to­C 
MIT source code translation tool 
Features 
AST building and type checking from ANSI C 
Data flow analysis on the AST 
MIT license 
Cons 
Relatively few built­in 
transformations 
Further development has ceased 
Distribution site now defunct (as of late 2005) 
Suggestions 
Lack of features and support prevent C2C from being a 
reliable infrastructure 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Memphis 
Characteristics and features 
Intended audience are compiler writers 
Provides basic mechanisms for rule­based 
tree 
transformations 
Works well with Lex and Yacc 
Memphis personal license + GPL 
Cons 
Lack of a ready­to­use 
C grammar 
No real world examples 
Largely unknown to the community 
Development site ceased (http://www.combo.org) 
Suggestions 
Infrastructure is only minimal and not really useful for any 
practical use 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
EDG C/C++ frontend 
Features 
Mature and complete C/C++ frontend 
Covers the entire C99 and latest C++ standards 
AST construction and a rich set of related data structures 
Extensive documentation ( 600 pages) 
Actively supported by a company (Edison Design Group) 
Proprietary open­source 
license; free for academic research 
Cons 
Developing user tools requires a significant time investment 
No API (which would simplify the development of extensions 
and plugins) 
Suggestions 
Viable choice in case infrastructure development time is 
more or less irrelevant 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
TXL 
Features 
TXL is a functional programming language mainly used for 
domain­specific 
language development 
Language primitives for specifying tree rewriting rules 
Comes with many frontends (C, C++, Java, Modula­2/ 
3, etc) 
Has been used in production environments (source code 
transformations for eliminating patterns of code arising Y2K 
problems) 
Cons 
Development seems to be steered by a single person; no real 
community being able to contribute 
TXL is a narrow­scope 
language 
No previous experience with TXL 
Suggestions 
Viable choice only if the source transformations involved 
could be easily specified by bare bones term rewriting 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Cetus 
Features 
Source­to­source 
C compiler written in Java 
Extensive set of compiler passes working on a high­level 
IR 
Supports parallelization techniques 
Analyses and transformations 
Data dependence analysis 
Loop parallelizer 
Source program canonicalization 
Loop outlining (procedural abstraction of loops) 
Modified Artistic License 
Cons 
Depending on external tools (Java libraries, ANTLR) 
Very small (nonexistent?) community outside Purdue Univ. 
Suggestions 
The scope of this infrastructure seems appropriate 
Focuses on parallelism extraction for OpenMP and not loop 
restructuring transformations suitable for other purposes 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
ROSE 
Features 
A C++ tool for building source­to­source 
translators 
Support for C, C99, UPC, C++, Fortran 77­90/ 
95­2003 
Builds upon the EDG frontend (included) 
Under active development 
Analyses and transformations 
AST construction, traversal and querying, CFG construction, 
data flow analyses 
Predefined loop optimizations: loop interchange, loop fusion, 
loop fission, loop splitting, loop unrolling 
Revised BSD license 
Cons 
External dependencies (Java, compiled version of Boost) 
It is unclear whether there is an active community yet 
Suggestions 
Scope and purpose of this infrastructure seem appropriate 
Heavy work for an EDG­based 
ecosystem already done 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Custom text transformation engine based on XML 
Features 
XML is a well­established 
and mature technology 
Provides the means for specifying your own text 
manipulation and transformation primitives 
Vast community of developers and users 
Cons 
Development of the infrastructure: constructors, traversals, 
querying mechanisms, pretty­printers, 
dumping to debugging 
formats, fundamental analyses and transformations 
Development effort cannot be easily estimated 
Suggestions 
XML is a tool for serious work given that the development 
project is closely managed in respect to timeframes and 
human resources 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Conclusion 
There exist viable solutions for creating a source­to­source 
translation tool fitting our needs 
EDG: roll your own analyses and transformations 
XML: roll your own and customize to your specific needs 
ROSE: open and extensible infrastructure based on the EDG 
frontend 
The choice of one of these solutions requires taking into 
account subjective factors such as: 
Communication of ideas, concepts and results to and from 
other parties involved 
Extensibility of the infrastructure 
Preexisting knowledge 
Personal preference 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
References I 
TXL homepage. http://www.txl.ca 
Memphis tree builder and walker. 
http://memphis.compilertools.net/index.html 
The C­to­C 
source code translator. 
ftp://theory.lcs.mit.edu/pub/c2c/ 
The EDG C/C++ frontend. http://www.edg.com 
The Cetus project. http://cetus.ecn.purdue.edu 
ROSE: A tool for building source­to­source 
translators. 
http://www.rosecompiler.org 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations
Revision history 
v0.1 (30/03/2009): Initial version 
Nikolaos Kavvadias nkavv@uop.gr Source­to­source 
transformations

More Related Content

What's hot (16)

PPTX
How to get started with R programming
Ramon Salazar
 
PDF
10 xrd-software
José da Silva Rabelo Neto
 
PDF
Introduction To Pentaho Kettle
Boulder Java User's Group
 
PPTX
Adopting the DSM paradigm: defining federation scenarios through resource br...
Christos Tranoris
 
PPT
LarKC Tutorial at ISWC 2009 - Parallelisation
LarKC
 
PPTX
R Introduction
schamber
 
PPTX
Semantic Web use cases in outcomes research
Chimezie Ogbuji
 
PDF
Comparative Study That Aims Rdf Processing For The Java Platform
Computer Science
 
PDF
Expressive Querying of Semantic Databases with Incremental Query Rewriting
Alexandre Riazanov
 
PDF
Scala Overview INFX 1616
Patrick Walter
 
PPT
R programming slides
Pankaj Saini
 
PPTX
LSESU a Taste of R Language Workshop
Korkrid Akepanidtaworn
 
PDF
R Programming Overview
dlamb3244
 
PPTX
L15 Data Source Layer
Ólafur Andri Ragnarsson
 
PPTX
An Approach for the Incremental Export of Relational Databases into RDF Graphs
Nikolaos Konstantinou
 
How to get started with R programming
Ramon Salazar
 
Introduction To Pentaho Kettle
Boulder Java User's Group
 
Adopting the DSM paradigm: defining federation scenarios through resource br...
Christos Tranoris
 
LarKC Tutorial at ISWC 2009 - Parallelisation
LarKC
 
R Introduction
schamber
 
Semantic Web use cases in outcomes research
Chimezie Ogbuji
 
Comparative Study That Aims Rdf Processing For The Java Platform
Computer Science
 
Expressive Querying of Semantic Databases with Incremental Query Rewriting
Alexandre Riazanov
 
Scala Overview INFX 1616
Patrick Walter
 
R programming slides
Pankaj Saini
 
LSESU a Taste of R Language Workshop
Korkrid Akepanidtaworn
 
R Programming Overview
dlamb3244
 
L15 Data Source Layer
Ólafur Andri Ragnarsson
 
An Approach for the Incremental Export of Relational Databases into RDF Graphs
Nikolaos Konstantinou
 

Viewers also liked (16)

PDF
bhandout
Azhar Abbas
 
PPTX
Thev norton eq
Hassaan Rahman
 
PPT
Thevenin norton_ECA
Shariq Alee
 
DOCX
Langkah mencari litar setara norton thevenin guna source transformation
fs fsc
 
PPTX
B tech ee ii_ eee_ u-2_ ac circuit analysis_dipen patel
Rai University
 
PPTX
Ac single phase
Mohammed Waris Senan
 
PPTX
Diploma i boee u 3 ac circuit analysis
Rai University
 
PPTX
PROGRAMMABLE LOGIC CONTROLLERS
RAHUL DESHMUKH
 
PPT
Circuit Theorem
stooty s
 
PPT
Star delta
avi1001
 
PPT
Delta star relationship (1)
140120109032
 
PPT
Topic 2a ac_circuits_analysis
Gabriel O'Brien
 
PPT
Network Theorems.ppt
bhanupratap_11
 
PPT
AC electricity
nlahoud
 
PPTX
Ac circuits 15 april 2013(1)
Malusela Ndivhuwo
 
PDF
Ac fundamentals
Anu71
 
bhandout
Azhar Abbas
 
Thev norton eq
Hassaan Rahman
 
Thevenin norton_ECA
Shariq Alee
 
Langkah mencari litar setara norton thevenin guna source transformation
fs fsc
 
B tech ee ii_ eee_ u-2_ ac circuit analysis_dipen patel
Rai University
 
Ac single phase
Mohammed Waris Senan
 
Diploma i boee u 3 ac circuit analysis
Rai University
 
PROGRAMMABLE LOGIC CONTROLLERS
RAHUL DESHMUKH
 
Circuit Theorem
stooty s
 
Star delta
avi1001
 
Delta star relationship (1)
140120109032
 
Topic 2a ac_circuits_analysis
Gabriel O'Brien
 
Network Theorems.ppt
bhanupratap_11
 
AC electricity
nlahoud
 
Ac circuits 15 april 2013(1)
Malusela Ndivhuwo
 
Ac fundamentals
Anu71
 
Ad

Similar to Source-to-source transformations: Supporting tools and infrastructure (20)

PPTX
Transpilers(Source-to-Source Compilers)
Shivang Bajaniya
 
DOC
Source-to-Source Compiler
Mintoo Jakhmola
 
PDF
Platforms and the Semantic Web
Danny Ayers
 
PDF
Constraint Grammar and Apertium
unhammer
 
PPTX
Mining Sociotechnical Information From Software Repositories
Marco Aurelio Gerosa
 
PDF
TAUS USER CONFERENCE 2010, More data equals better machine translation – the ...
TAUS - The Language Data Network
 
PDF
Introduction to the source{d} Stack
source{d}
 
PDF
Generator
Ramasubbu .P
 
PDF
SUBJECT
Ramasubbu .P
 
PPT
TypeScript - Javascript done right
Wekoslav Stefanovski
 
PPSX
The path to an hybrid open source paradigm
Jonathan Challener
 
PPT
Interoperability
sudhakar mandal
 
PDF
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
Alessandro Confetti
 
PDF
Overlapping optimization with parsing through metagrammars
IAEME Publication
 
PDF
On the way of listening to the crowd for supporting modeling activities
Davide Ruscio
 
PDF
Tecnick.com Open Source Tecnologies
Tecnick.com LTD
 
ODP
Open Nordic 2008 NTNU
Øyvind Hauge
 
PPT
Cilip Seminar 6th October - Integrating With Open Source
Jonathan Field
 
Transpilers(Source-to-Source Compilers)
Shivang Bajaniya
 
Source-to-Source Compiler
Mintoo Jakhmola
 
Platforms and the Semantic Web
Danny Ayers
 
Constraint Grammar and Apertium
unhammer
 
Mining Sociotechnical Information From Software Repositories
Marco Aurelio Gerosa
 
TAUS USER CONFERENCE 2010, More data equals better machine translation – the ...
TAUS - The Language Data Network
 
Introduction to the source{d} Stack
source{d}
 
Generator
Ramasubbu .P
 
SUBJECT
Ramasubbu .P
 
TypeScript - Javascript done right
Wekoslav Stefanovski
 
The path to an hybrid open source paradigm
Jonathan Challener
 
Interoperability
sudhakar mandal
 
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
Alessandro Confetti
 
Overlapping optimization with parsing through metagrammars
IAEME Publication
 
On the way of listening to the crowd for supporting modeling activities
Davide Ruscio
 
Tecnick.com Open Source Tecnologies
Tecnick.com LTD
 
Open Nordic 2008 NTNU
Øyvind Hauge
 
Cilip Seminar 6th October - Integrating With Open Source
Jonathan Field
 
Ad

Recently uploaded (20)

PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Best Web development company in india 2025
Greenusys
 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PDF
NPD Software -Omnex systems
omnex systems
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PDF
Latest Capcut Pro 5.9.0 Crack Version For PC {Fully 2025
utfefguu
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Best Web development company in india 2025
Greenusys
 
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
NPD Software -Omnex systems
omnex systems
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Latest Capcut Pro 5.9.0 Crack Version For PC {Fully 2025
utfefguu
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 

Source-to-source transformations: Supporting tools and infrastructure

  • 1. Source­to­source transformations Supporting tools and infrastructure Nikolaos Kavvadias [email protected] March 31st, 2009 Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 2. Source­to­source transformation (1) By the term ‘‘source­to­source transformation’’ we refer to any mechanism that when applied to a SOURCE program, a functionally equivalent TARGET program is produced Basic assumptions SOURCE and TARGET programs submit to the same programming language semantics A ‘‘database’’ of the source program is generated by translating to a form of high­level intermediate representation (HIR) The target program is produced by pretty­printing the HIR view of the source program Secondary assumptions Structural information (e.g. program layout, line numbers) may not be preserved when translating to the HIR form Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 3. Source­to­source transformation (2) Potential uses of source­to­source (also termed as ‘‘source­level’’) transformations Algebraic and other simplifications (e.g. matrix flattening) Data access improvements for enhancing data locality Enforcing the use of a data memory hierarchy (data reuse transformations) Conversion to a standard (canonicalized) form Enabling the application of lower level transformations (closer to the underlying machine model) High­level view of the source­to­source translation process Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 4. Pragmatics of a source­to­source transformation framework Useful software facilities for implementing a source­to­source transformation framework AST builder and walker AST/HIR query engine Semantics checker and/or HIR validator AST2HIR and HIR2AST modules Z In general, comprehensive frontend facilities would be extremely useful to build upon Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 5. An overview of tools and infrastructure Existing software systems The C­to­C source code translator (ftp://theory.lcs.mit.edu/pub/c2c/), now defunct Memphis tree builder and walker tool (http://memphis.compilertools.net/index.html) EDG C/C++ frontend (http://www.edg.com) TXL (http://www.txl.ca) The Cetus project (http://cetus.ecn.purdue.edu/) ROSE compiler infrastructure (http://www.rosecompiler.org) . . . or ‘‘Roll Your Own’’ system/infrastructure Based on extensible text transformation technology: XML + XSLT (http://www.w3.org/2001/XMLSchema) Adapt to exactly fit your needs Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 6. The C­to­C MIT source code translation tool Features AST building and type checking from ANSI C Data flow analysis on the AST MIT license Cons Relatively few built­in transformations Further development has ceased Distribution site now defunct (as of late 2005) Suggestions Lack of features and support prevent C2C from being a reliable infrastructure Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 7. Memphis Characteristics and features Intended audience are compiler writers Provides basic mechanisms for rule­based tree transformations Works well with Lex and Yacc Memphis personal license + GPL Cons Lack of a ready­to­use C grammar No real world examples Largely unknown to the community Development site ceased (http://www.combo.org) Suggestions Infrastructure is only minimal and not really useful for any practical use Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 8. EDG C/C++ frontend Features Mature and complete C/C++ frontend Covers the entire C99 and latest C++ standards AST construction and a rich set of related data structures Extensive documentation ( 600 pages) Actively supported by a company (Edison Design Group) Proprietary open­source license; free for academic research Cons Developing user tools requires a significant time investment No API (which would simplify the development of extensions and plugins) Suggestions Viable choice in case infrastructure development time is more or less irrelevant Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 9. TXL Features TXL is a functional programming language mainly used for domain­specific language development Language primitives for specifying tree rewriting rules Comes with many frontends (C, C++, Java, Modula­2/ 3, etc) Has been used in production environments (source code transformations for eliminating patterns of code arising Y2K problems) Cons Development seems to be steered by a single person; no real community being able to contribute TXL is a narrow­scope language No previous experience with TXL Suggestions Viable choice only if the source transformations involved could be easily specified by bare bones term rewriting Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 10. Cetus Features Source­to­source C compiler written in Java Extensive set of compiler passes working on a high­level IR Supports parallelization techniques Analyses and transformations Data dependence analysis Loop parallelizer Source program canonicalization Loop outlining (procedural abstraction of loops) Modified Artistic License Cons Depending on external tools (Java libraries, ANTLR) Very small (nonexistent?) community outside Purdue Univ. Suggestions The scope of this infrastructure seems appropriate Focuses on parallelism extraction for OpenMP and not loop restructuring transformations suitable for other purposes Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 11. ROSE Features A C++ tool for building source­to­source translators Support for C, C99, UPC, C++, Fortran 77­90/ 95­2003 Builds upon the EDG frontend (included) Under active development Analyses and transformations AST construction, traversal and querying, CFG construction, data flow analyses Predefined loop optimizations: loop interchange, loop fusion, loop fission, loop splitting, loop unrolling Revised BSD license Cons External dependencies (Java, compiled version of Boost) It is unclear whether there is an active community yet Suggestions Scope and purpose of this infrastructure seem appropriate Heavy work for an EDG­based ecosystem already done Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 12. Custom text transformation engine based on XML Features XML is a well­established and mature technology Provides the means for specifying your own text manipulation and transformation primitives Vast community of developers and users Cons Development of the infrastructure: constructors, traversals, querying mechanisms, pretty­printers, dumping to debugging formats, fundamental analyses and transformations Development effort cannot be easily estimated Suggestions XML is a tool for serious work given that the development project is closely managed in respect to timeframes and human resources Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 13. Conclusion There exist viable solutions for creating a source­to­source translation tool fitting our needs EDG: roll your own analyses and transformations XML: roll your own and customize to your specific needs ROSE: open and extensible infrastructure based on the EDG frontend The choice of one of these solutions requires taking into account subjective factors such as: Communication of ideas, concepts and results to and from other parties involved Extensibility of the infrastructure Preexisting knowledge Personal preference Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 14. References I TXL homepage. http://www.txl.ca Memphis tree builder and walker. http://memphis.compilertools.net/index.html The C­to­C source code translator. ftp://theory.lcs.mit.edu/pub/c2c/ The EDG C/C++ frontend. http://www.edg.com The Cetus project. http://cetus.ecn.purdue.edu ROSE: A tool for building source­to­source translators. http://www.rosecompiler.org Nikolaos Kavvadias [email protected] Source­to­source transformations
  • 15. Revision history v0.1 (30/03/2009): Initial version Nikolaos Kavvadias [email protected] Source­to­source transformations