Advanced Functional Programming (9) Domain Specific Embedded Languages

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Advanced Functional Programming (9) Domain Specific Embedded Languages"

Transcription

1 Advanced Functional Programming (9) Domain Specific Embedded Languages Advanced Functional Programming (9) Domain Specific Embedded Languages, Universiteit Utrecht February 28, 2007

2 Domain Specific Embedded Languages Overview 1 Domain Specific Languages 2 Domain Specific Embedded Languages 3 Growing a language 4 Template Haskell 5 Agenda

3 Domain Specific Embedded Languages > Domain Specific Languages Domain Specific Languages General purpose language: a programming language for creating various kinds of programs. Domain specific language (DSL): a programming language for one particular problem domain. DSLs offer appropriate notation and abstractions for one domain. Often limited to the domain. Examples: PostScript for page rendering Structured Query Language for accessing a database make macro language for declaring file dependencies L A T E X and bibtex for document preparation

4 Domain Specific Embedded Languages > Domain Specific Languages Why use a DSL? Because the language is tailored for one problem domain, a DSL is even at a higher level than a high-level language. Ideally, a domain engineer should be able to use a DSL Programs in a DSL are generally easier to write, modify, and reason about. Argument in favor of using DSLs: the initial cost to start using a DSL may be high, but over time it should yield significant savings.

5 Domain Specific Embedded Languages > Domain Specific Embedded Languages Problems of DSL Don t build a DSL from scratch, but inherit the infrastructure of some other language! This yields a domain specific embedded language A pure embedding: no pre-processor, macro-expander, or generator.

6 Domain Specific Embedded Languages > Domain Specific Embedded Languages Problems of DSL Don t build a DSL from scratch, but inherit the infrastructure of some other language! This yields a domain specific embedded language A pure embedding: no pre-processor, macro-expander, or generator. What makes Haskell a good host for a DSEL? Higher-order functions Laziness Polymorphism Type classes

7 Domain Specific Embedded Languages > Domain Specific Embedded Languages Syntax and semantics Slogan: semantics is more important than syntax however, syntax does matter (although it probably isn t the designer s biggest worry) Many semantic details do not matter much (numbers, scoping rules, looping constructs) Idea: borrow design decisions made for host language, and reuse ideas. Advantages: Access to more programming features. (Common evolutionary path a for DSL is to grow to a complex general purpose language hard to find the foundations) Share a common base language (and its tools). Large applications may have more than one DSEL.

8 Domain Specific Embedded Languages > Domain Specific Embedded Languages Example: geometric region analysis type Region = Point Bool inregion :: Point Region Bool p inregion r = r p circle :: Radius Region outside :: Region Region -- logical negation ( ) :: Region Region Region -- intersection ( ) :: Region Region Region -- union (r1 r2) p = p inregion r1 p inregion r2

9 Domain Specific Embedded Languages > Domain Specific Embedded Languages Example: geometric region analysis type Region = Point Bool inregion :: Point Region Bool p inregion r = r p circle :: Radius Region outside :: Region Region -- logical negation ( ) :: Region Region Region -- intersection ( ) :: Region Region Region -- union (r1 r2) p = p inregion r1 p inregion r2 Disbelief that this code is executable! Simple to prove associativity of intersection: use equational reasoning (referential transparency), or QuickCheck. (r1 r2) r3 r1 (r2 r3)

10 Domain Specific Embedded Languages > Domain Specific Embedded Languages Modular algebraic semantics It is important to recognize layers of abstraction for a DSEL (this requires a good understanding of the domain). Good example: two layers in the wxhaskell library. Example: A simple graphics DSEL

11 Domain Specific Embedded Languages > Domain Specific Embedded Languages Layer 1: pictures -- Atomic objects: circle square bitmap "p.gif" -- a unit circle -- a unit square -- an imported bit-map -- Composite objects: scale v p -- scale picture p by vector v color c p -- color picture p with color c trans v p -- translate picture p by vector v p1 over p2 -- overlay p1 on p2 p1 above p2 -- place p1 above p2 p1 beside p2 -- place p1 beside p2 Nice properties can be proven about this algebra of pictures (e.g., distributive laws, associativity)

12 Domain Specific Embedded Languages > Domain Specific Embedded Languages Layer 2: animations type Behavior a = Time a type Animation = Behavior Picture (lift1 f b1) t = f (b1 t) (lift2 f b1 b2) t = f (b1 t) (b2 t) colorb = lift2 color sinb = lift1 sin time t = t -- the color may also be time varying wiggle = sinb (pi time) wigglerange lo hi = lo + (hi lo) (wiggle + 1) / 2 ball = colorb red (scaleb (wigglerange 0.5 1) circle) Generalization: we adopt a more generic viewpoint Lifting could be done with type classes (also Num)

13 Domain Specific Embedded Languages > Domain Specific Embedded Languages Layer 3: reactivity Basic reactive expression has the form b1 until e = b2. ( behave as b1 until event e occurs, then behave as b2 ). until and (= ) are just Haskell functions (although they appear to be primitives!) color (cycle red green blue) circle where cycle c1 c2 c3 = c1 until leftmousebutton = cycle c2 c3 c1 (cycle relies on lazy evaluation)

14 Domain Specific Embedded Languages > Domain Specific Embedded Languages Advanced Parsing Techniques Another example of a layered DSEL are the parser combinators: Simple combinators (used for the Grammars and Parsing course) Error-correcting parsers Fast online parser (produce output as soon as possible to avoid space-leaks) Self-analyzing parser (recent work by Arthur Baars to cope with a left recursive context-free grammar)

