Previous work has proven typestates to be useful for modeling protocols in object-oriented languages. We build on this work by addressing substitutability of subtypes as well as improving precision and conciseness of ...
详细信息
ISBN:
(纸本)1595930140
Previous work has proven typestates to be useful for modeling protocols in object-oriented languages. We build on this work by addressing substitutability of subtypes as well as improving precision and conciseness of specifications. We propose a specification technique for objects based on abstract states that incorporates state refinement, method refinement, and orthogonal state dimensions. Union and intersection types form the underlying semantics of method specifications. the approach guarantees substitutability and behavioral subtyping. We designed a dynamic analysis to check existing object-oriented software for protocol conformance and validated our approach by specifying two standard Java libraries. We provide preliminary evidence for the usefulness of our approach. Copyright 2005 ACM.
the three problems of the title - the first two widely discussed in the literature, the third less well known but just as important for further development of object technology - are: center dot Eradicating the risk o...
详细信息
ISBN:
(纸本)354027992X
the three problems of the title - the first two widely discussed in the literature, the third less well known but just as important for further development of object technology - are: center dot Eradicating the risk of void calls: X. f with, at run time, the target X not denoting any object, leading to an exception and usually a crash. center dot Eradicating the risk of "catcalls": erroneous run-time situations, almost inevitably leading to crashes, resulting from the use of covariant argument typing. center dot Providing a simple way, in concurrent object-orientedprogramming, to lock an object handled by a remote processor or thread of control, or to access it without locking it, as needed by the context and in a safe way. A language mechanism provides a combined solution to all three issues. this mechanism also allows new solutions to two known problems: how to check that a certain object has a certain type, and then use it accordingly ("Run-Time Type Identification" or "downcasting"), for which it may provide a small improvement over previously proposed techniques;and how to provide a "once per object" facility, permitting just-in-time evaluation of certain object properties. the solution relies on a small extension to the type system involving a single symbol, the question mark. the idea is to declare certain types as "attached" (not permitting void values), enforce some new validity rules that rule out void calls, and validate a number of common programming schemes as "Certified Attachment Patterns" guaranteed to rule out void calls. (In addition, the design replaced an existing type-querying construct by a simpler one.) the mechanism is completely static: A checks can be performed by compilers as part of normal type system enforcement. It places no undue burden on these compilers - in particular, does not require dataflow analysis - and can be fairly quickly explained to programmers. Existing code, if reasonably well-written, will usually continue to work wit
Traits support the factoring out of common behaviour, and its integration into classes in a manner that coexists smoothly with inheritance-based structuring mechanisms. We designed the language Chai, which incorporate...
详细信息
ISBN:
(纸本)354027992X
Traits support the factoring out of common behaviour, and its integration into classes in a manner that coexists smoothly with inheritance-based structuring mechanisms. We designed the language Chai, which incorporates statically typed traits into a simple Java-inspired base language, and we discuss three versions of the language: Chai(1), where traits are only a mechanism for the creation of classes;Chai(2) where traits are a mechanism for the creation of classes, and can also introduce types, and Chai(3) where traits play a role at runtime, and can can be applied to objects, and change the objects' behaviour. We give formal models for these languages, outline the proof of soundness, and our prototype implementation.
object-oriented scripting languages like JavaScript and Python are popular partly because of their dynamic features. these include the runtime modification of objects and classes through addition of fields or updating...
详细信息
ISBN:
(纸本)354027992X
object-oriented scripting languages like JavaScript and Python are popular partly because of their dynamic features. these include the runtime modification of objects and classes through addition of fields or updating, of methods. these features make static typing difficult and so usually dynamic typing is used. Consequently, errors such as access to non-existent members are not detected until runtime. We first develop a formalism for an object based language, JS(0), with features from JavaScript, including dynamic addition of fields and updating of methods. We give an operational semantics and static type system for JS(0) using structural types. Our types allow objects to evolve in a controlled manner by classifying members as definite or potential. We define a type inference algorithm for JS(0) that is sound with respect to the type system. If the type inference algorithm succeeds, then the program is typeable. therefore, programmers can benefit from the safety offered by the type system, without the need to write explicitly types in their programs.
Most modern programming systems such as Java allow us to link independently developed components together dynamically. this makes it possible to develop and deploy software on a per component basis. However, a number ...
详细信息
ISBN:
(纸本)354027992X
Most modern programming systems such as Java allow us to link independently developed components together dynamically. this makes it possible to develop and deploy software on a per component basis. However, a number of Java developers have reported a problem, ironically called the version barrier, imposed by the strict separation of namespaces. the version barrier prohibits one component from passing an instance to another component if each component contains that class type. this paper introduces a novel concept for Java namespaces, called sister namespaces, to address this problem. Sister namespaces can relax the version barrier between components. the main purpose of this paper is to provide a mechanism for relaxing the version barrier, while still allowing type-safe instance accesses between components with negligible performance penalties in regular execution.
Aspect-orientedprogramming (AOP) promises to benefit software engineering by providing a layer of abstraction that can modularize system-level concerns. AOP is still a very young area of research and has yet to recei...
详细信息
In this paper, we present a collection of aspect-oriented refactorings covering boththe extraction of aspects from object-oriented legacy code and the subsequent tidying up of the resulting aspects. In some cases, th...
详细信息
object composition arises as a natural operation to combine objects in an object-based setting. In our incomplete objects setting it has a strong meaning, as it may combine objects with different internal states. In t...
详细信息
ISBN:
(纸本)3540291067
object composition arises as a natural operation to combine objects in an object-based setting. In our incomplete objects setting it has a strong meaning, as it may combine objects with different internal states. In this paper we study how to make object composition safe in the presence of width subtyping, we propose two solutions, and discuss the alternative ones.
the application of distributed control systems is one of the main trends in current automation. Here, besides the programming of the control application code and its functional allocation to specific devices, an impor...
详细信息
ISBN:
(纸本)078039402X
the application of distributed control systems is one of the main trends in current automation. Here, besides the programming of the control application code and its functional allocation to specific devices, an important point is the implementation of communication related code to exploit the underlying communication platform and realise the collaboration of the distributed control application code. Due to the real-timeliness and even time-criticality of control applications, the correct handling of real-time constraints has to be considered. this paper presents two approaches for integrating communication related code into distributed control application code. One integration method is based on the application of AspectJ, an extension for aspect-orientedprogramming with Java, and the other method is based on ordinary object orientation applying standard design patterns. this work is part of the research project TORERO, which was funded by the european Commission under the IST program.
the proceedings contain 14 papers. the topics discussed include: optimizing performance of object-oriented and object-relational systems by dynamic method materialization;D-ARIES: a distributed version of the ARIES re...
the proceedings contain 14 papers. the topics discussed include: optimizing performance of object-oriented and object-relational systems by dynamic method materialization;D-ARIES: a distributed version of the ARIES recovery algorithm;evolutionary learning of Boolean queries by genetic programming;three layer evolution model for XML stored in relational databases;towards the semantic web - an approach to reverse engineering of relational databases to ontologies;an architecture for natural language dialog applications in data exploration and presentation domain;autonomous applications - towards a better data integration model;transformation from requirements to design for service oriented information systems;architecture of pattern management software system;software quality and life cycles;and on a concept of scalable security: PKI-based model using additional cryptographic modules.
暂无评论