Oliveira and Cook (2012) and Oliveira et al. (2013) have recently introduced object algebras as a program structuring technique to improve the modularity and extensibility of programs. We analyze the relationship betw...
详细信息
Oliveira and Cook (2012) and Oliveira et al. (2013) have recently introduced object algebras as a program structuring technique to improve the modularity and extensibility of programs. We analyze the relationship between object algebras and attribute grammars (AGs), a formalism to augment context-free grammars with attributes. We present an extension of the object algebra technique with which the full class of L-attributed grammars - an important class of AGs that corresponds to one-pass compilers - can be encoded in Scala. The encoding is modular (attributes can be defined and type-checked separately), scalable (the size of the encoding is linear in the size of the AG specification) and compositional (each AG artifact is represented as a semantic object of the host language). To evaluate these claims, we have formalized the encoding and re-implemented a one-pass compiler for a subset of C with our technique. We also discuss how advanced features of modern AG systems, such as higher-order and parameterized attributes, reference attributes, and forwarding can be supported.
Many JavaScript programs are written in an event-driven style. In particular, in server-side Node. js applications, operations involving sockets, streams, and files are typically performed in an asynchronous manner, w...
详细信息
Many JavaScript programs are written in an event-driven style. In particular, in server-side Node. js applications, operations involving sockets, streams, and files are typically performed in an asynchronous manner, where the execution of listeners is triggered by events. Several types of programming errors are specific to such event-based programs (e.g., unhandled events, and listeners that are registered too late). We present the event-based call graph, a program representation that can be used to detect bugs related to event handling. We have designed and implemented three analyses for constructing event-based call graphs. Our results show that these analyses are capable of detecting problems reported on StackOverflow. Moreover, we show that the number of false positives reported by the analysis on a suite of small Node. js applications is manageable.
Traversing complex Abstract Syntax Trees (ASTs) typically requires large amounts of tedious boilerplate code. For many operations most of the code simply walks the structure, and only a small portion of the code imple...
详细信息
Traversing complex Abstract Syntax Trees (ASTs) typically requires large amounts of tedious boilerplate code. For many operations most of the code simply walks the structure, and only a small portion of the code implements the functionality that motivated the traversal in the first place. This paper presents a type-safe Java framework called Shy that removes much of this boilerplate code. In Shy object Algebras are used to describe complex and extensible AST structures. Using Java annotations Shy generates generic boilerplate code for various types of traversals. For a concrete traversal, users of Shy can then inherit from the generated code and override only the interesting cases. Consequently, the amount of code that users need to write is significantly smaller. Moreover, traversals using the Shy framework are also much more structure shy, becoming more adaptive to future changes or extensions to the AST structure. To prove the effectiveness of the approach, we applied Shy in the implementation of a domain-specific questionnaire language. Our results show that for a large number of traversals there was a significant reduction in the amount of user-defined code.
Many internal software metrics and external quality attributes of Java programs correlate strongly with program size. This knowledge has been used pervasively in quantitative studies of software through practices such...
详细信息
Many internal software metrics and external quality attributes of Java programs correlate strongly with program size. This knowledge has been used pervasively in quantitative studies of software through practices such as normalization on size metrics. This paper reports size-related super- and sublinear effects that have not been known before. Findings obtained on a very large collection of Java programs - 30,911 projects hosted at Google Code as of Summer 2011 - unveils how certain characteristics of programs vary disproportionately with program size, sometimes even non-monotonically. Many of the specific parameters of nonlinear relations are reported. This result gives further in-sights for the differences of "programming in the small" vs. "programming in the large." The reported findings carry important consequences for OO software metrics, and software research in general: metrics that have been known to correlate with size can now be properly normalized so that all the information that is left in them is size-independent.
The development of large software packages requires not only modularity but also the capability to experiment and change. Such a capability is akin to self-organization characteristics of adaptive systems. It is sugge...
详细信息
The development of large software packages requires not only modularity but also the capability to experiment and change. Such a capability is akin to self-organization characteristics of adaptive systems. It is suggested that computer-aided software engineering (CASE) can benefit from the development retrainable software modules, where both the data structures and the algorithms performing on them are subject to evolutionary change. Such an approach is modeled after the AI (artificial-intelligence) methodology of reasoning by analogy, and it can be naturally implemented through the paradigm of object-orientedprogramminglanguages, which provide an exploratory software environment in which changes resulting from feedback to the system are easy to track and implement. The benefits of OOP to major software development areas involved with resource allocation, computer vision, and the service industry are discussed.< >
Operating system primitives (e.g. problem-oriented shared memory, shared virtual memory, the Agora shared memory) and languages (e.g. Concurrent Prolog, Linda, Emerald) for programming distributed systems have been pr...
详细信息
Operating system primitives (e.g. problem-oriented shared memory, shared virtual memory, the Agora shared memory) and languages (e.g. Concurrent Prolog, Linda, Emerald) for programming distributed systems have been proposed that support the shared-variable paradigm without the presence of physical shared memory. The authors look at the reasons for this evolution, the resemblances and differences among these proposals, and the key issues in their design and implementation. Many implementations are based on replication of data. The authors take this idea one step further, and discuss how automatic replication (initiated by the run-time system) can be used as a basis for a model, called the shared data-object model, whose semantics are similar to the shared variable model. They also discuss the design of a language for distributed programming, Orca, which is based on the shared-data-object model.< >
Identifies the confluence of several new technologies that will allow major improvements in the software development process. Future research in this area will encompass advances in database technology, programming la...
详细信息
Identifies the confluence of several new technologies that will allow major improvements in the software development process. Future research in this area will encompass advances in database technology, programminglanguages, expert systems, and distributed workstations. Researchers are working on a new data model that will combine object-oriented language features, database features, inferencing, and distribution. This will allow new software environments that are even more efficient because of the seamless integration of these technologies. This will expedite future software prototyping, production, and maintenance.< >
Summary form only given. Discusses the applicability of the object-oriented paradigm to the stage of problem specification. The authors define some criteria that can be used to assess this applicability and show how t...
详细信息
Summary form only given. Discusses the applicability of the object-oriented paradigm to the stage of problem specification. The authors define some criteria that can be used to assess this applicability and show how the object-oriented approach measures up based on these criteria.< >
This paper briefly describes how the issues of access to (possibly remote) services and cooperative distributed computing are treated in Guide, a distributed operating system under development at Grenoble. Section 1 i...
详细信息
ISBN:
(纸本)9781450373364
This paper briefly describes how the issues of access to (possibly remote) services and cooperative distributed computing are treated in Guide, a distributed operating system under development at Grenoble. Section 1 is an overview of the project. Section 2 describes the computational model of the system. Section 3 is a discussion of remote computation. Section 4 describes the current implementation status.
We present a type system and inference algorithm for a rich subset of JavaScript equipped with objects, structural subtyping, prototype inheritance, and first-class methods. The type system supports abstract and recur...
详细信息
We present a type system and inference algorithm for a rich subset of JavaScript equipped with objects, structural subtyping, prototype inheritance, and first-class methods. The type system supports abstract and recursive objects, and is expressive enough to accommodate several standard benchmarks with only minor workarounds. The invariants enforced by the types enable an ahead-of-time compiler to carry out optimizations typically beyond the reach of static compilers for dynamic languages. Unlike previous inference techniques for prototype inheritance, our algorithm uses a combination of lower and upper bound propagation to infer types and discover type errors in all code, including uninvoked functions. The inference is expressed in a simple constraint language, designed to leverage off-the-shelf fixed point solvers. We prove soundness for both the type system and inference algorithm. An experimental evaluation showed that the inference is powerful, handling the aforementioned benchmarks with no manual type annotation, and that the inferred types enable effective static compilation.
暂无评论