Skip to content

cyberthirst/microc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

μC

A reference implementation of the μC language for the NI-APR course.

Requirements

  • OpenJDK 17 (please check java -version)
  • Scala 2.13.6
  • SBT 1.8.2

Building

The following will produce a fat JAR that includes all the code and dependencies.

sbt assembly

Alternatively, you can build a docker image:

sbt docker

Integration tests

A poor-man's snapshot testing framework for integration tests is prepared for you in the tests directory. It is a shell script that runs the uc command with various programs and checks the output and exit code against some expected, pre-recorded values (snapshots - hence the name snapshot testing). If the output / exit code is different it will show a diff using either diff or delta. The tests are divided into suites found under tests/suites. The expected outputs are in tests/expected.

For example, the following

./tests/test.sh

will run all the test suites.

See the ./tests/test.sh --help for more info.

CI

This repo is using the GitLab CI. The pipeline definition is in .gitlab-ci.yml file. It uses a custom docker image that has all the dependencies listed above.

Benchmarks

There are a few benchmarks that can be run using jmh. For example:

$ sbt
> Jmh/run .*Interpreter.*

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published