Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Paul Co kshott,
Motivation
Paul Co kshott,
The SCC
Paul Co kshott,
Paul Co kshott,
Paul Co kshott,
Paul Co kshott,
Paul Co kshott,
Syntax of Lino
omm::= dev | alias
omms ::=
omm[;
omms ]
prog ::=
oms ; main = exp
ommands
ommand seq
a program is a sequen
e of
ommands
ending with a nominated main expression
dene tile id
Paul Co kshott,
Syntax ontinued
Paul Co kshott,
shell blo
k
redire
ted shell
omman
standard redire
tions
dire
tion names
expressions
name of dened tile or
aliased expression
More syntax
I
Mirror
0
( exp )
exp1 |exp2
exp1 _ exp2
exp * int
exp ^int
Flip exp
Rotate exp
As in
identity
redire
ts fa
e I/O
sink
bra
keting for priority
pro
ess row
pro
ess
olumn
horizontal repli
ation
verti
al repli
ation
ree
tion about verti
al axis
rotate 90 degrees
lo
kwise
5
1
a) identity
b) mirror
c) null
Paul Co
kshott,
a) flip
7
0
1
b) rotate
Lino programs
Paul Co kshott,
Agebrai
rules
Lino has algebrai
re-writing rules
input
is equivalent to
e*1
e*N
e^1
e^N
Flip I
Flip Mirror
Flip 0
Flip(e|f)
Flip (e_f)
a|(b|
)
a_(b_
)
e
e|(e*N-1)
e
e^(e*N-1)
I
Mirror
0
Flip f| Flip e
(Flip e)_(Flip f)
(a|b)|
(a_b)_
Paul Co kshott,
is equivalent to
Rotate I
Rotate Mirror
Rotate 0
Rotate (e|f)
Rotate (e_f)
Flip Flip e
Rotate Rotate Rotate Rotate e
(a_b)|(
_d)
I
Mirror
0
(Rotate f) _ (Rotate e)
(Rotate f)|(Rotate e)
e
e
(a|
)_(b|d)
Paul Co kshott,
Status
A prototype implementation was
ompleted last autumn.
Implementation pro
eeds in two stages. First, the main expression
is fully expanded to
olumn-major order. Then, the overall
olumn
of rows drives the generation of an equivalent shell s
ript in whi
h,
for ea
h tile position, approprite exe
utable
alls are made with
stream redire
tion to linking FIFOs.
This rst version runs on standard multi-
ore linux. It translates
dire
tly into shell s
ript to generate the parallelism using &
operations.
A new implementation being made targeted expli
itly at the SCC.
Paul Co kshott,
Examples
/* a very simple example */
main = ( Flip ( [ls > East |[
at <West )) ;
Paul Co kshott,