[Top] | [Contents] | [Index] | [ ? ] |
The Java Modeling Language (JML) is a notation for formally specifying the behavior and interfaces of Java classes and methods. The purpose of this manual is to precisely define JML's syntax and semantics.
-- The Detailed Node Listing ---
Introduction
1.1 Behavioral Interface Specifications 1.2 A First Example 1.3 What is JML Good For? 1.4 Status and Plans for JML 1.5 Historical Precedents 1.6 Acknowledgments
Fundamental Concepts
Language Levels
2.9.1 Level 0 Features 2.9.2 Level 1 Features 2.9.3 Level 2 Features 2.9.4 Level 3 Features 2.9.5 Level C Features 2.9.6 Level X Features
Lexical Conventions
4.1 White Space 4.2 Lexical Pragmas 4.3 Comments 4.4 Annotation Markers 4.5 Documentation Comments 4.6 Tokens
Compilation Units
5.1 Package Definitions 5.2 Import Definitions
Type Definitions
6.1 Class and Interface Definitions 6.2 Modifiers
Class and Interface Definitions
6.1.1 Subtyping for Type Definitions 6.1.2 Modifiers for Type Definitions
Modifiers
Class and Interface Member Declarations
7.1 Java Member Declarations 7.2 Class Initializer Declarations
Java Member Declarations
7.1.1 Method and Constructor Declarations 7.1.2 Field and Variable Declarations
Method and Constructor Declarations
7.1.1.1 Formal Parameters 7.1.1.2 Model Methods and Constructors 7.1.1.3 Pure Methods and Constructors 7.1.1.4 Helper Methods and Constructors
Field and Variable Declarations
7.1.2.1 JML Modifiers for Fields 7.1.2.2 Type-Specs
Type Specifications
Invariants
8.2.1 Static vs. instance invariants 8.2.2 Invariants and Exceptions 8.2.3 Access Modifiers for Invariants 8.2.4 Invariants and Inheritance
Constraints
8.3.1 Static vs. instance constraints 8.3.2 Access Modifiers for Constraints 8.3.3 Constraints and Inheritance
Method Specifications
Invariants and constraints
Exceptional Behavior Specification Cases
9.8.1 Pragmatics of Exceptional Behavior Specifications Cases
Method Specification Clauses
Specification Variable Declarations
9.9.1.1 Forall Variable Declarations 9.9.1.2 Old Variable Declarations
Data Groups
10.1 Static Data Group Inclusions 10.2 Dynamic Data Group Mappings
Predicates and Specification Expressions
11.1 Predicates 11.2 Specification Expressions 11.3 Expressions 11.4 JML Primary Expressions 11.5 Set Comprehensions 11.6 JML Operators 11.7 Store Refs
JML Primary Expressions
Quantified Expressions
JML Operators
11.6.1 Subtype operator 11.6.2 Equivalence and Inequivalence Operators 11.6.3 Forward and Reverse Implication Operators 11.6.4 Lockset Ordering
Statements and Annotation Statements
12.1 Local Declaration Statements 12.2 Loop Statements 12.3 Assert Statements 12.4 JML Annotation Statements
Local Declaration Statements
12.1.1 Modifiers for Local Declarations
Loop Statements
12.2.1 Loop Invariants 12.2.2 Loop Variant Functions
JML Annotation Statements
12.4.1 Assume Statements 12.4.2 Set Statements 12.4.3 Refining Statements 12.4.4 Unreachable Statements 12.4.5 Debug Statements 12.4.6 Hence By Statements
Redundancy
13.1 Redundant Implications and Redundantly Clauses 13.2 Redundant Examples
Model Programs
Specification Statements
14.6.1 Continues Clause 14.6.2 Breaks Clause 14.6.3 Returns Clause
Specification for Subtypes
15.1 Method of Specifying for Subclasses 15.2 Code Contracts
Refinement
16.1 File Name Suffixes 16.2 Using Separate Files 16.3 Refinement Chains 16.4 Type Checking Refinements 16.5 Refinement Viewpoints
Refinement Viewpoints
16.5.1 Default Constructor Refinement
MultiJava Extensions to JML
17.1 Augmenting Method Declarations 17.2 MultiMethods
Universe Type System
18.1 Basic Concepts of Universes 18.2 Rep and Peer 18.3 Readonly 18.4 Ownership Modifiers for Array Types 18.5 Default Ownership Modifiers 18.6 Ownership Type Rules 18.7 Casts and Ownership Types
Ownership Type Rules
18.6.1 Ownership Subtyping 18.6.2 Ownership Typing for Expressions
Safe Math Extensions
19.1 \bigint 19.2 \real
Deprecated and Replaced Syntax
20.1 Deprecated Syntax 20.2 Replaced Syntax
Differences
E.1 Differences Between JML and Other Tools E.2 Differences Between JML and Java
Differences Between JML and Other Tools
E.1.1 Differences Between JML and ESC/Java2
Differences Between JML and Java
E.2.1 Non-null by Default