Modeling Language Syntax for Dbquity

page modified: 2024/08/11 22:21:41

Declarative, textual, indented language syntax in .dbquity source files

The Dbquity Modeling Language is a textual source language that

A model source declares a hierarchy of elements, and each element is given a name, which separated by at least a single space follows the element type. Under each element properties and nested elements are defined. Thus:

<element-type> <name>
    <property>: <value>
    <property-2>: <value>
    <property-3>:
        <line-1>
        <line-2>
        <line-3>
        ...
    <property-4>:   <line-1>
                    <line-2>
                    <line-3>
                    ...
    ...
    <nested-element-type> <name>
        ...
    <nested-element-2-type> <name>
        ...
    ...
<element-2-type> <name>
    ...
...

Some properties support multi-line values as illustrated for <property-3> and <property-4> above. The nested elements follow the same structure as the top-most elements.

The structure of a syntactically well-formed Dbquity model is defined by the metamodel:

The two complex classifier specializations, entity and class support inheritance, which is specified in one of two equivalent ways:

<complex-type> <base-name>
    ...
<complex-type> <name>
    base: <base-name>
    ...

or shorthand:

<complex-type> <base-name>
    ...
<base-name> <name>
    ...

where the shorthand notation combined with the stereotype modifier and the property model element and the modelconstraint property effectively forms a capability to extend the set of built-in complex types.