37
CCSL: The Clock Constraint Specification Language Frédéric MALLET AOSTE Team-Project Université Nice Sophia Antipolis I3S Laboratory – UMR 7271 CNRS INRIA Sophia Antipolis Méditerranée

CCSL: The Clock Constraint Specification Language

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CCSL: The Clock Constraint Specification Language

CCSL:

The Clock Constraint Specification

Language

Frédéric MALLETAOSTE Team-Project

Université Nice Sophia AntipolisI3S Laboratory – UMR 7271 CNRS

INRIA Sophia Antipolis Méditerranée

Page 2: CCSL: The Clock Constraint Specification Language

Outline

�Logical Time as/at design time

� The Clock Constraint Specification Language

�CCSL usages

� A syntax to specify time semantics explicitly and

formally

� A language to express timed requirements

March 2012 2F. Mallet

Page 3: CCSL: The Clock Constraint Specification Language

Logical Time is

�an explicit design artifact

�functional� Should be made a first-class citizen

� Not just a mere annotation introduced only for performance/time analysis

�partially ordered and progressively refined� The relative rates are often more important than the actual

durations

� possibly approximate

� abstract and multiform

� The physical (real) time is just a special case => chronometric

A model to capture (logical) time propertiesMarch 2012 3F. Mallet

Page 4: CCSL: The Clock Constraint Specification Language

Design time

�Untimed relationships

� Causality (control and data flows)

� Exclusion

�Timed relationships

� Before

� After

� At the same time (simultaneously)

March 2012 F. Mallet 4

Page 5: CCSL: The Clock Constraint Specification Language

Untimed relationships

�From occurrence nets / event structures

� Causality / dependency

� Exclusion / Inhibit

{}, {c}, {c,a}, {c,b}

March 2012 F. Mallet 5

occurrences

occurrences

{a}, {b}, {a,b}, {a,b,c}

Page 6: CCSL: The Clock Constraint Specification Language

Causality

Causality (untimed)

� a causes b => b cannot occur unless a occurs

becomes

�Temporal sequentiality

� a precedes b => a always occurs before b

or

�Simultaneity

� a causes b and

� a is coincident with b

March 2012 F. Mallet 6

Page 7: CCSL: The Clock Constraint Specification Language

Exclusion

�Untimed exclusion

� a exclusiveWith b => either a or b can occur

�Timed exclusion

� a # b => a and b cannot occur simultaneously

�Asymmetry => priority

March 2012 F. Mallet 7

Page 8: CCSL: The Clock Constraint Specification Language

Inspiration: Tag structures

�Support for encoding several (timed or

untimed) Models of Computation

March 2012 F. Mallet 8

Signal

Need a syntax to

build the partial order

� CCSL

Page 9: CCSL: The Clock Constraint Specification Language

Logical clocks – instant relations

�Clocks are a priori independent

March 2012 F. Mallet 9

Clock

coincidenceprecedence

Instant

Page 10: CCSL: The Clock Constraint Specification Language

Clock relations – Coincidence-based

�Infinitely many coincidence relations

March 2012 F. Mallet 10

c2 = c1

Page 11: CCSL: The Clock Constraint Specification Language

Clock relations – Coincidence-based

�Infinitely many coincidence relations

March 2012 F. Mallet 11

c2 = c1 $ 2 c2 is a subclock of c1

Page 12: CCSL: The Clock Constraint Specification Language

Clock relations – Coincidence-based

�Infinitely many coincidence relations

March 2012 F. Mallet 12

c2 isPeriodicOn c1 period=3 offset=1

Page 13: CCSL: The Clock Constraint Specification Language

Clock relations – Coincidence-based

�Infinitely many coincidence relations

March 2012 F. Mallet 13

c2 = idealClk discretizedBy 0.1

Page 14: CCSL: The Clock Constraint Specification Language

Clock relations – Precedence-based

�Infinitely many precedence relations

March 2012 F. Mallet 14

c1≺ c2

Page 15: CCSL: The Clock Constraint Specification Language

Clock relations – Precedence-based

�Can be bounded if required (for analysis)

March 2012 F. Mallet 15

c1 ~ c2Kernel + Libraries

c2≺ c1 $ 1c1≺ c2 3

Page 16: CCSL: The Clock Constraint Specification Language

Clock expressions - Union

�Several solutions

� Also intersection

March 2012 F. Mallet 16

c11 2 3 4 5 6 7

c21 2 3 4 5

c1 + c21 2 3 4 5 6 7 8 9

Page 17: CCSL: The Clock Constraint Specification Language

Clock expressions - Inf

�Slowest clock faster than both c1 and c2 (GLB)

� Also Sup (Least Upper Bound)

March 2012 F. Mallet 17

c11 2 3 4 5 6 7

c21 2 3 4 5

inf(c1,c2)1 2 3 4 5 76

Page 18: CCSL: The Clock Constraint Specification Language

Clock relations - summary

�Elementary relations

� Coincidence, precedence

� Mixed relations (sampling, delay)

�Combined to build common time patterns

� Periodicity |a[i+1]-a[i]| = period

� Sporadicity |a[i+1]-a[i]| > interArrival

� Deadline |end[i]-start[i]| < deadline

� Jitter, skew, …

�The Clock Constraint Specification Language

March 2012 F. Mallet 18

Page 19: CCSL: The Clock Constraint Specification Language

