Next: Modifiers for type definitions, Previous: Class and interface definitions, Up: Class and interface definitions
Inheritance in BML is defined similarly as inheritance for Java or JML, see Section 6.1.1 of the JML Reference Manual. As in JML, ghost and model features as well as specifications are inherited, i.e. a subtype inherits from its supertypes:
As in JML, instance methods have to obey the specifications of all methods that they override. Together with inheritance of invariants and history constraints, this enforces behavioural subtyping [Dhara-Leavens96] [Leavens-Naumann06] [Leavens06b].