15 Domain Specific Embedded Languages > Domain Specific Embedded Languages Advanced Parsing Techniques Another example of a layered DSEL are the parser combinators: Simple combinators (used for the Grammars and Parsing course) Error-correcting parsers Fast online parser (produce output as soon as possible to avoid space-leaks) Self-analyzing parser (recent work by Arthur Baars to cope with a left recursive context-free grammar) Although the implementation of the (basic) combinators is getting more and more complicated, the interface is (almost) the same. This is essential for building a successful library.

16 Domain Specific Embedded Languages > Domain Specific Embedded Languages Building a modular interpreter So far, a DSEL is just about notation. It should be possible to make fundamental changes in the interpreter, even long after the initial design. Describe language features along with their semantics. New features can be added without altering any previous code

17 Domain Specific Embedded Languages > Domain Specific Embedded Languages Building a modular interpreter So far, a DSEL is just about notation. It should be possible to make fundamental changes in the interpreter, even long after the initial design. Describe language features along with their semantics. New features can be added without altering any previous code Possible approaches: Use monads and monad transformers for constructing building blocks Use an attribute grammar (the Utrecht approach) Template Haskell may also be used to acquire some extensions

18 Domain Specific Embedded Languages > Growing a language Growing a language Growing a language : brilliant paper by Guy L. Steele Jr. from Sun Microsystems Laboratories (highly recommended to read it yourself) Don t try to design and build The Right Thing : users will not wait for it. Plan for growth: the language must grow as the set of users grows. Library functions should look like primitives. Make it a community-effort: cathedral versus bazaar style.

19 Domain Specific Embedded Languages > Growing a language Growing a language: Haskell Haskell helps developers to design libraries with a native look-and-feel. For instance, recall (:=) and the on function from wxhaskell. However, not all desired extensions can be expressed within Haskell.

20 Domain Specific Embedded Languages > Growing a language Growing a language: Haskell Haskell helps developers to design libraries with a native look-and-feel. For instance, recall (:=) and the on function from wxhaskell. However, not all desired extensions can be expressed within Haskell. Some examples: Add syntactic sugar to the language: for instance, list comprehension cannot be introduced within the language Change the evaluation strategy: lazy versus strict Extend the type system: for example, to support generic programming The static analyzer is not aware of DSELs: error messages are still reported in terms of the host language

21 Domain Specific Embedded Languages > Growing a language Syntax macros Work by Arthur Baars: supply syntax macros to the compiler for adding syntactic sugar to the language. compiler syntax macros abstract syntax (constructors+types) initial grammar (list of parsers) source file macro interpreter compiler output

22 Domain Specific Embedded Languages > Growing a language Type inference directives Scripting the type inference process (Heeren, Hage, and Swierstra), ICFP Directives let a compiler report domain specific type error messages. (<$>) :: (a b) Parser s a Parser s b x :: t1; y :: t2; x <$> y :: t3; t1 a1 b1 : left operand is not a function t2 Parser s1 a2 : right operand is not a parser t3 Parser s2 b2 : result type is not a parser s1 s2 : parser has an incorrect symbol type a1 a2 : function cannot be applied to result of parser b1 b2 : parser has an incorrect result type

23 Domain Specific Embedded Languages > Growing a language Type inference directives Scripting the type inference process (Heeren, Hage, and Swierstra), ICFP Directives let a compiler report domain specific Use error type error message messages. attributes in the specialized type error messages: (<$>) :: (a b) Parser s a Parser s b t2 Parser s1 a2 : x :: t1; y : The right operand of <$> should be a parser expression : x <$> y :: t3; right operand : t1 a1type b1 : left: operand is not a function t2 Parser does not s1 a2 match : right : Parser operand is not a parser t3 Parser s2 b2 : result type is not a parser s1 s2 : parser has an incorrect symbol type a1 a2 : function cannot be applied to result of parser b1 b2 : parser has an incorrect result type

24 Domain Specific Embedded Languages > Growing a language Example A program with a type error: test :: Parser Char String test = map toupper <$> "hello, world!" Compiling this program results in the following type error message: (2, 21) : The right operand of <$> should be a parser expression : map toupper <$> "hello, world!" right operand : "hello, world!" type : String does not match : Parser Char String

25 Domain Specific Embedded Languages > Template Haskell What is Template Haskell System by Tim Sheard and Simon Peyton Jones. Extension to Haskell that supports compile-time metaprogramming (i.e., algorithmic construction of programs at compile-time). With TH, we can do: Polytypic programming Macro-like expansion User-directed optimization (for instance, inlining) Generation of supporting data structures and functions from existing data structures and functions Implemented in GHC.

26 Domain Specific Embedded Languages > Template Haskell What is meta-programming? Nice example: C-like printf function in Haskell. printf "Error: %s on line %d." msg line

27 Domain Specific Embedded Languages > Template Haskell What is meta-programming? Nice example: C-like printf function in Haskell. printf "Error: %s on line %d." msg line We can t define printf in Haskell because its type depends (in a complicated way) on its first parameter. With Template Haskell, we can guarantee type-safety for printf (types for msg and line) compile template code efficiently (for instance, interpret the control string at compile-time) make it user-definable (not a compiler extension)

28 Domain Specific Embedded Languages > Template Haskell Using printf in Template Haskell $( printf "Error: %s on line %d." ) msg line