Outline

�Logical Time as/at design time

� The Clock Constraint Specification Language

�Model-Driven Engineering: OMG UML MARTE

� The Time Model

�CCSL usages

� A syntax to specify timed semantics explicitly and

formally

� A language to express timed requirements

March 2012 19F. Mallet

Page 20: CCSL: The Clock Constraint Specification Language

MARTE – Time Model

�Annotate UML models to identify logical clocks

� Events

� Behavior (start, finish)

� Messages (send, receive), Signals

�Specify constraints with CCSL

� To specify the causal / timed constraints

�Rely on logical clocks

� Reuse existing diagrams

� Orthogonal notion of time

March 2012 20F. Mallet

Page 21: CCSL: The Clock Constraint Specification Language

Annotate UML models

Identify and constrain clocks

21March 2012 F. Mallet

C always occurs

before

every second

occurrence of B

« clock »

« clock »

Page 22: CCSL: The Clock Constraint Specification Language

Annotate UML models

for simulation and animation

22March 2012 F. Mallet

C always occurs

before

every second

occurrence of B

TimeSquareTimeSquarehttp://timesquare.inria.fr/

ModelioSoft

Page 23: CCSL: The Clock Constraint Specification Language

Outline

�Logical Time as/at design time

� The Clock Constraint Specification Language

�Model-Driven Engineering: OMG UML MARTE

� The Time Model

�CCSL usages

� A syntax to specify timed semantics explicitly and

formally

� A language to express timed requirements

March 2012 23F. Mallet

Page 24: CCSL: The Clock Constraint Specification Language

Examples

�Synchronous and polychronous languages

�Process networks

� Self-timed => fully timed by scheduling/optimization

�Avionics: AADL – SAE Standard

�Automotive: East-ADL – dedicated to AutoSAR

�EDA/SoC Design: IP-Xact – Accelera consortium

March 2012 F. Mallet 24

Page 25: CCSL: The Clock Constraint Specification Language

March 2012 25

An example pattern in AADL

(with binding representation)

10 Hz 50 Hz

F. Mallet

Page 26: CCSL: The Clock Constraint Specification Language

CCSL: Time Refinement

�Application

� sense causes step1 [asynchronous]

� step1 causes step2

� step2 causes step3

� step3 causes act

March 2012 F. Mallet 26

Page 27: CCSL: The Clock Constraint Specification Language

CCSL: Time Refinement

�Execution Platform: 3 threads

� t3 is twice slower than t1 [synchronous]

• t3 isPeriodicOn t1 period=2

• t1 causes step1

• t3 causes step3

� Communications

• t1 precedes t2 [temporality]

March 2012 F. Mallet 27

t1 t2 t3

Page 28: CCSL: The Clock Constraint Specification Language

CCSL: Time Refinement

�Execution Platform: 3 threads

� t3 is twice slower than t1 [synchronous]

• t3 isPeriodicOn t1 period=2

• t1 causes step1

• t3 causes step3

� Communications

• t1 5-precedes t2 [temporality]

[bounded]

March 2012 F. Mallet 28

t1 t2 t3

Page 29: CCSL: The Clock Constraint Specification Language

CCSL: Time Refinement

�Physical time

� Periodic sensor [synchronous]

• sense is _100Hz

� Periodic task

• t1 is sense SampledOn _50Hz

March 2012 F. Mallet 29

t1 t2 t3

Page 30: CCSL: The Clock Constraint Specification Language

CCSL: Time Refinement

�Allocation

� Tasks t1 and t2 are allocated on the p1

• t1 exclusiveWith t2

March 2012 F. Mallet 30

t1 t2 t3

sense

step1

t1

_50hz

step2

step3

act

t3

Page 31: CCSL: The Clock Constraint Specification Language

March 2012 31

Example

Application

Software

execution

platform

Hardware

execution

platform

F. Mallet

t1 t2 t3

Page 32: CCSL: The Clock Constraint Specification Language

March 2012 32

Executable

Specification

t2

core2

s2

ds

acq

t1

core1

s1

t3

core2

s3

da

rel

F. Mallet

t1 t2 t3

Page 33: CCSL: The Clock Constraint Specification Language

Outline

�Logical Time as/at design time

� The Clock Constraint Specification Language

�Model-Driven Engineering: OMG UML MARTE

� The Time Model

�CCSL usages

� A syntax to specify time semantics explicitly and

formally

� A language to express timed requirements

March 2012 33F. Mallet

Page 34: CCSL: The Clock Constraint Specification Language

Adorns UML models

for requirements

March 2012 F. Mallet 34Esterel/SyncCharts

observation

Esterel/SyncCharts

specification

Page 35: CCSL: The Clock Constraint Specification Language

Adorns UML models

for requirements

March 2012 F. Mallet 35VHDL

observation

specification

VHDL

Page 36: CCSL: The Clock Constraint Specification Language

Safety properties

Verification of CCSL specifications

� Check Properties on CCSL specifications

� Linear Temporal Logics (LTL)

� First Results (Yin Ling’s PhD, Sep. 2010)• Modular Transformation of CCSL into Promela

� Property Specification Language (Régis Gascon)• Transformation of CCSL operators into Büchi automata

March 2012 F. Mallet 36

specification

Page 37: CCSL: The Clock Constraint Specification Language

THANK YOU !

March 2012 F. Mallet 37