22.06.2015 Views

IIST and UNU - UNU-IIST - United Nations University

IIST and UNU - UNU-IIST - United Nations University

IIST and UNU - UNU-IIST - United Nations University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Temporal logic of resource cumulation 6<br />

3 Temporal logic of resource cumulation<br />

Resource cumulation<br />

Many aspects of computing can be modelled as the cumulation of resources. In real-time computing,<br />

time is a kind of resource. A process “consumes” a non-negative amount of time. A<br />

computation may also produce resources. For example, a reactive process generates an increasingly<br />

longer sequence of intermediate states called a trace. Resource cumulation can be<br />

formalized as a quintuple called a cumulator: (X, ; 0, ⌢ ; | · |) , which consists of three<br />

parts: a well-founded partial order (X, ) in which each element is called a cumulation <strong>and</strong><br />

the greatest lower bound exists for any non-empty subset, a monoid (0, ⌢ ) in which 0 , or<br />

zero cumulation is the least cumulation, <strong>and</strong> a monotonic <strong>and</strong> associative binary operation concatenation<br />

⌢ corresponds to the addition of cumulations, <strong>and</strong> a monotonic <strong>and</strong> strict volume<br />

function | · | : X → [0, ∞] : We assume that the partial order <strong>and</strong> the monoid are consistent:<br />

a b ⇔ ∃c∈X · a ⌢ c = b . The unusual part of a cumulator is the volume function. A volume<br />

function measures the amount of resource cumulated. With such additional information we can<br />

then reason about the dynamics of resource cumulation. For example, a resource is exhausted<br />

when its volume reaches infinity ∞ . The use of volume functions can substantially simplify the<br />

reasoning of limit points, continuity, <strong>and</strong> other topological properties. Such modelling is aimed<br />

at avoiding complicated domain construction <strong>and</strong> has reflected our pragmatic view on resources.<br />

For a more complete account of resource cumulation, please refer to [3].<br />

Example: The amount of time that a computation consumes can be modelled as a cumulator:<br />

RTime ̂= ([0, ∞], ; 0, + ; id) where + is addition. id is the identity function.<br />

Example: In some applications, we are interested in temporal properties over a period of time<br />

<strong>and</strong> thus need to reason about temporal intervals. Intervals form a cumulator Interval ̂= (I, <br />

; ∅, ⌢ ; | · |) where I denotes the set of intervals, each of which is a convex subset i of the<br />

real domain [0, ∞] (such that for any t 1 , t 2 ∈ i <strong>and</strong> t 3 ∈ T , t 1 t 3 t 2 implies t 3 ∈ i ). For<br />

example, [1, 2] , [1, 2) , (1, 2] , (1, 2) <strong>and</strong> the empty set ∅ are intervals. Let I denote the set of<br />

all intervals. a ⌢ b ̂= a ∪ b if a ∩ b = ∅ , ⊔a = ⊓b <strong>and</strong> a ∪ b ∈ I . The volume of a non-empty<br />

interval is its length: |a| ̂= ⊔a − ⊓a where ⊔a <strong>and</strong> ⊓a denote the lub <strong>and</strong> glb of the interval<br />

a respectively. The volume of the empty set is zero |∅| = 0 . The orders a b means that b is<br />

a right-h<strong>and</strong> extension of a , i.e. ∃c ∈ I · a ⌢ c = b .<br />

Example: Finite <strong>and</strong> infinite traces form a typical cumulator: Trace(X) ̂= (X † , ; 〈〉, ∧ ; |·<br />

|) where X is the type of each element, <strong>and</strong> X † the set of all sequences of elements (including<br />

the infinite ones). For two sequences a, b ∈ X † , a ∧ b denotes their concatenation. If a is an<br />

infinite sequence, then for any b, a ∧ b = a . a b iff a is a prefix (i.e. pre-cumulation) of b . |a|<br />

denotes the length of a . For exampe, the length of the empty sequence 〈〉 is 0. a i denotes the<br />

i -th element of the sequence where 1 i |a| .<br />

Report No. 301,<br />

<strong>UNU</strong>-<strong>IIST</strong>, P.O. Box 3058, Macau

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!