From 819e8199b4711d4eaa3f1cddb943c530e627f58c Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Thu, 10 Dec 2020 22:53:58 +0100 Subject: [PATCH] Migrate 'event' and 'expression' --- chapters/equations.tex | 3 +++ chapters/glossary.tex | 9 --------- chapters/operatorsandexpressions.tex | 6 +++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/chapters/equations.tex b/chapters/equations.tex index 8ce1a948e..e28230b8a 100644 --- a/chapters/equations.tex +++ b/chapters/equations.tex @@ -572,6 +572,9 @@ \section{Synchronous Data-flow Principle and Single Assignment Rule}\label{synch \section{Events and Synchronization}\label{events-and-synchronization} +An \firstuse{event}\index{event} is something that occurs instantaneously at a specific time or when a specific condition occurs. +Events are for example defined by the condition occurring in a when-clause, if-clause, or if-expression. + The integration is halted and an event occurs whenever an event generation expression, e.g.\ \lstinline!x > 2! o or \lstinline!floor(x)!, changes its value. An event generating expression has an internal buffer, and diff --git a/chapters/glossary.tex b/chapters/glossary.tex index c988eb0d4..7d06e7950 100644 --- a/chapters/glossary.tex +++ b/chapters/glossary.tex @@ -1,14 +1,5 @@ \chapter{Glossary}\label{glossary} -\glossaryitem{event}: something that occurs instantaneously at a specific time -or when a specific condition occurs. Events are for example defined by -the condition occurring in a when clause, if clause, or if expression. -(See \cref{events-and-synchronization}.) - -\glossaryitem{expression}: a term built from operators, function references, -components, or component references (referring to components) and -literals. Each expression has a type and a variability. (See \cref{operators-and-expressions}.) - \glossaryitem{flattening}: the computation that creates a flattened class of a given class, where all inheritance, modification, etc.\ has been performed and all names resolved, consisting of a flat set of equations, diff --git a/chapters/operatorsandexpressions.tex b/chapters/operatorsandexpressions.tex index 4fc36f420..dbe448b9a 100644 --- a/chapters/operatorsandexpressions.tex +++ b/chapters/operatorsandexpressions.tex @@ -1,8 +1,8 @@ \chapter{Operators and Expressions}\label{operators-and-expressions} -The lexical units are combined to form even larger building blocks such -as expressions according to the rules given by the expression part of -the Modelica grammar in \cref{modelica-concrete-syntax}. +The lexical units are combined to form even larger building blocks such as \firstuse{expressions}\index{expression} according to the rules given by the \lstinline[language=grammar]!expression! part of the Modelica grammar in \cref{modelica-concrete-syntax}. +For example, they can be built from operators, function references, components, or component references (referring to components) and literals. +Each expression has a type and a variability. This chapter describes the evaluation rules for expressions, the concept of expression variability, built-in mathematical operators and