Results 1 - 10
of
10
Safe query objects: statically typed objects as remotely executable queries
- In Proceedings of the 27th International Conference on Software Engineering (ICSE
, 2005
"... Developers of data-intensive applications are increasingly using persistence frameworks such as EJB, Hibernate and JDO to access relational data. These frameworks support both transparent persistence for individual objects and explicit queries to efficiently search large collections of objects. Whil ..."
Abstract
-
Cited by 34 (5 self)
- Add to MetaCart
Developers of data-intensive applications are increasingly using persistence frameworks such as EJB, Hibernate and JDO to access relational data. These frameworks support both transparent persistence for individual objects and explicit queries to efficiently search large collections of objects. While transparent persistence is statically typed, explicit queries do not support static checking of types or syntax because queries are manipulated as strings and interpreted at runtime. This paper presents Safe Query Objects, a technique for representing queries as statically typed objects while still supporting remote execution by a database server. Safe query objects use object-relational mapping and reflective metaprogramming to translate query classes into traditional database queries. The model supports complex queries with joins, parameters, existentials, and dynamic criteria. A prototype implementation for JDO provides a type-safe interface to the full query functionality in the JDO 1.0 standard.
Improving the Static Analysis of Embedded Languages via Partial Evaluation
, 2004
"... detected or enforced by their host language. We show how to use macros to easily implement partial evaluation of embedded interpreters in order to capture invariants encoded in embedded programs and render them explicit in the terms of their host language. We demonstrate the effectiveness of this te ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
detected or enforced by their host language. We show how to use macros to easily implement partial evaluation of embedded interpreters in order to capture invariants encoded in embedded programs and render them explicit in the terms of their host language. We demonstrate the effectiveness of this technique in improving the results of a value flow analysis.
Strategic programming by model interpretation and partial evaluation
, 2009
"... The dominant approach to model-driven development and domain-specific language engineering is to write a translator, or compiler, that defines a strategy for executing the high-level language. In this paper we introduce a new approach to strategic programming by writing interpreters of high-level mo ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
The dominant approach to model-driven development and domain-specific language engineering is to write a translator, or compiler, that defines a strategy for executing the high-level language. In this paper we introduce a new approach to strategic programming by writing interpreters of high-level modeling languages, rather than compilers. This technique is demonstrated by interpreting data models and user interface models. The interpreters are compiled by partial evaluation and deforestation. Although partial evaluation is traditionally applied to functions, we show that it can also be applied to implement data abstractions as objects. Generic functions, for equality and reading, can also be defined as interpreters and partially evaluated. The user interface interpreter illustrates a solution to integrating two modeling languages. The system described here is bootstrapped from Scheme, although the goal is to build a complete software development environment based on model interpretation.
ScalaQL: Language-integrated database queries for Scala
- In Software Language Engineering: 2nd Intnl. Conf., SLE 2009
, 2009
"... Abstract. One of the most ubiquitous elements of modern computing is the relational database. Very few modern applications are created without some sort of database backend. Unfortunately, relational database concepts are fundamentally very different from those used in generalpurpose programming lan ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Abstract. One of the most ubiquitous elements of modern computing is the relational database. Very few modern applications are created without some sort of database backend. Unfortunately, relational database concepts are fundamentally very different from those used in generalpurpose programming languages. This creates an impedance mismatch between the the application and the database layers. One solution to this problem which has been gaining traction in the.NET family of languages is Language-Integrated Queries (LINQ). That is, the embedding of database queries within application code in a way that is statically checked and type safe. Unfortunately, certain language changes or core design elements were necessary to make this embedding possible. We present a framework which implements this concept of type safe embedded queries in Scala without any modifications to the language itself. The entire framework is implemented by leveraging existing language features (particularly for-comprehensions). 1
Systematic Unit Testing in a Read-eval-print Loop
"... Abstract: Lisp programmers constantly carry out experiments in a read-eval-print loop. The experimental activities convince the Lisp programmers that new or modified pieces of programs work as expected. But the experiments typically do not represent systematic and comprehensive unit testing efforts. ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Abstract: Lisp programmers constantly carry out experiments in a read-eval-print loop. The experimental activities convince the Lisp programmers that new or modified pieces of programs work as expected. But the experiments typically do not represent systematic and comprehensive unit testing efforts. Rather, the experiments are quick and dirty one shot validations which do not add lasting value to the software, which is being developed. In this paper we propose a tool that is able to collect, organize, and re-validate test cases, which are entered as expressions in a read-eval-print loop. The process of collecting the expressions and their results imposes only little extra work on the programmer. The use of the tool provides for creation of test repositories, and it is intended to catalyze a much more systematic approach to unit testing in a read-evalprint loop. In the paper we also discuss how to use a test repository for other purposes than testing. As a concrete contribution we show how to use test cases as examples in library interface documentation. It is hypothesized—but not yet validated—that the tool will motivate the Lisp programmer to take the transition from casual testing to systematic testing.
Draft Proceedings of the Workshop on Declarative Programming in the Context of Object-Oriented Languages (DP-COOL’03)
, 2003
"... Syntax sugar for FC++: lambda, infix, monads, and more.............. 15 ..."
Unifying Tables, Objects and Documents
- In Proceedings of Declarative Programming in the Context of OO Languages (DP-COOL
, 2003
"... This paper proposes a number of type-system and language extensions to natively support relational and hierarchical data within a statically typed object-oriented setting. In our approach SQL tables and XML documents become first class citizens that benefit from the full range of features availa ..."
Abstract
- Add to MetaCart
This paper proposes a number of type-system and language extensions to natively support relational and hierarchical data within a statically typed object-oriented setting. In our approach SQL tables and XML documents become first class citizens that benefit from the full range of features available in a modern programming language like C or Java. This allows objects, tables and documents to be constructed, loaded, passed, transformed, updated, and queried in a unified and typesafe manner.
Safe Query Objects: Statically-Typed Objects as Remotely-Executable Queries
"... When building scalable systems that involve general-purpose computation and persistent data, object-oriented languages and relational databases are often essential components. Yet the impedance mismatch between these technologies has not been completely overcome by existing integration approaches. C ..."
Abstract
- Add to MetaCart
When building scalable systems that involve general-purpose computation and persistent data, object-oriented languages and relational databases are often essential components. Yet the impedance mismatch between these technologies has not been completely overcome by existing integration approaches. Call level interfaces like ODBC and JDBC are an unsafe and fragile form of metaprogramming: database queries are constructed at runtime as strings and executed as programs against the database engine. Object/relational mapping and persistent object systems do not support query shipping, in which complex queries are sent to the database for execution. This paper presents safe query objects, an integrated approach to impedance mismatch that allows query behavior to be defined using statically-typed objects and methods. In addition, safe query objects support query shipping by automatically generating code to execute queries remotely in a relational database. A concrete implementation of this solution is presented using the OpenJava macro language and Java Data Objects.
Linguistic Support for Unit Testing
"... Existing systems for writing unit tests exploit built-in language constructs, such as reflection, to simulate the addition of testing constructs. While these simulations provide the minimally necessary functionality, they fail to support testing properly in many instances. In response, we have desig ..."
Abstract
- Add to MetaCart
Existing systems for writing unit tests exploit built-in language constructs, such as reflection, to simulate the addition of testing constructs. While these simulations provide the minimally necessary functionality, they fail to support testing properly in many instances. In response, we have designed, implemented, and evaluated extensions for Java that enable programmers to express test cases with language constructs. Not surprisingly, these true language extensions improve testing in many different ways, starting with basic statical checks but also allowing the collection of additional information about the unit tests. 1. Testing Failure Stories of catastrophic software failure due to a lack of sufficient testing abound. Proponents of test-driven development
General Terms Reliability, Languages
"... Programs in embedded languages contain invariants that are not automatically detected or enforced by their host language. We show how to use macros to easily implement partial evaluation of embedded interpreters in order to capture invariants encoded in embedded programs and render them explicit in ..."
Abstract
- Add to MetaCart
Programs in embedded languages contain invariants that are not automatically detected or enforced by their host language. We show how to use macros to easily implement partial evaluation of embedded interpreters in order to capture invariants encoded in embedded programs and render them explicit in the terms of their host language. We demonstrate the effectiveness of this technique in improving the results of a value flow analysis. Categories and Subject Descriptors

