A denotational framework for comparing models of computation Daniele Gasperini.

28
A denotational framework for comparing models of computation Daniele Gasperini
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    216
  • download

    0

Transcript of A denotational framework for comparing models of computation Daniele Gasperini.

Page 1: A denotational framework for comparing models of computation Daniele Gasperini.

A denotational framework for comparing models of computation

Daniele Gasperini

Page 2: 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

Page 3: A denotational framework for comparing models of computation Daniele Gasperini.

Main characteristics

Denotational rather than operational Mathematical approach Main actors:

– Processes– Signals– Events

Tagged signal model

Page 4: A denotational framework for comparing models of computation Daniele Gasperini.

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

Page 5: A denotational framework for comparing models of computation Daniele Gasperini.

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

Page 6: A denotational framework for comparing models of computation Daniele Gasperini.

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

Page 7: A denotational framework for comparing models of computation Daniele Gasperini.

Given M processes in SN a process Q composed of these processesis given by:

Where P is the collection of processes

Composing processes 1

P = set of behaviors s Composing = P1 x P2 x … Pn

PP

ii

PQ

MiSP Ni 1,

Page 8: A denotational framework for comparing models of computation Daniele Gasperini.

Composing processes 2: projections

)s,,(s )(by

S ontoS )s,,(s s of )( projection thedefine and

Ni1 range in the indices ofset orderedanbe)i,,(iILet

m1 iiI

mNN1I

m1

s

s

Process P = set of behaviors s

s' (s) π whereP s exists theresuch that s'set (P)π II

Page 9: A denotational framework for comparing models of computation Daniele Gasperini.

Inputs and outputs

)(S B is inputs possible all ofSet

behaviors acceptable ofset total theis P A such that

S A constraint imposed externallyan is S process a Input to

N

NN

).'()( that followsit

)'()( whereP s' and P severy for if

O) (I, respect to with functional is P processA

ss

ss

OO

II

PI (size m) O (size n)

))(()(

P,s allfor

such that SS :F mapping valuedsingle a is There

o

nm

sFs I

Page 10: A denotational framework for comparing models of computation Daniele Gasperini.

Determinacy

A process is determinate if for any input A є B it has exactly one behavioror exactly no behaviors. Otherwise is nondeterminate.

functional + functional = functional → preserve

Functional +

source processes with exacly one behavior = functional → preserve

Depends on the tag system and the process

Page 11: A denotational framework for comparing models of computation Daniele Gasperini.

Tags systems

The central role of a tag system is to establish ordering among events.

specification

implementation

s1 s2 s3 …

s1 s2 s3 …

i.e. time

Ordering relation among events properties:

reflective transitive antisymmetricOrdering of tags Ordering of events

Page 12: A denotational framework for comparing models of computation Daniele Gasperini.

Timed models of computation

The set of tags T is a totally ordered set Tag = timestamp

Page 13: A denotational framework for comparing models of computation Daniele Gasperini.

Flavors of timed models

Metric time Continuous time Discrete event Discrete event simulators Synchronous and discrete-time systems Sequential systems

Page 14: A denotational framework for comparing models of computation Daniele Gasperini.

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

Page 15: A denotational framework for comparing models of computation Daniele Gasperini.

Continuous time

T totally ordered T is a continuum T(s) = T for each signal s in any tuple s that

satisfies the system

Page 16: A denotational framework for comparing models of computation Daniele Gasperini.

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 inchronological order.

Many simulators (most digital circuit simulators)

Page 17: A denotational framework for comparing models of computation Daniele Gasperini.

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)

Page 18: A denotational framework for comparing models of computation Daniele Gasperini.

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

Page 19: A denotational framework for comparing models of computation Daniele Gasperini.

Sequential systems

Single signal s The set of tags in the signal are totally

ordered

Page 20: A denotational framework for comparing models of computation Daniele Gasperini.

Untimed models of computation

Tags are partially ordered Partial order is present in many models of

computations because denotes– Causality– Synchronization

Page 21: A denotational framework for comparing models of computation Daniele Gasperini.

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

Communicating sequential processes andthe calculus of communicating systems

T(e1) = T(e2) = T(e3)

s1

s3

s2

Page 22: A denotational framework for comparing models of computation Daniele Gasperini.

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 inputsignals all possible outputs are sequence equivalent

Sequence determinacy

Page 23: A denotational framework for comparing models of computation Daniele Gasperini.

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

s’ s’’

s

P

e’consumed by ei + 1 ei ≤ e’ ≤ ei + 1

e’’produced by ei ei ≤ e’’ ≤ ei + 1

Page 24: A denotational framework for comparing models of computation Daniele Gasperini.

Petri Nets

Similar to dataflow Events within signals need not be ordered

s2

s1

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

Page 25: A denotational framework for comparing models of computation Daniele Gasperini.

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)

Page 26: A denotational framework for comparing models of computation Daniele Gasperini.

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

Page 27: A denotational framework for comparing models of computation Daniele Gasperini.

Discrete event systems

Causality• Synchronous events

• Feedback loops

Cantor metric

The n-tuples of signals → metric spaceDistanceof signals

Three form of causality:

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)

Delta casual: there is a delay of at least Δ before anyoutput of a process can be produced in reaction to aninput eventIf a process is functional and delta casual then

the feedback loop has exactly one behavior

Simulators (VHDL, Verilog)

Page 28: A denotational framework for comparing models of computation Daniele Gasperini.

F(W) )WF( boundupper least a has F(W)

(S) chain W every for and (S)(S) :Ffunction

withfunctional sequence a isit if continuous is P processA

UU

mnm

Monotonicity and continuity in Kahn process networks

s' s

)(s' (s) )F( )F( and F,function with

functional sequence a isit if monotonic is P processA ''

Monotonicity Continuity

Determinacy of feedback compositions

Constructive procedure for finding one unique behavior

Causality

Prefix order a natural partial ordering for signals that contains a totally ordered set of events

Σ(s) sequence of values in the signal s

A continuous process is monotonic, not all monotonic functions are continuous

The feedback loops have an alternative interpretation of the composition Q thatbrings the sequence to be determinate (fixed point theorem)