The document outlines concepts covered in a programming languages course, including syntax and semantics, names and bindings, data types, functional programming, polymorphism, parsing and interpretation, modular programming, concurrency, and domain-specific languages. It also lists various languages as examples, such as Scala, JavaScript, C, and internal DSLs in languages like Haskell and Ruby. Finally, it discusses domain-specific languages and provides examples including spreadsheet formulas, query languages, graph layout languages, web languages, game scripting languages, and modeling languages.
A look at a modern programming language and how it can enhance the productivity and workflow of developers while promising higher execution performance. We will be talking about metaprogramming, functional programming and type systems in a pragmatic way mixed with some examples from `vibe.d` web framework.
By Yazan Dabain - Senior System Engineer, Arabia Weather
Do you want to upgrade your GWT application or write a sizable web application? Dart is the efficient choice.
As a brief example, check out http://lightningdart.com
This presentation is updated October 2015 for Silicon Valley Code Camp
A look at a modern programming language and how it can enhance the productivity and workflow of developers while promising higher execution performance. We will be talking about metaprogramming, functional programming and type systems in a pragmatic way mixed with some examples from `vibe.d` web framework.
By Yazan Dabain - Senior System Engineer, Arabia Weather
Do you want to upgrade your GWT application or write a sizable web application? Dart is the efficient choice.
As a brief example, check out http://lightningdart.com
This presentation is updated October 2015 for Silicon Valley Code Camp
Everything about OOPs (Object-oriented programming) in this slide we cover the all details about object-oriented programming using C++. we also discussed why C++ is called a subset of C.
Object-oriented programming (OOP) with Complete understanding modulesDurgesh Singh
Object-oriented programming (OOP) is the core ingredient of the .NET framework. OOP is so important that, before embarking on the road to .NET, you must understand its basic principles and terminology to write even a simple program. The fundamental idea behind OOP is to combine into a single unit both data and the methods that operate on that data; such units are called an object. All OOP languages provide mechanisms that help you implement the object-oriented model. They are encapsulation, inheritance, polymorphism and reusability. Let's now take a brief look at these concepts.
Object Oriented Programming using C++ Part IAjit Nayak
C++ Fundamentals
C++ Simple Program
C++ Operators
C++ Datatypes
C++ Namespace
C++ Function Prototypes
C++ Reference
C++ Passing Default Arguments
C++ Function Overloading
C++ Inline Functions
C++ Named constants
C++ Dynamic memory allocations
Before 1975 writing a compiler was a very time-consuming process. Then Lesk [1975] and Johnson published papers on lex and YACC. These utilities/components greatly simplify compiler writing. We’ve used flex and bison to compile the code.
Qcon2011 functions rockpresentation_scalaMichael Stal
This is the part I of the tutorial I planned to give at QCon 2011 on Functional Programming with Scala. It also includes Scala 2.8 as well as upcoming features
Everything about OOPs (Object-oriented programming) in this slide we cover the all details about object-oriented programming using C++. we also discussed why C++ is called a subset of C.
Object-oriented programming (OOP) with Complete understanding modulesDurgesh Singh
Object-oriented programming (OOP) is the core ingredient of the .NET framework. OOP is so important that, before embarking on the road to .NET, you must understand its basic principles and terminology to write even a simple program. The fundamental idea behind OOP is to combine into a single unit both data and the methods that operate on that data; such units are called an object. All OOP languages provide mechanisms that help you implement the object-oriented model. They are encapsulation, inheritance, polymorphism and reusability. Let's now take a brief look at these concepts.
Object Oriented Programming using C++ Part IAjit Nayak
C++ Fundamentals
C++ Simple Program
C++ Operators
C++ Datatypes
C++ Namespace
C++ Function Prototypes
C++ Reference
C++ Passing Default Arguments
C++ Function Overloading
C++ Inline Functions
C++ Named constants
C++ Dynamic memory allocations
Before 1975 writing a compiler was a very time-consuming process. Then Lesk [1975] and Johnson published papers on lex and YACC. These utilities/components greatly simplify compiler writing. We’ve used flex and bison to compile the code.
Qcon2011 functions rockpresentation_scalaMichael Stal
This is the part I of the tutorial I planned to give at QCon 2011 on Functional Programming with Scala. It also includes Scala 2.8 as well as upcoming features
The history of programming languages shows a progressive development from low-level programming languages close to the machine, to high-level languages close to the problems being solved with software. Domain-specific languages take this a step further than general purpose programming languages by making assumptions about the class of applications for which the language is intended. Complete applications typically require programs in multiple (technical) domains, which can be catered for by separate domain-specific languages. While such separation of concerns is beneficial for domain expressivity, it often leads to loose coupling and lack of static verification. Hence, the design of individual DSLs needs to be complemented with their linguistic integration.
In this talk, I illustrate these ideas with the design of WebDSL, a domain-specific language for data centric web applications. WebDSL linguistically integrates the definition of data models, user interfaces, actions, access control rules, data validation rules, styling rules, and workflow definitions. While maintaining separation between these concerns through specialized sub-languages, linguistic integration ensures static consistency checking and correct code generation. The language allows developers to concentrate on the essential design of web applications, abstracting from accidental complexity, such as the details of data persistence. The combination of high-level and low-level constructs ensures high expressivity, while supporting customization to application requirements.
These are the slides for the second lecture of the course "Model-Driven Software Development" taught at Delft University of Technology in the academic year 2009-2010.
Dart is a new language for the web, enabling you to write JavaScript on a secure and manageable way. No need to worry about "JavaScript: The bad parts".
This presentation concentrates on the developer experience converting from the Java based GWT to Dart.
Accessing loosely structured data from F# and C#Tomas Petricek
Slides from my talk at GOTO 2011. The presentation discusses how to bridge the impedance mismatch between the structure used in programming languages (classes, records, unions, ...) and structure used in data sources (database schema, XML file or JSON document). The talk shows how to solve this problem at three scales - using dynamic typing, by defining structure explicitly and using F# type providers.
Building scalable and language independent java services using apache thriftTalentica Software
This presentation is about the key challenges of cross language interactions and how they can be overcome. We discuss the Apache Thrift as a solution and understand its principle of Operation with code snippets and examples.
Declarative Type System Specification with StatixEelco Visser
In this talk I present the design of Statix, a new constraint-based language for the executable specification of type systems. Statix specifications consist of predicates that define the well-formedness of language constructs in terms of built-in and user-defined constraints. Statix has a declarative semantics that defines whether a model satisfies a constraint. The operational semantics of Statix is defined as a sound constraint solving algorithm that searches for a solution for a constraint. The aim of the design is that Statix users can ignore the execution order of constraint solving and think in terms of the declarative semantics.
A distinctive feature of Statix is its use of scope graphs, a language parametric framework for the representation and querying of the name binding facts in programs. Since types depend on name resolution and name resolution may depend on types, it is typically not possible to construct the entire scope graph of a program before type constraint resolution. In (algorithmic) type system specifications this leads to explicit staging of the construction and querying of the type environment (class table, symbol table). Statix automatically stages the construction of the scope graph of a program such that queries are never executed when their answers may be affected by future scope graph extension. In the talk, I will explain the design of Statix by means of examples.
https://eelcovisser.org/post/309/declarative-type-system-specification-with-statix
Compiler Construction | Lecture 6 | Introduction to Static AnalysisEelco Visser
Lecture introducing the need for static analysis in addition to parsing, the complications caused by names, and an introduction to name resolution with scope graphs
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
2. Syntax and Semantics
Names, Bindings, and Scopes
Storage
Data Types
Functional Programming
First-class Functions
Polymorphism
Type Parameterization
Parsing and Interpretation
Data Abstraction / Modular Programming
Functional Programming Redux
Concurrency
Concurrent Programming
Domain-Specific Languages
Quarter 3
Quarter 4
Basics of
Scala
JavaScript
C
7. From Instructions to Expressions
mov &a, &c
add &b, &c
mov &a, &t1
sub &b, &t1
and &t1,&c
Source: http://sites.google.com/site/arch1utep/home/course_outline/translating-complex-expressions-into-assembly-language-using-expression-trees
c = a
c += b
t1 = a
t1 -= b
c &= t1
c = (a + b) & (a - b)
8. From Calling Conventions to Procedures
calc:
push eBP ; save old frame pointer
mov eBP,eSP ; get new frame pointer
sub eSP,localsize ; reserve place for locals
.
. ; perform calculations, leave result in AX
.
mov eSP,eBP ; free space for locals
pop eBP ; restore old frame pointer
ret paramsize ; free parameter space and return
f(e1,e2,...,en)
push eAX ; pass some register result
push byte[eBP+20] ; pass some memory variable (FASM/TASM syntax)
push 3 ; pass some constant
call calc ; the returned result is now in eAX
f(x) { ... }
http://en.wikipedia.org/wiki/Calling_convention
9. A structure is a collection of one or more variables, possibly of different types,
grouped together under a single name for convenient handling. (Structures are
called ``records'' in some languages, notably Pascal.)
struct point {
int x;
int y;
};
member
structure tag
Structures in C:Abstract from Memory Layout
10. Malloc/Free to Automatic Memory Management
/* Allocate space for an array with ten elements of type int. */
int *ptr = (int*)malloc(10 * sizeof (int));
if (ptr == NULL) {
/* Memory could not be allocated, the program
should handle the error here as appropriate. */
} else {
/* Allocation succeeded. Do something. */
free(ptr); /* We are done with the int objects,
and free the associated pointer. */
ptr = NULL; /* The pointer must not be used again,
unless re-assigned to using malloc again. */
}
http://en.wikipedia.org/wiki/Malloc
int [] = new int[10];
/* use it; gc will clean up (hopefully) */
11. typedef struct Base {
void* (**vtable)();
int x;
} Base;
void (*Base_Vtable[])() = { &Base_print };
Base* newBase(int v) {
Base* obj = (Base*)malloc(sizeof(Base));
obj->vtable = Base_Vtable;
obj->x = v;
return obj;
}
void print(Base* obj) {
obj->vtable[0](obj);
}
class Base {
Integer x;
public Base(Integer v) {
x = v;
}
public void print() {
System.out.println("Base: " + x);
}
}
class Child extends Base {
Integer y;
public Child(Integer v1, Integer v2) {
super(v1);
y = v2;
}
public void print() {
System.out.println("Child: (" + x + "," + y + ")");
}
}
Dynamic Dispatch
12. Polymorphic Higher-Order Functions
def map[A,B](f: A => B, xs: List[A]): List[B] = {
xs match{
case Nil() => Nil()
case Cons(y, ys) => Cons(f(y), map(f, ys))
}
}
def incList(xs: IntList): IntList =
xs match {
case Nil() => Nil()
case Cons(y, ys) => Cons(y + 1, incList(ys))
}
13. Abstractions in Programming Languages
❖ Structured control-flow
★ if-then-else, while
❖ Procedural abstraction
★ procedures, first-class functions (closures)
❖ Memory management
★ garbage collection
❖ Data abstraction
★ abstract data types, objects
❖ Modules
★ inheritance, traits, mixins
14. “A programming language is low level when its
programs require attention to the irrelevant”
Alan J. Perlis. Epigrams on Programming. SIGPLAN Notices, 17(9):7-13, 1982.
15. Do HLLs eliminate all irrelevant details?
What about
❖ data persistence
❖ data services
❖ concurrency
❖ distribution
❖ access control
❖ data invariants
❖ workflow
❖ ...
16. Do HLLs eliminate all irrelevant details?
What about
❖ data persistence
❖ data services
❖ concurrency
❖ distribution
❖ access control
❖ data invariants
❖ workflow
❖ ...
many of these
concerns require
programmatic
encodings
17. What is the Next Level of
Abstraction?
Problem
Domain
HLL Machine
21. Impact of Software Errors
compiler
computer
error
Mars Climate Orbiter
Unit mismatch: Orbiter
variables in Newtons,
Ground control software in
Pound-force.
Damage: ~350 M$
input distance : Float;
input duration : Float;
output speed : Float := duration / distance;
wrong output
22. Example: Explicit Representation of Units
computer
input distance : Meter;
input duration : Second;
output speed : Meter/Second := duration / distance;
compiler
formalize knowledge of application area (domain) in language
error
23. DSLs Provide Domain-Specific ...
Abstractions
★ directly represent domain concepts
Concrete syntax
★ natural notation
Optimization
★ based on domain assumptions
Error checking
★ report errors in terms of domain concepts
Tool support
★ interpreter, compiler, code generator, IDE
24. Internal DSL
Library in HLL
★ Haskell, Scala, Ruby, ...
★ API is language
★ language features for ‘linguistic abstraction’
Advantages
★ host language = implementation language
Disadvantages
★ host language = implementation language (encoding)
★ no portability
★ no domain-specific errors, analysis, optimization
25. External DSL
Dedicated language
★ independent of host/target language (portable)
★ implementation with interpreter or compiler
Advantages
★ language tuned to domain
★ domain-specific errors, analysis, optimizations
Disadvantages
★ cost of learning new language
★ cost of maintaining language
31. Concerns in Web
Programming
Data Persistence
Access Control
Injection Attacks
Search
XSS
DataValidation
Data Binding
Routing
... ...
32. Zef Hemel, Danny M. Groenewegen, Lennart C. L. Kats, EelcoVisser.
Static consistency checking of web applications with
WebDSL. Journal of Symbolic Computation, 46(2):150-182, 2011.
Late Failure Detection in Web Applications
33. Complexity in Web Programming:
Multiple Languages x Multiple Concerns
Consistency not statically checked
34. EelcoVisser. WebDSL: A Case Study in Domain-Specific Language Engineering. In
Ralf Lämmel, JoostVisser, João Saraiva, editors, Generative and Transformational Techniques in
Software Engineering II, International Summer School, GTTSE 2007.Volume 5235 of Lecture Notes
in Computer Science, pages 291-373, Springer, Braga, Portugal, 2007.
Separation of Concerns & Linguistic Integration
39. 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();
}
}
entity Post {
key :: String (id)
title :: String (name, searchable)
content :: WikiText (searchable)
blog -> Blog
}
Persistent Data Models
Generation of queries: no injection attacks
42. access control rules
principal is User
with credentials username, password
rule page blog(b: Blog, index: Int) {
true
}
rule page post(p: Post) {
p.public || p.author == principal
}
rule page editpost(p: Post) {
principal == p.author
}
extend entity User {
password :: Secret
}
extend entity Blog {
owner -> User
}
extend entity Post {
public :: Bool
}
Declarative Access Control Rules
43. Linguistically Integrated
Persistent data model
Logic
Templates (UI, Email, Service)
Data binding
Access control
Data validation
Faceted search
Collaborative filtering
44. DSL Summary
software reuse through linguistic abstraction
• capture understanding of design patterns in language concepts
• abstract from accidental complexity
• program in terms of domain concepts
• automatically generate implementation
45. When to Use/Create DSLs?
Hierarchy of abstractions
• first understand how to program it
• make variations by copy, paste, adapt
• (avoid over-engineering)
• make library of frequently used patterns
• find existing (internal) DSLs for the domain
Time for a DSL?
• large class of applications using same design patterns
• design patterns cannot be captured in PL
• lack of checking / optimization for DSL abstractions
47. object ExpParser extends JavaTokenParsers with PackratParsers {
lazy val exp: PackratParser[Exp] =
(exp <~ "+") ~ exp1 ^^ { case lhs~rhs => Add(lhs, rhs) } |
exp1
lazy val exp1: PackratParser[Exp] =
(exp1 ~ exp0) ^^ { case lhs~rhs => App(lhs, rhs) } |
exp0
lazy val exp0: PackratParser[Exp] =
number | identifier | function | letBinding |
"(" ~> exp <~ ")"
// ...
def parse(text: String) = parseAll(exp, text)
}
syntax through parsers
48. sealed abstract class Value
case class numV(n: Int) extends Value
case class closureV(param: Symbol, body: Exp, env: Env)
extends Value
def eval(exp: Exp, env: Env): Value = exp match {
case Num(v) => numV(v)
case Add(l, r) => plus(eval(l, env), eval(r, env))
case Id(name) => lookup(name, env)
case Let(name, e1, e2) =>
eval(e2, bind(name, eval(e1, env), env))
case Fun(name, body) => closureV(name, body, env)
case App(fun, arg) => eval(fun, env) match {
case closureV(name, body, env2) =>
eval(body, bind(name, eval(arg, env), env2))
case _ => sys.error("Closure expected")
}
}
semantics through interpreter
57. Spoofax Language Workbench
declarative meta-languages
• syntax definition
• editor services
• term rewriting
implementation
• generic integration into Eclipse and IMP
• compilation & interpretation of language definitions
agile
• Spoofax & IDE under development in same Eclipse instance
• support for test-driven development
58. A Taste of Language Engineering
with Spoofax
• abstract syntax trees
• declarative syntax definition
• name binding and scope
• transformation by term rewriting
59. EnFun: Entities with Functions
module blog
entity String {
function plus(that:String): String
}
entity Bool { }
entity Set<T> {
function add(x: T)
function remove(x: T)
function member(x: T): Bool
}
entity Blog {
posts : Set<Post>
function newPost(): Post {
var p : Post := Post.new();
posts.add(p);
}
}
entity Post {
title : String
}
64. Declarative Syntax Definition
Entity("User", [
Property("first", Type("String")),
Property("last", Type("String"))
])
signature
constructors
Entity : ID * List(Property) -> Definition
Type : ID -> Type
Property : ID * Type -> Property
65. Declarative Syntax Definition
entity User {
first : String
last : String
}
Entity("User", [
Property("first", Type("String")),
Property("last", Type("String"))
])
signature
constructors
Entity : ID * List(Property) -> Definition
Type : ID -> Type
Property : ID * Type -> Property
66. Declarative Syntax Definition
entity User {
first : String
last : String
}
Entity("User", [
Property("first", Type("String")),
Property("last", Type("String"))
])
signature
constructors
Entity : ID * List(Property) -> Definition
Type : ID -> Type
Property : ID * Type -> Property
context-free syntax
"entity" ID "{" Property* "}" -> Definition {"Entity"}
ID -> Type {"Type"}
ID ":" Type -> Property {"Property"}
77. From Tree to Graph
Module(
"test"
, [ Entity("String", [])
, Entity(
"User"
, [ Property("first", )
, Property("last", )
]
)
]
)
78. NaBL: Name Binding Language
module names
imports
include/Cam
namespaces Type Property Function Variable
rules
Entity(name, None(), None(), _):
defines Type name of type Type(name, [])
scopes Type, Function, Property, Variable
Type(name, _):
refers to Type name
83. Language Engineering Summary
apply linguistic abstraction to language engineering
• declarative languages for language definition
• automatic derivation of efficient compilers
• automatic derivation of IDEs
85. Example: Explicit Representation of Units
computer
input distance : Meter;
input duration : Second;
output speed : Meter/Second := duration / distance;
compiler
formalize knowledge of application area (domain) in language
error
86. error
Problem: Correctness of Language Definitions
computer
compiler
Can we
trust the
compiler?
wrong outputinput
program
type soundness: well-typed programs don’t go wrong
89. Formal Language Specification
State-of-the-Art: Semantics Engineering
Abstract
Syntax
Type
System
Dynamic
Semantics
Transforms
focus on (only semi-automatic) verification; not suitable for implementation
Correctness
Proof
TestsCompiler
Editor
(IDE)
90. Declarative Language Definition
My Approach: Multi-Purpose Language Definitions
Syntax
Definition
Name
Binding
Type
System
Dynamic
Semantics
Transforms
Compiler
Editor
(IDE)
Correctness
Proof
Tests
bridging the gap between language engineering and semantics engineering
93. Syntax and Semantics
Names, Bindings, and Scopes
Storage
Data Types
Functional Programming
First-class Functions
Polymorphism
Type Parameterization
Parsing and Interpretation
Data Abstraction / Modular Programming
Functional Programming Redux
Concurrency
Concurrent Programming
Domain-Specific Languages
Quarter 3
Quarter 4
Basics of
Scala
JavaScript
C
94. Material for exam
Slides from lectures
Tutorial exercises
Graded assignments
Sebesta: Chapters 1-13, 15
Programming in Scala: Chapters 1, 4-16, 19, 32-33
K&R C: Chapters 1-6
JavaScript Good Parts: Chapters 1-4
95. Content of exam
10% multiple choice questions
about concepts
50% Scala programming
(functional programming)
20% C programming
(structures and pointers)
20% JavaScript programming
(objects and prototypes)
96. Registration for Exam is Required
http://department.st.ewi.tudelft.nl/weblab/assignment/761 -> your submission