[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 Declarations 5.2 Import Declarations
Type Declarations
6.1 Class and Interface Declarations 6.2 Modifiers
Class and Interface Declarations
6.1.1 Subtyping for Type Declarations 6.1.2 Modifiers for Type Declarations
Modifiers for Type Declarations
6.1.2.1 Pure Type Declarations 6.1.2.2 Model Type Declarations
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
12.1 Predicates 12.2 Specification Expressions 12.3 Expressions 12.4 JML Primary Expressions 12.5 Set Comprehensions 12.6 JML Operators 12.7 Store Refs
JML Primary Expressions
Quantified Expressions
JML Operators
12.6.1 Subtype operator 12.6.2 Equivalence and Inequivalence Operators 12.6.3 Forward and Reverse Implication Operators 12.6.4 Lockset Ordering
Statements and Annotation Statements
13.1 Local Declaration Statements 13.2 Loop Statements 13.3 Assert Statements 13.4 JML Annotation Statements
Local Declaration Statements
13.1.1 Modifiers for Local Declarations
Loop Statements
13.2.1 Loop Invariants 13.2.2 Loop Variant Functions
JML Annotation Statements
13.4.1 Assume Statements 13.4.2 Set Statements 13.4.3 Refining Statements 13.4.4 Unreachable Statements 13.4.5 Debug Statements 13.4.6 Hence By Statements
Redundancy
14.1 Redundant Implications and Redundantly Clauses 14.2 Redundant Examples
Model Programs
Specification Statements
15.6.1 Continues Clause 15.6.2 Breaks Clause 15.6.3 Returns Clause
Specification for Subtypes
16.1 Method of Specifying for Subclasses 16.2 Code Contracts
Separate Files for Specifications
17.1 File Name Suffixes 17.2 Using Separate Files 17.3 Type Checking Separate Files 17.4 Default Constructors and Separate Files
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
A.1 Deprecated Syntax A.2 Replaced Syntax
Deprecated Syntax
A.1.1 Deprecated Annotation Markers A.1.2 Deprecated Represents Clause Syntax A.1.3 Deprecated Monitors For Clause Syntax A.1.4 Deprecated File Name Suffixes A.1.5 Deprecated Refine Prefix
Differences
G.1 Differences Between JML and Other Tools G.2 Differences Between JML and Java
Differences Between JML and Other Tools
G.1.1 Differences Between JML and ESC/Java2
Differences Between JML and Java
G.2.1 Non-null by Default