280 likes | 303 Views
A denotational framework to compare various computational models based on signals, events, and processes using mathematical notations. Analyses determinacy and functional properties for different models.
E N D
A denotational framework for comparing models of computation Daniele Gasperini
Abstract • Aim: compare different model of computation and their certain essential features • How: use a denotational framework
Main characteristics • Denotational rather than operational • Mathematical approach • Main actors: • Processes • Signals • Events Tagged signal model
SIGNALS 1 • Event e = tag : value • Set of values V • Set of tags T • Tags: model time, precedence relationships, synchronization points • Values: represent operands and result of computation • Signal s = set of events = subset of T x V e є T x V
SIGNALS 2: Characteristics & notations • Functional signals • e1= (t, v1) є s and e2= (t, v2) є s then v1 = v2 • S = the set of all signals • SN = collection/tuple of N signals • λ = empty signal (no events) • Λ = collection/tuple of N empty signals • λє S and ΛєSN • = bottom : absence of value
PROCESSES • P = process : subset of SN for some N • s = behavior of a process • s єSN and s є P → P = set of behaviors • Composing processes • Inputs and outputs • Determinacy
Composing processes 1 • P = set of behaviors s • Composing = P1 x P2 x … Pn Given M processes in SN a process Q composed of these processes is given by: Where P is the collection of processes
Composing processes 2: projections Process P = set of behaviors s
I (size m) O (size n) P Inputs and outputs
Determinacy A process is determinate if for any input A є B it has exactly one behavior or exactly no behaviors. Otherwise is nondeterminate. functional + functional = functional → preserve Depends on the tag system and the process Functional + source processes with exacly one behavior = functional → preserve
s1 s2 s3 … specification i.e. time implementation s1 s2 s3 … Ordering of events Ordering of tags Tags systems The central role of a tag system is to establish ordering among events. Ordering relation among events properties: reflective transitive antisymmetric
Timed models of computation • The set of tags T is a totally ordered set • Tag = timestamp
Flavors of timed models • Metric time • Continuous time • Discrete event • Discrete event simulators • Synchronous and discrete-time systems • Sequential systems
Metric time • T totally ordered • T Abelian group • closed to addition • zero • for every t є T there is another element -tє T such that t + (-t) = 0 • T has a metric Directly modeling physical systems
Continuous time • T totally ordered • T is a continuum • T(s) = T for each signal s in any tuple s that satisfies the system
Discrete event • T totally ordered • The set of tags must be a discrete subset of T • The set of tags must be order isomorphic The timestamps that appear in any behavior can be enumerated in chronological order. Many simulators (most digital circuit simulators)
Discrete events simulators • Same characteristics of discrete event • Events explicitly include timestamp • The simulator operates by keeping a list of events sorted by timestamp • Delta time (affects semantic and ensure strict causality)
Synchronous and discrete-time systems Two events are synchronous if they have the same tag Two signals are synchronous if all events in one signal are synchronous with an event in the other signal and vice versa A process is synchronous if every signal in any behavior of the process is synchronous with every other signal in the behavior
Sequential systems • Single signal s • The set of tags in the signal are totally ordered
Untimed models of computation • Tags are partially ordered • Partial order is present in many models of computations because denotes • Causality • Synchronization
s1 s3 s2 Rendezvous of sequential processes • Sequential processes reach a particular point at which they must verify that another process has reached a corresponding point before proceeding T(e1) = T(e2) = T(e3) Communicating sequential processes and the calculus of communicating systems
Kahn process networks • Processes communicate via channels, which are one-way unbounded FIFO queues with a single reader and a single writer. FIFO T(s) is totally ordered for each signal s Imposes an ordering on the events Be Σ(s) denote the sequence of values in s Two signals s and s’ sequence equivalent Σ(s) = Σ(s’) A process is sequence functional if given a set of equivalent tuples of input signals all possible outputs are sequence equivalent Sequence determinacy
s s’’ s’ P Dataflow • Special case of Kahn process networks • A dataflow process is a Kahn process that is also sequential • Self loop signal is called firing signal consumed by ei + 1 ei≤ e’ ≤ ei + 1 e’ produced by ei ei≤ e’’ ≤ ei + 1 e’’
s1 s2 Petri Nets • Similar to dataflow • Events within signals need not be ordered f: s2→ s1 such that f(e) < e for all e є s2 A firing (an event in s2) has a corresponding token (an event in s1) with a smaller tag
Heterogeneous systems • V divided into subsets → carry the notion of data types • T divided → separately model parts of heterogeneous system (continuous time, discrete event and dataflow subsystems)
The Role of Tags in composition of processes • Aim: connect tagged signal model to well-known results in semantics • Two cases: • Discrete event systems • Kahn process networks
Discrete event systems Cantor metric Causality • Synchronous events • Feedback loops Distance of signals The n-tuples of signals → metric space Casual: two possible outputs differ no earlier than the inputs that produced them Strictly casual: two possible outputs differ later than the inputs that produced them (or not at all) Three form of causality: Delta casual: there is a delay of at least Δ before any output of a process can be produced in reaction to an input event If a process is functional and delta casual then the feedback loop has exactly one behavior Simulators (VHDL, Verilog)
Monotonicity and continuity in Kahn process networks Causality a natural partial ordering for signals that contains a totally ordered set of events Prefix order Σ(s) sequence of values in the signal s Monotonicity Continuity Determinacy of feedback compositions Constructive procedure for finding one unique behavior A continuous process is monotonic, not all monotonic functions are continuous The feedback loops have an alternative interpretation of the composition Q that brings the sequence to be determinate (fixed point theorem)