[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

20. Deprecated and Replaced Syntax

The subsections below briefly describe the deprecated and replaced features of JML. A feature is deprecated if it is supported in the current release, but slated to be removed from a subsequent release. Such features should not be used.

A feature that was formerly deprecated is replaced if it has been removed from JML in favor of some other feature or features. While we do not describe all replaced syntax in this appendix, we do mention a few of the more interesting or important features that were replaced, especially those discussed in earlier papers on JML.

20.1 Deprecated Syntax  
20.2 Replaced Syntax  


20.1 Deprecated Syntax

The following syntax is deprecated.

The use of a code-contract-spec is now deprecated. In its place one can use a heavyweight specification case with the keyword code just before the behavior keyword, and a precondition of \same. (See section 15.2 Code Contracts, for details of the new features.)

 
code-contract-spec ::= code_contract code-contract-clause
                       [ code-contract-clause ] ...

code-contract-clause ::= accessible-clause
        | callable-clause
        | measured-clause 

The use of \other is now deprecated. Instead of using \other, one should use a name to refer more exactly to the object or class in question.

 
method-ref-start ::= \other
object-store-ref ::= other-ref
other-ref ::= \other [ store-ref-name-suffix ] ...
method-ref-rest ::= \other


20.2 Replaced Syntax

As a note for readers of older papers, the keyword subclassing_contract was replaced with code_contract, which is now deprecated (see above). In it's place one should currently use a heavyweight specification case with the keyword code just before the behavior keyword, and a precondition of \same.

Similarily, the depends clause has been replaced by the mechanism of data groups and the in and maps clauses of variable declarations.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by leavens on January, 11 2006 using texi2html