טכניון מכון טכנולוגי לישראל
הטכניון מכון טכנולוגי לישראל - בית הספר ללימודי מוסמכים  
Ph.D Thesis
Ph.D StudentLenz Keren
SubjectInternal and External Mechanisms for Extending
Programming Languages
DepartmentDepartment of Computer Science
Supervisor Professor Joseph Gil
Full Thesis textFull thesis text - English Version


Abstract

Most object oriented applications that involve persistent data interact with a relational database.

There is an inherent gap between object-oriented languages and database access languages,  known as “Object-Relational impedance mismatch”. This work strives to bridge this gap in two  mainstream object-oriented languages, C and JAVA.

We begin by presenting ARARAT, a C extension with an augmented relational algebra calculus for the purpose of generating safe SQL queries. All SQL statements constructed by ARARAT are guaranteed to be syntactically correct and type safe, with respect to the database schema. ARARAT allows direct representation of relational algebra expressions as C expressions, yet it is implemented without modifications to the host C compiler, relying on template meta-programming and operator overloading.

We then describe three studies, conducted in the course of extending JAVA with safe query facilities. First, we present an empirical study on the use and abuse of overloading in JAVA. One interesting contribution of this study is the employment of research techniques traditionally used in social sciences. Second, we extend JAVA method invocation mechanism with named parameters and default values.

This feature is realized by modifying the host compiler. Finally, we unveil some of the potential pitfalls encountered while benchmarking small JAVA programs (microbechmarking).