On automatic approaches to multi-language programming via code reusability
暂无分享,去创建一个
The focus of this research is the production of software by reusing existing software resources (that is, collections of data structures/classes and procedures/functions which operate upon them) as black boxes to compose a coherent collage. In particular, we are interested in the problem of constructing a suite of automatic tools to assist in the development of multi-language programs for scientific computation, where the phrase multi-language implies that the various resources exploit the capabilities afforded by language heterogeneity. The automatic nature of these tools is very important, because we want the target users (scientists-programmers) to be liberated from chores which generally are irrelevant in the context defined by the problems they want to solve.
A fundamental problem associated with this scenario, which is what we call multi-language programming via code reusability (or multi-language reusability, for short) is the data type correspondence problem. Informally, this refers to finding suitable representations for type-related concepts which are nonexistent in a given programming language. In this dissertation we present two approaches to tackling the data type correspondence problem in the context of multi-language reusability with minimal user intervention. The first one, which we call a transformational approach, or scATM, explicitly and systematically transforms one type-related concept into another to achieve interlanguage communication. In this context, the automatic nature of scATM consists of automatically computing the required transformations.
Alternatively, our reverse object-oriented approach, or scROOM, is based on the fundamental concept of type model, which uses abstraction to concentrate on common type-related concepts instead of becoming distracted by irrelevant differences. This concept leads us, in a natural way, to define a common ground where apparently different type systems can coexist in harmony. scROOM adopts the philosophy behind the object-oriented paradigm but follows a reverse path from the representation defined by the resource (to be reused) to a class with this representation. We visualize this class as wrapping the resource, which is why we call it the wrapper class. In this context, the automatic nature of scROOM consists of automatically computing the wrapper class. We discuss some problems associated with the process of wrapping a resource, which we prove to be undecidable. This establishes, in a certain sense, limits to the scope of any automatic approach to multi-language reusability.