The thread synchronization mechanism employed by Java is derived from the Hoare’s monitor concept. In order to minimize its implementation complexity, the monitor provided by Java is quite primitive. This design deci...
详细信息
This paper reports our experience using AspectJ, a general-purpose aspect-oriented extension to Java, to implement distribution and persistence aspects in a web-based information system. This system was originally imp...
详细信息
ISBN:
(纸本)9781581134711
This paper reports our experience using AspectJ, a general-purpose aspect-oriented extension to Java, to implement distribution and persistence aspects in a web-based information system. This system was originally implemented in Java and restructured with AspectJ. Our main contribution is to show that AspectJ is useful for implementing several persistence and distribution concerns in the application considered, and other similar applications. We have also identified a few drawbacks in the language and suggest some minor modifications that could significantly improve similar implementations. Despite the drawbacks, we argue that the AspectJ implementation is superior to the pure Java implementation. Some of the aspects implemented in our experiment are abstract and constitute a simple aspect framework. The other aspects are application specific but we suggest that different implementations might follow the same aspect pattern. The framework and the pattern allow us to propose architecture-specific guidelines that provide practical advice for both restructuring and implementing certain kinds of persistent and distributed applications with AspectJ.
This paper discusses a language and associated environment for building rule-based programs. The language and environment are encapsulated in a system we call ORBS (Oregon Rule Based System). In tune with this confere...
ISBN:
(纸本)9780897911658
This paper discusses a language and associated environment for building rule-based programs. The language and environment are encapsulated in a system we call ORBS (Oregon Rule Based System). In tune with this conference, our focus will be on the interplay between language and environment design. However, we will broaden this somewhat to include design constraints placed by our program development model1 as well. Instead of attempting a complete design rationalization of ORBS, we will concentrate on design decisions that highlight the coupling between language, environment, and development *** falls in the class of rule-based systems that often is categorized as forward-chaining or data-driven. Other systems in this category include OPS5 [9], YAPS [2], and all of the Hearsay family [5, 11, 15]. What is often taken as the inverse of this set are the backward-chaining or goal-directed languages such as EMYCIN [17]. Arguments for and against the forward and backward approaches have been made many times elsewhere (see [12] for examples of each), and we will not address the issue further in this paper.2 While we believe that many of the arguments we make for the design of ORBS are applicable to rule-based systems in general, any reference to the term rule-based should be taken in light of the classification above.
Concurrent programming is notoriously difficult. Current abstractions are intricate and make it hard to design computer systems that are reliable and scalable. We argue that these problems can be addressed by moving t...
详细信息
ISBN:
(纸本)9781581137125
Concurrent programming is notoriously difficult. Current abstractions are intricate and make it hard to design computer systems that are reliable and scalable. We argue that these problems can be addressed by moving to a declarative style of concurrency control in which programmers directly indicate the safety properties that they require. In our scheme the programmer demarks sections of code which execute within lightweight software-based transactions that commit atomically and exactly once. These transactions can update shared data, instantiate objects, invoke library features and so on. They can also block, waiting for arbitrary boolean conditions to become true. Transactions which do not access the same shared memory locations can commit concurrently. Furthermore, in general, no performance penalty is incurred for memory accesses outside *** present a detailed design of this proposal along with an implementation and evaluation. We argue that the resulting system (i) is easier for mainstream programmers to use, (ii) prevents lock-based priority-inversion and deadlock problems and (iii) can offer performance advantages.
For performance reasons, client applications often need to influence the implementation strategies of libraries whose services they use. If an object-oriented library contains multiple service classes customized for d...
ISBN:
(纸本)9780897916882
For performance reasons, client applications often need to influence the implementation strategies of libraries whose services they use. If an object-oriented library contains multiple service classes customized for different usage patterns, applications can influence service implementations by instantiating the customized classes that match their needs. However, with many similar service classes, it can be difficult for applications to determine which classes to instantiate. Choosing the wrong class can result in very subtle errors since a customized class might use optimizations that work only over a restricted domain. In this paper, we show how client-side software contracts and exemplar-based class factories can be used to construct customized server objects. By expressing priorities and requirements in contracts, clients can delegate service class selection to the library and thereby avoid implicit dependencies on the library implementation. We have used this approach in the implementation of a real-time database system.
Today's processors provide a rich source of statistical information on application execution through hardware counters. In this paper, we explore the utilization of these statistics as request signatures in server...
详细信息
Today's processors provide a rich source of statistical information on application execution through hardware counters. In this paper, we explore the utilization of these statistics as request signatures in server applications for identifying requests and inferring high-level request properties (e.g., CPU and I/O resource needs). Our key finding is that effective request signatures may be constructed using a small amount of hardware statistics while the request is still in an early stage of its execution. Such on-the-fly request identification and property inference allow guided operating system adaptation at request granularity (e.g., resource-aware request scheduling and on-the-fly request classification). We address the challenges of selecting hardware counter metrics for signature construction and providing necessary operating system support for per-request statistics management. Our implementation in the Linux 2.6.10 kernel suggests that our approach requires low overhead suitable for runtime deployment. Our on-the-fly request resource consumption inference (averaging 7%, 3%, 20%, and 41% prediction errors for four server workloads, TPC-C, TPC-H, J2EE-based RUBiS, and a trace-driven index search, respectively) is much more accurate than the online running-average based prediction (73-82% errors). Its use for resource-aware request scheduling results in a 15-70% response time reduction for three CPU-bound applications. Its use for on-die-fly request classification and anomaly detection exhibits high accuracy for the TPC-H workload with synthetically generated anomalous requests following a typical SQL-injection attack pattern.
design by Contract represents an established, lightweight paradigm for engineering reliable and robust software systems by specifying verifiable expectations and obligations between software components. Due to its lab...
详细信息
ISBN:
(纸本)9798400712111
design by Contract represents an established, lightweight paradigm for engineering reliable and robust software systems by specifying verifiable expectations and obligations between software components. Due to its laborious nature, developers hardly adopt design by Contract in practice. A plethora of research on (semi-)-automated inference to reduce the manual burden has not improved the adoption of so-called code contracts in practice. This paper examines the potential of Generative AI to automatically generate code contracts in terms of pre- and postconditions for any Java project without requiring any additional auxiliary artifact. To fine-tune two state-of-the-art Large language Models, CodeT5 and CodeT5+, we derive a dataset of more than 14k Java methods comprising contracts in form of Java Modeling language (JML) annotations, and train the models on the task of generating contracts. We examine the syntactic and semantic validity of the contracts generated for software projects not used in the fine-tuning and find that more than 95% of the generated contracts are syntactically correct and exhibit remarkably high completeness and semantic correctness. To this end, our fully automated method sets the stage for future research and eventual broader adoption of design by Contract in software development practice.
Many popular object-oriented programminglanguages, such as C++, Smalltalk-80, Java, and Eiffel, do not support multiple dispatch. Yet without multiple dispatch, programmers find it difficult to express binary methods...
详细信息
ISBN:
(纸本)9781581130058
Many popular object-oriented programminglanguages, such as C++, Smalltalk-80, Java, and Eiffel, do not support multiple dispatch. Yet without multiple dispatch, programmers find it difficult to express binary methods and design patterns such as the "visitor" pattern. We describe a new, simple, and orthogonal way to add multimethods to single-dispatch object-oriented languages, without affecting existing code. The new mechanism also clarifies many differences between single and multiple dispatch.
Although the Java programminglanguage has achieved widespread acceptance, one feature that seems sorely missed is the ability to use type parameters (as in Ada generics, C++ templates, and ML polymorphic functions or...
ISBN:
(纸本)9780897919081
Although the Java programminglanguage has achieved widespread acceptance, one feature that seems sorely missed is the ability to use type parameters (as in Ada generics, C++ templates, and ML polymorphic functions or data types) to allow a general concept to be instantiated to one or more specific types. In this paper, we propose parameterized classes and interfaces in which the type parameter may be constrained to either implement a given interface or extend a given class. This design allows the body of a parameterized class to refer to methods on objects of the parameter type, without introducing any new type relations into the language. We show that these Java extensions may be implemented by expanding parameterized classes at class load time, without any extension or modification to existing Java bytecode, verifier or bytecode interpreter.
The Internet of Things (IoT) conceives a future where "things" are interconnected by means of suitable information and communication technologies. Unfortunately, recent events have demonstrated the high vuln...
详细信息
ISBN:
(数字)9781728191485
ISBN:
(纸本)9781728191492
The Internet of Things (IoT) conceives a future where "things" are interconnected by means of suitable information and communication technologies. Unfortunately, recent events have demonstrated the high vulnerability of IoT. One of the main reasons for this is the use of low-level programminglanguages. The Octopi project is developing technologies to easily and securely program IoT devices by the use of functional high-level languages. Unfortunately, a traditional implementation of a modern functional language that runs on traditional hardware is very resource demanding. So resource demanding that few, if any, IoT devices can run *** the Cephalopode project (which is a subproject of Octopi) we are exploring the implementation of a very low power hardware device directly aimed at running a high-level functional language. By integrating many resource-heavy tasks into dedicated hardware, we aim at creating an execution engine for IoT devices that will allow secure programming.
暂无评论