4. High-Level Languages
Problem
HLL Machine
Domain
"A programming language is low level when its programs
require attention to the irrelevant." Alan J. Perlis (1982)
HLLs reduce gap
6. Software Language Design & Engineering
enable software engineers to
effectively design, implement,
and apply domain-specific
software languages
7. Research: Software Language Engineering
Automatically derive efficient,
scalable, incremental compiler +
usable IDE from high-level,
declarativelanguage
definition
8. The Spoofax Language Workbench
creating full featured IDEs for domain-specific languages
9. Research: Software Language Design
Systematically design domain-
specific software
languages with optimal
tradeoff between expressivity,
completeness, portability, coverage, and
maintainability
10. Software Language Design Case Studies
Mobl: client-side stateful web applications
WebDSL: server-side restful web applications
13. Web Programming
browser server database
HTML,
Java SQL
JS, CSS
code runs on server, browser, and database
14. Concerns in Web Programming
❖ Persistent data
★ data integrity
★ search
❖ User interface
★ data validation
★ styling, layout
★ navigation
★ actions
❖ Access control
15. Separation of Concerns in Web Programming
Example
❖ Data modeling
★ Java classes with JPA annotations
❖ User interface
★ Java ServerFaces XML templates
★ Seam Java classes
❖ Access control
★ Acegi configuration/annotation
16. Problems in Web Programming
❖ Lack of integration
★ no cross language/concern consistency checking
★ leads to late (detection of) failures
❖ Low-level encoding
★ leads to boilerplate code
19. Late Failures in Web Applications
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.
26. Logic
entity Blog {
key :: String (id)
title :: String (name)
posts -> Set<Post> (inverse=Post.blog)
function recentPosts(index: Int, n: Int): List<Post> {
var i := max(1,index) - 1;
return [p | p: Post in posts
order by p.created desc limit n offset i*n].list();
}
function newPost(): Post {
var p := Post{ title := "No Title" blog := this };
p.key := p.id.toString();
return p;
}
}
67. Linguistic Abstraction for the Web
Linguistic abstraction:
capture software knowledge in
domain-specific languages http://spoofax.org
separation of concerns + linguistic integration http://mobl-lang.org
cross concern consistency checking http://webdsl.org
early detection failures http://researchr.org
Language workbench: DSL design and http://eelcovisser.org
implementation with less effort than
traditional language engineering
http://researchr.org/search/publication/mobl+spoofax+webdsl