Core Calculus Clause Samples
Core Calculus. Hybrid relations are used to describe the assumptions and guarantees associated with hybrid reactive designs by constraining the possible evolutions of continuous variables. A hybrid relation is a form of reactive relation where the underlying trace model is (TT, ^, s). Thus, the trace contribution (tt ) refers to a particular evolution of the continuous state space Σc, which is a topological (Hausdorff) space. We introduce the syntax A ¾ end(tt ) which refers to the length of the present evolution. ⇒ Variables in the timed trace model are projections of the continuous state space Σ, which is a topological space. Technically, we uses lenses [16, 21] to model these projects, such that each continuous variable x identifies a region of Σc, such that x : R = Σc. Actually, the source type of each lens is not limited to R but can also be any topological space. We introduce the syntax s:x to project the part of state space s described by lens x. A continuous variable expression x(t) can then be defined as follows. Definition 4.1 (Continuous Variable Expression). x(t) ¾ tt (t):x A continuous variable x is a function that obtains the continuous state space at time t and then projects the corresponding region. ⇒ ⇒ For the sake of generality, we split the overall state space of a hybrid relation Σ, described by observational variable st, into both a discrete state space (Σd) and a continuous state space (Σc). We therefore introduce lenses d : Σd = Σ and c : Σc = Σ that refer to these sub-regions of the state space, respectively. As in our previous work [19], we unify continuous variable assignment and evolution such that c is tied to the evolution in the trace (tt ). Nevertheless to avoid confusion, it is important to distinguish continuous state variables, that is the valuation of the continuous variables at the beginning or end of a computation, from continuous trajectory variables, which are functions on the timed trace. These quantities are linked, but are not identical. We also note that the discrete variables within d are not precisely the same concept as discrete variables in the Modelica sense. They are variables that are not represented in the trajectory and exist only as imperative assignable variables. For the most part such variables are useful to store temporary local variables used in imperative program fragments. In contrast, for Modelica, discrete variables are really a subclass of continuous variable that remain constant over a trajectory evolution...
