Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

规约语言

规约描述函数调用、程序状态和数据应满足的条件,以 Rust 属性和宏调用的形式书写。

Syntax
Specification :=
      FunctionContract
    | TypeInvariant
    | ContractStatement

词法规则定义本参考手册使用的记号和 Rust 语法约定;逻辑表达式定义构成规约条件的表达式。

后续章节说明这些条件的作用位置:

每种构造分别说明语法、语义、示例和实现边界。文法索引汇总全部产生式。