29 Domain Specific Embedded Languages > Template Haskell Using printf in Template Haskell $( printf "Error: %s on line %d." ) msg line $(... ) is special notation ( evaluate at compile-time ). $(... ) is called a splice (not to be confused with Haskell s infix application operator). Conceptually, the splice above generates the following lambda term: (λs 0 λn 1 "Error: " + s 0 + " on line " + show n 1 ) Of course, this term can be assigned a type as any other normal function.

30 Domain Specific Embedded Languages > Template Haskell Defining printf in Template Haskell printf :: String Expr printf s = gen (parse s) data Format = D S L String parse :: String [Format ] gen :: [Format ] Expr gen [D ] = [ λn show n ] gen [S ] = [ λs s ] gen [L s] = lift s parse is an ordinary Haskell function Simplified implementation of gen: only one format specifier [... ] is called the quasi-quote notation lift lifts a string to a value of type Expr

31 Domain Specific Embedded Languages > Template Haskell Defining printf in Template Haskell printf :: String Expr printf s = gen (parse s) data Format = D S L String parse :: String [Format ] gen :: [Format ] Expr gen [D ] = [ λn show n ] gen [S ] = [ λs s ] gen [L s] = lift s Let s define gen for an arbitrary number of format specifiers. We use recursion! parse is an ordinary Haskell function Simplified implementation of gen: only one format specifier [... ] is called the quasi-quote notation lift lifts a string to a value of type Expr

32 Domain Specific Embedded Languages > Template Haskell Defining printf in Template Haskell (2) printf :: String Expr printf s = gen (parse s) [ "" ] data Format = D S L String parse :: String [Format ] gen :: [Format ] Expr Expr gen [ ] x = x gen (D : xs) x = [ λn $( gen xs [ $x + show n ] ) ] gen (S : xs) x = [ λs $( gen xs [ $x + s ] ) ] gen (L s : xs) x = gen xs [ $x + $( lift s ) ] gen uses an accumulating parameter Recursive calls to gen are ran at compile-time Static scoping extends across the template mechanism (task of quotation monad Q)

33 Domain Specific Embedded Languages > Template Haskell Why templates? High-level languages make programs shorter, easier to maintain, and easier to reason about. Why? The compiler will do the job (most of the times, in a superior way). But what if a programmer knows some particular details? Let the user teach the compiler a new trick. A compiler manipulates programs. TH lets users manipulate their own programs.

34 Domain Specific Embedded Languages > Template Haskell Why templates? High-level languages make programs shorter, easier to maintain, and easier to reason about. Why? The compiler will do the job (most of the times, in a superior way). But what if a programmer knows some particular details? Let the user teach the compiler a new trick. A compiler manipulates programs. TH lets users manipulate their own programs. 1 Conditional compilation (for different configurations) 2 Program reification (inspect program structure, deriving) 3 Algorithmic program construction (printf ) 4 Abstractions (zip1, zip2, zip3, etcetera) 5 Optimizations (for algebraic laws, in-lining opportunities)

