SlideShare a Scribd company logo
1 of 95
Download to read offline
`Programming Languages shape
Computational Thinkingā€™
Intreerede prof. dr. Eelco Visser
Hoogleraar Programming Languages
17 Januari 2014

Challenge the future

1
This Lecture
repeat n times
variation-of(same-argument)
for(p in important-people)
thank-you(p)
for(p in audience)
individual-quiz(p)
def same-argument =
ā€œProgramming Languages shape Computational Thinkingā€
Automatisering beperkt wachttijd rijexamen

Automatisering landbouw
teveel zaak van koplopers

Ondernemingsraden	
 Ā in	
 Ā banksector	
 Ā willen	
 Ā 
automatisering	
 Ā onder	
 Ā controle	
 Ā krijgen

Automatisering	
 Ā mislukt	
 Ā bij	
 Ā helft	
 Ā bedrijven
Grote behoefte aan personeel automatisering
De PC, een algemeen gebruikt, maar toch ingewikkeld gereedschap

Artsen bekijken nut computer

Mensen zijn geen verlengstuk van de computer
Kosten automatisering overheid stijgen snel

Vrouw en computer

Automatisering politie is verkapte bezuiniging
Werknemers onvoldoende bij automatisering betrokken
Source: http://kranten.kb.nl
Software systems are the engines
of modern information society
Software systems are for people
Software should ā€˜just workā€™
easy to use
safe
cheap (free!)
responsive
scale
reliable
donā€™t lose data
keep data private
help catch terrorists
Software is encoded computational thinking

software

_fib:
!
pushq
!
movq
!
subq
!
movl
!
movl
!
cmpl
!
jg
!
movl
!
jmp
LBB1_2:
!
movl
!
subl
!
movl
!
callq
!
movl
!
movl
!
subl
!
movl
!
movl
!
callq
!
movl
!
movl
!
addl
!
movl
LBB1_3:
!
movl
!
movl
!
movl
!
addq
!
popq
!
ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp
Software engineers are the architects and mechanics
of modern information society

computer
user

software

_fib:
!
pushq
!
movq
!
subq
!
movl
!
movl
!
cmpl
!
jg
!
movl
!
jmp
LBB1_2:
!
movl
!
subl
!
movl
!
callq
!
movl
!
movl
!
subl
!
movl
!
movl
!
callq
!
movl
!
movl
!
addl
!
movl
LBB1_3:
!
movl
!
movl
!
movl
!
addq
!
popq
!
ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

software
engineer
Software engineering provides the tools that let
software engineers do a good job

design patterns
best practices
coding standards
code reviews
pair programming
(unit) testing
debugging

computer
user

software

_fib:
!
pushq
!
movq
!
subq
!
movl
!
movl
!
cmpl
!
jg
!
movl
!
jmp
LBB1_2:
!
movl
!
subl
!
movl
!
callq
!
movl
!
movl
!
subl
!
movl
!
movl
!
callq
!
movl
!
movl
!
addl
!
movl
LBB1_3:
!
movl
!
movl
!
movl
!
addq
!
popq
!
ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

software
engineer
Programming languages are the key tools
in the encoding process
computer
user

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp
Programming languages are software systems too

computer
user

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

compiler
interpreter
type checker
editor (IDE)
refactorings
bug ļ¬nders
Programming languages should ā€˜just workā€™

computer
user

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

easy to use
safe
cheap (free!)
responsive
scale
reliable
Language designers create programming languages

computer
user

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

language
designer
Language engineering provides the tools that let
language designers do a good job
computer
user

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

language
designer
Meta-languages support the encoding of language designs

computer
user

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer
_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

metalanguage

language
designer
_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

language
engineer
Language engineers eat their own dogfood

computer
user

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer
_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

metalanguage

language
designer
_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

language
engineer
Software is encoded computational thinking

_fib:
!
pushq
!
movq
!
subq
!
movl
!
movl
!
cmpl
!
jg
!
movl
!
jmp
LBB1_2:
!
movl
!
subl
!
movl
!
callq
!
movl
!
movl
!
subl
!
!
movl
!
movl
!
callq
!
movl
!
movl
!
addl
!
movl
LBB1_3:
!
movl
!
movl
!
movl
!
addq
!
popq
!
ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp
Software is encoded computational thinking

_fib:
!
pushq
!
movq
!
subq
!
movl
!
movl
!
cmpl
!
jg
!
movl
!
jmp
LBB1_2:
!
movl
!
subl
!
movl
!
callq
!
movl
!
movl
!
subl
!
!
movl
!
movl
!
callq
!
movl
!
movl
!
addl
!
movl
LBB1_3:
!
movl
!
movl
!
movl
!
addq
!
popq
!
ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

modeling mechanical computation

Alan Turing
1912 - 1954
Turing
Machine

current

tape

state

$ 0 0 1 0 $ 0 0 1 1

2

$ 0 0 0 0 $ 0 1 0 1

3

1 $ $ R 2
2 0 0 R 2

Alan Turing
1936

2 1 1 L 3
2 $ $ R H

current
state
Church-Turing
Thesis: Any effective
computation can be
expressed with a
Turing Machine

current
symbol

3 0 0 L 3
3 1 1 L 3
3 $ $ R 4

new
symbol

next
state
move
tape
Turing
Machine

1

$ 0 0 0 0 $ 0 1 0 1

Add two
binary
numbers

$ 0 0 1 0 $ 0 0 1 1

H

1 $ $ R 2

41 0 R 4

8 1 1 R 8

2 1 1 L 3

4$ $ L 5

8 $ $ L 9

2 $ $ R H

5 1 0 L 5

9 1 0 L 9

3 0 0 L 3

5 0 1 L 6

9 0 1 L 10

3 1 1 L 3

6 0 0 L 6

10 0 0 L 10

3 $ $ R 4

Church-Turing
Thesis: Any effective
computation can be
expressed with a
Turing Machine

8 0 0 R 8

2 0 0 R 2

is zero?

40 1 R 4

6 1 1 L 6

10 1 1 L 10

6 $ $ R 7

10 $ $ L 11

7 0 1 R 7

11 0 0 L 11

7 1 0 R 7

11 1 1 L 11

7 $ $ R 8

12 $ $ R 2

subtract
one

add
one

back

repeat

Alan Turing
1936
Universal
Turing
Machine
program

$

data

S

Universal Program
(Turing Machine
Interpreter)

Halting problem: given a Turing Machine
program P, does P halt for any input data?

Undeci dable!

Alan Turing
1936
world

bus

Von Neumann

control
unit
data
ALU

Simple Instructions
add, subtract
fetch, store
ā€¦

registers

program

CPU

memory

Alan Turing
n
0

1

1

1

2

2=1+1

3

3=1+2

4

5=2+3

5

8=3+5

6

13 = 5 + 8

7

21 = 8 + 13

8

Example: a procedure for computing Fibonacci numbers

n-th ļ¬bonacci

34 = 13 + 21
n
0

1

1

1

2

2=1+1

3

3=1+2

4

5=2+3

5

8=3+5

6

13 = 5 + 8

7

21 = 8 + 13

8

Example: a procedure for computing Fibonacci numbers

n-th ļ¬bonacci

34 = 13 + 21
compute n-th ļ¬bonacci number

if n less or equal to 1 result is 1

compute (n-2)-nd ļ¬bonacci number

compute (n-1)-th ļ¬bonacci number

add the results

return to caller

_fib:
! pushq
! movq
! subq
! movl
! movl
! cmpl
! jg
! movl
! jmp
LBB1_2:
! movl
! subl
! movl
! callq
! movl
! movl
! subl
! movl
! movl
! callq
! movl
! movl
! addl
! movl
LBB1_3:
! movl
! movl
! movl
! addq
! popq
! ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

0

1

2

2=1+1

3

3=1+2

4

5=2+3

5

by calling _ļ¬b

1

1

by calling _ļ¬b

n-th ļ¬bonacci

8=3+5

6

13 = 5 + 8

7

21 = 8 + 13

8

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

n

34 = 13 + 21
procedure has
label _ļ¬b

pass argument in
%edi register

The Procedure
Design Pattern
pass return value
in %eax register

use 16 bytes for
stack frame

_fib:
! pushq
! movq
! subq
! movl
! movl
! cmpl
! jg
! movl
! jmp
LBB1_2:
! movl
! subl
! movl
! callq
! movl
! movl
! subl
! movl
! movl
! callq
! movl
! movl
! addl
! movl
LBB1_3:
! movl
! movl
! movl
! addq
! popq
! ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

procedure entry
set up stack frame
get argument(s)

procedure
deļ¬nition

pass argument(s)
call procedure
get return value

procedure call

pass argument(s)
call procedure
get return value

procedure call

return value
unwind stack
return to caller
design patterns
best practices
coding standards
code reviews
pair programming
(unit) testing
bug ļ¬nders
program annotations
debugging

_fib:
! pushq
! movq
! subq
! movl
! movl
! cmpl
! jg
! movl
! jmp
LBB1_2:
! movl
! subl
! movl
! callq
! movl
! movl
! subl
! movl
! movl
! callq
! movl
! movl
! addl
! movl
LBB1_3:
! movl
! movl
! movl
! addq
! popq
! ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

procedure entry
set up stack frame
get argument(s)

procedure
deļ¬nition

pass argument(s)
call procedure
get return value

procedure call

pass argument(s)
call procedure
get return value

procedure call

return value
unwind stack
return to caller
Procedural Abstraction

int fib(int n) {
if(n <= 1)
	
return 1;
else
	
return fib(n - 2) + fib(n - 1);
}

The C Programming Language - Kernighan & Ritchie (1988)

A declarative language for specifying procedures
Procedural Abstraction

procedure
deļ¬nition

int fib(int n) {
if(n <= 1)
	
return 1;
else
	
return fib(n - 2) + fib(n - 1);
}
procedure
call

Procedure design pattern captured in linguistic abstraction
Procedural Abstraction
n
0

compute (n-2)-th
compute (n-1)-th
ļ¬bonacci number
ļ¬bonacci number
add results
return to caller

Self explanatory code!

1

2

2=1+1

3

3=1+2

4

5=2+3

5

8=3+5

6

int fib(int n) {
if(n <= 1)
	
return 1;
else
	
return fib(n - 2) + fib(n - 1);
}

1

1

compute n-th
ļ¬bonacci number

n-th ļ¬bonacci

13 = 5 + 8

7

21 = 8 + 13

8

34 = 13 + 21
Procedural Abstraction

Should return int not string

int fib(int n) {
if(n <= 1)
	
return ā€œ1ā€;
else
	
return fib(n, 2) + fob(n - 1);
}

Expecting 1 argument, not 2

Automatic consistency checks!

There is no procedure ā€˜fobā€™
Procedural Abstraction

int fib(int n) {
if(n <= 1)
	
return 1;
else
	
return fib(n - 2) + fib(n - 1);
}

Automatic generation of correct code!

gcc

_fib:
!
pushq
!
movq
!
subq
!
movl
!
movl
!
cmpl
!
jg
!
movl
!
jmp
LBB1_2:
!
movl
!
subl
!
movl
!
callq
!
movl
!
movl
!
subl
!
movl
!
movl
!
callq
!
movl
!
movl
!
addl
!
movl
LBB1_3:
!
movl
!
movl
!
movl
!
addq
!
popq
!
ret

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3
-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)
-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp
Procedural Abstraction
Is this a correct implementation of Fibonacci?
design patterns
best practices
coding standards
code reviews
pair programming
(unit) testing
bug ļ¬nders
program annotations
debugging

int fib(int n) {
if(n <= 1)
	
return 1;
else
	
return fib(n - 2) + fib(n - 1);
}

Yes, but it is not a very responsive implementation of Fibonacci; its complexity is O(2^n)

Reasoning about behaviour!
Problem
Domain

Solution
Domain
Problem
Domain

Intermediate
Language

Solution
Domain

linguistic abstraction | liNGĖˆgwistik abĖˆstrakSHən |
noun
1. a programming language construct that captures a programming
design pattern
the linguistic abstraction saved a lot of programming eļ¬€ort
he introduced a linguistic abstraction for page navigation in web programming

2. the process of introducing linguistic abstractions
linguistic abstraction for name binding removed the algorithmic encoding of name resolution
Procedural abstraction
Structured control-ļ¬‚ow
Automatic memory management
Data abstraction
Modules
and many more
Church-Turing Thesis++: Any
effective computation can be
expressed with a C program
ā€œA programming language is low level when its programs
require attention to the irrelevantā€. -- Alan Perlis, 1982
ā€œThe enormous growth in data leads to large underlying graphs which require huge amounts of
computational power to analyze. While modern commodity computer systems provide a signiļ¬cant
amount of computational power measured in the tera-ļ¬‚ops, efļ¬cient execution of graph analysis
algorithms on large datasets remains difļ¬cult on these systems [26]. ... it is often challenging
to implement a graph analysis algorithm in an efļ¬cient way.ā€
Sungpack Hong et al. (2012)
Late Failure Detection in Web Applications

browser

server

database

HTML,
JS, CSS

Java

SQL

Data Persistence
Routing
Search
Injection Attacks

Access Control

Zef Hemel, Danny M. Groenewegen, Lennart C. L. Kats, Eelco Visser.
Static consistency checking of web applications with
WebDSL. Journal of Symbolic Computation, 46(2):150-182, 2011.

Data Binding
XSS

Data Validation
...

...
parallel programming (multi-core machines)
distributed systems (web, mobile)
data persistence / services / invariants
security / authentication / authorization / access control
embedded software (resource constraints)
big data analytics (scalability)
programming quantum computers
Problem
Domain

GeneralPurpose
Language

Solution
Domain

ā€œA programming language is low level when its programs
require attention to the irrelevantā€. -- Alan Perlis, 1982
Problem
Domain

DomainSpecific
Language

GeneralPurpose
Language

Domain-speciļ¬c language (DSL)
noun
1. a programming language that provides notation, analysis,
veriļ¬cation, and optimization specialized to an application domain
2. result of linguistic abstraction beyond general-purpose computation

Solution
Domain
Markus PĆ¼schel
Green-Marl: A DSL for Easy and Efļ¬cient Graph Analysis
Sungpack Hong, Hassan Chaļ¬, Eric Sedlar, Kunle Olukotun (ASPLOS 2012)
WebDSL: tier-less web programming
Separation of Concerns & Linguistic Integration
entity Status {
text
: WikiText
author : Person
validate(text.length() <= 140, "Message can only be 140 characters")
}
	
extend entity Person {
following : Set<Person>
}

template output(p: Person) {
navigate profile(p) { output(p.name) }
}
page profile(p: Person) {
// page body
}

statically checked navigation

data model with invariants (automatic data persistence)

function searchPerson(name: String, lim: Int) : List<Person> {
return select p from Person as p
where p.name like ~("%" + name + "%")
limit ~lim;
}

integrated queries (prevent injection attacks)

template update() {
var status := Status{ author := principal() }
	 form{
	
input(status.text)
	
submit action{} { "Share" }
	 }
}

model-view pattern (no controllers)
Problem
Domain

DomainSpecific
Language

GeneralPurpose
Language

Solution
Domain
Problem
Domain

DomainSpecific
Language

Making programming languages
is probably very expensive?

GeneralPurpose
Language

Solution
Domain
Problem
Domain

DomainSpecific
Language

GeneralPurpose
Language

Solution
Domain

GeneralPurpose
Language

Compiler +
Editor (IDE)

Making programming languages
is probably very expensive?

Language
Design
Problem
Domain

DomainSpecific
Language

GeneralPurpose
Language

Solution
Domain

GeneralPurpose
Language

Compiler +
Editor (IDE)

Meta-Linguistic Abstraction

Language
Design

DeclarativeMeta
Languages
Language
Design

DeclarativeMeta
Languages

Compiler +
Editor (IDE)
Language Design
Syntax
Deļ¬nition

Name
Binding

Type
System

Language Workbench
Meta-DSLs

Compiler +
Editor (IDE)

Dynamic
Semantics

Transforms
Language Design
Syntax
Deļ¬nition

Name
Binding

Type
System

Dynamic
Semantics

Spoofax Language Workbench
SDF3

declarative rule-based
language deļ¬nition

Stratego Transformation Language

Compiler +
Editor (IDE)

Transforms
Language Design
Syntax
Deļ¬nition

Syntax Deļ¬nition
with SDF3

Name
Binding

Type
System

Dynamic
Semantics

Spoofax Language Workbench
Stratego Transformation Language

Compiler +
Editor (IDE)

Transforms
Syntax: Phrase Structure of Programs

int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}
Syntax: Phrase Structure of Programs

int

fib ( int

if ( n

<=

return

n)

{

1)
1 ;

else
return
}

fib ( n - 2 )

+

fib ( n - 1 ) ;
Definition.Function

Syntax: Phrase Structure of Programs
Statement.If

Statement.Return
Exp.Add

Exp.Call

ID Param.Param
IntType

int

IntType

fib ( int

n)

Exp.Leq
Exp.Var

{ if ( n

Statement.Return

Exp.Int

<=

1)

Exp.Sub

Exp.Int

return

1 ;

Exp.Var

else

Exp.Call

return

Exp.Sub

Exp.Int Exp.Var Exp.Int

fib ( n - 2 )

+

fib ( n - 1 ) ; }
Function

Abstract
Syntax
Tree

If

Return
Add

Call

Call

Param
IntType

fib

IntType

n

Leq

Return

Sub

Var

Int

Int

n

1

1

Var

fib

n

Sub
Var

Int

2

fib

n

Int

1
int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}

Text

parse

Function(
IntType()
, "fib"
, [Param(IntType(),
, [ If(
Leq(Var("n"),
, Int("1")
, Add(
Call("fib",
, Call("fib",
)
)
]
)

"n")]
Int("1"))

[Sub(Var("n"), Int("2"))])
[Sub(Var("n"), Int("1"))])

Abstract Syntax Term
Definition.Function

Type ID ( Param* ) { Statement* }

Understanding Syntax =
Understanding Tree Structure

Statement.If

if ( Exp ) Statement else Statement
Statement.Return

return

Exp

parse(prettyprint(t)) = t

;

Exp.Add
Exp

+

Exp

Exp.Var
ID

No need to understand
how parse works!
Definition.Function

The Syntax Deļ¬nition Formalism SDF3

Type ID ( Param* ) { Statement* }
Statement.If

if ( Exp ) Statement else Statement
Statement.Return

return

Exp

;

Exp.Add

templates
Definition.Function = <
<Type> <ID>(<Param*; separator=",">) {
<Statement*; separator="n">
}
>
Statement.If = <
if(<Exp>)
<Statement>
else
<Statement>
>
Statement.Return = <return <Exp>;>

Exp

+

Exp

Exp.Var
ID

Exp.Add

= <<Exp> + <Exp>>

Exp.Var

= <<ID>>
Demo: Syntax Deļ¬nition in the Spoofax Language
Workbench
Multi-Purpose Declarative Syntax Deļ¬nition
Parser
Error recovery rules
Statement.If = <
if(<Exp>)
<Statement>
else
<Statement>
>

Syntax Deļ¬nition

Pretty-Printer
Abstract syntax tree schema
Syntactic coloring
Syntactic completion templates
Folding rules
Outline rules
A very incomplete history of SDF
Context-free Grammars

1956

Chomsky

BNF

1963

Backus, Naur

Tomita parsing

1985

Tomita

The Syntax Deļ¬nition Formalism SDF

1988

Heering, Hendriks, Klint, Rekers

Generalized LR Parsing

1992

Rekers

Character level grammars (SDF2)

1995

Visser

Scannerless Generalized LR Parsing

1997

Visser

Disambiguation ļ¬lters

2002

van den Brand, Scheerder, Vinju, Visser

Language embedding

2004

Bravenboer, Visser

SGLR in Java (JSGLR)

2006

Kalleberg

Preventing injection attacks

2010

Bravenboer, Dolstra, Visser

The Spoofax Language Workbench

2010

Kats, Visser

Library-based syntactic language extensibility (SugarJ)

2011

Erdweg, Rendel, KƤstner, Ostermann

Error recovery for SGLR

2012

De Jonge, Kats, Visser, Sƶderberg

Template-based grammar productions (SDF3)

2012

Vollebregt, Kats, Visser

Layout sensitive generalized parsing

2012

Erdweg, Rendel, KƤstner, Ostermann
Language Design
Syntax
Deļ¬nition

Syntax Deļ¬nition
with SDF3

Name
Binding

Type
System

Dynamic
Semantics

Spoofax Language Workbench
Stratego Transformation Language

Compiler +
Editor (IDE)

Transforms
Language Design
Syntax
Deļ¬nition

Name
Binding

Type
System

Dynamic
Semantics

Transforms

Spoofax Language Workbench
SDF3

incremental analysis
& transformation

Stratego Transformation Language

Compiler +
Editor (IDE)

veriļ¬cation of language
design consistency
Language Design
Syntax
Deļ¬nition

Name
Binding

Type
System

Dynamic
Semantics

Transforms

automatic
veriļ¬cation

more declarative
meta-languages
A Language Designerā€™s Workbench
SDF3

Incremental
Compiler

NaBL

Responsive
Editor (IDE)

TS

DynSem

Consistency
Proof

Stratego

Tests
Language Design
Syntax
Deļ¬nition

Name
Binding

Type
System

Dynamic
Semantics

Name Binding Language Designerā€™s Workbench
A
with NaBL
TS

SDF3

Incremental
Compiler

Responsive
Editor (IDE)

DynSem

Consistency
Proof

Transforms

Stratego

Tests
Name Binding & Scope Rules
Needed for
what does this variable refer to?
int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}

which function is being called here?

- checking correct use of names and types
- lookup in interpretation and compilation
- navigation in IDE
- code completion

State-of-the-art
- programmatic encoding of name resolution algorithms

Our contribution
- declarative language for name binding & scope rules
- generation of incremental name resolution algorithm
- Konat, Kats, Wachsmuth, Visser (SLE 2012)
- Wachsmuth, Konat, Vergu, Groenewegen, Visser (SLE 2013)
Deļ¬nitions and References
binding rules
Param(IntType(), ā€œnā€)

Param(t, name) :
defines Variable name

int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}
Var(ā€œnā€)

Var(name) :
refers to Variable name
Deļ¬nitions and References
binding rules
Function(IntType(), ā€œfibā€, [ā€¦], If(ā€¦))

int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}
Call(ā€œfibā€, [ā€¦])

Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Function(t, name, param*, s) :
defines Function name
Call(name, exp*) :
refers to Function name
Scope
binding rules
int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}
int power(int x, int n) {
if(x <= 0)
return 1;
else
return x * power(x, n - 1);
}

Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Function(t, name, param*, s) :
defines Function name
Call(name, exp*) :
refers to Function name
Scope
binding rules
int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}

Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Same name!

int power(int x, int n) {
if(x <= 0)
return 1;
else
return x * power(x, n - 1);
}

Function(t, name, param*, s) :
defines Function name
Call(name, exp*) :
refers to Function name
Scope
binding rules
int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}

Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Wrong!

int power(int x, int n) {
if(x <= 0)
return 1;
else
return x * power(x, n - 1);
}

Function(t, name, param*, s) :
defines Function name
Call(name, exp*) :
refers to Function name
Scope
binding rules
int fib(int n) {
if(n <= 1)
return 1;
else
return fib(n - 2) + fib(n - 1);
}
int power(int x, int n) {
if(x <= 0)
return 1;
else
return x * power(x, n - 1);
}

Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Function(t, name, param*, s) :
defines Function name
scopes Variable
Call(name, exp*) :
refers to Function name
Scope
binding rules
int power(int x, int n) {
int power(int n) {
if(n <= 0)
return 1;
else
return power(n - 1) * x;
}

Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Function(t, name, param*, s) :
defines Function name
scopes Variable, Function

return power(n);
}

Call(name, exp*) :
refers to Function name
Demo: Name Binding in the Spoofax Language Workbench
Declarative Name Binding and Scope Rules

binding rules
Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Function(t, name, param*, s) :
defines Function name
scopes Variable, Function
Call(name, exp*) :
refers to Function name

Incremental name resolution algorithm
Name checks
Reference resolution
Semantic code completion
Semantics of Name Binding?

binding rules

Research: how to characterize correctness of the result of
name resolution without appealing to the algorithm itself?

Param(t, name) :
defines Variable name
Var(name) :
refers to Variable name
Function(t, name, param*, s) :
defines Function name
scopes Variable, Function
Call(name, exp*) :
refers to Function name
Analogy: declarative semantics of syntax deļ¬nition
Language Design
Syntax
Deļ¬nition

Name
Binding

Type
System

Dynamic
Semantics

Name Binding
Language Designerā€™s Workbench
with NaBL
TS

SDF3

Incremental
Compiler

Responsive
Editor (IDE)

DynSem

Consistency
Proof

Transforms

Stratego

Tests
Language Design
Syntax
Deļ¬nition

Name
Binding

Type
System

Dynamic
Semantics

Transforms

Language Designerā€™s Workbench
SDF3

Incremental
Compiler

NaBL

Responsive
Editor (IDE)

TS

DynSem

Consistency
Proof

Stratego

Tests
Spoofax 2.0: Prototype the Language Designerā€™s Workbench
capturing understanding of language deļ¬nition

templates // statements
Statement.Return =
<return <Exp>;>
Statement.If = <
if(<Exp>)
<Statement>
else
<Statement>
>

binding rules

type rules

Param(t, name) :
defines Variable name
of type t
Var(name) :
refers to Variable name

Incremental
Compiler

rules

Call(name, exp*) : t
where definition of
name : (t*, t)
and exp* : t_exp*
and t_exp* == t*

Responsive
Editor (IDE)

rules

e --> True(), s1 --> v
---------------------If(e, s1, s2) --> v
e --> False(), s2 --> v
----------------------If(e, s1, s2) --> v

Consistency
Proof

Tests

translate :
Call(f, e*) -> [
<translate> e*,
Callq(f),
Movl(Reg("r"), Reg("t"))
]
computer
user

WebLab, researchr,
YellowGrass, ...

WebDSL, KeyBridge,
Green-Marl, SugarJ

Spoofax, SDF3, Stratego
NaBL, TS, DynSem

software

_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

programming
language

software
engineer
_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

metalanguage

language
designer
_fib:
!
!
!
!
!
!
!
!
!
LBB1_2:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
LBB1_3:
!
!
!
!
!
!

pushq
movq
subq
movl
movl
cmpl
jg
movl
jmp

%rbp
%rsp, %rbp
$16, %rsp
%edi, -4(%rbp)
-4(%rbp), %eax
$1, %eax
LBB1_2
$1, -12(%rbp)
LBB1_3

movl
subl
movl
callq
movl
movl
subl
movl
movl
callq
movl
movl
addl
movl

-4(%rbp), %eax
$2, %eax
%eax, %edi
_fib
%eax, %ecx
-4(%rbp), %edx
$1, %edx !
%ecx, -16(%rbp)
%edx, %edi
_fib
%eax, %ecx
-16(%rbp), %edx
%ecx, %edx
%edx, -12(%rbp)

movl
movl
movl
addq
popq
ret

-12(%rbp), %eax
%eax, -8(%rbp)
-8(%rbp), %eax
$16, %rsp
%rbp

language
engineer
Education
Software languages are the instruments that allow us to
turn computational thinking into computation
A computer science education should prepare its
students to co-evolve with the changing language
landscape, learn new technologies as they emerge,
contribute to their development, and apply them in new
contexts
That requires students to develop an understanding of
the fundamentals of computing, rather than just
acquire a set of speciļ¬c skills
Modernizing Programming Education
Concepts of Programming Languages
- Study modern programming languages
- Functional + OO (Scala)
- Prototype based inheritance (JavaScript)
- Connections with other disciplines
Model-Driven Software Development
- Language design project
Compiler Construction
- Using language workbench
- Complete compiler + IDE in one semester
- Connection with research
Extending Curriculum
- program analysis, formal semantics, veriļ¬cation, ...
ā€˜ICT in Educationā€™

EvaTool: automate the course evaluation workļ¬‚ow

researchr: bibliography management for literature surveys

WebLab: learning management system for programming education

Improving efļ¬ciency and effectiveness of organization
WebLab
Programming education
in the browser

Program in browser
Compile on server
Automatic grading
with unit testing
Instructor uses
same environment
Thanks!
Family
Connie Visser
Wim Visser
Janine Mets
Jelle Visser
Bente Visser
Employers
Board TU Delft

Paul Klint (UvA)

EEMCS Faculty

Andrew Tolmach (OGI)

AvL Committee

Doaitse Swierstra (UU)
Arie van Deursen
Henk Sips
Rob Fastenau
Karel Luyben
Research Group
(1998-2006)

Anya Bagge
Martin Bravenboer
Eelco Dolstra
Merijn de Jonge

Karl Kalleberg
Karina Olmos
Rob Vermaas

Sander Mak
Roy van den Broek
Armijn Hemel
Jory van Zessen
Bogdan Dumitriu
Remko van Beusekom
Rene de Groot
Niels Janssen
Arthur van Dam

Spoofax
WebDSL
DisNix
Hydra

Sander van der Burg
Eelco Dolstra
Danny Groenewegen
Maartje de Jonge
Zef Hemel

Lennart Kats
Rob Vermaas
Sander Vermolen
Guido Wachsmuth

Richard Vogelij
Oskar van Rest
Chris Gersen
Elmer van Chastelet
Nathan Bruning
Ricky Lindeman
AndrƩ Miguel SimƵes
Dias Vieira
Tobi Vollebregt
Vlad Vergu

LuĆ­s Amorim
Elmer van Chastelet
Danny Groenewegen
Gabriƫl Konat

Pierre Neron
Augusto Passalaqua
Vlad Vergu
Guido Wachsmuth

Stratego/XT
Nix

(2006-2013)

Language
Designerā€™s
Workbench
(2013-2018)

Mircea Voda
Daco Harkes

Jozef Kruger
Jonne van Wijngaarden
Alan van Dam
Robert Anisko
Lennart Swart
Hedzer Westra
Arne de Bruijn

Gabriƫl Konat
Sverre Rabbelier
Nami Nasserazad
Ruben Verhaaf
Wouter Mouw
Michel Weststrate
Jippe Holwerda
Nicolas Pierron
Jonathan Joubert
Sponsors

Oracle Labs
Philips Research
Jacquard, Open Competition, VICI

SERC
The Future of Programming
Arie van Deursen
Brandon Hill
Daan Leijen
Erik Meijer
Guido Wachsmuth
Harry Buhrman
Herman Geuvers

John Hughes
Manuel Serrano
Markus PĆ¼schel
Markus Vƶlter
Sebastian Erdweg
Stefan Hanenberg
Tiark Rompf

More Related Content

Similar to Programming languages shape computational thinking

Owf 2013 rii moose speaker 2
Owf 2013 rii moose speaker 2Owf 2013 rii moose speaker 2
Owf 2013 rii moose speaker 2Patrick MOREAU
Ā 
The Mystery of Natural Language Processing
The Mystery of Natural Language ProcessingThe Mystery of Natural Language Processing
The Mystery of Natural Language ProcessingMahmood Aijazi, MD
Ā 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For ManagersAtul Shridhar
Ā 
Php performance-talk
Php performance-talkPhp performance-talk
Php performance-talkSherif Ramadan
Ā 
Large Scale Text Processing
Large Scale Text ProcessingLarge Scale Text Processing
Large Scale Text ProcessingSuneel Marthi
Ā 
Large Scale Processing of Unstructured Text
Large Scale Processing of Unstructured TextLarge Scale Processing of Unstructured Text
Large Scale Processing of Unstructured TextDataWorks Summit
Ā 
Pooja H
Pooja H Pooja H
Pooja H PoojaH35
Ā 
Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...BookNet Canada
Ā 
YAPC::EU::2009 - How Opera Software uses Perl
YAPC::EU::2009 - How Opera Software uses PerlYAPC::EU::2009 - How Opera Software uses Perl
YAPC::EU::2009 - How Opera Software uses PerlCosimo Streppone
Ā 
Julia: compiler and community
Julia: compiler and communityJulia: compiler and community
Julia: compiler and communityJiahao Chen
Ā 
Big Data Spain 2017 - Deriving Actionable Insights from High Volume Media St...
Big Data Spain 2017  - Deriving Actionable Insights from High Volume Media St...Big Data Spain 2017  - Deriving Actionable Insights from High Volume Media St...
Big Data Spain 2017 - Deriving Actionable Insights from High Volume Media St...Apache OpenNLP
Ā 
Lecture1 compilers
Lecture1 compilersLecture1 compilers
Lecture1 compilersAftab Ahmad
Ā 
Rrw02 Week 1 Assignment
Rrw02 Week 1 AssignmentRrw02 Week 1 Assignment
Rrw02 Week 1 AssignmentSheri Elliott
Ā 
Evaluation of morden computer & system attributes in ACA
Evaluation of morden computer &  system attributes in ACAEvaluation of morden computer &  system attributes in ACA
Evaluation of morden computer & system attributes in ACAPankaj Kumar Jain
Ā 
Computer program, computer languages, computer software
Computer program, computer languages, computer softwareComputer program, computer languages, computer software
Computer program, computer languages, computer softwareSweta Kumari Barnwal
Ā 
Machine Tanslation
Machine TanslationMachine Tanslation
Machine TanslationMahsa Mohaghegh
Ā 
Introduction to computer software
Introduction to computer softwareIntroduction to computer software
Introduction to computer softwareManvendra Singh
Ā 
Introduction to computer software
Introduction to computer softwareIntroduction to computer software
Introduction to computer softwareDeepu Chaudhary
Ā 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system conceptsGreen Ecosystem
Ā 

Similar to Programming languages shape computational thinking (20)

Owf 2013 rii moose speaker 2
Owf 2013 rii moose speaker 2Owf 2013 rii moose speaker 2
Owf 2013 rii moose speaker 2
Ā 
The Mystery of Natural Language Processing
The Mystery of Natural Language ProcessingThe Mystery of Natural Language Processing
The Mystery of Natural Language Processing
Ā 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For Managers
Ā 
Php performance-talk
Php performance-talkPhp performance-talk
Php performance-talk
Ā 
Large Scale Text Processing
Large Scale Text ProcessingLarge Scale Text Processing
Large Scale Text Processing
Ā 
Large Scale Processing of Unstructured Text
Large Scale Processing of Unstructured TextLarge Scale Processing of Unstructured Text
Large Scale Processing of Unstructured Text
Ā 
Pooja H
Pooja H Pooja H
Pooja H
Ā 
Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...
Ā 
YAPC::EU::2009 - How Opera Software uses Perl
YAPC::EU::2009 - How Opera Software uses PerlYAPC::EU::2009 - How Opera Software uses Perl
YAPC::EU::2009 - How Opera Software uses Perl
Ā 
Julia: compiler and community
Julia: compiler and communityJulia: compiler and community
Julia: compiler and community
Ā 
IN4308 1
IN4308 1IN4308 1
IN4308 1
Ā 
Big Data Spain 2017 - Deriving Actionable Insights from High Volume Media St...
Big Data Spain 2017  - Deriving Actionable Insights from High Volume Media St...Big Data Spain 2017  - Deriving Actionable Insights from High Volume Media St...
Big Data Spain 2017 - Deriving Actionable Insights from High Volume Media St...
Ā 
Lecture1 compilers
Lecture1 compilersLecture1 compilers
Lecture1 compilers
Ā 
Rrw02 Week 1 Assignment
Rrw02 Week 1 AssignmentRrw02 Week 1 Assignment
Rrw02 Week 1 Assignment
Ā 
Evaluation of morden computer & system attributes in ACA
Evaluation of morden computer &  system attributes in ACAEvaluation of morden computer &  system attributes in ACA
Evaluation of morden computer & system attributes in ACA
Ā 
Computer program, computer languages, computer software
Computer program, computer languages, computer softwareComputer program, computer languages, computer software
Computer program, computer languages, computer software
Ā 
Machine Tanslation
Machine TanslationMachine Tanslation
Machine Tanslation
Ā 
Introduction to computer software
Introduction to computer softwareIntroduction to computer software
Introduction to computer software
Ā 
Introduction to computer software
Introduction to computer softwareIntroduction to computer software
Introduction to computer software
Ā 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
Ā 

More from Eelco Visser

CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingCS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingEelco Visser
Ā 
CS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic ServicesCS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic ServicesEelco Visser
Ā 
CS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | ParsingCS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | ParsingEelco Visser
Ā 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionEelco Visser
Ā 
CS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: IntroductionCS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: IntroductionEelco Visser
Ā 
A Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation RulesA Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation RulesEelco Visser
Ā 
Declarative Type System Specification with Statix
Declarative Type System Specification with StatixDeclarative Type System Specification with Statix
Declarative Type System Specification with StatixEelco Visser
Ā 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionEelco Visser
Ā 
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Eelco Visser
Ā 
Compiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementCompiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementEelco Visser
Ā 
Compiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersCompiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersEelco Visser
Ā 
Compiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code GenerationCompiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code GenerationEelco Visser
Ā 
Compiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual MachinesCompiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual MachinesEelco Visser
Ā 
Compiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone FrameworksCompiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone FrameworksEelco Visser
Ā 
Compiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow AnalysisCompiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow AnalysisEelco Visser
Ā 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionEelco Visser
Ā 
Compiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsCompiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsEelco Visser
Ā 
Compiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingEelco Visser
Ā 
Compiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static AnalysisCompiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static AnalysisEelco Visser
Ā 
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingCompiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingEelco Visser
Ā 

More from Eelco Visser (20)

CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingCS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
Ā 
CS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic ServicesCS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic Services
Ā 
CS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | ParsingCS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | Parsing
Ā 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definition
Ā 
CS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: IntroductionCS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: Introduction
Ā 
A Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation RulesA Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation Rules
Ā 
Declarative Type System Specification with Statix
Declarative Type System Specification with StatixDeclarative Type System Specification with Statix
Declarative Type System Specification with Statix
Ā 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Ā 
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Ā 
Compiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementCompiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory Management
Ā 
Compiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersCompiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | Interpreters
Ā 
Compiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code GenerationCompiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code Generation
Ā 
Compiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual MachinesCompiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual Machines
Ā 
Compiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone FrameworksCompiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone Frameworks
Ā 
Compiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow AnalysisCompiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow Analysis
Ā 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint Resolution
Ā 
Compiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsCompiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type Constraints
Ā 
Compiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type Checking
Ā 
Compiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static AnalysisCompiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static Analysis
Ā 
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingCompiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Ā 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
Ā 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
Ā 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
Ā 
Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024The Digital Insurer
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
Ā 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
Ā 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
Ā 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
Ā 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
Ā 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜RTylerCroy
Ā 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
Ā 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Ā 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
Ā 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Ā 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Ā 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Ā 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Ā 

Programming languages shape computational thinking

  • 1. `Programming Languages shape Computational Thinkingā€™ Intreerede prof. dr. Eelco Visser Hoogleraar Programming Languages 17 Januari 2014 Challenge the future 1
  • 2. This Lecture repeat n times variation-of(same-argument) for(p in important-people) thank-you(p) for(p in audience) individual-quiz(p) def same-argument = ā€œProgramming Languages shape Computational Thinkingā€
  • 3. Automatisering beperkt wachttijd rijexamen Automatisering landbouw teveel zaak van koplopers Ondernemingsraden Ā in Ā banksector Ā willen Ā  automatisering Ā onder Ā controle Ā krijgen Automatisering Ā mislukt Ā bij Ā helft Ā bedrijven Grote behoefte aan personeel automatisering De PC, een algemeen gebruikt, maar toch ingewikkeld gereedschap Artsen bekijken nut computer Mensen zijn geen verlengstuk van de computer Kosten automatisering overheid stijgen snel Vrouw en computer Automatisering politie is verkapte bezuiniging Werknemers onvoldoende bij automatisering betrokken Source: http://kranten.kb.nl
  • 4. Software systems are the engines of modern information society
  • 5. Software systems are for people
  • 6. Software should ā€˜just workā€™ easy to use safe cheap (free!) responsive scale reliable donā€™t lose data keep data private help catch terrorists
  • 7. Software is encoded computational thinking software _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp
  • 8. Software engineers are the architects and mechanics of modern information society computer user software _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp software engineer
  • 9. Software engineering provides the tools that let software engineers do a good job design patterns best practices coding standards code reviews pair programming (unit) testing debugging computer user software _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp software engineer
  • 10. Programming languages are the key tools in the encoding process computer user software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp
  • 11. Programming languages are software systems too computer user software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp compiler interpreter type checker editor (IDE) refactorings bug ļ¬nders
  • 12. Programming languages should ā€˜just workā€™ computer user software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp easy to use safe cheap (free!) responsive scale reliable
  • 13. Language designers create programming languages computer user software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp language designer
  • 14. Language engineering provides the tools that let language designers do a good job computer user software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp language designer
  • 15. Meta-languages support the encoding of language designs computer user software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp metalanguage language designer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp language engineer
  • 16. Language engineers eat their own dogfood computer user software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp metalanguage language designer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp language engineer
  • 17. Software is encoded computational thinking _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp
  • 18. Software is encoded computational thinking _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp modeling mechanical computation Alan Turing 1912 - 1954
  • 19. Turing Machine current tape state $ 0 0 1 0 $ 0 0 1 1 2 $ 0 0 0 0 $ 0 1 0 1 3 1 $ $ R 2 2 0 0 R 2 Alan Turing 1936 2 1 1 L 3 2 $ $ R H current state Church-Turing Thesis: Any effective computation can be expressed with a Turing Machine current symbol 3 0 0 L 3 3 1 1 L 3 3 $ $ R 4 new symbol next state move tape
  • 20. Turing Machine 1 $ 0 0 0 0 $ 0 1 0 1 Add two binary numbers $ 0 0 1 0 $ 0 0 1 1 H 1 $ $ R 2 41 0 R 4 8 1 1 R 8 2 1 1 L 3 4$ $ L 5 8 $ $ L 9 2 $ $ R H 5 1 0 L 5 9 1 0 L 9 3 0 0 L 3 5 0 1 L 6 9 0 1 L 10 3 1 1 L 3 6 0 0 L 6 10 0 0 L 10 3 $ $ R 4 Church-Turing Thesis: Any effective computation can be expressed with a Turing Machine 8 0 0 R 8 2 0 0 R 2 is zero? 40 1 R 4 6 1 1 L 6 10 1 1 L 10 6 $ $ R 7 10 $ $ L 11 7 0 1 R 7 11 0 0 L 11 7 1 0 R 7 11 1 1 L 11 7 $ $ R 8 12 $ $ R 2 subtract one add one back repeat Alan Turing 1936
  • 21. Universal Turing Machine program $ data S Universal Program (Turing Machine Interpreter) Halting problem: given a Turing Machine program P, does P halt for any input data? Undeci dable! Alan Turing 1936
  • 22. world bus Von Neumann control unit data ALU Simple Instructions add, subtract fetch, store ā€¦ registers program CPU memory Alan Turing
  • 23. n 0 1 1 1 2 2=1+1 3 3=1+2 4 5=2+3 5 8=3+5 6 13 = 5 + 8 7 21 = 8 + 13 8 Example: a procedure for computing Fibonacci numbers n-th ļ¬bonacci 34 = 13 + 21
  • 24. n 0 1 1 1 2 2=1+1 3 3=1+2 4 5=2+3 5 8=3+5 6 13 = 5 + 8 7 21 = 8 + 13 8 Example: a procedure for computing Fibonacci numbers n-th ļ¬bonacci 34 = 13 + 21
  • 25. compute n-th ļ¬bonacci number if n less or equal to 1 result is 1 compute (n-2)-nd ļ¬bonacci number compute (n-1)-th ļ¬bonacci number add the results return to caller _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp 0 1 2 2=1+1 3 3=1+2 4 5=2+3 5 by calling _ļ¬b 1 1 by calling _ļ¬b n-th ļ¬bonacci 8=3+5 6 13 = 5 + 8 7 21 = 8 + 13 8 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) n 34 = 13 + 21
  • 26. procedure has label _ļ¬b pass argument in %edi register The Procedure Design Pattern pass return value in %eax register use 16 bytes for stack frame _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp procedure entry set up stack frame get argument(s) procedure deļ¬nition pass argument(s) call procedure get return value procedure call pass argument(s) call procedure get return value procedure call return value unwind stack return to caller
  • 27. design patterns best practices coding standards code reviews pair programming (unit) testing bug ļ¬nders program annotations debugging _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp procedure entry set up stack frame get argument(s) procedure deļ¬nition pass argument(s) call procedure get return value procedure call pass argument(s) call procedure get return value procedure call return value unwind stack return to caller
  • 28. Procedural Abstraction int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } The C Programming Language - Kernighan & Ritchie (1988) A declarative language for specifying procedures
  • 29. Procedural Abstraction procedure deļ¬nition int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } procedure call Procedure design pattern captured in linguistic abstraction
  • 30. Procedural Abstraction n 0 compute (n-2)-th compute (n-1)-th ļ¬bonacci number ļ¬bonacci number add results return to caller Self explanatory code! 1 2 2=1+1 3 3=1+2 4 5=2+3 5 8=3+5 6 int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } 1 1 compute n-th ļ¬bonacci number n-th ļ¬bonacci 13 = 5 + 8 7 21 = 8 + 13 8 34 = 13 + 21
  • 31. Procedural Abstraction Should return int not string int fib(int n) { if(n <= 1) return ā€œ1ā€; else return fib(n, 2) + fob(n - 1); } Expecting 1 argument, not 2 Automatic consistency checks! There is no procedure ā€˜fobā€™
  • 32. Procedural Abstraction int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } Automatic generation of correct code! gcc _fib: ! pushq ! movq ! subq ! movl ! movl ! cmpl ! jg ! movl ! jmp LBB1_2: ! movl ! subl ! movl ! callq ! movl ! movl ! subl ! movl ! movl ! callq ! movl ! movl ! addl ! movl LBB1_3: ! movl ! movl ! movl ! addq ! popq ! ret %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp
  • 33. Procedural Abstraction Is this a correct implementation of Fibonacci? design patterns best practices coding standards code reviews pair programming (unit) testing bug ļ¬nders program annotations debugging int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } Yes, but it is not a very responsive implementation of Fibonacci; its complexity is O(2^n) Reasoning about behaviour!
  • 35. Problem Domain Intermediate Language Solution Domain linguistic abstraction | liNGĖˆgwistik abĖˆstrakSHən | noun 1. a programming language construct that captures a programming design pattern the linguistic abstraction saved a lot of programming eļ¬€ort he introduced a linguistic abstraction for page navigation in web programming 2. the process of introducing linguistic abstractions linguistic abstraction for name binding removed the algorithmic encoding of name resolution
  • 36. Procedural abstraction Structured control-ļ¬‚ow Automatic memory management Data abstraction Modules and many more
  • 37. Church-Turing Thesis++: Any effective computation can be expressed with a C program
  • 38. ā€œA programming language is low level when its programs require attention to the irrelevantā€. -- Alan Perlis, 1982
  • 39.
  • 40. ā€œThe enormous growth in data leads to large underlying graphs which require huge amounts of computational power to analyze. While modern commodity computer systems provide a signiļ¬cant amount of computational power measured in the tera-ļ¬‚ops, efļ¬cient execution of graph analysis algorithms on large datasets remains difļ¬cult on these systems [26]. ... it is often challenging to implement a graph analysis algorithm in an efļ¬cient way.ā€ Sungpack Hong et al. (2012)
  • 41. Late Failure Detection in Web Applications browser server database HTML, JS, CSS Java SQL Data Persistence Routing Search Injection Attacks Access Control Zef Hemel, Danny M. Groenewegen, Lennart C. L. Kats, Eelco Visser. Static consistency checking of web applications with WebDSL. Journal of Symbolic Computation, 46(2):150-182, 2011. Data Binding XSS Data Validation ... ...
  • 42. parallel programming (multi-core machines) distributed systems (web, mobile) data persistence / services / invariants security / authentication / authorization / access control embedded software (resource constraints) big data analytics (scalability) programming quantum computers
  • 43. Problem Domain GeneralPurpose Language Solution Domain ā€œA programming language is low level when its programs require attention to the irrelevantā€. -- Alan Perlis, 1982
  • 44. Problem Domain DomainSpecific Language GeneralPurpose Language Domain-speciļ¬c language (DSL) noun 1. a programming language that provides notation, analysis, veriļ¬cation, and optimization specialized to an application domain 2. result of linguistic abstraction beyond general-purpose computation Solution Domain
  • 46. Green-Marl: A DSL for Easy and Efļ¬cient Graph Analysis Sungpack Hong, Hassan Chaļ¬, Eric Sedlar, Kunle Olukotun (ASPLOS 2012)
  • 47. WebDSL: tier-less web programming Separation of Concerns & Linguistic Integration entity Status { text : WikiText author : Person validate(text.length() <= 140, "Message can only be 140 characters") } extend entity Person { following : Set<Person> } template output(p: Person) { navigate profile(p) { output(p.name) } } page profile(p: Person) { // page body } statically checked navigation data model with invariants (automatic data persistence) function searchPerson(name: String, lim: Int) : List<Person> { return select p from Person as p where p.name like ~("%" + name + "%") limit ~lim; } integrated queries (prevent injection attacks) template update() { var status := Status{ author := principal() } form{ input(status.text) submit action{} { "Share" } } } model-view pattern (no controllers)
  • 49. Problem Domain DomainSpecific Language Making programming languages is probably very expensive? GeneralPurpose Language Solution Domain
  • 54. Language Design Syntax Deļ¬nition Name Binding Type System Dynamic Semantics Spoofax Language Workbench SDF3 declarative rule-based language deļ¬nition Stratego Transformation Language Compiler + Editor (IDE) Transforms
  • 55. Language Design Syntax Deļ¬nition Syntax Deļ¬nition with SDF3 Name Binding Type System Dynamic Semantics Spoofax Language Workbench Stratego Transformation Language Compiler + Editor (IDE) Transforms
  • 56. Syntax: Phrase Structure of Programs int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); }
  • 57. Syntax: Phrase Structure of Programs int fib ( int if ( n <= return n) { 1) 1 ; else return } fib ( n - 2 ) + fib ( n - 1 ) ;
  • 58. Definition.Function Syntax: Phrase Structure of Programs Statement.If Statement.Return Exp.Add Exp.Call ID Param.Param IntType int IntType fib ( int n) Exp.Leq Exp.Var { if ( n Statement.Return Exp.Int <= 1) Exp.Sub Exp.Int return 1 ; Exp.Var else Exp.Call return Exp.Sub Exp.Int Exp.Var Exp.Int fib ( n - 2 ) + fib ( n - 1 ) ; }
  • 60. int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } Text parse Function( IntType() , "fib" , [Param(IntType(), , [ If( Leq(Var("n"), , Int("1") , Add( Call("fib", , Call("fib", ) ) ] ) "n")] Int("1")) [Sub(Var("n"), Int("2"))]) [Sub(Var("n"), Int("1"))]) Abstract Syntax Term
  • 61. Definition.Function Type ID ( Param* ) { Statement* } Understanding Syntax = Understanding Tree Structure Statement.If if ( Exp ) Statement else Statement Statement.Return return Exp parse(prettyprint(t)) = t ; Exp.Add Exp + Exp Exp.Var ID No need to understand how parse works!
  • 62. Definition.Function The Syntax Deļ¬nition Formalism SDF3 Type ID ( Param* ) { Statement* } Statement.If if ( Exp ) Statement else Statement Statement.Return return Exp ; Exp.Add templates Definition.Function = < <Type> <ID>(<Param*; separator=",">) { <Statement*; separator="n"> } > Statement.If = < if(<Exp>) <Statement> else <Statement> > Statement.Return = <return <Exp>;> Exp + Exp Exp.Var ID Exp.Add = <<Exp> + <Exp>> Exp.Var = <<ID>>
  • 63. Demo: Syntax Deļ¬nition in the Spoofax Language Workbench
  • 64. Multi-Purpose Declarative Syntax Deļ¬nition Parser Error recovery rules Statement.If = < if(<Exp>) <Statement> else <Statement> > Syntax Deļ¬nition Pretty-Printer Abstract syntax tree schema Syntactic coloring Syntactic completion templates Folding rules Outline rules
  • 65. A very incomplete history of SDF Context-free Grammars 1956 Chomsky BNF 1963 Backus, Naur Tomita parsing 1985 Tomita The Syntax Deļ¬nition Formalism SDF 1988 Heering, Hendriks, Klint, Rekers Generalized LR Parsing 1992 Rekers Character level grammars (SDF2) 1995 Visser Scannerless Generalized LR Parsing 1997 Visser Disambiguation ļ¬lters 2002 van den Brand, Scheerder, Vinju, Visser Language embedding 2004 Bravenboer, Visser SGLR in Java (JSGLR) 2006 Kalleberg Preventing injection attacks 2010 Bravenboer, Dolstra, Visser The Spoofax Language Workbench 2010 Kats, Visser Library-based syntactic language extensibility (SugarJ) 2011 Erdweg, Rendel, KƤstner, Ostermann Error recovery for SGLR 2012 De Jonge, Kats, Visser, Sƶderberg Template-based grammar productions (SDF3) 2012 Vollebregt, Kats, Visser Layout sensitive generalized parsing 2012 Erdweg, Rendel, KƤstner, Ostermann
  • 66. Language Design Syntax Deļ¬nition Syntax Deļ¬nition with SDF3 Name Binding Type System Dynamic Semantics Spoofax Language Workbench Stratego Transformation Language Compiler + Editor (IDE) Transforms
  • 67. Language Design Syntax Deļ¬nition Name Binding Type System Dynamic Semantics Transforms Spoofax Language Workbench SDF3 incremental analysis & transformation Stratego Transformation Language Compiler + Editor (IDE) veriļ¬cation of language design consistency
  • 68. Language Design Syntax Deļ¬nition Name Binding Type System Dynamic Semantics Transforms automatic veriļ¬cation more declarative meta-languages A Language Designerā€™s Workbench SDF3 Incremental Compiler NaBL Responsive Editor (IDE) TS DynSem Consistency Proof Stratego Tests
  • 69. Language Design Syntax Deļ¬nition Name Binding Type System Dynamic Semantics Name Binding Language Designerā€™s Workbench A with NaBL TS SDF3 Incremental Compiler Responsive Editor (IDE) DynSem Consistency Proof Transforms Stratego Tests
  • 70. Name Binding & Scope Rules Needed for what does this variable refer to? int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } which function is being called here? - checking correct use of names and types - lookup in interpretation and compilation - navigation in IDE - code completion State-of-the-art - programmatic encoding of name resolution algorithms Our contribution - declarative language for name binding & scope rules - generation of incremental name resolution algorithm - Konat, Kats, Wachsmuth, Visser (SLE 2012) - Wachsmuth, Konat, Vergu, Groenewegen, Visser (SLE 2013)
  • 71. Deļ¬nitions and References binding rules Param(IntType(), ā€œnā€) Param(t, name) : defines Variable name int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } Var(ā€œnā€) Var(name) : refers to Variable name
  • 72. Deļ¬nitions and References binding rules Function(IntType(), ā€œfibā€, [ā€¦], If(ā€¦)) int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } Call(ā€œfibā€, [ā€¦]) Param(t, name) : defines Variable name Var(name) : refers to Variable name Function(t, name, param*, s) : defines Function name Call(name, exp*) : refers to Function name
  • 73. Scope binding rules int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } int power(int x, int n) { if(x <= 0) return 1; else return x * power(x, n - 1); } Param(t, name) : defines Variable name Var(name) : refers to Variable name Function(t, name, param*, s) : defines Function name Call(name, exp*) : refers to Function name
  • 74. Scope binding rules int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } Param(t, name) : defines Variable name Var(name) : refers to Variable name Same name! int power(int x, int n) { if(x <= 0) return 1; else return x * power(x, n - 1); } Function(t, name, param*, s) : defines Function name Call(name, exp*) : refers to Function name
  • 75. Scope binding rules int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } Param(t, name) : defines Variable name Var(name) : refers to Variable name Wrong! int power(int x, int n) { if(x <= 0) return 1; else return x * power(x, n - 1); } Function(t, name, param*, s) : defines Function name Call(name, exp*) : refers to Function name
  • 76. Scope binding rules int fib(int n) { if(n <= 1) return 1; else return fib(n - 2) + fib(n - 1); } int power(int x, int n) { if(x <= 0) return 1; else return x * power(x, n - 1); } Param(t, name) : defines Variable name Var(name) : refers to Variable name Function(t, name, param*, s) : defines Function name scopes Variable Call(name, exp*) : refers to Function name
  • 77. Scope binding rules int power(int x, int n) { int power(int n) { if(n <= 0) return 1; else return power(n - 1) * x; } Param(t, name) : defines Variable name Var(name) : refers to Variable name Function(t, name, param*, s) : defines Function name scopes Variable, Function return power(n); } Call(name, exp*) : refers to Function name
  • 78. Demo: Name Binding in the Spoofax Language Workbench
  • 79. Declarative Name Binding and Scope Rules binding rules Param(t, name) : defines Variable name Var(name) : refers to Variable name Function(t, name, param*, s) : defines Function name scopes Variable, Function Call(name, exp*) : refers to Function name Incremental name resolution algorithm Name checks Reference resolution Semantic code completion
  • 80. Semantics of Name Binding? binding rules Research: how to characterize correctness of the result of name resolution without appealing to the algorithm itself? Param(t, name) : defines Variable name Var(name) : refers to Variable name Function(t, name, param*, s) : defines Function name scopes Variable, Function Call(name, exp*) : refers to Function name Analogy: declarative semantics of syntax deļ¬nition
  • 81. Language Design Syntax Deļ¬nition Name Binding Type System Dynamic Semantics Name Binding Language Designerā€™s Workbench with NaBL TS SDF3 Incremental Compiler Responsive Editor (IDE) DynSem Consistency Proof Transforms Stratego Tests
  • 82. Language Design Syntax Deļ¬nition Name Binding Type System Dynamic Semantics Transforms Language Designerā€™s Workbench SDF3 Incremental Compiler NaBL Responsive Editor (IDE) TS DynSem Consistency Proof Stratego Tests
  • 83. Spoofax 2.0: Prototype the Language Designerā€™s Workbench capturing understanding of language deļ¬nition templates // statements Statement.Return = <return <Exp>;> Statement.If = < if(<Exp>) <Statement> else <Statement> > binding rules type rules Param(t, name) : defines Variable name of type t Var(name) : refers to Variable name Incremental Compiler rules Call(name, exp*) : t where definition of name : (t*, t) and exp* : t_exp* and t_exp* == t* Responsive Editor (IDE) rules e --> True(), s1 --> v ---------------------If(e, s1, s2) --> v e --> False(), s2 --> v ----------------------If(e, s1, s2) --> v Consistency Proof Tests translate : Call(f, e*) -> [ <translate> e*, Callq(f), Movl(Reg("r"), Reg("t")) ]
  • 84. computer user WebLab, researchr, YellowGrass, ... WebDSL, KeyBridge, Green-Marl, SugarJ Spoofax, SDF3, Stratego NaBL, TS, DynSem software _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp programming language software engineer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp metalanguage language designer _fib: ! ! ! ! ! ! ! ! ! LBB1_2: ! ! ! ! ! ! ! ! ! ! ! ! ! ! LBB1_3: ! ! ! ! ! ! pushq movq subq movl movl cmpl jg movl jmp %rbp %rsp, %rbp $16, %rsp %edi, -4(%rbp) -4(%rbp), %eax $1, %eax LBB1_2 $1, -12(%rbp) LBB1_3 movl subl movl callq movl movl subl movl movl callq movl movl addl movl -4(%rbp), %eax $2, %eax %eax, %edi _fib %eax, %ecx -4(%rbp), %edx $1, %edx ! %ecx, -16(%rbp) %edx, %edi _fib %eax, %ecx -16(%rbp), %edx %ecx, %edx %edx, -12(%rbp) movl movl movl addq popq ret -12(%rbp), %eax %eax, -8(%rbp) -8(%rbp), %eax $16, %rsp %rbp language engineer
  • 86. Software languages are the instruments that allow us to turn computational thinking into computation A computer science education should prepare its students to co-evolve with the changing language landscape, learn new technologies as they emerge, contribute to their development, and apply them in new contexts That requires students to develop an understanding of the fundamentals of computing, rather than just acquire a set of speciļ¬c skills
  • 87. Modernizing Programming Education Concepts of Programming Languages - Study modern programming languages - Functional + OO (Scala) - Prototype based inheritance (JavaScript) - Connections with other disciplines Model-Driven Software Development - Language design project Compiler Construction - Using language workbench - Complete compiler + IDE in one semester - Connection with research Extending Curriculum - program analysis, formal semantics, veriļ¬cation, ...
  • 88. ā€˜ICT in Educationā€™ EvaTool: automate the course evaluation workļ¬‚ow researchr: bibliography management for literature surveys WebLab: learning management system for programming education Improving efļ¬ciency and effectiveness of organization
  • 89. WebLab Programming education in the browser Program in browser Compile on server Automatic grading with unit testing Instructor uses same environment
  • 91. Family Connie Visser Wim Visser Janine Mets Jelle Visser Bente Visser
  • 92. Employers Board TU Delft Paul Klint (UvA) EEMCS Faculty Andrew Tolmach (OGI) AvL Committee Doaitse Swierstra (UU) Arie van Deursen Henk Sips Rob Fastenau Karel Luyben
  • 93. Research Group (1998-2006) Anya Bagge Martin Bravenboer Eelco Dolstra Merijn de Jonge Karl Kalleberg Karina Olmos Rob Vermaas Sander Mak Roy van den Broek Armijn Hemel Jory van Zessen Bogdan Dumitriu Remko van Beusekom Rene de Groot Niels Janssen Arthur van Dam Spoofax WebDSL DisNix Hydra Sander van der Burg Eelco Dolstra Danny Groenewegen Maartje de Jonge Zef Hemel Lennart Kats Rob Vermaas Sander Vermolen Guido Wachsmuth Richard Vogelij Oskar van Rest Chris Gersen Elmer van Chastelet Nathan Bruning Ricky Lindeman AndrĆ© Miguel SimƵes Dias Vieira Tobi Vollebregt Vlad Vergu LuĆ­s Amorim Elmer van Chastelet Danny Groenewegen GabriĆ«l Konat Pierre Neron Augusto Passalaqua Vlad Vergu Guido Wachsmuth Stratego/XT Nix (2006-2013) Language Designerā€™s Workbench (2013-2018) Mircea Voda Daco Harkes Jozef Kruger Jonne van Wijngaarden Alan van Dam Robert Anisko Lennart Swart Hedzer Westra Arne de Bruijn GabriĆ«l Konat Sverre Rabbelier Nami Nasserazad Ruben Verhaaf Wouter Mouw Michel Weststrate Jippe Holwerda Nicolas Pierron Jonathan Joubert
  • 94. Sponsors Oracle Labs Philips Research Jacquard, Open Competition, VICI SERC
  • 95. The Future of Programming Arie van Deursen Brandon Hill Daan Leijen Erik Meijer Guido Wachsmuth Harry Buhrman Herman Geuvers John Hughes Manuel Serrano Markus PĆ¼schel Markus Vƶlter Sebastian Erdweg Stefan Hanenberg Tiark Rompf