diff --git a/src/reference/formal_and_informative/specC02_units_reference.rst b/src/reference/formal_and_informative/specC02_units_reference.rst deleted file mode 100644 index 41cb8017..00000000 --- a/src/reference/formal_and_informative/specC02_units_reference.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _specC02: - -.. include:: ../sectionC_interpretation.inc - :start-after: marker_units_reference_start - :end-before: marker_units_reference1 - -.. include:: ../informative/informC02_units_reference.rst - -.. include:: ../sectionC_interpretation.inc - :start-after: marker_units_reference1 - :end-before: marker_units_reference_end diff --git a/src/reference/formal_and_informative/specC04_component_reference.rst b/src/reference/formal_and_informative/specC04_component_reference.rst deleted file mode 100644 index 9bd86a09..00000000 --- a/src/reference/formal_and_informative/specC04_component_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _specC04: - -.. include:: ../sectionC_interpretation.inc - :start-after: marker_component_reference_start - :end-before: marker_component_reference_end - -.. include:: ../informative/informC04_component_reference.rst diff --git a/src/reference/formal_and_informative/specC05_variable_reference.rst b/src/reference/formal_and_informative/specC05_variable_reference.rst deleted file mode 100644 index c7a4388f..00000000 --- a/src/reference/formal_and_informative/specC05_variable_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _specC05: - -.. include:: ../sectionC_interpretation.inc - :start-after: marker_variable_reference_start - :end-before: marker_variable_reference_end - -.. include:: ../informative/informC05_variable_reference.rst diff --git a/src/reference/formal_and_informative/specC06_interpretation_of_initial_values.rst b/src/reference/formal_and_informative/specC06_interpretation_of_initial_values.rst deleted file mode 100644 index 5b7d960d..00000000 --- a/src/reference/formal_and_informative/specC06_interpretation_of_initial_values.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _specC06: - -.. include:: ../sectionC_interpretation.inc - :start-after: marker_interpretation_of_initial_values_start - :end-before: marker_interpretation_of_initial_values_end - -.. include:: ../informative/informC06_interpretation_of_initial_values.rst diff --git a/src/reference/formal_and_informative/specC07_effect_of_units_on_variables.rst b/src/reference/formal_and_informative/specC07_effect_of_units_on_variables.rst deleted file mode 100644 index e3469932..00000000 --- a/src/reference/formal_and_informative/specC07_effect_of_units_on_variables.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _specC07: - -.. include:: ../sectionC_interpretation.inc - :start-after: marker_effect_of_units_on_variables_start - :end-before: marker_effect_of_units_on_variables_end - -.. todo ../informative/informC07_effect_of_units_on_variables.rst diff --git a/src/reference/formal_and_informative/specC08_interpretation_of_mathematics.rst b/src/reference/formal_and_informative/specC08_interpretation_of_mathematics.rst deleted file mode 100644 index 886594dd..00000000 --- a/src/reference/formal_and_informative/specC08_interpretation_of_mathematics.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _specC08: - -.. include:: ../sectionC_interpretation.inc - :start-after: marker_interpretation_of_mathematics_start - :end-before: marker_interpretation_of_mathematics_end - -.. todo ../informative/informC08_interpretation_of_mathematics.rst diff --git a/src/reference/formal_and_informative/specC09_interpretation_of_encapsulation.rst b/src/reference/formal_and_informative/specC_components.rst similarity index 68% rename from src/reference/formal_and_informative/specC09_interpretation_of_encapsulation.rst rename to src/reference/formal_and_informative/specC_components.rst index e741ead6..752cdd0c 100644 --- a/src/reference/formal_and_informative/specC09_interpretation_of_encapsulation.rst +++ b/src/reference/formal_and_informative/specC_components.rst @@ -1,4 +1,13 @@ -.. _specC09: + +.. ** PREVIOUSLY THIS WAS THE COMPONENT_REFERENCE SECTION ** + +.. include:: ../sectionC_interpretation.inc + :start-after: marker_component_reference_start + :end-before: marker_component_reference_end + +.. include:: ../informative/informC04_component_reference.rst + +.. ** PREVIOUSLY THIS WAS THE INTERPRETATION OF ENCAPSULATIONS ** .. include:: ../sectionC_interpretation.inc :start-after: marker_interpretation_of_encapsulation_start diff --git a/src/reference/formal_and_informative/specC01_interpretation_of_imports.rst b/src/reference/formal_and_informative/specC_imports.rst similarity index 93% rename from src/reference/formal_and_informative/specC01_interpretation_of_imports.rst rename to src/reference/formal_and_informative/specC_imports.rst index 15a8bebd..b8f3500b 100644 --- a/src/reference/formal_and_informative/specC01_interpretation_of_imports.rst +++ b/src/reference/formal_and_informative/specC_imports.rst @@ -1,4 +1,3 @@ -.. _specC01: .. include:: ../sectionC_interpretation.inc :start-after: marker_interpretation_of_imports_start diff --git a/src/reference/formal_and_informative/specC_maths.rst b/src/reference/formal_and_informative/specC_maths.rst new file mode 100644 index 00000000..1ff6e29a --- /dev/null +++ b/src/reference/formal_and_informative/specC_maths.rst @@ -0,0 +1,12 @@ + +.. include:: ../sectionC_interpretation.inc + :start-after: marker_interpretation_of_mathematics_start + :end-before: marker_interpretation_of_mathematics_end + +.. todo ../informative/informC08_interpretation_of_mathematics.rst + +.. include:: ../sectionC_interpretation.inc + :start-after: marker_interpretation_of_initial_values_start + :end-before: marker_interpretation_of_initial_values_end + +.. include:: ../informative/informC06_interpretation_of_initial_values.rst \ No newline at end of file diff --git a/src/reference/formal_and_informative/specC_models.rst b/src/reference/formal_and_informative/specC_models.rst new file mode 100644 index 00000000..4fc802b8 --- /dev/null +++ b/src/reference/formal_and_informative/specC_models.rst @@ -0,0 +1,6 @@ + +.. include:: ../sectionC_interpretation.inc + :start-after: marker_interpretation_of_models_start + :end-before: marker_interpretation_of_models_end + +.. todo ../informative/informC_model.rst diff --git a/src/reference/formal_and_informative/specC11_interpretation_of_variable_resets.rst b/src/reference/formal_and_informative/specC_resets.rst similarity index 94% rename from src/reference/formal_and_informative/specC11_interpretation_of_variable_resets.rst rename to src/reference/formal_and_informative/specC_resets.rst index dbfcf84a..b9fd7870 100644 --- a/src/reference/formal_and_informative/specC11_interpretation_of_variable_resets.rst +++ b/src/reference/formal_and_informative/specC_resets.rst @@ -1,4 +1,3 @@ -.. _specC11: .. include:: ../sectionC_interpretation.inc :start-after: marker_interpretation_of_variable_resets_start diff --git a/src/reference/formal_and_informative/specC03_interpretation_of_units.rst b/src/reference/formal_and_informative/specC_units.rst similarity index 67% rename from src/reference/formal_and_informative/specC03_interpretation_of_units.rst rename to src/reference/formal_and_informative/specC_units.rst index a545498a..7ce1f04a 100644 --- a/src/reference/formal_and_informative/specC03_interpretation_of_units.rst +++ b/src/reference/formal_and_informative/specC_units.rst @@ -1,4 +1,3 @@ -.. _specC03: .. include:: ../sectionC_interpretation.inc :start-after: marker_interpretation_of_units_start @@ -22,4 +21,14 @@ :start-after: marker_interpretation_of_units_3 :end-before: marker_interpretation_of_units_end -.. include:: ../libcellml/libcellmlC03_interpretation_of_units.rst +.. ** THIS IS WHERE THE UNITS_REFERENCE SECTION STARTS ** + +.. include:: ../sectionC_interpretation.inc + :start-after: marker_units_reference_start + :end-before: marker_units_reference1 + +.. include:: ../informative/informC02_units_reference.rst + +.. include:: ../sectionC_interpretation.inc + :start-after: marker_units_reference1 + :end-before: marker_units_reference_end diff --git a/src/reference/formal_and_informative/specC10_interpretation_of_map_variables.rst b/src/reference/formal_and_informative/specC_variables.rst similarity index 81% rename from src/reference/formal_and_informative/specC10_interpretation_of_map_variables.rst rename to src/reference/formal_and_informative/specC_variables.rst index aaa8626d..723f4d40 100644 --- a/src/reference/formal_and_informative/specC10_interpretation_of_map_variables.rst +++ b/src/reference/formal_and_informative/specC_variables.rst @@ -1,4 +1,13 @@ -.. _specC10: + +.. ** PREVIOUSLY THIS WAS VARIABLE REFERENCES ** + +.. include:: ../sectionC_interpretation.inc + :start-after: marker_variable_reference_start + :end-before: marker_variable_reference_end + +.. include:: ../informative/informC05_variable_reference.rst + +.. ** PREVIOUSLY THIS WAS INTERPRETATION OF MAP_VARIABLES ** .. include:: ../sectionC_interpretation.inc :start-after: marker_interpretation_of_map_variables_start diff --git a/src/reference/index_sectionC.rst b/src/reference/index_sectionC.rst index 8f5dae6c..a23d98ae 100644 --- a/src/reference/index_sectionC.rst +++ b/src/reference/index_sectionC.rst @@ -6,6 +6,12 @@ Interpretation .. toctree:: :maxdepth: 1 - :glob: - formal_and_informative/specC* + formal_and_informative/specC_models.rst + formal_and_informative/specC_units.rst + formal_and_informative/specC_components.rst + formal_and_informative/specC_variables.rst + formal_and_informative/specC_imports.rst + formal_and_informative/specC_maths.rst + formal_and_informative/specC_resets.rst + diff --git a/src/reference/sectionC_interpretation.inc b/src/reference/sectionC_interpretation.inc index 947ee8b1..c313bf05 100644 --- a/src/reference/sectionC_interpretation.inc +++ b/src/reference/sectionC_interpretation.inc @@ -1,5 +1,29 @@ .. _sectionC: + +.. marker_interpretation_of_models_start + +Interpretation of ``model`` elements +------------------------------------ + +.. container:: preamble + + A *model* is a conceptual entity defining a system of equations. + + A model is defined by a :code:`model` element. + + A model has a name, determined by the :code:`name` attribute of its :code:`model` element. + + A model contains zero or more units [LINK **TODO**]. + + A model contains zero or more components [LINK **TODO**]. + + +**TODO** Stuff about models should go here! + +.. marker_interpretation_of_models_end + + .. marker_interpretation_of_imports_start .. _specC_interpretation_of_imports: @@ -7,6 +31,10 @@ Interpretation of ``import`` elements ------------------------------------- +.. container:: preamble + + **TODO** Preamble for imports goes here + #. Each :code:`import` element present in a :ref:`CellML infoset` (the importing infoset) SHALL define a new and distinct instance of the CellML infoset which is referenced by the :code:`href` attribute (the imported infoset). This imported infoset instance SHALL provide the context in which the child of an import element (a :code:`units` or :code:`component` element) is defined and interpreted. @@ -132,6 +160,18 @@ The term "units reference" refers to the value of a :code:`units_ref` attribute Interpretation of ``units`` elements ------------------------------------ +.. container:: preamble + + A *units definition* is a conceptual entity representing physical units. + + A units definition is defined by a :code:`units` element or an :code:`import units` element, or is one of the built-in units listed in the :ref:`Built-in Units table`. + + A units definition has a *name*, determined by the :code:`name` attribute of its :code:`units` element or :code:`import units` element, or by the "Name" column in the :ref:`Built-in Units table`. + + A units definition has a *unit reduction*, determined by the rules in section XYZ **TODO**. + + + 1. The :code:`units` element SHALL be interpreted as the product of its :code:`unit` element children, according to the following rules: @@ -289,6 +329,11 @@ Effect of ``units`` on a ``variable`` Interpretation of ``math`` elements ----------------------------------- +.. container:: preamble + + **TODO** Preamble for maths and initial values goes here + + #. The following :code:`component` elements SHALL, for the purposes of this specification, be "pertinent component elements": #. All :code:`component` elements in the top-level :ref:`CellML infoset` for the :ref:`CellML model`; @@ -306,11 +351,23 @@ Interpretation of ``math`` elements .. _specC_interpretation_of_encapsulation: - Interpretation of ``encapsulation`` elements -------------------------------------------- -1. For the purposes of this specification, there SHALL be a "conceptual encapsulation digraph" in which there is EXACTLY one node for every component in the :ref:`CellML model`. +.. container:: preamble + + A *component* is a conceptual entity representing a group of variables. + + A component is defined by a :code:`component` element or an :code:`import component` element. + + A component has a *name*, determined by the :code:`name` attribute of its :code:`component` element or :code:`import component` element. + + A component contains zero or more variables [LINK **TODO**]. + + A component contains zero or more encapsulated components, as defined in section ABC **TODO**. + + +#. For the purposes of this specification, there SHALL be a "conceptual encapsulation digraph" in which there is EXACTLY one node for every component in the :ref:`CellML model`. Therefore the encapsulation digraph will not contain any loops. 2. Where a :code:`component_ref` element appears as a child of another :code:`component_ref` element, there SHALL be an arc in the encapsulation digraph, and that arc SHALL be from the node corresponding to the component referenced by the parent :code:`component_ref` element, and to the node corresponding to the component referenced by the child :code:`component_ref` element. @@ -339,7 +396,27 @@ Interpretation of ``encapsulation`` elements Interpretation of ``map_variables`` elements -------------------------------------------- -1. For the purposes of this specification, the variable equivalence (conceptual) network SHALL be an undirected graph with one node for every :code:`variable` element in the :ref:`CellML model`. +.. container:: preamble + + A *variable* is a conceptual entity representing a mathematical variable. + + A variable is defined by a :code:`variable` element. + + A variable has a *name*, determined by the :code:`name` attribute of its :code:`variable` element. + + A variable has *units*, determined by the :code:`units` attribute of its :code:`variable` element. + The value of the :code:`units` attribute of a :code:`variable` element must equal the name of a predefined unit, or a unit defined within the model. + + A variable has an *initial value*, determined by the :code:`initial_value` attribute of its :code:`variable`. + + A variable has an *interface*, determined by the :code:`interface` attribute of its :code:`variable` element. + + A variable can be part of an *equivalent variable network*, as defined in section PQR **TODO**. + + A variable can be used in equations, see section KLM **TODO**. + + +#. For the purposes of this specification, the variable equivalence (conceptual) network SHALL be an undirected graph with one node for every :code:`variable` element in the :ref:`CellML model`. The arcs of this graph SHALL be equivalences defined in the CellML model. .. marker_interpretation_of_map_variables_1 @@ -407,10 +484,14 @@ Interpretation of ``map_variables`` elements .. _specC_interpretation_of_variable_resets: - Interpretation of ``reset`` elements ------------------------------------ +.. container:: preamble + + **TODO** Preamble for resets goes here + + #. Each :code:`reset` element describes a change to be applied to the variable referenced by the :code:`variable` attribute when specified conditions are met during the simulation of the model. #. All :code:`reset` elements SHALL be considered sequentially for the connected variable set (see :ref:`Interpretation of map_variables`) to which the referenced variable belongs. diff --git a/src/static/css/cellml.css b/src/static/css/cellml.css index b4ac4bfb..2d4c4fc9 100644 --- a/src/static/css/cellml.css +++ b/src/static/css/cellml.css @@ -83,6 +83,20 @@ li { content: " -"; } +.preamble { + background: #ececec; + color: saddlebrown; + padding: 10px; + + margin-top: 0; + margin-bottom: 15px; + margin-left: 0; + margin-right: 0; + + line-height: 24px; + font-family: "Lato", "proxima-nova", "Helvetica Neue", "Arial", sans-serif; +} + .infospec { /* border-top: 1px solid #b9c6dd; */ background: #e1eaf0;