35 Domain Specific Embedded Languages > Template Haskell Design issues The advantages and disadvantages of TH s design decisions: Compile-time and run-time functions use the same language In contrast with most systems (#if, #define) Existing libraries and programming skills can be used We need explicit annotations for specifying when to execute the code Executed at compile time Allows to do full static analysis (including type inference) May lead to non-terminating compilation

36 Domain Specific Embedded Languages > Template Haskell Syntax-construction functions Select the first component of a triple: case x of (a, b, c) a

37 Domain Specific Embedded Languages > Template Haskell Syntax-construction functions Select the first component of a triple: case x of (a, b, c) a With Template Haskell: given that sel :: Int Int Expr sel i n = [ λx case x of... ] $( sel 1 3 ) x

38 Domain Specific Embedded Languages > Template Haskell Syntax-construction functions Select the first component of a triple: case x of (a, b, c) a With Template Haskell: $( sel 1 3 ) x given that sel :: Int Int Expr sel i n = [ λx case x of... ] We can t write sel with quasi-quoting only

39 Domain Specific Embedded Languages > Template Haskell Syntax-construction functions (2) sel :: Int Int Expr sel i n = lam [pvar "x"] (casee (var "x") [alt ]) where alt :: Match alt = simplem pat rhs pat :: Patt pat = ptup (map pvar as) rhs :: Expr rhs = var (as!! (i 1)) -- the operator (!!) is zero based as :: [String ] as = ["a" + show i i [1.. n]]

40 Domain Specific Embedded Languages > Template Haskell Syntax-construction functions (2) sel :: Int -- Int Syntax Expr for patterns sel i n = pvar lam [pvar :: String "x"] (casee Patt (var "x") [alt-- ]) x where ptup :: [Patt ] Patt -- (x, y, z) alt :: pcon Match:: String [Patt ] Patt -- Fork x y alt = pwild simplem :: Patt pat rhs -- pat :: Patt -- Syntax for expressions pat = var ptup (map :: String pvar as) Expr -- x tup :: [Expr ] Expr -- (3, y) rhs :: Expr app :: Expr Expr Expr -- f x rhs = var (as!! (i 1)) -- the operator (!!) is zero based lam :: [Patt ] Expr Expr -- λx y 5 as :: casee [String ] :: Expr [Match] Expr -- case x of... as = simplem ["a" + show :: Patt i iexpr [1.. n]] Match -- x : xs 2

41 Domain Specific Embedded Languages > Template Haskell Mix the two styles sel :: Int Int Expr sel i n = [ λx $( casee (var "x") [alt ] ) ] where alt = simplem pat rhs pat = ptup (map pvar as) rhs = var (as!! (i 1)) as = ["a" + show i i [1.. n]]

42 Domain Specific Embedded Languages > Template Haskell Mix the two styles sel :: Int Int Expr sel i n = [ λx $( casee (var "x") [alt ] ) ] where alt = simplem pat rhs pat = ptup (map pvar as) rhs = var (as!! (i 1)) as = ["a" + show i i [1.. n]] Our next challenge: implement an n-ary zip function. $( zipn 3 ) as bs cs

43 Domain Specific Embedded Languages > Template Haskell zipn: investigate for n = 3 To gain some insight, we first consider what zipn should do for n = 3. zip3 :: [a] [b] [c ] [(a, b, c)] zip3 = let rec = λy1 y2 y3 case (y1, y2, y3) of (x1 : xs1, x2 : xs2, x3 : xs3) (x1, x2, x3) : rec xs1 xs2 xs3 [ ] in rec Recursive definition Quite a lot pattern/expression variables

44 Domain Specific Embedded Languages > Template Haskell Defining zipn zipn :: Int Expr zipn n = [ let zp = $( mkzip n [ zp ] ) in zp ] mkzip :: Int Expr Expr mkzip n name = lam pys (casee (tup eys) [m1, m2 ]) where (pxs, exs) = genpe "x" n (pys, eys) = genpe "y" n (pxss, exss) = genpe "xs" n pcons x xs = [p $x : $xs ] body = [ $( tup exs ) : $( apps (name : exss) ) ] m1 = simplem (ptup (zipwith pcons pxs pxss)) body m2 = simplem pwild (con "[]") genpe :: String Int ([Pat ], [ExpQ ]) genpe s n = let ns = [s + show i i [1.. n]] in (map pvar ns, map var ns) apps = foldl1 app

45 Domain Specific Embedded Languages > Template Haskell Defining zipn zipn :: Int Expr zipn n = [ let zp = $( mkzip n [ zp ] ) in zp ] mkzip :: Int Expr Expr mkzip n name = lam pys (casee (tup eys) [m1, m2 ]) where (pxs, exs) = genpe "x" n (pys, eys) = genpe "y" n (pxss, exss) = genpe "xs" n pcons x xs = [p $x : $xs ] body = [ $( tup exs ) : $( apps (name : exss) ) ] m1 = simplem (ptup (zipwith pcons pxs pxss)) body m2 = simplem pwild (con "[]") genpe :: String Int ([Pat ], [ExpQ ]) genpe s n = let ns = [s + show i i [1.. n]] in (map pvar ns, map var ns) apps = foldl1 app apps has an elegant definition

46 Domain Specific Embedded Languages > Template Haskell Defining zipn Expr is really ExpQ zipn :: Int Expr zipn n = [ let zp = $( mkzip n [ zp ] ) in zp ] mkzip :: Int Expr Expr mkzip n name = lam pys (casee (tup eys) [m1, m2 ]) where (pxs, exs) = genpe "x" n (pys, eys) = genpe "y" n lam should be lame (pxss, exss) = genpe "xs" n pcons x xs = [p $x : $xs ] Pattern quasi-quoting is not yet body = [ $( tup exs ) : $( apps (name supported : exss) ) ] m1 = simplem (ptup (zipwith pcons pxs pxss)) body m2 = simplem pwild (con "[]") genpe :: String Int ([Pat ], [ExpQ ]) con "[]" must be genpe s n = let ns = [s + show i i con [1.."GHC.Base:[]" n]] in (map pvar ns, map var ns) apps = foldl1 app apps has an elegant definition

47 Domain Specific Embedded Languages > Template Haskell Declaration slicing We can splice in template declarations at top-level. For instance, introduce zip0, zip1,..., zip10. zipdecl :: Int DecQ zipdecl n = vald name body [ ] where name = pvar ("zip" + show n) body = normalb (zipn n) $ (mapm zipdecl [0.. 10]) Question: what is the type of zip0?

48 Domain Specific Embedded Languages > Template Haskell Reification data Tree a = Node (Tree a) (Tree a) Leaf a reptree :: Decl reptree = reifydecl Tree lengthtype :: Type lengthtype = reifytype length percentfixity :: Q Int percentfixity = reifyfixity (%) here :: Q String here = reifylocn Reification: query the state of the compiler A language construct, not a function!

49 Domain Specific Embedded Languages > Template Haskell Conclusion Template Haskell provides a powerful, new way of writing programs. Because all meta-code is executed at compile-time, we can still guarantee run-time safety. GHC supports Template Haskell, but the library is not mature yet (see also Section 7.6 of the User s Guide). What will the future bring for TH?

50 Domain Specific Embedded Languages > Agenda Agenda 1 Read QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs (Koen Claessen and John Hughes). 2 Next week: deadline Exercise 2 (wxhaskell). Next lecture: March 5 (Monday): Debugging and Tracing (and space leaks in particular)

POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful

POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful RALF HINZE Institute of Information and Computing Sciences Utrecht University Email: ralf@cs.uu.nl Homepage: http://www.cs.uu.nl/~ralf/

More information

On every sheet please give your first name, last name, and matriculation number.

On every sheet please give your first name, last name, and matriculation number. RHEINISCH- WESTFÄLISCHE TECHNISCHE HOCHSCHULE AACHEN LEHR- UND FORSCHUNGSGEBIET INFORMATIK 2 RWTH Aachen D-52056 Aachen GERMANY http://verify.rwth-aachen.de/ LuFG Informatik II Functional Programming Exam,

More information

Syntax Check of Embedded SQL in C++ with Proto

Syntax Check of Embedded SQL in C++ with Proto Proceedings of the 8 th International Conference on Applied Informatics Eger, Hungary, January 27 30, 2010. Vol. 2. pp. 383 390. Syntax Check of Embedded SQL in C++ with Proto Zalán Szűgyi, Zoltán Porkoláb

More information

Functional Programming. Functional Programming Languages. Chapter 14. Introduction

Functional Programming. Functional Programming Languages. Chapter 14. Introduction Functional Programming Languages Chapter 14 Introduction Functional programming paradigm History Features and concepts Examples: Lisp ML 1 2 Functional Programming Functional Programming Languages The

More information

Chapter 7: Functional Programming Languages

Chapter 7: Functional Programming Languages Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language

More information

Embedded Software Development with MPS

Embedded Software Development with MPS Embedded Software Development with MPS Markus Voelter independent/itemis The Limitations of C and Modeling Tools Embedded software is usually implemented in C. The language is relatively close to the hardware,

More information

Object-Oriented Software Specification in Programming Language Design and Implementation

Object-Oriented Software Specification in Programming Language Design and Implementation Object-Oriented Software Specification in Programming Language Design and Implementation Barrett R. Bryant and Viswanathan Vaidyanathan Department of Computer and Information Sciences University of Alabama

More information

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

The Clean programming language. Group 25, Jingui Li, Daren Tuzi

The Clean programming language. Group 25, Jingui Li, Daren Tuzi The Clean programming language Group 25, Jingui Li, Daren Tuzi The Clean programming language Overview The Clean programming language first appeared in 1987 and is still being further developed. It was

More information

Functional Programming

Functional Programming FP 2005 1.1 3 Functional Programming WOLFRAM KAHL kahl@mcmaster.ca Department of Computing and Software McMaster University FP 2005 1.2 4 What Kinds of Programming Languages are There? Imperative telling

More information

Comparing Dynamic and Static Language Approaches to Web Frameworks

Comparing Dynamic and Static Language Approaches to Web Frameworks Comparing Dynamic and Static Language Approaches to Web Frameworks Neil Brown School of Computing University of Kent UK 30 April 2012 2012-05-01 Comparing Dynamic and Static Language Approaches to Web

More information

Towards a Tight Integration of a Functional Web Client Language into Scala

Towards a Tight Integration of a Functional Web Client Language into Scala Towards a Tight Integration of a Functional Web Client Language into Scala Christoph Höger Technische Universität Berlin christoph.hoeger@tu-berlin.de Martin Zuber Technische Universität Berlin martin.zuber@tu-berlin.de

More information

YouTrack MPS case study

YouTrack MPS case study YouTrack MPS case study A case study of JetBrains YouTrack use of MPS Valeria Adrianova, Maxim Mazin, Václav Pech What is YouTrack YouTrack is an innovative, web-based, keyboard-centric issue and project

More information

Domain Specific Languages

Domain Specific Languages Domain Specific Languages Paul Hudak Department of Computer Science Yale University December 15, 1997 1 Introduction When most people think of a programming language they think of a general purpose language:

More information

Thomas Jefferson High School for Science and Technology Program of Studies Accelerated Foundations of Computer Science as of April 2013

Thomas Jefferson High School for Science and Technology Program of Studies Accelerated Foundations of Computer Science as of April 2013 Thomas Jefferson High School for Science and Technology Program of Studies Accelerated Foundations of Computer Science as of April 2013 Unit of Study / Accelerated Foundations of Computer Science is offered

More information

The countdown problem

The countdown problem JFP 12 (6): 609 616, November 2002. c 2002 Cambridge University Press DOI: 10.1017/S0956796801004300 Printed in the United Kingdom 609 F U N C T I O N A L P E A R L The countdown problem GRAHAM HUTTON

More information

C Primer. Fall Introduction C vs. Java... 1

C Primer. Fall Introduction C vs. Java... 1 CS 33 Intro Computer Systems Doeppner C Primer Fall 2016 Contents 1 Introduction 1 1.1 C vs. Java.......................................... 1 2 Functions 1 2.1 The main() Function....................................

More information

Cedalion A Language Oriented Programming Language (Extended Abstract)

Cedalion A Language Oriented Programming Language (Extended Abstract) Cedalion A Language Oriented Programming Language (Extended Abstract) David H. Lorenz Boaz Rosenan The Open University of Israel Abstract Implementations of language oriented programming (LOP) are typically

More information

SDT: A Programming Language for Debugging (Working Paper)

SDT: A Programming Language for Debugging (Working Paper) SDT: A Programming Language for Debugging (Working Paper) Steven P. Reiss Department of Computer Science Brown University Providence, RI 02912 spr@cs.brown.edu (401) 863-7641 January, 1989 Abstract This

More information

Functional Programming in C++11

Functional Programming in C++11 Functional Programming in C++11 science + computing ag IT-Dienstleistungen und Software für anspruchsvolle Rechnernetze Tübingen München Berlin Düsseldorf An Overview Programming in a functional style

More information

Chapter 2: Problem Solving Using C++

Chapter 2: Problem Solving Using C++ Chapter 2: Problem Solving Using C++ 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common

More information

Chapter 1. Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705. CS-4337 Organization of Programming Languages

Chapter 1. Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705. CS-4337 Organization of Programming Languages Chapter 1 CS-4337 Organization of Programming Languages Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705 Chapter 1 Topics Reasons for Studying Concepts of Programming

More information

Improving type-error messages in functional languages

Improving type-error messages in functional languages Improving type-error messages in Bastiaan Heeren Universiteit Utrecht January 5, 200 Contents Introduction Constraints Type inference rules Solving constraints Solving inconsistencies Future work Conclusion

More information

[Refer Slide Time: 05:10]

[Refer Slide Time: 05:10] Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture

More information

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1 The Role of Programming in Informatics Curricula A. J. Cowling Department of Computer Science University of Sheffield Structure of Presentation Introduction The problem, and the key concepts. Dimensions

More information

Compiler I: Syntax Analysis Human Thought

Compiler I: Syntax Analysis Human Thought Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

Chapter 5 Parser Combinators

Chapter 5 Parser Combinators Part II Chapter 5 Parser Combinators 5.1 The type of parsers 5.2 Elementary parsers 5.3 Grammars 5.4 Parser combinators 5.5 Parser transformers 5.6 Matching parentheses 5.7 More parser combinators 5.8

More information

Variable Base Interface

Variable Base Interface Chapter 6 Variable Base Interface 6.1 Introduction Finite element codes has been changed a lot during the evolution of the Finite Element Method, In its early times, finite element applications were developed

More information

Programming Languages

Programming Languages Programming Languages Qing Yi Course web site: www.cs.utsa.edu/~qingyi/cs3723 cs3723 1 A little about myself Qing Yi Ph.D. Rice University, USA. Assistant Professor, Department of Computer Science Office:

More information

Lecture 9. Semantic Analysis Scoping and Symbol Table

Lecture 9. Semantic Analysis Scoping and Symbol Table Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax

More information

Programming Languages in Artificial Intelligence

Programming Languages in Artificial Intelligence Programming Languages in Artificial Intelligence Günter Neumann, German Research Center for Artificial Intelligence (LT Lab, DFKI) I. AI programming languages II. Functional programming III. Functional

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

Lecture 1: Introduction

Lecture 1: Introduction Programming Languages Lecture 1: Introduction Benjamin J. Keller Department of Computer Science, Virginia Tech Programming Languages Lecture 1 Introduction 2 Lecture Outline Preview History of Programming

More information

Timber: A Programming Language for Real-Time Embedded Systems

Timber: A Programming Language for Real-Time Embedded Systems Timber: A Programming Language for Real-Time Embedded Systems Andrew P. Black, Magnus Carlsson, Mark P. Jones, Richard Kieburtz and Johan Nordlander Department of Computer Science and Engineering OGI School

More information

White Paper: 5GL RAD Development

White Paper: 5GL RAD Development White Paper: 5GL RAD Development After 2.5 hours of training, subjects reduced their development time by 60-90% A Study By: 326 Market Street Harrisburg, PA 17101 Luis Paris, Ph.D. Associate Professor

More information

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 1 Goals of the Lecture Present an introduction to Objective-C 2.0 Coverage of the language will be INCOMPLETE

More information

On every sheet please give your first name, last name, and matriculation number.

On every sheet please give your first name, last name, and matriculation number. RHEINISCH- WESTFÄLISCHE TECHNISCHE HOCHSCHULE AACHEN LEHR- UND FORSCHUNGSGEBIET INFORMATIK 2 RWTH Aachen D-52056 Aachen GERMANY http://verify.rwth-aachen.de/ LuFG Informatik II Functional Programming Exam,

More information

Scanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm

Scanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Scanning and Parsing Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Today Outline of planned topics for course Overall structure of a compiler Lexical analysis

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

03 - Lexical Analysis

03 - Lexical Analysis 03 - Lexical Analysis First, let s see a simplified overview of the compilation process: source code file (sequence of char) Step 2: parsing (syntax analysis) arse Tree Step 1: scanning (lexical analysis)

More information

Jos Warmer, Independent jos.warmer@openmodeling.nl www.openmodeling.nl

Jos Warmer, Independent jos.warmer@openmodeling.nl www.openmodeling.nl Domain Specific Languages for Business Users Jos Warmer, Independent jos.warmer@openmodeling.nl www.openmodeling.nl Sheet 2 Background Experience Business DSLs Insurance Product Modeling (structure) Pattern

More information

An Overview of a Compiler

An Overview of a Compiler An Overview of a Compiler Department of Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline of the Lecture About the course

More information

Deterministic Discrete Modeling

Deterministic Discrete Modeling Deterministic Discrete Modeling Formal Semantics of Firewalls in Isabelle/HOL Cornelius Diekmann, M.Sc. Dr. Heiko Niedermayer Prof. Dr.-Ing. Georg Carle Lehrstuhl für Netzarchitekturen und Netzdienste

More information

Project Group Applied Functional Programming

Project Group Applied Functional Programming Project Group Applied Functional Programming Web Development with Haskell Meike Grewing, Lukas Heidemann, Fabian Thorand and Fabian Zaiser Informatik, Universität Bonn, Germany Abstract The goal of the

More information

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer How to make the computer understand? Fall 2005 Lecture 15: Putting it all together From parsing to code generation Write a program using a programming language Microprocessors talk in assembly language

More information

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper Parsing Technology and its role in Legacy Modernization A Metaware White Paper 1 INTRODUCTION In the two last decades there has been an explosion of interest in software tools that can automate key tasks

More information

Outline. Adding output

Outline. Adding output Outle Doma Specific Languages Lecture 2: The State Monad and an Imperative DSL Verónica Gaspes ceres School of Information Science, Computer and Electrical Engeerg February 2 Programmg with monads Computations

More information

SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova

SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova Where someone is building a Web application, often he need to use databases to store information, or to manage user accounts. And

More information

Anatomy of Programming Languages. William R. Cook

Anatomy of Programming Languages. William R. Cook Anatomy of Programming Languages William R. Cook Copyright (C) 2013 2 Chapter 1 Preliminaries Preface What? This document is a series of notes about programming languages, originally written for students

More information

Compilation 2012 Domain-Specific Languages and Syntax Extensions

Compilation 2012 Domain-Specific Languages and Syntax Extensions Compilation 2012 and Syntax Extensions Jan Midtgaard Michael I. Schwartzbach Aarhus University GPL Problem Solving The General Purpose Language (GPL) approach: analyze the problem domain express the conceptual

More information

NLUI Server User s Guide

NLUI Server User s Guide By Vadim Berman Monday, 19 March 2012 Overview NLUI (Natural Language User Interface) Server is designed to run scripted applications driven by natural language interaction. Just like a web server application

More information

Chapter One Introduction to Programming

Chapter One Introduction to Programming Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of

More information

1/20/2016 INTRODUCTION

1/20/2016 INTRODUCTION INTRODUCTION 1 Programming languages have common concepts that are seen in all languages This course will discuss and illustrate these common concepts: Syntax Names Types Semantics Memory Management We

More information

Simplifying the Development of Rules Using Domain Specific Languages in DROOLS

Simplifying the Development of Rules Using Domain Specific Languages in DROOLS Simplifying the Development of Rules Using Domain Specific Languages in DROOLS Ludwig Ostermayer, Geng Sun, Dietmar Seipel University of Würzburg, Dept. of Computer Science INAP 2013 Kiel, 12.09.2013 1

More information

Ralf Hinze Generic Programs and Proofs

Ralf Hinze Generic Programs and Proofs Ralf Hinze Generic Programs and Proofs Bonn, 2000 Für Anja, Lisa und Florian Brief contents 1 Introduction 1 2 Background 15 3 Generic programs 53 4 Generic proofs 87 5 Examples 107 6 Generic Haskell 147

More information

Compiler Design. Type Checking

Compiler Design. Type Checking Compiler Design Type Checking Static Checking Token Stream Parser Abstract Syntax Tree Static Checker Decorated Abstract Syntax Tree Intermediate Code Generator Intermediate Code Static (Semantic) Checks

More information

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam. Compilers Spring term Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.es Lecture 1 to Compilers 1 Topic 1: What is a Compiler? 3 What is a Compiler? A compiler is a computer

More information

A Scala DSL for Rete-based Runtime Verification

A Scala DSL for Rete-based Runtime Verification A Scala DSL for Rete-based Runtime Verification Klaus Havelund Jet Propulsion Laboratory California Institute of Technology, California, USA Abstract. Runtime verification (RV) consists in part of checking

More information

Domains and Competencies

Domains and Competencies Domains and Competencies DOMAIN I TECHNOLOGY APPLICATIONS CORE Standards Assessed: Computer Science 8 12 I VII Competency 001: The computer science teacher knows technology terminology and concepts; the

More information

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science Program Schedule CTech Computer Science Credits CS101 Computer Science I 3 MATH100 Foundations of Mathematics and

More information

C Programming Dr. Hasan Demirel

C Programming Dr. Hasan Demirel C How to Program, H. M. Deitel and P. J. Deitel, Prentice Hall, 5 th edition (3 rd edition or above is also OK). Introduction to C Programming Dr. Hasan Demirel Programming Languages There are three types

More information

Visualization of C++ Template Metaprograms

Visualization of C++ Template Metaprograms Introduction Templight Debugger Visualizer Conclusion 1 Zoltán Borók-Nagy, Viktor Májer, József Mihalicza, Norbert Pataki, Zoltán Porkoláb Dept. Programming Languages and Compilers Eötvös Loránd University,

More information

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages Introduction Compiler esign CSE 504 1 Overview 2 3 Phases of Translation ast modifled: Mon Jan 28 2013 at 17:19:57 EST Version: 1.5 23:45:54 2013/01/28 Compiled at 11:48 on 2015/01/28 Compiler esign Introduction

More information

C++ Programming Language

C++ Programming Language C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract

More information

The programming language C. sws1 1

The programming language C. sws1 1 The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

More information

The Mjølner BETA system

The Mjølner BETA system FakePart I FakePartTitle Software development environments CHAPTER 2 The Mjølner BETA system Peter Andersen, Lars Bak, Søren Brandt, Jørgen Lindskov Knudsen, Ole Lehrmann Madsen, Kim Jensen Møller, Claus

More information

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London

More information

Chapter 15 Functional Programming Languages

Chapter 15 Functional Programming Languages Chapter 15 Functional Programming Languages Introduction - The design of the imperative languages is based directly on the von Neumann architecture Efficiency (at least at first) is the primary concern,

More information

Fundamentals of Java Programming

Fundamentals of Java Programming Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors

More information

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming Java has become enormously popular. Java s rapid rise and wide acceptance can be traced to its design

More information

Architectural Design

Architectural Design Software Engineering Architectural Design 1 Software architecture The design process for identifying the sub-systems making up a system and the framework for sub-system control and communication is architectural

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction Standard 2: Technology and Society Interaction Technology and Ethics Analyze legal technology issues and formulate solutions and strategies that foster responsible technology usage. 1. Practice responsible

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

Haskell Programming With Tests, and Some Alloy

Haskell Programming With Tests, and Some Alloy Haskell Programming With Tests, and Some Alloy Jan van Eijck jve@cwi.nl Master SE, 2010 Abstract How to write a program in Haskell, and how to use the Haskell testing tools... QuickCheck is a tool written

More information

Adding GADTs to OCaml the direct approach

Adding GADTs to OCaml the direct approach Adding GADTs to OCaml the direct approach Jacques Garrigue & Jacques Le Normand Nagoya University / LexiFi (Paris) https://sites.google.com/site/ocamlgadt/ Garrigue & Le Normand Adding GADTs to OCaml 1

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming II (#495) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Testing and Tracing Lazy Functional Programs using QuickCheck and Hat

Testing and Tracing Lazy Functional Programs using QuickCheck and Hat Testing and Tracing Lazy Functional Programs using QuickCheck and Hat Koen Claessen 1, Colin Runciman 2, Olaf Chitil 2, John Hughes 1, and Malcolm Wallace 2 1 Chalmers University of Technology, Sweden

More information

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6) Semantic Analysis Scoping (Readings 7.1,7.4,7.6) Static Dynamic Parameter passing methods (7.5) Building symbol tables (7.6) How to use them to find multiply-declared and undeclared variables Type checking

More information

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha Algorithm & Flowchart & Pseudo code Staff Incharge: S.Sasirekha Computer Programming and Languages Computers work on a set of instructions called computer program, which clearly specify the ways to carry

More information

Chapter 13: Program Development and Programming Languages

Chapter 13: Program Development and Programming Languages Understanding Computers Today and Tomorrow 12 th Edition Chapter 13: Program Development and Programming Languages Learning Objectives Understand the differences between structured programming, object-oriented

More information

A Multi-layered Domain-specific Language for Stencil Computations

A Multi-layered Domain-specific Language for Stencil Computations A Multi-layered Domain-specific Language for Stencil Computations Christian Schmitt, Frank Hannig, Jürgen Teich Hardware/Software Co-Design, University of Erlangen-Nuremberg Workshop ExaStencils 2014,

More information

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages ICOM 4036 Programming Languages Preliminaries Dr. Amirhossein Chinaei Dept. of Electrical & Computer Engineering UPRM Spring 2010 Language Evaluation Criteria Readability: the ease with which programs

More information

Division of Mathematical Sciences

Division of Mathematical Sciences Division of Mathematical Sciences Chair: Mohammad Ladan, Ph.D. The Division of Mathematical Sciences at Haigazian University includes Computer Science and Mathematics. The Bachelor of Science (B.S.) degree

More information

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014 CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages Nicki Dell Spring 2014 What is a Programming Language? A set of symbols and associated tools that translate (if necessary) collections

More information

Asymptotic Improvement of Computations over Free Monads

Asymptotic Improvement of Computations over Free Monads Asymptotic Improvement of Computations over Free Monads Janis Voigtländer Institut für Theoretische Informatik Technische Universität Dresden 01062 Dresden, Germany janis.voigtlaender@acm.org Abstract.

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

The Needle Programming Language

The Needle Programming Language The Needle Programming Language The Needle Programming Language 1 What is Needle? Needle is an object-oriented functional programming language with a multimethod-based OO system, and a static type system

More information

Maar hoe moet het dan?

Maar hoe moet het dan? Maar hoe moet het dan? Onderzoek naar feedback in interactieve leeromgevingen bij de Faculteit Informatica Johan Jeuring Met bijdragen van Alex Gerdes, Bastiaan Heeren, Josje Lodder, Harrie Passier, Sylvia

More information

A Framework for Extensible Languages

A Framework for Extensible Languages A Framework for Extensible Languages Sebastian Erdweg TU Darmstadt, Germany Felix Rieger TU Darmstadt, Germany Abstract Extensible programming languages such as SugarJ or Racket enable programmers to introduce

More information

Fun with Phantom Types

Fun with Phantom Types 1 Fun with Phantom Types RALF HINZE Institut für Informatik III, Universität Bonn Römerstraße 164, 53117 Bonn, Germany Email: ralf@informatik.uni-bonn.de Homepage: http://www.informatik.uni-bonn.de/~ralf

More information

F# Web Tools: Rich client/server web applications in F#

F# Web Tools: Rich client/server web applications in F# F# Web Tools: Rich client/server web applications in F# (Unpublished draft) Tomáš Petříček Charles University in Prague Faculty of Mathematics and Physics tomas@tomasp.net Don Syme Microsoft Research,

More information

Adjusted/Modified by Nicole Tobias. Chapter 2: Basic Elements of C++

Adjusted/Modified by Nicole Tobias. Chapter 2: Basic Elements of C++ Adjusted/Modified by Nicole Tobias Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types

More information

A New Advanced Query Web Page and its query language

A New Advanced Query Web Page and its query language A New Advanced Query Web Page and its query language To replace the advanced query web form on www.biocyc.org Mario Latendresse Bioinformatics Research Group SRI International Mario@ai.sri.com 1 The Actual

More information

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases Paul L. Bergstein, Priyanka Gariba, Vaibhavi Pisolkar, and Sheetal Subbanwad Dept. of Computer and Information Science,

More information

The previous chapter provided a definition of the semantics of a programming

The previous chapter provided a definition of the semantics of a programming Chapter 7 TRANSLATIONAL SEMANTICS The previous chapter provided a definition of the semantics of a programming language in terms of the programming language itself. The primary example was based on a Lisp

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information