5 research outputs found

    Discussion of Design Alternatives for JML Java 5 Annotations

    Get PDF
    The Java Modeling Language (JML) is a specification language for Java that allows users to specify intended code behavior through assertions attached to the code. Currently, these assertions are written in Java comments in the code. This paper describes a proposed syntax for translating the current JML assertions into new Java 5 annotations. This would allow syntax checkers in tools like Eclipse to check part of the assertion syntax and give code completion assistance to the user

    Adapting the Java Modeling Language for Java 5 Annotations

    Get PDF
    The Java Modeling Language (JML) is a formal specification language for Java that allows to express intended behavior through assertions. Currently, users must embed these assertions in Java comments, which complicates parsing and hinders tool support, leading to poor usability. This paper describes a set of proposed Java 5 annotations which reflect current JML assertions and provides for better tool support. We consider three alternative designs for such annotations and explain why the chosen design is preferred. This syntax is designed to support both a design-by-contract subset of JML, and to be extensible to the full language. We demonstrate that by building two tools: Modern Jass, which provides almost-native support for design by contract, and a prototype that works with a much larger set of JML

    A specification language design for the Java Modeling Language (JML) using Java 5 annotations

    Get PDF
    Design by contract specification languages help programmers write their intentions for a piece of code in a formal mathematical language. Most programming languages do not have built-in syntax for such specifications, so many design by contract languages place specifications in comments. The Java Modeling Language (JML) is one such specification language for Java that uses comments to specify contracts. However, starting with version 5, Java has introduced annotations, a syntactical structure to place metadata in various places in the code. This thesis proposes an initial design to writing JML contracts in the Java 5 annotation syntax and evaluates several criteria in the areas of specification languages and Java language design: whether these annotations are expressive enough to take advantage of annotation simplicity and tool support, and whether the annotation syntax is expressive enough to support handling a large specification language such as JML

    A Specification Language Design for the Java Modeling Language (JML) Using Java 5 Annotations

    Get PDF
    Design by contract specification languages help programmers write their intentions for a piece of code in a formal mathematical language. Most programming languages do not have built-in syntax for such specifications, so many design by contract languages place specifications in comments. The Java Modeling Language (JML) is one such specification language for Java that uses comments to specify contracts. However, starting with version 5, Java has introduced annotations, a syntactical structure to place metadata in various places in the code. This thesis proposes an initial design to writing JML contracts in the Java 5 annotation syntax and evaluates several criteria in the areas of specification languages and Java language design: whether these annotations are expressive enough to take advantage of annotation simplicity and tool support, and whether the annotation syntax is expressive enough to support handling a large specification language such as JML

    Reflective Constraint Management for Languages on Virtual Platforms

    No full text
    Extending an object-oriented type system with assertions makes it possible for programs using reflection to rely on semantic information to ensure correct use of discovered types. Using extended reflective capabilities to access assertions in (dynamically) loaded class objects allows a variety of general and flexible verification techniques. The XVP (Extended Virtual Platform) implements these features by extending the Java Virtual Machine with the proposed functionalities. Its architecture and applications are described in the paper. One of the goals of the XVP is to provide a virtual platform that supports JML and the programming by contract methodology.
    corecore