Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
da430cc
updated README
JTFulkerson Feb 11, 2026
0b7ffd6
Merge branch 'clause:main' into main
JTFulkerson Feb 11, 2026
4757202
L3 README with some inclass work on tests/check implementation
JTFulkerson Feb 13, 2026
b985268
I put the L3 readme in the wrong file so fixed that and wrote the L2 …
JTFulkerson Feb 13, 2026
c9cbe16
Merge branch 'clause:main' into main
JTFulkerson Feb 13, 2026
126028c
finished l1 and l0 readme content
JTFulkerson Feb 14, 2026
456ce24
in class work
JTFulkerson Feb 14, 2026
66d869e
Merge branch 'main' of github.com:JTFulkerson/471c
JTFulkerson Feb 14, 2026
34f5726
Merge branch 'main' into main
JTFulkerson Feb 18, 2026
dfc2ffe
Added class example but need to figure out how to get my stash. Pulle…
JTFulkerson Feb 18, 2026
331be98
Readme changes for testing
JTFulkerson Feb 18, 2026
0d90c17
Restored some of my old changes.
JTFulkerson Feb 19, 2026
f917ade
Restored previous stashed changes
JTFulkerson Feb 19, 2026
e5b9a18
Removed unnessesary checks on negative index and count values. Non ne…
JTFulkerson Feb 19, 2026
b3d2b5f
Merge branch 'clause:main' into main
JTFulkerson Feb 20, 2026
2c39f84
Merge branch 'clause:main' into main
JTFulkerson Feb 20, 2026
54016ba
Changed to use new pulled elimate letrec, wrote but have not tested l…
JTFulkerson Feb 20, 2026
a90bd8a
Merge branch 'clause:main' into main
JTFulkerson Feb 26, 2026
11d723f
Finished eliminating letrec, not passing all branch tests
JTFulkerson Feb 26, 2026
f405004
Merge branch 'clause:main' into main
JTFulkerson Feb 27, 2026
a2d246c
Merge branch 'clause:main' into main
JTFulkerson Feb 27, 2026
1ff63b5
Merge branch 'clause:main' into main
JTFulkerson Feb 27, 2026
e83aa3e
Fixed tests to have 100% branch coverage
JTFulkerson Feb 28, 2026
ab9d429
Merge pull request #1 from JTFulkerson/jtfulkerson/letrec-tests
JTFulkerson Feb 28, 2026
c6f5b30
Skipping parse tests
JTFulkerson Feb 28, 2026
85c43d7
added some test, should be at 100% code covereage now
JTFulkerson Feb 28, 2026
213df94
I think I finished the lark logic, need to finish parse and then can …
JTFulkerson Mar 5, 2026
c49323f
Removed the skip from all tests
JTFulkerson Mar 5, 2026
937f12d
Added most of parse logic, passing all provided tests but need to add…
JTFulkerson Mar 5, 2026
9f425dd
Added final test for branch coverage
JTFulkerson Mar 6, 2026
57d254a
Merge branch 'main' into main
JTFulkerson Mar 6, 2026
3036686
skipped test for optimizer
JTFulkerson Mar 6, 2026
4d66127
Added files for optimize and did first implementation of constant fol…
JTFulkerson Mar 12, 2026
470b5fb
Wrote constant propogation and broke helper functions out into util.py
JTFulkerson Mar 13, 2026
ce8e7ed
Merge branch 'clause:main' into main
JTFulkerson Mar 13, 2026
3e0fa1e
Dead code elimination implementation
JTFulkerson Mar 13, 2026
ddab7c5
Merge branch 'main' of github.com:JTFulkerson/471c
JTFulkerson Mar 13, 2026
cbd4dad
Commented out file
JTFulkerson Mar 13, 2026
8abe939
classwork with optimize implementation in main.py
JTFulkerson Mar 13, 2026
185f6fa
Cleaned up util helpers after class conversation
JTFulkerson Mar 13, 2026
0697662
added some uniquify logic and a few optimize tests
JTFulkerson Mar 13, 2026
f7323d3
went back to having optimize.py instead of matching arcitecture of pr…
JTFulkerson Mar 15, 2026
002418d
I updated constant folding and dead code elimination, working through…
JTFulkerson Mar 15, 2026
45e4434
omtimize tests
JTFulkerson Mar 15, 2026
ce5cedb
Had to fix some eliminate letrec errors...
JTFulkerson Mar 16, 2026
b3494b8
Finished unify and tests
JTFulkerson Mar 20, 2026
26f20e6
Added a comment to push a new change for codecov to hopefully run
JTFulkerson Mar 20, 2026
88a274f
Current class changes to cps
JTFulkerson Apr 3, 2026
0064c43
Uncommented tests and finished cps convert
JTFulkerson Apr 3, 2026
17a13dc
initial lsp example
JTFulkerson Apr 16, 2026
374679d
Initial close.py
JTFulkerson Apr 16, 2026
e01e1df
Implement match cases for L1.Copy, L1.Immediate, L1.Primitive, L1.Bra…
JTFulkerson Apr 16, 2026
6083f93
Implement free_variables and close_term functions for L1 syntax; add …
JTFulkerson Apr 25, 2026
98f892a
Merge pull request #2 from JTFulkerson/jtfulkerson/closure-converstion
JTFulkerson Apr 25, 2026
d741def
Add pragma directive to close_program match case for clarity
JTFulkerson Apr 25, 2026
5a9ac54
Merge branch 'main' of github.com:JTFulkerson/471c into jtfulkerson/l…
JTFulkerson Apr 27, 2026
20915ce
Add L4 package with initial syntax, check, and elaborate implementati…
JTFulkerson Apr 27, 2026
2f19740
Added some inital diagnostics to L3 and integrated it with the LSP. P…
JTFulkerson Apr 27, 2026
9a88eee
Merge pull request #3 from JTFulkerson/jtfulkerson/lsp-implementation
JTFulkerson Apr 28, 2026
e67d3f2
Add .gitignore and initial L4 example files for Lambda and test cases
JTFulkerson Apr 28, 2026
f6df90f
Merge branch 'main' of github.com:JTFulkerson/471c
JTFulkerson Apr 28, 2026
be06c79
Mild changes, I think its good enough? After I got a stronger grasp o…
nolanKeefe May 4, 2026
b734ce3
Just a quick copy of L3 lark into the L4 lark file. No addition of ty…
nolanKeefe May 6, 2026
6e8eb6e
some types added and terms added to term need to actually write the u…
nolanKeefe May 6, 2026
3ad2883
L4.lark should be completed now. I believe it covers cases
nolanKeefe May 7, 2026
cd777fe
changed class.l4 to hopefully fit syntax written
nolanKeefe May 7, 2026
991c47f
Notes he gave us, adding box type
nolanKeefe May 8, 2026
fe76d3e
renamed example files
JTFulkerson May 11, 2026
48d4913
Merge pull request #4 from JTFulkerson/typeAdd
JTFulkerson May 17, 2026
fbd0b33
This took forever but added semantic highlighting and it is working r…
JTFulkerson May 17, 2026
c23db09
Merge branch 'main' of github.com:JTFulkerson/471c into jtfulkerson/l…
JTFulkerson May 17, 2026
7893a2d
Implement L4 syntax support with diagnostics and example files
JTFulkerson May 17, 2026
7efa68a
Refactor import statements in parse.py for clarity
JTFulkerson May 17, 2026
d4ed373
Enhance L4 diagnostics integration by setting PYTHONPATH and adding s…
JTFulkerson May 17, 2026
2a0ead7
Merge pull request #5 from JTFulkerson/jtfulkerson/lsp-v1
JTFulkerson May 17, 2026
a5209f4
Box type finished up for real now
nolanKeefe May 18, 2026
a6a5593
Merge branch 'main' of https://github.com/JTFulkerson/471c
nolanKeefe May 18, 2026
b6746a4
Parse for types
nolanKeefe May 18, 2026
ba83377
minor check change
nolanKeefe May 18, 2026
1450c2f
Add tests for L4 type mismatch diagnostics and corresponding test fix…
JTFulkerson May 18, 2026
4e63f89
Refactor LSP extension documentation, enhance diagnostics tests, and …
JTFulkerson May 18, 2026
1cb0372
Update CONTRIBUTING.md and README.md for clarity, modify package.json…
JTFulkerson May 18, 2026
c15ad05
Merge pull request #6 from JTFulkerson/jtfulkerson/type-checking-lsp
JTFulkerson May 18, 2026
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
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ We use UV for dependency management, running tests, and pre-commit hooks.

