Inheritance
Specialization via baseType
Every Block specializes exactly one parent through baseType — single inheritance, mandatory on every definition except the root org.blockml.bml.core.Block, which has none.
What baseType is for
baseType is used for branch membership — placing a Block under ValueType, Language, or a domain base — and for sharing member fragments that every specialization needs.
abstract marks a Block as incomplete, creating an implementation obligation for descendants, while final on a Block or member prevents any further override.
The effective definition
A Block's effective definition is not just what it declares locally — it is the merge of every member along its baseType chain, with local declarations refining what came before.
Refining an inherited member
A child Block that specializes a parent through baseType can refine one of the parent's members, declaring only what changes.
<!-- Parent: declares the "count" Property with a default of 3 -->
<acme:Basket xmlns="http://blockml.org/bml"
xmlns:acme="com.acme.example"
xmlns:core="org.blockml.bml.core"
xmlns:type="org.blockml.bml.type">
<baseType>
core:Block
</baseType>
<properties>
<count type="type:Integer">
<value>3</value>
</count>
</properties>
</acme:Basket>
<!-- Child: baseType points at the parent; count is refined with override -->
<acme:SmallBasket xmlns="http://blockml.org/bml"
xmlns:acme="com.acme.example"
xmlns:type="org.blockml.bml.type">
<baseType>
acme:Basket
</baseType>
<properties>
<count override="true" type="type:Integer">
<value>1</value>
</count>
</properties>
</acme:SmallBasket>
SmallBasket's baseType points at Basket, and its count property is redeclared with override, changing only the default from 3 to 1. The child's effective definition still has every member Basket declared; only the refined property changes, and only because the child marked it as an override.
What to carry into the next pages
After this page, readers should be able to trace a Block's effective definition through its baseType chain, before contrasting that mechanism with contracts on the next page.