Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Latest commit

 

History

History
107 lines (91 loc) · 2.99 KB

README.md

File metadata and controls

107 lines (91 loc) · 2.99 KB

SOCKit: Socket-Oriented Concurrency Kit

This project is built with dune. Clone the repo and run dune build to build the project (don't dune init!).

git clone [email protected]:rdnajac/SOCKit.git
cd SOCKit
dune build

Optionally, run dune install to install the project to your system.

Hello, World!

To make sure the project builds correctly run dune exec -- sockit --hello. If you opted to install the project, you can simply run sockit --hello instead.

Project Structure

sockit/
│
├── bin/
│   ├── main.ml
│   └── dune
│
├── src/
│   ├── ast/
│   │   ├── ast.ml
│   │   └── dune
│   ├── codegen/
│   │   ├── codegen.ml
│   │   └── dune
│   ├── hello/
│   │   ├── hello.ml
│   │   └── dune
│   ├── interpreter/
│   │   ├── interpreter.ml
│   │   └── dune
│   ├── sast/
│   │   ├── sast.ml
│   │   └── dune
│   ├── semant/
│   │   ├── semant.ml
│   │   └── dune
│   │
│   ├── dune
│   ├── parser.mly
│   └── scanner.mll
│
├── test/
│   ├── test.ml
│   └── dune
│
├── dune-project
├── dune
├── sock.opam
├── .ocamlformat
└── README.md

dune-project

This file is used to specify the version of dune to use, among other globs.

dune

This file is used to specify the build configuration for the project.

SOCK.opam

This file is used to provide information to opam, The project's package manager. Do not edit this file directly, dune will handle it.

.ocamlformat

Don't edit this file. This lets us run dune fmt to automatically format our code.

/bin/

This is where the sockit executable is built. There is one file, main.ml, which is the entry point for the program.

/src/

everything here is built with dune build automatically when we build from the top level directory

  • lexer.mll (builds with ocamllex)
  • parser.mly (builds with ocamllyacc)
  • ast.ml (abstract syntax tree)
  • sast.ml (semantic abstract syntax tree)
  • semant.ml (semantic analysis)
  • codegen.ml (code generation)
  • interpreter.ml (not a compiler!)

TODO

TODO for Hello World Submission

URGENT

  • summarize the work done so far and work left until completion (with the expected timeline) in the README.md file
  • include source code in our language in the /test/ directory
  • update the language implementation for SOCKit features

TODO for Final Submission

  • require dune clean and dune fmt before pushing to the repo
    • this can be done with a git hook
    • for now, just remember to do it please
  • set up testing
    • process example files
    • add a dune runtest command
  • pin llvm version in opam file
  • check cross-platform compatibility

TODO Bugs

  • unused variable warnings in codegen.ml
  • unused variable warnings in interpreter.ml
  • linking error with llvm