## Fork and Clone the Repository

1. Fork the repository: `https://github.com/clause/471c/fork`

2. Choose your personal namespace or group for the fork.
1. Fork the repository on GitHub (use your account or organization).

3. Add `clause@udel.edu` and `wahid@udel.edu` as project members with the developer role.
2. Clone your fork locally:

4. Clone your fork locally either via command line or by using your preferred IDE.

5. Link [CodeCov](https://about.codecov.io/) to your GitHub account (login to codecov using your github credentials).
```bash
git clone https://github.com/<your-org>/471c.git
cd 471c
```

6. Update the badge URLs in README.md by replacing `clause` with `<NAMESPACE>` and `471c` with `<PROJECT>`.
3. Enable GitHub Actions for your fork if desired (Actions → Enable workflows).

7. Enable workflows for your fork by accessing the "actions" tab.
4. If you use CodeCov, connect it to your GitHub account separately. Update badge URLs in `README.md` as needed for your fork.

## Install project dependencies

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Status

[![.github/workflows/ci.yml](https://github.com/clause/471c/actions/workflows/ci.yml/badge.svg)](https://github.com/clause/471c/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/clause/471c/branch/main/graph/badge.svg)](https://codecov.io/gh/clause/471c)
[![.github/workflows/ci.yml](https://github.com/JTFulkerson/471c/actions/workflows/ci.yml/badge.svg)](https://github.com/JTFulkerson/471c/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/JTFulkerson/471c/branch/main/graph/badge.svg)](https://codecov.io/gh/JTFulkerson/471c)

# Contributing

Expand All @@ -12,3 +12,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
![license](https://img.shields.io/badge/license-MIT-green.svg)

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.

## About

`471c` is a multi-level language compiler project (L0..L4) with tooling and a VS Code language server that provides syntax and semantic diagnostics for L3/L4. See [lsp/README.md](lsp/README.md) for extension development instructions and the `packages/` directory for individual language packages.
20 changes: 20 additions & 0 deletions lsp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
out
node_modules
client/server
.vscode-test# Node dependencies
node_modules/

# TypeScript build output
out/
dist/
build/
*.tsbuildinfo

# Test and coverage output
coverage/
.vscode-test/

# Local environment and editor files
.env
.env.*
.DS_Store
9 changes: 9 additions & 0 deletions lsp/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
37 changes: 37 additions & 0 deletions lsp/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"env": {
"PYTHONPATH": "${workspaceFolder}/../packages/L4/src:${workspaceFolder}/../packages/L3/src:${workspaceFolder}/../packages/L2/src:${workspaceFolder}/../packages/util/src"
},
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": [
"${workspaceRoot}/client/out/**/*.js",
"${workspaceRoot}/server/out/**/*.js"
],
"autoAttachChildProcesses": true,
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
}
]
}
8 changes: 8 additions & 0 deletions lsp/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.insertSpaces": false,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
33 changes: 33 additions & 0 deletions lsp/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
]
}
]
}
15 changes: 15 additions & 0 deletions lsp/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.vscode/**
**/*.ts
**/*.map
.gitignore
**/tsconfig.json
**/tsconfig.base.json
contributing.md
.travis.yml
client/node_modules/**
!client/node_modules/vscode-jsonrpc/**
!client/node_modules/vscode-languageclient/**
!client/node_modules/vscode-languageserver-protocol/**
!client/node_modules/vscode-languageserver-types/**
!client/node_modules/{minimatch,brace-expansion,concat-map,balanced-match}/**
!client/node_modules/{semver,lru-cache,yallist}/**
48 changes: 48 additions & 0 deletions lsp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# LSP for L3/L4

Language Server Protocol extension providing syntax and semantic diagnostics, semantic token highlighting for L3 and L4 language files (`.l3`, `.l4`).

## Functionality

This Language Server provides:
- **Syntax diagnostics** — parser errors (e.g., unmatched parentheses)
- **Semantic diagnostics** — type checking, unbound variables, duplicate bindings
- **Semantic token highlighting** — keywords and types
- **End-to-End tests** — regression tests for diagnostics and highlighting

## Structure

```
.
├── client // VSCode extension client
│ ├── src
│ │ ├── extension.ts // Extension entry point
│ │ └── test/ // End-to-end tests
│ └── testFixture/ // L3/L4 test files
├── server // Language server (Node.js)
│ └── src/server.ts // Server logic; calls L3/L4 Python diagnostics CLI
├── package.json // Extension manifest
└── README.md // This file
```

## Running the Extension

- Run `npm install` in this folder to install dependencies
- Open VS Code on this folder (or the repo root)
- Press F5 to launch the Extension Development Host (or go to Run → Launch Client)
- Open an `.l3` or `.l4` file to see diagnostics and highlighting
- Run `npm test` to run end-to-end tests

## L4 Development notes

When working on the L4 compiler and server integration you will often need the local Python packages to be importable by the language server.

- The `Launch Client` launch configuration now sets `PYTHONPATH` so the Extension Development Host can run the L4 diagnostics CLI against workspace sources.
- To run the L4 CLI directly from the repo root (recommended):

```bash
cd /Users/johnfulkerson/src/CISC471/471c
PYTHONPATH=packages/L4/src:packages/L3/src:packages/L2/src:packages/util/src .venv/bin/python -m L4.main packages/L4/examples/two.l4 --output /tmp/l4_two.py && .venv/bin/python /tmp/l4_two.py
```

- The server publishes a quick parenthesis syntax diagnostic immediately and replaces it with richer diagnostics produced by `python -m L4.main --diagnostics-json <file>` when available.
Loading