Meeting 01 - Welcome

Bor-Yuh Evan Chang
\(\newcommand{\TirName}[1]{\text{#1}} \newcommand{\inferrule}[3][]{ \let\and\qquad \begin{array}{@{}l@{}} \TirName{#1} \\ \displaystyle \frac{#2}{#3} \end{array} } \newcommand{\infer}[3][]{\inferrule[#1]{#2}{#3}} \)

Principles of Programming Languages - CSCI 3155 - Fall 2024

Professor Bor-Yuh Evan Chang

In-Class Slides

Today

Bootstrapping

A puzzle …

Suppose you want to run lots of JavaScript programs — all the cool kids are doing it, but unfortunately you have a computer that can only execute x86 assembly. So you decide to write a compiler from JavaScript to x86 assembly.

Furthermore, suppose that you think Scala is the best language for writing a compiler; you find the language has particularly effective constructs for implementing compilers. Unfortunately, your computer only has a C to x86 compiler. Having taken 3155, you know that you can write an awesome compiler in Scala that produces efficient x86 code, but you’re not so sure you can write an efficient compiler in C. What do you do?

Back up. What is program?

How do you use a program?

How do you run a program?

What is compilation?

What is an interpreter?

Uh oh …

Let’s Restart with Some PL Terminology

Idea: Bootstrapping

Key Terms: A meta language versus an object language.

Some Terminology

A programming language is








A program is

An Analogy: Cooking

Syntax and Semantics

Syntax is








Semantics is

Meta Language versus Object Language

Interpreter

An interpreter is a program that executes other programs.

An interpreter is written in a meta language (also called an implementation language) that interprets programs in an object language (also called a source language).

Compiler

A compiler is a program from one object language (the source language) translating a program in another object language (the target language).

Back to the puzzle …

Step 0

Step 1

Step 2

Step 3

Step 4

Step 5

Meeting 01: Welcome

Principles of Programming Languages - CSCI 3155 - Fall 2024

Professor Bor-Yuh Evan Chang

Announcements

  • Today’s Homework: Post an introduction of yourself on Piazza
  • Today’s Reading from Schedule
    • Syllabus: Coming next time means you have read and agreed
    • PPPL Introduction: Course Approach, Getting Your Money’s Worth

Getting to Know You

“I, …, wonder …”

Distraction-Free Classroom

Let’s turn off our cell phones and laptops.

Just imagine that we have class in Rocky Mountain National Park.

If you have a need to use a laptop, please discuss with me after class.

Your Guide this semester

Course Approach: Active Classroom

  • Build interpreters for mini-languages.

  • 2-3 weeks of active discussion — in class and online (Piazza) — towards incrementally completing a lab! Do intermediate assignments along the way.

  • Recitation sections are lab sessions. Bring a laptop.

  • Assignments due Friday 6pm. Everyone gets an automatic “stuff happens” 24-hour grace period.

  • No late assignments but generous “redo” policy and lowest score dropped.

Course Approach: Active Classroom

Course Approach: Active Classroom

Please interrupt at any time!

It’s completely ok to say, “I don’t understand. Please say it another way. Slow down!”

Attempting assignments and reading before class prompts the discussion. There is an expectation on you to be active.

Learning Oath

About You: Your Goals and Worries

  1. What do you want to get out of this class?
  2. What do you think this course is about?
  3. What worries you about this class?

What worries you about this class?

Getting Your Money’s Worth

Why study PL?

Why study PL when we have ChatGPT?

Testimonials

Come on Thursday to hear from 3155 alumni!

Don’t we have enough PLs?

A Dismal View

This is not a history course.

This is not a trip to the zoo

This is more like a study of anatomy

Learn new languages

You will need to learn many languages during your careers.

You will learn concepts that make it easier for you to learn new languages in this class.

Improve background for selecting a suitable one for your task

Have you ever had to pick a language?

What criteria did you use?

How do you understand “about pages”?

Gain new ways of viewing computation and approaching algorithmic problems

Have you heard of Google MapReduce?

How about Meta React?

… inspired by ideas from PL theory

Gain new ways of viewing programs

What does it mean for two programs to “behave the same”?

You will be able to reason about computation.

Being able to compute versus being about to reason about computation is very different (analogy: arithmetic versus algebra).

Gain insight into avoiding mistakes for when (not if!) you design languages

Use AI assistants to accelerate your creative design

Other reasons?

Syllabus Policies

Requirements

Distinguishes between learning activities:

  • Reading
  • Quizzes and Exercises (25%)
  • Lab Assignments (30%)
  • Participation (5%)

And summative assessments:

  • In-Class Exams (20%)
  • Final Exam (20%)

Highlights