Skip to content

Sigmapitech/void

 
 

Repository files navigation

GLaDOS

Generic Language and Data Operand Syntax

GLaDOS is a interpreted programming language implemented in Haskell that follows a C-like syntax. As part of the assignment, it includes a small lisp interpreter.

Core Components

  • AST: Abstract Syntax Tree definitions.

  • Compiler: Transforms source code into bytecode.

  • VM: A Stack Machine to execute the compiled bytecode.

🔗 Useful Links

Pre-requisites

Note

We use Nix Flakes to ensure a reproducible development environment

Option 1: Using Nix (Recommended)

  • Install Nix (if you haven't already)
  • Enter the development environment:
    nix develop

Option 2: Using Docker

Build and run the project in a Docker container without installing dependencies:

# Build the Docker image
docker build -t glados .

# Run the container
docker run -it --rm glados

# Or run with volume mount for development
docker run -it --rm -v $(pwd):/app glados

Option 3: Manual Installation

Install the following system dependencies:

  • GHC (version 9.8.4)
  • cabal (version 3.14.2.0)
  • make (version 4.0+)

On Ubuntu/Debian:

sudo apt update
sudo apt install -y ghc cabal-install make
cabal update

On Fedora

sudo dnf install -y ghc cabal-install make
cabal update

On Arch Linux:

sudo pacman -S ghc cabal-install make
cabal update

Tip

After installing GHC and Cabal, all Haskell package dependencies (like hspec, megaparsec, directory, etc.) will be automatically downloaded and installed by Cabal when you run make or cabal build all.

🛠️ Build & Run

Build the entire project:

make

🧪 Testing & Quality

We use Hspec for testing and hlint for linting.

Run Unit Tests:

cabal test all

Check Coverage:

cabal test all --enable-coverage

Lint Code:

hlint .

About

Generic Language and data operand syntax

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 91.2%
  • Python 4.0%
  • Makefile 2.2%
  • Nix 2.1%
  • Other 0.5%