Continuations represent “the rest of the computation.” We use control operators in order to manipulate continuations and represent non-local transfer of control. However, it is not easy to represent such a complex control structure in a programming language. To manipulate continuations in a uniform way, this paper presents a calculus, called a symmetric λ-calculus (SLC). It is based on the calculus presented by Filinski, and deals with terms and continuations in a systematic and symmetric way. We formulate this system by small step semantics, and prove that SLC satisfies the basic properties of typed languages, namely progress and preservation. Then, we show the following two transformations: (1) from Felleisen's ΛC-calculus with the control operator C to the call-by-value SLC, and (2) from Parigot's call-by-name λμ-calculus to the call-by-name SLC. These transformations show that SLC is suitable as a base calculus for discussing various aspects of continuations. We expect to relate this symmetry between call-by-value and call-by-name to the symmetry between terms and continuations.
Gradual typing, proposed by Siek and Taha, is a framework to combine the benefits of static and dynamic typing. In gradual typing, some parts of the program are type-checked at compile-time, and the other parts are type-checked at run-time. So, a programmer can write a program rapidly without static type annotations in the beginning of development, then add type annotations as the development progresses and end up with a fully statically typed program. In this paper, we introduce FJ? as a theoretical basis of gradual typing for an object-oriented language with a nominal type system. FJ? is a gradual typing system for Featherweight Java (FJ), a minimal core calculus for Java by Igarashi, Pierce and Wadler. We define FJrefl, an extension of FJ with reflection, to give translational semantics of FJ? and show that a certain type safety property holds for FJ?, even in the presence of dynamically typed program fragments.
Rewriting induction (Reddy, 1989) is an automated inductive theorem proving method for term rewriting systems. An automated lemma generation method for automated inductive theorem proving is said to be sound if it does not produce incorrect lemmas. Divergence critic (Walsh, 1996) is a well-known automated lemma generation method for the rewriting induction, but it is unsound. In this paper, we propose a sound variant of the divergence critic applicable for monomorphic term rewriting systems by incorporating sound generalization (Urso and Kounalis, 2004) in a part of its procedure. We implement these three automated lemma generation methods on a rewriting induction system with disproof to evaluate effectiveness of these methods. Our experiment reveals that the (sound) divergence critic and the sound generalization are often effective for different kinds of conjectures. Thus, the sound divergence critic can be combined with the sound generalization to obtain a more powerful automated sound lemma generation method for rewriting induction.
A bidirectional transformation consists of a pair of unidirectional transformations: a forward transformation that maps one data structure called source to another called view, and a backward transformation that reflects changes in the view to the source. Bidirectional transformation has many useful applications such as replicated data synchronization, presentation-oriented editor development, and software artifact synchronization. In a previous work, we proposed a framework in which a backward transformation is automatically generated from a forward transformation by derivation of a complementary function if the forward transformation is given by a program in a simple functional language. However, the language has a severe restriction that no variable is allowed to be used more than once. In this paper, we show that tupling transformation relaxes this restriction, allowing us to handle a wider class of bidirectional transformations that may contain duplications.
We propose an automated confluence checker for term rewriting systems (TRSs) that combines several criteria for proving the confluence property of TRSs. For a TRS to which none of confluence criteria directly applies, our checker automatically decomposes it into small components using direct sum decomposition and commutative decomposition, and applies the confluence criteria to each component so that the confluence of the whole system is checked by combining these results. For the best of our knowledge, an automated confluence checker based on such an approach has been unknown. We have implemented our checker, and have successfully applied our checker to automatically check the confluence of a complex TRS, to which none of known confluence criteria applies directly. We also construct a collection of sample TRSs mainly extracted from papers on confluence of TRSs and perform an experiment to this collection.
An example of verification of communication protocols with CafeOBJ algebraic specification language is shown. The SCP communication protocol is a simplified version of the ABP communication protocol, which uses unreliable cells as communication channels between senders and receivers. The reliable communication property is as follows: when a receiver receives N packets, they are the first N packets that a sender has sent and the order in which the N packets has been sent is preserved. Described is the verification with proof score that the SCP communication protocol satisfies the reliable communication property.
A functional concern, code that helps fulfill a functional requirement, is typically implemented by collaborative software modules. When developers understand the implementation of a concern, they need to find code fragments contributing to the concern and understand how the modules collaborate with one another. In this paper, we propose an automatic approach to extract program elements closely related to developer's interest and visualize the relationship among the elements as a concern graph. We extend program slicing by introducing heuristics to calculate the degree of interest to a developer among program elements for excluding unrelated elements from a program slice. We have implemented our approach as a slicing tool for Java software and conducted an experiment. The result shows that our approach extracts a concern graph more suitable to understand a concern than a traditional program slicing.
We give a semantics of abstraction in PML (Pointer Manipulation Language) given by Takahashi et al.. This is an instance of unifying theory for abstraction of reactive systems given by the second author et al., as every model of PML induces a model of Rμ, a modal logic with fixpoints studied by the second author. It gives the proof of the correctness of predicate abstraction used in MLAT.
In this paper, we propose an analysis method for checking method invocation patterns using context-sensitive points-to analysis and report on the result of experimentation using implementations of our method. For a given program written in an object-oriented language, the method statically checks whether the order of method invocations to specific objects at run-time will conform to an invocation pattern rule. In order to precisely figure out the locations where method invocations to specific objects will occur, our method uses context-sensitive points-to analysis. We employed three kind of contexts, objsens, cfa and k-cfa, and developed three corresponding implementations to evaluate them. Our experiments show that objsens figures out the method invocation sites by the highest accuracy and the accuracy of objsens is 5.5 times as high compared with the one of context-insensitive method. We also obtained the result that the accuracy of the pattern checks improved by 3.4 times.
In the AspectJ family of aspect-oriented programming languages, the programmers sometimes make mistakes in pointcuts. This results in making advice unexecutable or advice executed at unexpected join points. We aim to solve this problem by proposing a type system for AspectJ aspects that detects contradictions within a pointcut and between pointcuts. This paper describes the definition of the types of pointcuts along with typing rules. We confirmed that the type system detects several non-trivial mistakes in pointcuts.