Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on:
- push

name: Build and Deploy

jobs:
build-and-test:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -15,12 +17,12 @@ jobs:
sudo apt-get install fonts-stix
sudo apt-get install libunistring-dev
- name: Install Racket
uses: Bogdanp/setup-racket@v1.11
uses: Bogdanp/setup-racket@v1.14
with:
architecture: 'x64'
distribution: 'full'
variant: 'CS'
version: '8.14'
version: '8.18'
- name: Install a86 and langs
run: |
git clone https://github.com/cmsc430/a86.git
Expand All @@ -33,13 +35,21 @@ jobs:
# raco pkg install --auto www/
raco make www/main.scrbl
make -C www main
- name: Archive www
- name: Upload www for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: www/main
deploy:
needs: build-and-test
- name: Upload www as artifact
uses: actions/upload-artifact@v4
with:
name: site-static
path: www/main
if-no-files-found: error
retention-days: 7

deploy-github-pages:
needs: build
permissions:
pages: write
id-token: write
Expand Down
10 changes: 6 additions & 4 deletions www/midterms/1.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

@title{Midterm 1}

@(define prefix "m1-")

@bold{Due: @m1-date 11:59PM}

Midterm 1 will be released at least @midterm-hours hours prior to
its due date.

@section{Practice}
@section[#:tag-prefix prefix]{Practice}

There is a practice midterm available on ELMS. You may submit to the
Practice Midterm 1 assignment on Gradescope to get feedback on your
Expand All @@ -19,7 +21,7 @@ level of feedback from the autograder. @bold{Make sure you do not
submit your practice midterm solution for the real midterm! We will
not allow late submissions if you submit the wrong work.}

@section{Instructions}
@section[#:tag-prefix prefix]{Instructions}

The midterm will be released as a zip file on ELMS (see the
description of Midterm 1 there for the link).
Expand All @@ -29,7 +31,7 @@ directory with a README and supplementary files. Read the README in
each part for instructions on how to complete that part of the
midterm.

@section{Communications}
@section[#:tag-prefix prefix]{Communications}

If you have questions about the exam, send a @bold{private} message on
@link[piazza]{Piazza}.
Expand All @@ -43,7 +45,7 @@ If you have trouble reaching the course staff via Piazza, email
You may not communicate with anyone outside of the course staff about
the midterm.

@section{Submissions}
@section[#:tag-prefix prefix]{Submissions}

You should submit your work as a single zip file of this directory on
Gradescope. Unlike past assignments, Gradescope will only do a basic
Expand Down
10 changes: 6 additions & 4 deletions www/midterms/2.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@

@title{Midterm 2}

@(define prefix "m2-")

@bold{Due: @m2-date 11:59PM}

Midterm 2 will be released at least @midterm-hours hours prior to
its due date.

@section{Practice}
@section[#:tag-prefix prefix]{Practice}

There is a practice midterm available on ELMS. You may submit to the
Practice Midterm 1 assignment on Gradescope to get feedback on your
Expand All @@ -21,7 +23,7 @@ level of feedback from the autograder. @bold{Make sure you do not
submit your practice midterm solution for the real midterm! We will
not allow late submissions if you submit the wrong work.}

@section{Instructions}
@section[#:tag-prefix prefix]{Instructions}

The midterm will be released as a zip file on ELMS (see the
description of Midterm 1 there for the link).
Expand All @@ -31,7 +33,7 @@ directory with a README and supplementary files. Read the README in
each part for instructions on how to complete that part of the
midterm.

@section{Communications}
@section[#:tag-prefix prefix]{Communications}

If you have questions about the exam, send a @bold{private} message on
@link[piazza]{Piazza}.
Expand All @@ -45,7 +47,7 @@ If you have trouble reaching the course staff via Piazza, email
You may not communicate with anyone outside of the course staff about
the midterm.

@section{Submissions}
@section[#:tag-prefix prefix]{Submissions}

You should submit your work as a single zip file of this directory on
Gradescope. Unlike past assignments, Gradescope will only do a basic
Expand Down
21 changes: 12 additions & 9 deletions www/notes/abscond.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@

@title[#:tag "Abscond"]{Abscond: a language of numbers}

@src-code["abscond"]
@(define lang-name "abscond")
@(define prefix (string-append lang-name "-"))

@src-code[lang-name]

@emph{Let's Make a Programming Language!}

@table-of-contents[]

@section{Overview}
@section[#:tag-prefix prefix]{Overview}

A compiler is just one (optional!) component of a @emph{programming
language}. So if you want to make a compiler, you must first settle
Expand Down Expand Up @@ -96,7 +99,7 @@ To begin, let's start with a dead simple programming language called
literals. Running an abscond program just produces that integer.
(Told you it was simple.)

@section{Concrete syntax for Abscond}
@section[#:tag-prefix prefix]{Concrete syntax for Abscond}

We will simplify matters of syntax by using the Lisp
notation of s-expression for the @bold{concrete} form of
Expand Down Expand Up @@ -153,7 +156,7 @@ line and then using the @racket[read] function to
parse the concrete expression as an s-expression.


@section{Abstract syntax for Abscond}
@section[#:tag-prefix prefix]{Abstract syntax for Abscond}

While not terribly useful for a language as overly simplistic as Abscond, we use
an AST datatype for representing expressions and another syntactic categories.
Expand All @@ -175,7 +178,7 @@ it is, otherwise it signals an error:
(eval:error (parse #t))]


@section{Meaning of Abscond programs}
@section[#:tag-prefix prefix]{Meaning of Abscond programs}

The meaning of an Abscond program is simply the number itself. So
@racket[(Lit 42)] evaluates to @racket[42].
Expand Down Expand Up @@ -267,7 +270,7 @@ operational semantics and an interpreter, which is (obviously)
correct. Now let's write a compiler.
}

@section{Toward a Compiler for Abscond}
@section[#:tag-prefix prefix]{Toward a Compiler for Abscond}

A compiler, like an interpreter, is an implementation of a programming
language. The key difference is that a compiler stages the work of
Expand Down Expand Up @@ -343,7 +346,7 @@ with an object file that contains @tt{entry} will produce an
executable that, when run, will carry out the execution of an Abscond
program.

@section{An Example}
@section[#:tag-prefix prefix]{An Example}

Before trying to write the Abscond compiler, let's first make an
example of what we would like the compiler to produce for a particular
Expand Down Expand Up @@ -408,7 +411,7 @@ We now have a working example. The remaining work will be to design a
compiler that takes an Abscond program and emits a file like
@tt{42.s}, but with the appropriate integer literal.

@section{A Compiler for Abscond}
@section[#:tag-prefix prefix]{A Compiler for Abscond}

We will now write a compiler for Abscond. To heart of the compiler
will be a function with the following signature:
Expand Down Expand Up @@ -510,7 +513,7 @@ Moreover, we can compare our compiled code to code compiled by Racket:
"time -p racket 42.rkt"]


@section{But is it @emph{Correct}?}
@section[#:tag-prefix prefix]{But is it @emph{Correct}?}

At this point, we have a compiler for Abscond. But is it correct?
What does that even mean, to be correct?
Expand Down