tutorial
26 pages
Español
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

...TUTORIALnotOF.LUSTRE.Nicolas.HALBWnoA.CHS.P.ascal.RA.YMONDductionJanaddeduary.24,172002.Conrecursivten.ts191.Basicoflanguage.2alues1.1.SimpleThisconastrolthedevicesmost.1.....no.....17.orks.....18.........prop.....20.......21.is2Lustre1.2olsNumericalsystematicexamplescomplete.are.rra.ed...........The.with...........Tw.net.............V.Program8.1.3.T.uples......4.2.safet.............Numerical...............y.cumen.in.the.and.ciated.e.e.tation.but.y.basic.12]..t.recursiv11are2[32Clo.c.ks.11.3.Arra.ys.and.recursiv.e.no3.5desdelay13de3.1recursionW.arning..................3.6.o.e.w.........................4.eriation.4.1.comparison........13.3.2.A.binary.adder........19.Pro.of.y.erties.......................4.3.v..............13.3.3.The.exclusive.no.de....Bibliograph.23.do.t.an.tro.to.language.V.its.so.to.W.will.giv.a.presen.of.language.a.bibliograph.is.The.references.[8,16The3.4recenThefeaturesdelayysnoededeswithdescribarrainys]..A.MostoinnotYaX2Figurein1: ...

Sujets

Informations

Publié par
Nombre de lectures 24
Langue Español

.
.
.
TUTORIAL
not
OF
.
LUSTRE
.
Nicolas
.
HALBW
no
A
.
CHS
.
P
.
ascal
.
RA
.
YMOND
duction
Jan
added
uary
.
24,
17
2002
.
Con
recursiv
ten
.
ts
19
1
.
Basic
of
language
.
2
alues
1.1
.
Simple
This
con
as
trol
the
devices
most
.
1
.
.
.
.
.
no
.
.
.
.
.
17
.
orks
.
.
.
.
.
18
.
.
.
.
.
.
.
.
.
prop
.
.
.
.
.
20
.
.
.
.
.
.
.
21
.
is
2
Lustre
1.2
ols
Numerical
systematic
examples
complete
.
are
.
rra
.
ed
.
.
.
.
.
.
.
.
.
.
.
The
.
with
.
.
.
.
.
.
.
.
.
.
.
Tw
.
net
.
.
.
.
.
.
.
.
.
.
.
.
.
V
.
Program
8
.
1.3
.
T
.
uples
.
.
.
.
.
.
4.2
.
safet
.
.
.
.
.
.
.
.
.
.
.
.
.
Numerical
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
y
.
cumen
.
in
.
the
.
and
.
ciated
.
e
.
e
.
tation
.
but
.
y
.
basic
.
12].
.
t
.
recursiv
11
are
2
[32
Clo
.
c
.
ks
.
11
.
3
.
Arra
.
ys
.
and
.
recursiv
.
e
.
no
3.5
des
delay
13
de
3.1
recursion
W
.
arning
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3.6
.
o
.
e
.
w
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4
.
eriation
.
4.1
.
comparison
.
.
.
.
.
.
.
.
13
.
3.2
.
A
.
binary
.
adder
.
.
.
.
.
.
.
.
19
.
Pro
.
of
.
y
.
erties
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4.3
.
v
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13
.
3.3
.
The
.
exclusive
.
no
.
de
.
.
.
.
Bibliograph
.
23
.
do
.
t
.
an
.
tro
.
to
.
language
.
V
.
its
.
so
.
to
.
W
.
will
.
giv
.
a
.
presen
.
of
.
language
.
a
.
bibliograph
.
is
.
The
.
references
.
[8,
16
The
3.4
recen
The
features
delay
ys
no
e
de
des
with
describ
arra
in
ys
].
.
A
.Most
oin
not
Y
a
X
2
Figure
in
1:
;
A
a
No
and
de
the
1
qual
Basic
"
language
:
A
t
Lustre
a
program
".
or
r
subprogram
is
is
(X:
called
a
a
ts
no
\
de
and
.
olean
Lustre
(
is
:
a
b
functional
and
language
^
op
:
erating
,
on
op
streams
meanings
.
n
F
only
or
"
the
follo
momen
bool
t
giv
let
Y
us
dees
consider
b
that
t
a
pre
stream
the
is
:
a
"
ite
to
or
streams
inite
a
sequence
n
of
=
v
:
alues
:
All
olean
the
Bo
v
1
alues
:
of
n
a
usual
stream
that
are
\
of
list
the
-V4
same
v
t
is
yp
tak
e
of
whic
cycle
h
one
is
"
called
v
the
is
t
node
yp
returns
e
deition
of
Y
the
b
stream
equation
A
X
program
This
has
Y
a
side
cyclic
always
b
the
eha
side
vior
and
A
This
t
olv
the
parameter
n
op
th
\
execution
\
cycle
usual
of
erators
the
erate
program
wise
all
A
the
1
in
;
v
;
olv
:
ed
and
streams
b
tak
2
e
:
their
;
n
)
th
o
v
then
alue
is
A
stream
no
^
de
a
dees
2
one
:
or
^
sev
:
eral
.
output
erators
parameters
ailable
as
a
functions
are
of
op
one
is
or
builtn
sev
in
eral
:
input
them
parameters
ob
All
xor
these
exclusiv
parameters
#
are
an
streams
b
1.1
olean
Simple
true
con
if
trol
at
devices
its
1.1.1
\
The
\
r
explicit
aising
op
e
de
dge
the
no
wing
de
EDGE
As
bool
a
(Y:
v
The
ery
of
st
output
example
is
let
en
us
y
consider
single
a
:
Bo
=
olean
and
stream
pre
X
equation
=
\
(
"
x
leftand
1
to
;
e
x
e
2
to
;
righ
:
hand
:
expression
:
X
;
not
x
".
n
expression
;
v
:
es
:
input
:
X
)
three
.
erators
W

e
and
w
and
an
not
t
are
to
Bo
dee
op
another
extended
Bo
op
olean
p
stream
t
Y
on
=
if
(
=
y
a
1
;
;
2
y
:
2
:
;
a
:
;
:
:
:
)
;
B
y
(
n
1
;
b
:
;
:
:
:
;
)
n
corresp
:
ond
:
ing
are
to
w
the
Bo
rising
streams
edge
A
of
B
X
the
,
olean
i
(
suc
1
h
b
that
;
y
2
n
b
+1
;
is
:
true
;
if
n
and
b
only
;
if
:
x
)
n
Most
is
op
false
are
and
v
x
in
n
w
+1
y
is
and
true
called
(
data
X
erators
raised
Here
from
the
false
of
to
data
true
erators
at
Lustre
cycle
1
n
1
+
of
1).
ha
The
e
corresp
vious
onding
\
no
"
de
the
et
e
us
\
call
"
it
es
EDGE
y
)
um
will
er
tak
Bo
e
parameters
X
returns
as
at
an
n
input
and
parameter
if
and
most
return
of
Y
parameters
as
true
an
int
output
and
parameter
real
The
are
in
con
terface
ersion
of
erators
the
EDGE
nows
and
:
2:
are
Sim
;
ulating
the
a
e
no
Figure
de
As
and
represen
or
to
xor
the
not
EDGE
#
A
ifhenlse
denotes
+
B
-
tro
*
1
/
the
div
2
mod
1
=
let
<>
complete
<
(Y:
<=
no
>
graphical
>=
represen
int
of
real
v

;
The
forev
\
this
pre
il
"
the
or
X
\
;
previous
:
")
and
op
(
erator
1
allo
^
ws
:
to
the
refer
->
at
false
cycle
no
n
EDGE
to
=
the
1.1.2
v
write
alue
Fus
of
the
a
of
stream
program
at
denotes
cycle
alue
n
,
1:
instance
if
;
A
;
=
and
(
equal
a
In
1
erator
;
mask
a
alue
2
b
;
op
:
consequence
:
(
:
x
;
:
a
n
n
:
;
\
:
pre
:
the
:
;
)
:
is
:
a
x
stream
x
pre
:
is
In
the
v
stream
v
(
use
nil
erator
;
constan
a
.
1
of
;
EDGE
a
wing
2
bool
;
let
:
->
:
pre
:
ulating
;
Let
a
no
n
a
1
call
;
ulator
:
of
:
the
:
no
).
the
Its
2):
st
constan
v
inite
alue
same
is
constan
the
,
undeed
immediate
v
F
alue
expression
nil
:
,
:
and
:
for
).
an
t
y
then
n
er
>
to
1,
.
its
particular
n
op
th
allo
v
to
alue
the
is
v
the
in
(
duced
n
y
th
pre
v
erator
alue
a
of
if
A
=
.
x

;
The
2
\
:
->
:
"
x
ollo
;
w
:
ed
)
b
expression
y
X
op
not
erator
"
allo
ts
ws
stream
to
nil
initialize
x
streams
^
If
x
A
;
=
:
(
;
a
n
1
:
;
n
a
;
2
:
;
).
:
order
:
a
:
oid
;
il
a
alue
n
us
;
the
:
op
:
and
:
builtn
)
t
and
2
B
The
=
deition
(
the
b
de
1
is
;
follo
b
node
2
(X:
;
returns
:
bool
:
Y
:
false
;
X
b
not
n
tel
;
Sim
:
a
:
de
:
us
)
the
are
de
t
in
w
e
o
and
streams
the
of
sim
the
giving
same
name
t
the
yp
and
e
name
then
the
\
de
AB
ting
"
main
is
ig
the
2
stream
lustre
(
t
a
an
1
stream
;
a
b
v
2
Preeed
;
ts
:
false
:
true
:
and
;
arithmetic
b
alues
n
or
;
the
:
3.14
:
(3
:
14
),
3
equal
14
to
3
A
14
at
:::
the
3
st
instansim
w
sim
Fus
pro
EDGE
lustre
The
lo
sim
",
ulator
graphical
op
the
ens
co
a
oc
windo
o
w
of
con
2
taining
=

terpretor
a
in
lab
and
el
EDGEc
corresp
common
onding
ulator
to
instrumen
the
e
output
to
of
ruealse
the
.
no
ruealse
de
true
Y
a
;
a
this
based
widget
Y
b
b
eha
program
v
name
es
the
as
e
a
tains
amp
the
it
].
is
using
highligted
yping
when
translated
the
.
output
also
is
Then
rue
and

EDGE
a
STEP
widget
a
corresp
t
onding
yp
to
STEP
the
=
input
?
of
pressing
the
o
no
with
de
1.1.3
X
de
.
ulator
This
an
widget
Lustre
b
can
eha
the
v
compiling
es
a
diren
us
tly
giving
dep
the
ending
name
on
no
the
EDGE
mo
a
de
h
:
ob
in
written
the
-
autotep
oc
mo
e
de
this
,
Lux
inputs
y
are
EDGEc
supp
de
osed
to
to
program
b
standard
e
program
exclusiv
in
e
loop
so
t
activ
are
ating
ed
a
executable
input
Calling
button
get
pro
##################
v
asking
o
v
ques
,
a
e
single
e
reaction
\
of
get
the
##################
program
1
in
#####
the
X
c
4
omp

ose
STEP
mo
v
de
ques
,
reaction
inputs
X
b
false
eha
Compiling
v
no
es
The
as
sim
\c
is
hec
on
k
in
buttons
of
so
programs
sev
ou
eral
also
inputs
ulate
can
program
b
y
e
it
selected
to
without
C
pro
Let
v
call
o
compiler
quing
the
a
of
reaction
e
Whatev
the
er
of
is
main
the
de
mo
Fus
de
W
the
get
step
e
button
whic
pro
con
v
the
o
ject
ques
de
a
in
single
Esterel
reaction
Lustre
The
format
men
[23
u
W
lo
can
c
ulate
ks
program
allo
the
ws
sim
the
b
user
t
to
lux
switc
The
h
co
b
is
et
in
w
an
een
ted
the
EDGE
utotep
A
and
main
the
op
omp
is
ose
generated
mo
a
de
EDGE
In
.
this
the
example
w
the
es
mo
compiled
de
link
is
in
not
an
v
program
ery
.
imp
EDGE
ortan
e
t
#####
since
1
there
X
is
?
only
for
one
st
input
alue
T
X
ry
of
,
yp
for
bool
instance
W
the
t
autotep
e
mo
1
de
and

#####
pressing
1
X
X
pro
?
v
Y
o
false
ques
STEP
a
##################
reaction
ruealse
with
1
X
luciole
=at
ctxcurrenttate
else
st
is
v
break
alue
ta
of
an
Y
false
is
}
false
a
,
case
and
{
a
END
new
is
v
instan
alue
ctx
is
ctxcurrenttate
w
=
an
=
ted
=
for
2;
X
=
.
1;
W
EDGEtxclient
e
}
can
;
then
corresp
con
Fig
tin
0
ue
state
the
The
sim
alse
ulation
ctx
and
1;
terminate
{
it
break
b
1:
y
EDGEtxclient
\
iftx
^C
break
".
ctxcurrenttate
Let
}
us
iftx
ha
EDGEtxclient
v
ctxcurrenttate
e
}
a
=
lo
ta
ok
2;
at
}
the
*/
C
1.1.4
co
The
de
to
in
wn
the
The
e
the
EDGE
the
.
In
The
output
e
er
con
0:
tains
=
some
EDGEtxclient
declarations
a
and
iftx
the
=
pro
break
cedure
else
EDGE
ctxcurrenttate
step
2;
,
}
sho
case
wn
ctx
b
alse
elo
at
w
ctx
whic
ctxcurrenttate
h
1;
implemen
}
ts
{
the
=
generated
break
automaton
break
The
2:
pro
ctx
cedure
rue
selects
da
the
ctx
co
=
de
break
to
else
b
ctx
e
alse
executed
da
according
ctx
to
=
the
break
v
break
alue
/*
of
SWITCH
the
EDGEesetnputtx
con
}
text
Minimizing
v
automaton
ariable
automaton
\
onding
ctxcurrent
EDGEc
state
dra
",
in
whic
3.
h
program
is
in
initialized
state
to
at
0.
initial
void
t
EDGEtepDGEtx
this
ctx
the
switchtxcurrent
is
ta
whatev
te
5
){
caseo
2
The
2
The
:
The
x
...
:
with
y
lustre
:
is
x
minimal
:
mo
y
no
x
w
x
written
:
minimal
y
DONE
1
implemen
x
and
:
tak
y
calling
:
the
x
e
:
3
y
done
Figure
means
3:
and
The
o
automaton
EDGE
of
directly
the
emand
no
-v
de
4
EDGE
construction
b
compiler
e
en
the
in
input
emand
but
and
dep
b
ending
EDGEc
on
option
the
erb
v
and
alue
Loading
of
done
X
Minimizing
,
...
the
3
next
steps
state
the
will
not
b
minimal
e
t
either
w
1
the
orresp
.
onding
compiler
to
duce
pre
using
X
3
=
EDGE
false
e
or
2
2
3
orresp
for
onding
automata
to
in
pre
st
X
ata
=
default
true
result
The
non
state
is
1
en
b
more
eha
result
v
0
es
y
lik
ocmin
e
-v
the
-v
initial
sets
state
v
In
ose
the
de
state
w
2,
get
the
automaton
next
=>
state
:
is
states
computed
lgo
lik
1)
e
=>
in
:
the
=>
other
(2
ones
That
but
that
the
automaton
v
as
alue
minimal
of
a
Y
one
dep
only
ends
w
on
states
the
as
the
in
v
e
alue
minc
of

X
Lustre
.
can
One
pro
can
a
note
automaton
that
the
this
option
automaton
:
is
Fus
not
emand
inimal
W
since
get
states
=>
0
states
and
transitions
1
Tw
are
algorithms
equiv
the
alen
of
t
are
There
ted
is
the
t
The
w
one
o
called
w
driv
a
he
ys
one
to
the
obtain
is
a
general
minimal
minimal
automaton
second

called
The
driv
o
it
c
es
co
time
de
the
can
is
b
6
e
minimizedolean
\
",
Resing
level
no
let
des
do
Once
hanges
a
\
no
a
de
tel
has
ecomes
b
\
een
a
deed
olean
it
initial
can
is
b
er
e
SWITCH
called
true
from
level
another
\
no
es
de
false
using
k
it
Ho
as
a
a
Let
new
call
op
not
erator
initial
F
Lustre
or
b
instance
alue
let
ccurs
us
of
dee
bool
another
->
no
then
de
ecis
computing
equal
the
ev
falling
ccurs
edge
\
of
but
its
level
input
\
parameter
ccur
node
v
FALLINGDGE
recursiv
(X:
this
bool
b
returns
whose
(Y:
unique
bool
b
let
a
Y
the
=
do
EDGEot
hange
X
dees
tel
alue
W
".
e
a
can
represen
add
a
this
whose
no
true
de
signal
declaration
w
to
v
our
program
e
reset
Fus
evel
,
=
call
set
the
if
compiler
else
with
h
FALLING
the
EDGE
is
as
\
the
then
main

no
"
de
it
lustre

Fus
"
FALLINGDGE
o
and
reset
sim
then
ulate
b
the
if
resulting
"
co
"
de
level
lux
its
FALLINGDGEc
otice
1.1.6
"
The
deed
switch
ev
no
has
de
It
The
used
EDGE
switc
no
el
de
er
is
is
of
change
v
a
ery
represen
common
then
usage
1.1.5
for
\
eriving
"
a
es
Bo
c
olean
\
stream
"
i
the
transforming
v
a
of
ev
level
el
In
in
,
to
signal
a
usually
ignal
ted
The
y
con
Bo
v
stream
erse
v
op
is
eration
whenev
is
the
also
o
v
Belo
ery
is
useful
st
it
ersion
will
the
b
node
e
et
our
initial
second
returns
example
bool
W
level
e
initial
w
if
an
then
t
else
to
reset
implemen
false
t
preevel
a
whic
witc
sp
h
that
taking
\
as
"
input
initially
t
to
w
initial
o
and
signals
for
\
er
set
if
"
set
and
o
\
then
reset
b
"
true
and
if
an
set
initial
do
v
not
alue
ccur
\
\
initial
"
",
es
and
\
returning
"
a
ecomes
Bo

olean
neither
\
set
level
nor
".
reset
An
o
y
\
o
"
ccurrence
eeps
of
previous
\
alue
set
that
"
level
rises
is
the
ely
\
).
level
w
"
er
to
program
true
a
an
w
y
cannot
o
e
ccurrence
as
of
neutton
\
h
reset
lev
"
c
resets
whenev
it
its
to
button
false
pushed
When
\
neither
"
\
e
set
Bo
"
stream
nor
ting
\
signal
reset
the
"
7
o
ccurseac
\
o
1
the
0
1)
:
4.
set
It
:
Let
level
o
:
ignores
resetevel
e
reset
eha
:
Numerical
level
write
setevel
C
:
in
initial
er
:
0
level
not
initialevel
A
Figure
this
4:
dra
The
SWITCH
automaton
same
of
\
the
c
no
easy
de
sequence
SWITCH
=
state
the
=
deition
SWITCHchangehange
v
r
the
ue
ccurences
);
X
will
then
compute
This
the
sp
alw
alue
a
coun
ys
instance
true
de
stream
the
\
in
state
no
"
SWITCH
is
e
initialized
long
to
"
true
"
and
1.2.1
nev
no
er
v
c
Lustre
hanges
recursiv
b
or
ecause
tion
the
->
\
1;
set
of
"
complicate
formal
build
parameter
sequence
has
is
b
instan
een
um
giv
rue
en
a
priorit
o
y
C
(T
if
ry
C
it
re
T
do
o
exactly
get
since
a
initial
no
X
de
ell
that
of
can
is
b
2
e
no
used
w
b
get
oth
automaton
as
wn
a
Fig
\t
The
w
des
outtons
and
and
b
a
v
neutton
the
switc
as
h
as
w
set
e
and
ha
reset
v
1.2
e
examples
to
The
mak
ounter
e
de
the
is
program
ery
a
in
bit
to
more
a
complex
e
the
F
\
instance
set
dei
"
C
signal
0
m
pre
ust
+
b
dees
e
sequence
considered
natural
only
us
when
this
the
to
switc
a
h
teger
is
whose
turned
alue
o
at
W
h
e
t
get
n
the
b
follo
of
wing
o
program
in
node
b
SWITCH
olean
et
w
reset
:
initial
=
bool
->
returns
X
evel
re
bool
+
let
else
level
C
=
deition
initial
es
->
meet
if
the
set
eciation
and
it
not
the
preevel
v
then
of
true
.
else
w
if
initialized
reset
ter
then
X
false
ccurences
else
for
preevel
8
tel
Compilingn
v
ry
=
receiv
0
=
->
mod
pre
w
C
n
C
=
=
real
if
reset
X
inte
then
b
C
using
+
F
1)
x
else
Y
PC
F
Let
is
us
->
complicate
in
this
pre
example
true
to
de
obtain
v
a
function
general
t
coun
metho
ter
o
with
suc
additionnal
x
inputs
x

a
an
that
in
(
teger

init
v
whic
parameter
h
let
is
+
the
the
initial
PC
v
true
alue
=
of
COUNTER
the
1.2.2
coun
ator
ter
example

es
an
Let
in
a
teger
time
incr
w
to
in
add
trap
to
The
coun
t
ter
alued
eac
STEP
h
that
time
f
X
)
is
+1
true
+

It
a
alued
b
suc
o
n
olean
n
reset
n
whic
+1
h
n
sets
The
the
of
coun
an
ter
integratorTEPni
to
(Y:
the
=
v
+
alue
tel
of
program
init
sho
,
5.
whatev
10:
er
=
is
->
the
mod
v
9;
alue
=
of
1,
X
reset
.
The
The
gr
complete
no
deition
This
of
in
the
olv
coun
real
ter
alues
is
f
node
e
COUNTERnit
real
incr
of
:
that
int
e
X
an
reset
to
:
tegrate
bool
the
returns
ezoid
(C
d
:
program
int
es
var
w
PC
real
:
streams
int
and
let
,
PC
h
=
F
init
=
->
(
pre
n
C
and
C
n
=
=
if
n
reset
STEP
then
+1
init
computes
else
real
if
stream
X
,
then
h
C
Y
+
+1
incr
Y
else
+
PC
F
tel
+
This
n
no
)
de
STEP
can
+1
b
2
e
initial
used
alue
to
Y
dee
also
the
input
sequence
node
of
t
o
returns
dd
real
in
Y
tegers
init
odds
pre
=
F
COUNTER
preTEP
2,
T
true
this
truefalse
on
Or
example
the
wn
in
Fig
tegers
9
mo
duloother
-
cut
1
matter
2
v
2
sincosmegaeal
2
the
0
cos
1
v
1
ersely
1
ducing
-1
omega
2
tel
1
0
0
v
F
end
STEP
of
init
needs
Y
,
1.5
ha
3.5
lo
3
"
6
real
3
0.0);
0
->
Figure
program
5:
omega
Use
-
of
fact
the
sin
in
taneously
tegrator
eac
1.2.3
the
The
n
sinus
of
osinus
n
no
of
de
con
One
W
can
e
try
dep
to
in
lo
\
op
erator
t
in
w
sin
o
integratoros
suc
=
h
*
in
0.1,
tegrators
ry
to
observ
compute
ergence
the
1
functions
instance
sin
a
(
of
!
the
t
ariables
)
and
and
instan
cos
dep
(
on
!
h
t
i
)
computation
in
the
a
th
simpleinded
alue
w
sin
a
the
y
th
node
alue
sincosmegaeal
cos
returns
and
in
v
cos
.
real
e
let
v
sin
to
=
the
omega
endence
*
op
integratoros
tro
0.1,
a
0.0);
pre
cos
op
=
node
1
returns
-
cos
omega
let
*
=
integratorin
*
0.1,
0.1,
0.0);
cos
tel
1
Called
omega
on
integrator
this
prein
program
0.0);
the
T
compiler
this
complains
and
that
e
there
div
is
ith
a
=
deadlo
:
c
for
k
10
.
As