In Scala, val declares immutable variables and var declares mutable variables. The value of a val cannot be changed after declaration, while the value of a var can be reassigned.
Introducing Language-Oriented Business Applications - Markus VoelterJAXLondon2014
The document introduces language-oriented business applications (LOBA) and language workbenches. LOBA uses domain-specific languages built with language workbenches to provide business users expressive tools for tasks like modeling core domain knowledge, business rules, and calculations. Examples of large LOBA systems are presented, demonstrating how language workbenches can be used to build languages tailored for different business domains. The benefits of LOBAs include improved productivity for business users and developers through features like syntax highlighting, auto-completion, and refactoring support provided by language workbenches.
The document discusses the evolution of different types of computers from the past to present. It begins with the largest and most powerful computers - supercomputers - used for complex calculations. It then discusses mainframe computers, which were the first used by businesses in the 1950s. Minicomputers followed and were common until the 1980s. Personal computers emerged in the 1970s and are now ubiquitous, while workstations fill a performance gap between personal computers and more powerful systems. The document provides details on the size, cost, performance and typical users of each type of computer through history to help students understand how computers have progressed.
The document provides a history of programming languages from the 1940s to the projected year 2100. It discusses early pioneers and the first programming language as well as the evolution of programming languages throughout each decade. Popular modern languages discussed include Python, Java, R, Julia, Lisp, JavaScript, C++, and Mojo in the context of artificial intelligence and machine learning. The document takes a high-level view of the evolution of programming over eight decades from the 1940s to 2000s and looks ahead to future trends.
The document provides a detailed history of programming languages from the 1940s to the projected future. It discusses the evolution of early machine codes and pseudocodes in the 1940s-1950s that paved the way for higher-level languages. Major milestones included the introduction of FORTRAN in 1957, which was one of the first high-level languages, followed by an explosion of new languages in the 1960s. The 1970s saw a focus on simplicity and abstraction with languages like Pascal. Object-oriented programming emerged in the 1980s with C++ and Smalltalk. The rise of the internet in the 1990s drove increased use of scripting languages and the creation of Java. Looking ahead, the future remains uncertain but programming continues
MWLUG 2011: The Never Ending Integration StoryJohn Head
This document outlines an agenda for a presentation on integrating Lotus Notes, Domino, and LotusLive applications with Microsoft Office, .NET, and Lotus Symphony. The presentation covers introductions, getting started with basic integration demos, advanced integration from the Notes client, other applications, and the web. It also discusses looking forward and taking questions. Integration history and tools are reviewed. Advanced demos include using the OpenNTF Contacts Experience template and document generation without a desktop app using OOXML, ODF and PDF standards.
The document provides an overview of Embarcadero's introduction of full Unicode support in RAD Studio and the challenges it presents for migrating existing Delphi applications. It discusses how the fundamental string, character, and pointer types were changed to support Unicode, requiring applications to be updated. The author collected stories from developers who successfully migrated to RAD Studio 2009 and later, and aims to share their experiences and advice to help guide others through the Unicode migration process. Specific areas that may require attention are examined, with examples and suggestions based on real world experiences migrating to the new Unicode-enabled environment in Delphi.
This document provides information about a programming languages concepts course, including details about the course code, title, lecturer, and description. The course aims to describe the evolution of programming languages and understand different computation models or paradigms like imperative, functional, logic and object-oriented programming. It will cover topics like syntax, semantics, data types, expressions and control structures over 13 weeks. Students will complete an assignment on MATLAB/Octave and two term exams. The course objectives are listed as understanding different programming language paradigms and concepts to select the proper language to solve problems.
Introducing Language-Oriented Business Applications - Markus VoelterJAXLondon2014
The document introduces language-oriented business applications (LOBA) and language workbenches. LOBA uses domain-specific languages built with language workbenches to provide business users expressive tools for tasks like modeling core domain knowledge, business rules, and calculations. Examples of large LOBA systems are presented, demonstrating how language workbenches can be used to build languages tailored for different business domains. The benefits of LOBAs include improved productivity for business users and developers through features like syntax highlighting, auto-completion, and refactoring support provided by language workbenches.
The document discusses the evolution of different types of computers from the past to present. It begins with the largest and most powerful computers - supercomputers - used for complex calculations. It then discusses mainframe computers, which were the first used by businesses in the 1950s. Minicomputers followed and were common until the 1980s. Personal computers emerged in the 1970s and are now ubiquitous, while workstations fill a performance gap between personal computers and more powerful systems. The document provides details on the size, cost, performance and typical users of each type of computer through history to help students understand how computers have progressed.
The document provides a history of programming languages from the 1940s to the projected year 2100. It discusses early pioneers and the first programming language as well as the evolution of programming languages throughout each decade. Popular modern languages discussed include Python, Java, R, Julia, Lisp, JavaScript, C++, and Mojo in the context of artificial intelligence and machine learning. The document takes a high-level view of the evolution of programming over eight decades from the 1940s to 2000s and looks ahead to future trends.
The document provides a detailed history of programming languages from the 1940s to the projected future. It discusses the evolution of early machine codes and pseudocodes in the 1940s-1950s that paved the way for higher-level languages. Major milestones included the introduction of FORTRAN in 1957, which was one of the first high-level languages, followed by an explosion of new languages in the 1960s. The 1970s saw a focus on simplicity and abstraction with languages like Pascal. Object-oriented programming emerged in the 1980s with C++ and Smalltalk. The rise of the internet in the 1990s drove increased use of scripting languages and the creation of Java. Looking ahead, the future remains uncertain but programming continues
MWLUG 2011: The Never Ending Integration StoryJohn Head
This document outlines an agenda for a presentation on integrating Lotus Notes, Domino, and LotusLive applications with Microsoft Office, .NET, and Lotus Symphony. The presentation covers introductions, getting started with basic integration demos, advanced integration from the Notes client, other applications, and the web. It also discusses looking forward and taking questions. Integration history and tools are reviewed. Advanced demos include using the OpenNTF Contacts Experience template and document generation without a desktop app using OOXML, ODF and PDF standards.
The document provides an overview of Embarcadero's introduction of full Unicode support in RAD Studio and the challenges it presents for migrating existing Delphi applications. It discusses how the fundamental string, character, and pointer types were changed to support Unicode, requiring applications to be updated. The author collected stories from developers who successfully migrated to RAD Studio 2009 and later, and aims to share their experiences and advice to help guide others through the Unicode migration process. Specific areas that may require attention are examined, with examples and suggestions based on real world experiences migrating to the new Unicode-enabled environment in Delphi.
This document provides information about a programming languages concepts course, including details about the course code, title, lecturer, and description. The course aims to describe the evolution of programming languages and understand different computation models or paradigms like imperative, functional, logic and object-oriented programming. It will cover topics like syntax, semantics, data types, expressions and control structures over 13 weeks. Students will complete an assignment on MATLAB/Octave and two term exams. The course objectives are listed as understanding different programming language paradigms and concepts to select the proper language to solve problems.
This document outlines the syllabus for an Object Oriented Programming course in Java. The course aims to teach students the principles of OOP using Java, including classes, objects, inheritance, polymorphism, exceptions handling, and more. It covers topics like Java basics, GUI programming, JDBC, collections, and multithreading. The course objectives are to enable students to write Java programs that solve problems and demonstrate good OOP skills. The content includes revising Java principles, learning about classes, interfaces, packages and more.
This document outlines the syllabus for an Object Oriented Programming course in Java. The course aims to teach students the principles of OOP using Java, including classes, objects, inheritance, polymorphism, interfaces, exceptions handling, and more. It will cover both programming concepts in Java as well as GUI, database connectivity, collections, and multithreading. The course content is presented over several classes and includes lectures, practical sessions, and assessed exercises.
Introduction to Python GUI development with Delphi for Python - Part 1: Del...Embarcadero Technologies
Learn how Embarcadero’s newly released free Python modules bring the power and flexibility of Delphi’s GUI frameworks to Python. VCL and FireMonkey (FMX) are mature GUI libraries. VCL is focused on native Windows development, while FireMonkey brings a powerful flexible GUI framework to Windows, Linux, macOS, and even Android. This webinar will introduce you to these new free Python modules and how you can use them to build graphical users interfaces with Python. Part 2 will show you how to target Android GUI applications with Python!
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, the evolution of operating systems, and different types of programming languages from machine code to high-level languages like C. The chapter also summarizes the history and uses of C, C++, and Java, and covers structured programming, typical development environments, and trends like hardware improvements and the internet. The objectives are to understand basic computer concepts and familiarize readers with various programming languages and their applications.
The document provides an overview of a compilers design and construction course. It discusses the various phases of compilation including lexical analysis, syntax analysis, semantic analysis, code generation, and optimization. The course aims to introduce the principles and techniques used in compiler construction and the issues that arise in developing a compiler. The course will cover topics like lexical analysis, syntax analysis, semantic analysis, intermediate code generation, control flow, code optimization and code generation over its 12 weeks.
Whether you are in the early planning stages of migrating an existing application to Unicode-enabled RAD Studio, or in the midst of the process, Delphi Unicode Migration for Mere Mortals can help. Written with input from many of the leaders in the RAD Studio community, this white paper provides you with valuable techniques and advice that will smooth the way.
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, as well as different types of programming languages like machine language, assembly language, and high-level languages. The chapter also summarizes the history and uses of C, C++, Java, and the standard library. It outlines the typical process of developing a C program and trends in hardware, networking, and the internet.
This document provides an overview of the basics of Python programming. It discusses that Python is a simple, easy to learn, high-level, interpreted, object-oriented, extensible and portable programming language. It has an extensive standard library and is free and open source. The document also provides a brief history of Python, describing its creation and key releases over time. It outlines some basic Python concepts like variables, data types, operators, expressions and input/output.
Delphi 1 to Delphi XE7: 20 years of Continuous Innovation by David IDavid Intersimone
This slide deck contains the release dates and technology innovations for each release of Delphi from version 1.0 to version XE7. The slide deck covers 20 years of continuous development tools, compiler, development environment, runtime library, components and frameworks developments. There's more ahead for developers in the years to come.
This presentation is part of the #DelphiWeek celebration of innovation taking place on line during the week of February 9 to February 13, 2015.
This chapter introduces key concepts related to computers, programming languages, and Java. It describes the basic parts of a computer and how they work together. It outlines the evolution of operating systems and different models of computing. It also discusses the history and characteristics of various programming languages like Java, C++, and FORTRAN. Additionally, it introduces object-oriented programming concepts like classes, objects, and design patterns. Finally, it provides an overview of the structure of a typical Java development environment.
IamLUG 2011: The Never Ending Integration Story: How to Integrate Your Lotus ...John Head
This document provides an agenda for a presentation on integrating Lotus Notes, Domino, and LotusLive applications with Microsoft Office, .NET, and Lotus Symphony. The agenda includes introductions, "Getting Started" demos of basic integration techniques, advanced integration demos from the Notes client, other applications, and the web, and a section on looking forward. It aims to build on past integration presentations and include updated demos taking advantage of the latest software versions.
This document provides a timeline of major programming languages from 1954 to 2004. It includes over 50 languages and was originally created by Éric Lévénez, then augmented by O'Reilly authors. The timeline shows the emergence and development of new languages over the past 50 years, with O'Reilly helping developers learn and stay up to date with changing technologies through their books and online resources.
This document provides an overview and introduction to a course on principles of compiler design. It discusses the motivation for studying compilers, as language processing is important for many software applications. It outlines what will be covered in the course, including the theoretical foundations and practical techniques for developing lexical analyzers, parsers, type checkers, code generators, and more. The document also describes the organization of the course with lectures, programming assignments, and exams.
This document provides an introduction to C++ programming. It discusses the basic elements of a C++ program including variables, input/output, comments, and memory. It then explains how a simple C++ program is compiled, showing the compilation process and different compiler options. Finally, it provides an overview of how C++ compilation works, outlining the steps of preprocessing, compilation, and linking.
This document provides an introduction to C++ programming. It discusses the basic elements of a C++ program including variables, input/output, comments, and memory. It then explains how a simple C++ program is compiled and executed. The document also provides a brief overview of programming and how C++ programs are compiled, involving preprocessing, compilation, and linking. Key concepts introduced include variables, data types, and the use of streams for input/output.
This document is a timeline from 1960 to 2004 that highlights 50 major programming languages. It was created by Éric Lévénez and augmented by O'Reilly authors and others. For over 50 years, O'Reilly has provided technical information to developers as new languages have emerged and evolved, to help them learn something new or answer tough questions.
A programming language is a formal language used to describe computations. It consists of syntax, semantics, and tools like compilers or interpreters. Programming languages support different paradigms like procedural, functional, object-oriented, and logic-based approaches. Variables are named locations in memory that hold values and have properties like name, scope, type, and values.
Applications of the Reverse Engineering Language REILzynamics GmbH
1) REIL is a platform-independent intermediate language designed for reverse engineering. It has a small instruction set and simple operand types to simplify analysis.
2) Applications of REIL include register tracking to follow data flow, index underflow detection to find bugs, automated deobfuscation to make code more readable, and ROP gadget generation to create return-oriented shellcode.
3) Future work includes developing BinAudit with more vulnerability research algorithms and type reconstruction to determine higher-level data types in registers.
This document discusses syntactic editor services including formatting, syntax coloring, and syntactic completion. It describes how syntactic completion can be provided generically based on a syntax definition. The document also discusses how context-free grammars can be extended with templates to specify formatting layout when pretty-printing abstract syntax trees to text. Templates are used to insert whitespace, line breaks, and indentation to produce readable output.
This document outlines the syllabus for an Object Oriented Programming course in Java. The course aims to teach students the principles of OOP using Java, including classes, objects, inheritance, polymorphism, exceptions handling, and more. It covers topics like Java basics, GUI programming, JDBC, collections, and multithreading. The course objectives are to enable students to write Java programs that solve problems and demonstrate good OOP skills. The content includes revising Java principles, learning about classes, interfaces, packages and more.
This document outlines the syllabus for an Object Oriented Programming course in Java. The course aims to teach students the principles of OOP using Java, including classes, objects, inheritance, polymorphism, interfaces, exceptions handling, and more. It will cover both programming concepts in Java as well as GUI, database connectivity, collections, and multithreading. The course content is presented over several classes and includes lectures, practical sessions, and assessed exercises.
Introduction to Python GUI development with Delphi for Python - Part 1: Del...Embarcadero Technologies
Learn how Embarcadero’s newly released free Python modules bring the power and flexibility of Delphi’s GUI frameworks to Python. VCL and FireMonkey (FMX) are mature GUI libraries. VCL is focused on native Windows development, while FireMonkey brings a powerful flexible GUI framework to Windows, Linux, macOS, and even Android. This webinar will introduce you to these new free Python modules and how you can use them to build graphical users interfaces with Python. Part 2 will show you how to target Android GUI applications with Python!
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, the evolution of operating systems, and different types of programming languages from machine code to high-level languages like C. The chapter also summarizes the history and uses of C, C++, and Java, and covers structured programming, typical development environments, and trends like hardware improvements and the internet. The objectives are to understand basic computer concepts and familiarize readers with various programming languages and their applications.
The document provides an overview of a compilers design and construction course. It discusses the various phases of compilation including lexical analysis, syntax analysis, semantic analysis, code generation, and optimization. The course aims to introduce the principles and techniques used in compiler construction and the issues that arise in developing a compiler. The course will cover topics like lexical analysis, syntax analysis, semantic analysis, intermediate code generation, control flow, code optimization and code generation over its 12 weeks.
Whether you are in the early planning stages of migrating an existing application to Unicode-enabled RAD Studio, or in the midst of the process, Delphi Unicode Migration for Mere Mortals can help. Written with input from many of the leaders in the RAD Studio community, this white paper provides you with valuable techniques and advice that will smooth the way.
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, as well as different types of programming languages like machine language, assembly language, and high-level languages. The chapter also summarizes the history and uses of C, C++, Java, and the standard library. It outlines the typical process of developing a C program and trends in hardware, networking, and the internet.
This document provides an overview of the basics of Python programming. It discusses that Python is a simple, easy to learn, high-level, interpreted, object-oriented, extensible and portable programming language. It has an extensive standard library and is free and open source. The document also provides a brief history of Python, describing its creation and key releases over time. It outlines some basic Python concepts like variables, data types, operators, expressions and input/output.
Delphi 1 to Delphi XE7: 20 years of Continuous Innovation by David IDavid Intersimone
This slide deck contains the release dates and technology innovations for each release of Delphi from version 1.0 to version XE7. The slide deck covers 20 years of continuous development tools, compiler, development environment, runtime library, components and frameworks developments. There's more ahead for developers in the years to come.
This presentation is part of the #DelphiWeek celebration of innovation taking place on line during the week of February 9 to February 13, 2015.
This chapter introduces key concepts related to computers, programming languages, and Java. It describes the basic parts of a computer and how they work together. It outlines the evolution of operating systems and different models of computing. It also discusses the history and characteristics of various programming languages like Java, C++, and FORTRAN. Additionally, it introduces object-oriented programming concepts like classes, objects, and design patterns. Finally, it provides an overview of the structure of a typical Java development environment.
IamLUG 2011: The Never Ending Integration Story: How to Integrate Your Lotus ...John Head
This document provides an agenda for a presentation on integrating Lotus Notes, Domino, and LotusLive applications with Microsoft Office, .NET, and Lotus Symphony. The agenda includes introductions, "Getting Started" demos of basic integration techniques, advanced integration demos from the Notes client, other applications, and the web, and a section on looking forward. It aims to build on past integration presentations and include updated demos taking advantage of the latest software versions.
This document provides a timeline of major programming languages from 1954 to 2004. It includes over 50 languages and was originally created by Éric Lévénez, then augmented by O'Reilly authors. The timeline shows the emergence and development of new languages over the past 50 years, with O'Reilly helping developers learn and stay up to date with changing technologies through their books and online resources.
This document provides an overview and introduction to a course on principles of compiler design. It discusses the motivation for studying compilers, as language processing is important for many software applications. It outlines what will be covered in the course, including the theoretical foundations and practical techniques for developing lexical analyzers, parsers, type checkers, code generators, and more. The document also describes the organization of the course with lectures, programming assignments, and exams.
This document provides an introduction to C++ programming. It discusses the basic elements of a C++ program including variables, input/output, comments, and memory. It then explains how a simple C++ program is compiled, showing the compilation process and different compiler options. Finally, it provides an overview of how C++ compilation works, outlining the steps of preprocessing, compilation, and linking.
This document provides an introduction to C++ programming. It discusses the basic elements of a C++ program including variables, input/output, comments, and memory. It then explains how a simple C++ program is compiled and executed. The document also provides a brief overview of programming and how C++ programs are compiled, involving preprocessing, compilation, and linking. Key concepts introduced include variables, data types, and the use of streams for input/output.
This document is a timeline from 1960 to 2004 that highlights 50 major programming languages. It was created by Éric Lévénez and augmented by O'Reilly authors and others. For over 50 years, O'Reilly has provided technical information to developers as new languages have emerged and evolved, to help them learn something new or answer tough questions.
A programming language is a formal language used to describe computations. It consists of syntax, semantics, and tools like compilers or interpreters. Programming languages support different paradigms like procedural, functional, object-oriented, and logic-based approaches. Variables are named locations in memory that hold values and have properties like name, scope, type, and values.
Applications of the Reverse Engineering Language REILzynamics GmbH
1) REIL is a platform-independent intermediate language designed for reverse engineering. It has a small instruction set and simple operand types to simplify analysis.
2) Applications of REIL include register tracking to follow data flow, index underflow detection to find bugs, automated deobfuscation to make code more readable, and ROP gadget generation to create return-oriented shellcode.
3) Future work includes developing BinAudit with more vulnerability research algorithms and type reconstruction to determine higher-level data types in registers.
This document discusses syntactic editor services including formatting, syntax coloring, and syntactic completion. It describes how syntactic completion can be provided generically based on a syntax definition. The document also discusses how context-free grammars can be extended with templates to specify formatting layout when pretty-printing abstract syntax trees to text. Templates are used to insert whitespace, line breaks, and indentation to produce readable output.
This document provides an overview of parsing in compiler construction. It discusses context-free grammars and how they are used to generate sentences and parse trees through derivations. It also covers ambiguity that can arise from grammars and various grammar transformations used to eliminate ambiguity, including defining associativity and priority. The dangling else problem is presented as an example of an ambiguous grammar.
This document provides an overview of the Lecture 2 on Declarative Syntax Definition for the CS4200 Compiler Construction course. The lecture covers the specification of syntax definition from which parsers can be derived, the perspective on declarative syntax definition using SDF, and reading material on the SDF3 syntax definition formalism and papers on testing syntax definitions and declarative syntax. It also discusses what syntax is, both in linguistics and programming languages, and how programs can be described in terms of syntactic categories and language constructs. An example Tiger program for solving the n-queens problem is presented to illustrate syntactic categories in Tiger.
This document provides an overview of the CS4200 Compiler Construction course at TU Delft. It discusses the course organization, structure, and assessment. The course is split into two parts - CS4200-A which covers concepts and techniques through lectures, papers, and homework assignments, and CS4200-B which involves building a compiler for a subset of Java as a semester-long project. Students will use the Spoofax language workbench to implement their compiler and will submit assignments through a private GitLab repository.
A Direct Semantics of Declarative Disambiguation RulesEelco Visser
This document discusses research into providing a direct semantics for declarative disambiguation of expression grammars. It aims to define what disambiguation rules mean, ensure they are safe and complete, and provide an effective implementation strategy. The document outlines key research questions around the meaning, safety, completeness and coverage of disambiguation rules. It also presents contributions around using subtree exclusion patterns to define safe and complete disambiguation for classes of expression grammars, and implementing this in SDF3.
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 17 | Beyond Compiler ConstructionEelco Visser
Compiler construction techniques are applied beyond general-purpose languages through domain-specific languages (DSLs). The document discusses several DSLs developed using Spoofax including:
- WebDSL for web programming with sub-languages for entities, queries, templates, and access control.
- IceDust for modeling information systems with derived values computed on-demand, incrementally, or eventually consistently.
- PixieDust for client-side web programming with views as derived values updated incrementally.
- PIE for defining software build pipelines as tasks with dynamic dependencies computed incrementally.
The document also outlines several research challenges in compiler construction like high-level declarative language definition, verification of
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Eelco Visser
This document discusses domain-specific languages (DSLs) for parallel graph analytics using PGX. It describes how DSLs allow users to implement graph algorithms and queries using high-level languages that are then compiled and optimized to run efficiently on PGX. Examples of DSL optimizations like multi-source breadth-first search are provided. The document also outlines the extensible compiler architecture used for DSLs, which can generate code for different backends like shared memory or distributed memory.
Compiler Construction | Lecture 15 | Memory ManagementEelco Visser
The document discusses different memory management techniques:
1. Reference counting counts the number of pointers to each record and deallocates records with a count of 0.
2. Mark and sweep marks all reachable records from program roots and sweeps unmarked records, adding them to a free list.
3. Copying collection copies reachable records to a "to" space, allowing the original "from" space to be freed without fragmentation.
4. Generational collection focuses collection on younger object generations more frequently to improve efficiency.
Compiler Construction | Lecture 14 | InterpretersEelco Visser
This document summarizes a lecture on interpreters for programming languages. It discusses how operational semantics can be used to define the meaning of a program through state transitions in an interpreter. It provides examples of defining the semantics of a simple language using DynSem, a domain-specific language for specifying operational semantics. DynSem specifications can be compiled to interpreters that execute programs in the defined language.
Compiler Construction | Lecture 13 | Code GenerationEelco Visser
The document discusses code generation and optimization techniques, describing compilation schemas that define how language constructs are translated to target code patterns, and covers topics like ensuring correctness of generated code through type checking and verification of static constraints on the target format. It also provides examples of compilation schemas for Tiger language constructs like arithmetic expressions and control flow and discusses generating nested functions.
Compiler Construction | Lecture 12 | Virtual MachinesEelco Visser
The document discusses the architecture of the Java Virtual Machine (JVM). It describes how the JVM uses threads, a stack, heap, and method area. It explains JVM control flow through bytecode instructions like goto, and how the operand stack is used to perform operations and hold method arguments and return values.
Compiler Construction | Lecture 9 | Constraint ResolutionEelco Visser
This document provides an overview of constraint resolution in the context of a compiler construction lecture. It discusses unification, which is the basis for many type inference and constraint solving approaches. It also describes separating type checking into constraint generation and constraint solving, and introduces a constraint language that integrates name resolution into constraint resolution through scope graph constraints. Finally, it discusses papers on further developments with this approach, including addressing expressiveness and staging issues in type systems through the Statix DSL for defining type systems.
Compiler Construction | Lecture 8 | Type ConstraintsEelco Visser
This lecture covers type checking with constraints. It introduces the NaBL2 meta-language for writing type specifications as constraint generators that map a program to constraints. The constraints are then solved to determine if a program is well-typed. NaBL2 supports defining name binding and type structures through scope graphs and constraints over names, types, and scopes. Examples show type checking patterns in NaBL2 including variables, functions, records, and name spaces.
Compiler Construction | Lecture 7 | Type CheckingEelco Visser
This document summarizes a lecture on type checking. It discusses using constraints to separate the language-specific type checking rules from the language-independent solving algorithm. Constraint-based type checking collects constraints as it traverses the AST, then solves the constraints in any order. This allows type information to be learned gradually and avoids issues with computation order.
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
How Barcodes Can Be Leveraged Within Odoo 17Celine George
In this presentation, we will explore how barcodes can be leveraged within Odoo 17 to streamline our manufacturing processes. We will cover the configuration steps, how to utilize barcodes in different manufacturing scenarios, and the overall benefits of implementing this technology.
🔥🔥🔥🔥🔥🔥🔥🔥🔥
إضغ بين إيديكم من أقوى الملازم التي صممتها
ملزمة تشريح الجهاز الهيكلي (نظري 3)
💀💀💀💀💀💀💀💀💀💀
تتميز هذهِ الملزمة بعِدة مُميزات :
1- مُترجمة ترجمة تُناسب جميع المستويات
2- تحتوي على 78 رسم توضيحي لكل كلمة موجودة بالملزمة (لكل كلمة !!!!)
#فهم_ماكو_درخ
3- دقة الكتابة والصور عالية جداً جداً جداً
4- هُنالك بعض المعلومات تم توضيحها بشكل تفصيلي جداً (تُعتبر لدى الطالب أو الطالبة بإنها معلومات مُبهمة ومع ذلك تم توضيح هذهِ المعلومات المُبهمة بشكل تفصيلي جداً
5- الملزمة تشرح نفسها ب نفسها بس تكلك تعال اقراني
6- تحتوي الملزمة في اول سلايد على خارطة تتضمن جميع تفرُعات معلومات الجهاز الهيكلي المذكورة في هذهِ الملزمة
واخيراً هذهِ الملزمة حلالٌ عليكم وإتمنى منكم إن تدعولي بالخير والصحة والعافية فقط
كل التوفيق زملائي وزميلاتي ، زميلكم محمد الذهبي 💊💊
🔥🔥🔥🔥🔥🔥🔥🔥🔥
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
This document provides an overview of wound healing, its functions, stages, mechanisms, factors affecting it, and complications.
A wound is a break in the integrity of the skin or tissues, which may be associated with disruption of the structure and function.
Healing is the body’s response to injury in an attempt to restore normal structure and functions.
Healing can occur in two ways: Regeneration and Repair
There are 4 phases of wound healing: hemostasis, inflammation, proliferation, and remodeling. This document also describes the mechanism of wound healing. Factors that affect healing include infection, uncontrolled diabetes, poor nutrition, age, anemia, the presence of foreign bodies, etc.
Complications of wound healing like infection, hyperpigmentation of scar, contractures, and keloid formation.
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
A Visual Guide to 1 Samuel | A Tale of Two HeartsSteve Thomason
These slides walk through the story of 1 Samuel. Samuel is the last judge of Israel. The people reject God and want a king. Saul is anointed as the first king, but he is not a good king. David, the shepherd boy is anointed and Saul is envious of him. David shows honor while Saul continues to self destruct.
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
Temple of Asclepius in Thrace. Excavation resultsKrassimira Luka
The temple and the sanctuary around were dedicated to Asklepios Zmidrenus. This name has been known since 1875 when an inscription dedicated to him was discovered in Rome. The inscription is dated in 227 AD and was left by soldiers originating from the city of Philippopolis (modern Plovdiv).
2. Overview
today’s lecture
A new course
• from IN1605-B to TI1220
What is this course about?
• why study concepts of programming languages?
How is this course organized?
• lectures and assignments
Introduction to Scala
• writing and running Scala programs
TI1220 - Introduction 2
4. A New Course
the only constant is change
IN1605-B: Algoritmen en Programmeertalen:
Programmeertalen
• 4 ECTS
• Haskell + C
• Peter Kluijt
TI1220: Concepten van Programmeertalen
• 6 ECTS
• Scala + C + JavaScript
• Eelco Visser
TI1220 - Introduction 4
5. Under New Management
Eelco Visser
Lecturer
• Dr. Eelco Visser
• UHD in Software Engineering Research Group
• http://eelcovisser.org
• Contact: e.visser@tudelft.nl
• first ask student assistants
• send questions by email
• appointment if necessary
TI1220 - Introduction 5
6. My Research
software language design & engineering
Spoofax Language Workbench
• design and implement languages & IDEs
• from high-level declarative specification
Domain-specific language design
• WebDSL: a DSL for web programming
• Mobl: a DSL for mobile web applications
Interaction design
• researchr.org: building a digital library
TI1220 - Introduction 6
7. Examination Old Course
You can still sit for exams of IN1605-B
• Provided you have finished the lab (practicum)
Sittings
• Together with exam for this course (TI1220)
• April 11, 2010
• June 22, 2010
TI1220 - Introduction 7
8. Feedback Appreciated
An invitation to Murphy
• New content
• New software
• New lectures, assignments, exams
• New lecturer
• New assistants (mostly)
Please let us know how it goes
• report problems early
• also let us know what goes right :)
TI1220 - Introduction 8
13. Turing Machines
computability
Turing/Church Thesis
• Every effective computation can be carried out by a
Turing machine*
Corollary
• All (Turing Complete) programming languages can
express all effective computations
• Why bother with new programming languages?
(*) see IN2505
TI1220 - Introduction 13
15. Programming Languages in TI
TI1200: Object-Oriented Programming
• Java
TI1400: Computer Systems
• Assembly
TI1500: Web- and Database Technology
• HTML, PHP, SQL, JavaScript
TI1600: Multi-Agent Systems
• Prolog, GOAL
TI1220 - Introduction 15
16. “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.
TI1220 - Introduction 16
17. Understanding Computation
purpose of programming languages
Encoding computation
• Computer needs list of instructions to move its parts
Understanding computation
• Discuss concepts
• Formulate algorithms
• Reason about problem solutions
Programming languages are for people
TI1220 - Introduction 17
18. Increasing the Level of Abstraction
concepts of programming languages
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
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
http://en.wikipedia.org/wiki/Calling_convention
def f(x)={ ... } f(e1)
TI1220 - Introduction 18
19. Programming Models
concepts of programming languages
Language provides model of computation
• data & operations, composition & abstraction
Language targets application domain
• Systems programming
• Embedded systems
• Web programming
• Enterprise software
TI1220 - Introduction 19
20. Programming Language DNA
concepts of programming languages
Scope and binding
• declaration and binding of names, free and bound
occurrences, renaming, substitution
Data structures
• product and sum types, records, recursive types
Modularization and data abstraction
• modules, classes, higher-order functions, class-based
vs prototype inheritance
Syntax and interpretation
TI1220 - Introduction 20
21. Why Study Concepts?
concepts of programming languages
Design abstractions for new domains
• from library to language feature
• apply PL techniques (MapReduce)
Learn new computational models
• understand fundamental ideas underlying PLs
• experience with variety of models
• learn new languages in future
Choosing the right language
TI1220 - Introduction 21
22. Goals of this Course
concepts of programming languages
• Understand programming languages and programs in
terms of concepts that transcend individual languages
• Consider advantages and disadvantages in the use of
particular languages and concepts
• Analyze programs in terms of concepts
• Application of concepts in designing programs
TI1220 - Introduction 22
23. Approach
concepts of programming languages
Study three concrete languages
• Scala + C + JavaScript
• Learn to program in these languages
• Learn concepts by using them in programming
• Programming assignments about languages
Generalize
• What are the underlying ideas?
• Learn to learn new languages
TI1220 - Introduction 23
24. Scala
functional programming
• Lecture 1: Getting Started with Scala
• Lecture 2: Functional Objects
• Lecture 3: Functions & Closures
• Lecture 4: List Programming (Recursion)
• Lecture 5: Trees & XML
• Lecture 6: Composition, Inheritance, Traits
• Lecture 7: Modular Programming
• Assignment: interpreter for tiny functional language
TI1220 - Introduction 24
25. C
systems programming
• Lecture 8: Memory Management
• stack vs heap
• pointers
• Lecture 9: Implementing Objects
• function pointers
• simulating dynamic dispatch
• Assignment: implementing OO in C
TI1220 - Introduction 25
26. JavaScript
web programming
Prototype-Based Object-Oriented Language
• Lecture 10: Prototypal Inheritance
• History: Smalltalk, Self (Squeak)
• Lecture 11: Asynchronous functions
• Lecture 12: DOM manipulation
• Lecture 13: Regular expressions
• Lecture 14: mobl: a domain-specific language for the
mobile web
• Assignment: playing with prototypes
TI1220 - Introduction 26
27. Meta-Programming
implementation of programming languages
Other courses consider internals of languages
• IN2505: Fundamental Computer Science 2: Theory of Computation
• grammars and automata
• IN4303: Compiler Construction
• translation of high-level source to machine language
• IN4308: Model-Driven Software Development
• design of domain-specific software languages
TI1220 - Introduction 27
29. Ingredients
course organization
This is a semester course
• Q3 + Q4
Lectures
• Tuesday morning
Practicum
• on Tuesday or Thursday afternoon
• Exercises + Graded Assignments
Exams
TI1220 - Introduction 29
30. Exams
course organization
Exam 1
• Monday 11 April, 2011, 9:00-12:00
• E1: about material of Q3 (Scala)
Exam 2
• Wednesday, 22 June, 2011, 9:00-12:00
• If Exam 1 >= 6
• then E2a: material of Q4 (C+JavaScript)
• else E2b: material Q3+Q4 (Scala+C+JavaScript)
TI1220 - Introduction 30
31. Exams
course organization
Exam 3 (resit)
• If Exam 2 < 6, even if Exam 1 >= 6
• Wednesday, 24 August, 2011, 9:00-12:00
• E3: material Q3+Q4 (Scala+C+JavaScript)
Note
• next year programming exams
TI1220 - Introduction 31
32. Practicum
course organization
Scala (Q3)
• Exercises: hand in on paper to assistants at end of lab!
• Assignment 1 (graded)
C (Q4)
• Assignment 2 (graded)
JavaScript (Q4)
• Assignment 3 (graded)
Graded assignments should be submitted as code
TI1220 - Introduction 32
33. Final Grade
course organization
val H = all exercises handed in
val A = 0.4*A1 + 0.3*A2 + 0.3*A3
val E2 = if(E1 >= 6) (E1 + E2a)/2
else E2b
val E = if(E2 >= 6) E2 else E3
val G = if(H && Ai >= 6 && E >= 6)
0.4*A + 0.6E
else min(E, 5)
TI1220 - Introduction 33
35. Practicum Assistants
course organization
Tuesday Thursday
Maartje de Jonge Sander van der Burg
Laurent Verweijen Bart van Vuuren
Vlad Vergu Peter Pul
Joost Heijkoop
TI1220 - Introduction 35
38. Programming Language Schools
imperative vs functional programming
Imperative Programming (Algol, C, Pascal)
• programming with side effects
• structured control-flow
Object-Oriented Programming (C++, Java)
• imperative programming with data abstraction
Functional Programming (ML, Haskell)
• functions as first-class citizens
• immutable data (pure)
TI1220 - Introduction 38
39. Pizza
history
POPL 1997 Philip Wadler, Martin Odersky, Gilad Bracha, Dave Stoutamire (source: http://lamp.epfl.ch/pizza/gj/)
• "Pizza into Java: Translating theory into practice", Martin Odersky and
Philip Wadler. Proc. 24th ACM Symposium on Principles of Programming
Languages, Paris, France, January 1997.
Extending Java with Functional Concepts
• Parametric polymorphism (generics)
• First-class functions (function pointers)
• Algebraic data types (class cases and pattern matching)
Continued in GJ and Java Generics
TI1220 - Introduction 39
40. Scala
history
A Scalable Language
• object-oriented + functional programming
Properties
• compatible (combines with Java)
• concise (sugar + abstractions)
• high-level
• statically typed
Designed by Martin Odersky et al. at EPFL
TI1220 - Introduction 40
41. Scala in Industry
history
Scala at Twitter
• Ruby-on-Rails did not scale
• Replaced back-end processing (API) with Scala
BankSimple
• Back-end services in Scala or Clojure
Alex Payne
• Programming Scala by Wampler & Payne
TI1220 - Introduction 41
42. Programming in Scala
Book
Programming in Scala
A comprehensive step-by-step guide
by Martin Odersky, Lex Spoon, and Bill Venners
http://www.artima.com/shop/programming_in_scala
Available as e-book (PDF)
Lectures are based on book; not everything in book is on slides; reading
book is required; see Literature slides at end of each lecture for required
reading!
TI1220 - Introduction 42
43. Installing Scala
Download Interpreter & Compiler
• Make your own installation (assignment 1)
• http://www.scala-lang.org/downloads
Editors
• Emacs, Vi, <your favorite editor>
Integrated Development Environments
• Plugins for Eclipse, IntelliJ, NetBeans
B:2.1 TI1220 - Introduction 43
44. The Scala Interpreter
$ scala
Welcome to Scala version 2.8.0.final (Java HotSpot(TM)
64-Bit Server VM, Java 1.6.0_22).
Type in expressions to have them evaluated.
Type :help for more information..
B:2.1 TI1220 - Introduction 44
47. Variable Declaration and Use
binding values to names
scala> val msg = "Hello, world!"
msg: java.lang.String = Hello, world!
scala> val msg2: java.lang.String =
| "Hello again, world!"
msg2: java.lang.String = Hello again, world!
scala> val msg3: String = "Hello yet again, world!"
msg3: String = Hello yet again, world!
scala> println(msg)
Hello, world!
B:2.2 TI1220 - Introduction 47
48. Immutable and Mutable Variables
changing value bound to name
scala> msg = "Goodbye cruel world!"
<console>:6: error: reassignment to val
msg = "Goodbye cruel world!"
scala> var greeting = "Hello, world!"
greeting: java.lang.String = Hello, world!
scala> greeting = "Leave me alone, world!"
greeting: java.lang.String = Leave me alone, world!
B:2.3 TI1220 - Introduction 48
49. Function Definition and Call
binding functions to names
scala> def max(x: Int, y: Int): Int = {
if (x > y) x
else y
}
max: (x: Int,y: Int)Int
scala> max(3, 5)
res2: Int = 5
scala> def max2(x: Int, y: Int) = if (x > y) x else y
max: (x: Int,y: Int)Int
B:2.3 TI1220 - Introduction 49
50. Unit
the type of side effects
scala> def greet() = println("Hello, world!")
greet: ()Unit
scala> greet()
Hello, world!
B:2.3 TI1220 - Introduction 50
56. Functional Style
Functional style
• functions are values
• operations map input values to output values
• instead of changing values in place (side effects)
A balanced attitude
• Prefer vals, immutable objects, and methods without side effects.
• Use vars, mutable objects, and methods with side effects when you have
a specific need and justification for them.
B:3.11 TI1220 - Introduction 56
57. $ scala linecounts.scala linecounts.scala
22 | import scala.io.Source
0 |
55 | def widthOfLength(s: String) = s.length.toString.length
0 |
22 | if (args.length > 0) {
54 | val lines = Source.fromFile(args(0)).getLines.toList
37 | val longestLine = lines.reduceLeft(
49 | (a, b) => if (a.length > b.length) a else b
3 | )
43 | val maxWidth = widthOfLength(longestLine)
23 | for (line <- lines) {
50 | val numSpaces = maxWidth - widthOfLength(line)
33 | val padding = " " * numSpaces
47 | println(padding + line.length +" | "+ line)
3 | }
1 | }
4 | else
46 | Console.err.println("Please enter filename")
B:3.12 TI1220 - Introduction 57
59. Width of Longest Line
charcounts
def widthOfLength(s: String) = s.length.toString.length
val lines = Source.fromFile(args(0)).getLines.toList
val longestLine = lines.reduceLeft(
(a, b) => if (a.length > b.length) a else b
)
val maxWidth = widthOfLength(longestLine)
B:3.12 TI1220 - Introduction 59
60. Print Lines with Length
charcounts
for (line <- lines) {
val numSpaces = maxWidth - widthOfLength(line)
val padding = " " * numSpaces
println(padding + line.length +" | "+ line)
}
B:3.12 TI1220 - Introduction 60
61. import scala.io.Source
def widthOfLength(s: String) = s.length.toString.length
if (args.length > 0) {
val lines = Source.fromFile(args(0)).getLines.toList
val longestLine = lines.reduceLeft(
(a, b) => if (a.length > b.length) a else b
)
val maxWidth = widthOfLength(longestLine)
for (line <- lines) {
val numSpaces = maxWidth - widthOfLength(line)
val padding = " " * numSpaces
println(padding + line.length +" | "+ line)
}
}
else
Console.err.println("Please enter filename")
B:3.12 TI1220 - Introduction 61
63. Class: Object Blueprint
declaration and instantiation
class ChecksumAccumulator {}
val acc = new ChecksumAccumulator
val csa = new ChecksumAccumulator
B:4.1 TI1220 - Introduction 63
64. Fields (Instance Variables)
object state
class ChecksumAccumulator {
var sum = 0
}
val acc = new ChecksumAccumulator
val csa = new ChecksumAccumulator
acc.sum = 3
B:4.1 TI1220 - Introduction 64
65. Reference vs Content
object state
class ChecksumAccumulator {
var sum = 0
}
val acc = new ChecksumAccumulator
val csa = new ChecksumAccumulator
acc.sum = 3
// Won’t compile, because acc is a val
acc = new ChecksumAccumulator
B:4.1 TI1220 - Introduction 65
66. Data Hiding
object state
class ChecksumAccumulator {
private var sum = 0
}
val acc = new ChecksumAccumulator
acc.sum = 5 // Won’t compile, because sum is private
B:4.1 TI1220 - Introduction 66
74. Summary
lessons learned
Programming languages are for people
• to reason about solutions for problems
Declaration and use
• binding values to names, referring to values using
names
Immutable values
• cannot be changed once created (no side effects)
Objects
• data structures with methods
B:2.3 TI1220 - Introduction 74
75. Exam Question
What happens when we execute the following code:
val greetStrings = new Array[String](3)
greetStrings(0) = "Hello"
greetStrings(1) = ", "
greetStrings(2) = "world!n"
(a) Error: greetStrings is an immutable variable that cannot
be assigned to
(b) Error: Array is a immutable data structure that cannot
be assigned to
(c) No error: greetStrings is a mutable variable that can be
assigned to
(d) No error: Array is a mutable data structure that can be
assigned to
B:2.3 TI1220 - Introduction 75
76. Exercises Week 1
getting started with Scala
Set up your Scala environment
• download and install Scala interpreter and compiler
Scala basics
• evaluating expressions
• defining functions
• running scripts
• making applications
• hand in on paper to student assistants!
B:2.3 TI1220 - Introduction 76
77. Literature
required reading
Programming in Scala
• Chapter 1: A Scalable Language
• Chapter 2: First Steps in Scala
• Chapter 3: Next Steps in Scala
• Chapter 4: Classes and Objects
• Chapter 5: Basic Types and Operations
TI1220 - Introduction 77
81. Pictures
copyrights
Slide 1:
Kinetica by Paul Downey, Some rights reserved
Slide 2:
McPhillips’ Map of the City of Winnipeg by Manitoba Historical Maps, some rights reserved
Slide 4:
The Blue Hour by Andreas Wonisch, Some rights reserved
Slide 5:
by Eelco Visser, Some rights reserved
Slide 8:
I’m listening by Melvin Gaal, some rights reserved
Slide 10:
Bombe detail by Garret Coakley, Some rights reserved
Slide 13:
Alan Turing by oalfonso, some rights reserved
Slide 14:
History of Programming Languages by O’Reilly
Slide:
ABZ-DNA by dulhunk, some rights reserved
Slide 32, 34:
Envelopes by benchilada, some rights reserved
Slide 33:
Report card by Carosaurus, some rights reserved
Slide 36:
paper coffee cup by Shutterstock, some rights reserved
B:2.3 TI1220 - Introduction 81
82. Pictures
copyrights
Slide 40:
Dinner at Roussillon (Martin Odersky) by Miles Sabin, some rights reserved
Slide 41:
Portrait: Alex Payne by Dave Fayram, some rights reserved
Slide 43:
“Plumbing Nightmare” by Natalie Wilkie, some rights reserved
Slide 72:
HIV: The Moleskine Summary by Niels Olson
Slide 75, 76:
remember to thank all the books you haven’t read over the past three years
by Natalia Osiatynska, Some rights reserved
Slide 7, 73:
Stupid Exam by Remi Carreiro, Some rights reserved
Slide 74:
Practice makes perfect by Simon Probert
Slide 10:
Bombe detail by Garret Coakley, Some rights reserved
Slide 29:
1.12.2011 <recipes> 362/365 by Phil Roeder, Some rights reserved
Slide 22,23:
China Tibet Himalaya by Bernhard Goldbach, Some rights reserved
Slide 17:
Thinking at Hell’s gate by innoxiuss, Some rights reserved
B:2.3 TI1220 - Introduction 82