Title: SMILE Project
1SMILE Project
- Prof. Andreas Prinz
- February 2004
2Contents
- History SDL Formal Semantics
- Definition
- Implementation
- Abstract State Machines
- EU Project SMILE
- HIA Project SMILE
3Static Semantics Overview
Formalisation
Language part
Overview of the Formal Semantics
4Dynamic Semantics Overview
Overview of the Formal Semantics
5Overview of the Technology
Z.100 text
Z.100.F text
Tooling for the Semantics
6Tooling for the Static Part
Concrete Syntax
Abstract Syntax
Tooling for the Semantics
7Tooling for the Dynamic Part
kimwitu
AsmL
Tooling for the Semantics
8Status and Outlook
- Formal semantics completed
- design objectives achieved
- expressiveness and flexibility by using ASMs
- Approval by ITU-T in November 2000
- real-life industrial setting
- SDL-to-AsmL compiler built, used to check
semantics - automatic generation of reference implementations
- TODO better runtime support
- Real-time extensions expected in the near future
- maximum and minimum reaction delays (bounded
response, bounded omission) - performance aspects
Final Remarks
9Abstract State Machines
- general
- state transitions
- introduced by Gurevich
- based on mathematics
- states
- transitions
- programs
- concurrency/time
Y. Gurevich. Evolving Algebra 1993 Lipari
GuideIn E. Börger, editor, Specification and
Validation Methods Oxford University Press
1995 Y. Gurevich.ASM Guide 97CSE Technical
Report, University of Michigan-Ann Arbor, 1997
ASM Introduction
10Abstract State Machines
- general
- states
- algebras
- sets,functions
- domains
- reserve elements
- transitions
- programs
- concurrency/time
state element domain function boolean function
vocabulary 0-ary function 1-ary
predicate function name predicate name
ASM Introduction
11Abstract State Machines
- general
- states
- transitions
- locations, updates
- firing of updates
- runs
- programs
- concurrency/time
Jill.Account 1000000 Jack.Account 0
Account(Jill) 1000000 Account(Jack) 0
ASM Introduction
12Abstract State Machines
- general
- states
- transitions
- programs
- concurrency/time
know(s) know(s)SDL
ASM Introduction
13Abstract State Machines
- general
- states
- transitions
- programs
- concurrency/time
- agents
- Program, Self
- partially ordered runs
- now
ag2
ag1
M1
M2
ag3
M3
ag4
Mod(agX)
S
View(agX,S)
ASM Introduction
14SMILE EU Project
- Semantic Middleware for System Modelling
Languages - combine UML, SDL, SystemC
- common semantic middleware
- hierarchical language definitions
- combined language application
- common exchange format
- public domain tools for modelling
15HIA SMILE Project
- Semantic Meta-model-based Integrated Language
Environment - MOF, UML, SDL, OCL,
- domain-specific, little languages
- hierarchical definition
- combined application
- semantic integration
- new languages / extensions
- public domain tools
16SMILE Overview
Abstract Syntax Meta-model MOF-structure
17SMILE Project
- Prof. Andreas Prinz
- February 2004
18Concrete and Abstract Syntax CS
state s input a output b,c
nextstate s endstate
ltoutputgt output ltoutput bodygt ltoutput
bodygt ltsignal identifiergt , ltsignal
identifiergt ltsignal identifiergt
ltidentifiergt
Static Semantics
19Concrete and Abstract Syntax AS1
State-node(Name(s), Input-node(Identifier(a),
Transition( Output-node(Identifier(b)),
Output-node(Identifier(c)),
Nextstate-node(Name(s)) ) ) )
Output-node Signal-identifier Signal-identifier
Identifier
Static Semantics
20Concrete and Abstract Syntax AS0
ltoutputgt output ltoutput bodygt ltoutput
bodygt ltsignal identifiergt , ltsignal
identifiergt ltsignal identifiergt
ltidentifiergt
ltoutputgt ltoutput bodygt ltoutput bodygt
ltsignal identifiergt ltsignal identifiergt
ltidentifiergt
Static Semantics
21Static Semantics Transformations
If several ltsignal identifiergts are specified in
an ltoutput bodygt, this is derived syntax for
specifying a sequence of ltoutputgts in the same
order as specified in the original ltoutput bodygt.
Static Semantics
22Static Semantics Conditions
The ltsignal identifiergt in an ltoutput bodygt must
denote a ltsignal definitiongt.
Static Semantics
23Static Semantics Mapping
ltoutputgt(ltoutput bodygt(lt id gt)) gt Output-node(Map
ping(id))
Static Semantics
24SAM Signal Flow
if Self.from.queue ? empty then let si
Self.from.queue.head in if Applicable(si)
then DELETE(si,Self.from) INSERT(si,
nowSelf.delay, Self.to) where Applicable(si)
def si.signalType ? Self.with
? Compatible(Self.to, si.signalType, ...)
Dynamic Semantics
25SAM Agents
Dynamic Semantics
26SAM Primitives
- PRIMITVE def LABEL ? ACTION
- ACTION def OUTPUT ? CALL ? SKIP ? ENTERSTATENODE
? LEAVESTATENODE ? ... - OUTPUT def SIGNAL ? CONTINUELABEL
- CALL def PROCEDURE ? VALUELABEL ? CONTINUELABEL
- SKIP def LABEL
- ENTERSTATENODE def STATENAME ? ENTRYNAME ? LABEL
- LEAVESTATENODE def STATENAME ? EXITNAME ? LABEL
Dynamic Semantics
27Compilation
- l1 LEAVESTATENODE(s) gt l2
- l2 OUTPUT(b) gt l3
- l3 OUTPUT(c) gt l4
- l4 ENTERSTATENODE(s)
state s input a output b,c nextstate
s endstate
Dynamic Semantics
28Initialisation (structure)
if mode(Self)initial then mode(Self)
starting CREATEVARIABLES(Self.ref.s-Variable-def
inition) do forall aSelf.ref.s-Agent-set
extend Agent with ag ref(ag) a
mode(ag) initial Program(ag)
INIT_AGENT_PROGRAM else CREATECHANNELS(Self.ref.
s-Channel-definition) Program(Self)
EXECUTE_PROGRAM
Dynamic Semantics
29Transition Selection
if Self.agentMode selectingTransition then
SELECTTRANSITION if Self.agentMode
firingTransition then FIRETRANSITION
Dynamic Semantics
30Transition Firing
FIRETRANSITION ? choose b b ? BEHAVIOUR ?
b.s-LABEL Self.currentLabel
EVALUATE (b.s-PRIMITIVE) EVALUATE(a ACTION) ?
if a ? TASK then EVALTASK(a) if a ? OUTPUT then
EVALOUTPUT(a) if a ? DECISION then
EVALDECISION(a) if a ? CALL then EVALCALL(a)
Dynamic Semantics