Commit 306b6a37 authored by Noric Couderc's avatar Noric Couderc

Updated documentation

parent 11b57ff2
# Table of Contents
1. [Building](#org8a2eab6)
2. [Structure](#orgb7cbbf3)
1. [Layers of Teal](#orgd3d1039)
2. [Documentation](#orgb748b70)
3. [Teal Intermediate Language (Teal IR)](#org9b7df16)
4. [Test files](#org8f8cc4a)
3. [Using Teal](#org4705c66)
4. [Running Teal programs](#org51333c2)
1. [Adding your own Teal actions](#org72d4476)
2. [Logging](#org51c871f)
5. [Notes on the implementation](#org910bb08)
6. [Git FAQ](#org03cb278)
1. [What's Git?](#orgab420f6)
2. [I Can't Clone the Repository](#org6242fa7)
3. [How Do I Update My Fork with Changes the Instructors Made?](#orga2be686)
1. [TL;DR](#org7ae0b9b)
2. [List Remotes](#org0133f01)
3. [Specify a Remote Upstream](#org5106dd8)
4. [Get the Changes](#orgf6e2f2c)
5. [Merging Changes](#org1630b13)
6. [Pushing to Gitlab](#orgd3fc244)
<a id="org8a2eab6"></a>
1. [Building](#org56015e8)
2. [Structure](#org1f65d63)
1. [Layers of Teal](#org650148f)
2. [Documentation](#org28194be)
3. [Teal Intermediate Language (Teal IR)](#org53b8a2c)
4. [Test files](#orgc26f11c)
3. [Using Teal](#org1dc34a0)
4. [Running Teal programs](#orgbd9eecb)
1. [Adding your own Teal actions](#orgcbffe99)
2. [Logging](#org14d6025)
5. [Notes on the implementation](#org9cbc93d)
6. [Git FAQ](#org2aa4ef8)
1. [What's Git?](#org81662cd)
2. [I Can't Clone the Repository](#orge832457)
3. [How Do I Update My Fork with Changes the Instructors Made?](#org7dc3950)
1. [TL;DR](#orge5951eb)
2. [List Remotes](#orgc124a66)
3. [Specify a Remote Upstream](#orgc5e6ef5)
4. [Get the Changes](#org6f1c095)
5. [Merging Changes](#org43e5eb7)
6. [Pushing to Gitlab](#org3497367)
<a id="org56015e8"></a>
# Building
......@@ -32,6 +32,10 @@ To build Teal-0 (the default) run:
./gradlew jar test
If you want to build without running the tests, run:
./gradlew jar
For other layers of Teal, set suitable parameters; e.g., for Teal-3, run:
~./gradlew -PlangVersion=teal-3 jar test
......@@ -40,7 +44,7 @@ If you are using Teal as part of a course, you may be using a distribution of Te
include all Teal layers (possibly only Teal-0).
<a id="orgb7cbbf3"></a>
<a id="org1f65d63"></a>
# Structure
......@@ -53,7 +57,7 @@ It is divided into the following parts:
4. `ir/`: An interpreter that takes Teal IR code and executes it (via interpretation)(. All variants of Teal currently use the same interpreter.
<a id="orgd3d1039"></a>
<a id="org650148f"></a>
## Layers of Teal
......@@ -62,7 +66,7 @@ from `compiler/teal0` to `compiler/teal3`.
Lower layers of Teal contain fewer language features.
<a id="orgb748b70"></a>
<a id="org28194be"></a>
## Documentation
......@@ -73,7 +77,7 @@ implementation disagrees with the documentation, you should assume
that this is a bug in the implementation.
<a id="org9b7df16"></a>
<a id="org53b8a2c"></a>
## Teal Intermediate Language (Teal IR)
......@@ -85,7 +89,7 @@ but only for the machine to analyse and execute.
Teal IR is most closely related to register transfer IRs such as GIMPLE, LLVM bitcode, or WebAssembly
<a id="org8f8cc4a"></a>
<a id="orgc26f11c"></a>
## Test files
......@@ -103,7 +107,7 @@ These files are loaded and tested by the various test classes in:
- `compiler/teal0/test/lang`
<a id="org4705c66"></a>
<a id="org1dc34a0"></a>
# Using Teal
......@@ -114,7 +118,7 @@ them with the following, which will print out help:
You can find this main entry point in: `teal/compiler/teal0/java/lang/Compiler.java`
<a id="org51333c2"></a>
<a id="orgbd9eecb"></a>
# Running Teal programs
......@@ -123,7 +127,7 @@ The arguments to the program can be integers or strings. This will call the `mai
take matching formal parameters) and print out the `main` function's return value.
<a id="org72d4476"></a>
<a id="orgcbffe99"></a>
## Adding your own Teal actions
......@@ -134,7 +138,7 @@ use to get started:
- `Compiler.customIRAction()`, which you can run with `java -jar build/teal-0.jar program.teal -Z`, can process the IR
<a id="org51c871f"></a>
<a id="org14d6025"></a>
## Logging
......@@ -145,21 +149,21 @@ Can be enabled by the `TEAL_DEBUG` environment variable:
- `export TEAL_DEBUG=interp,irgen` enables both interpreter and IR generation debugging
<a id="org910bb08"></a>
<a id="org9cbc93d"></a>
# Notes on the implementation
See [the implementation notes](notes.md) (if available in your distribution).
<a id="org03cb278"></a>
<a id="org2aa4ef8"></a>
# Git FAQ
Here are answers to some questions you may ask yourself when using Git.
<a id="orgab420f6"></a>
<a id="org81662cd"></a>
## What's Git?
......@@ -195,7 +199,7 @@ Lastly, if you prefer videos with rainbows and unicorns, you may be
interested in [this series of videos by Daniel Shiffman](https://thecodingtrain.com/beginners/git-and-github/).
<a id="org6242fa7"></a>
<a id="orge832457"></a>
## I Can't Clone the Repository
......@@ -208,7 +212,7 @@ The file you didn't upload (the private key) is not to be shared with anyone.
[Here](https://docs.gitlab.com/ee/ssh) is a tutorial on how to do that.
<a id="orga2be686"></a>
<a id="org7dc3950"></a>
## How Do I Update My Fork with Changes the Instructors Made?
......@@ -218,7 +222,7 @@ forks with the changes have been made with git (while keeping your own changes t
Here's how you do it (based on [this tutorial](https://medium.com/@sahoosunilkumar/how-to-update-a-fork-in-git-95a7daadc14e)).
<a id="org7ae0b9b"></a>
<a id="orge5951eb"></a>
### TL;DR
......@@ -234,7 +238,7 @@ Run these instructions in the `exercise-1` directory.
Otherwise, here are the explanations!
<a id="org0133f01"></a>
<a id="orgc124a66"></a>
### List Remotes
......@@ -249,7 +253,7 @@ You should see something like
origin git@coursegit.cs.lth.se:edap15-2020/<group>/exercise-1.git (push)
<a id="org5106dd8"></a>
<a id="orgc5e6ef5"></a>
### Specify a Remote Upstream
......@@ -260,7 +264,7 @@ We can give names to remote, we'll call this one *upstream*.
git remote add upstream https://git.cs.lth.se/creichen/edap15-exercise-1.git
<a id="orgf6e2f2c"></a>
<a id="org6f1c095"></a>
### Get the Changes
......@@ -279,7 +283,7 @@ You can also *compare* branches with `git diff upstream/master`, this will show
the differences between your master branch and `upstream/master`.
<a id="org1630b13"></a>
<a id="org43e5eb7"></a>
### Merging Changes
......@@ -293,7 +297,7 @@ You do this by running
git merge upstream/master
<a id="orgd3fc244"></a>
<a id="org3497367"></a>
### Pushing to Gitlab
......
......@@ -8,6 +8,12 @@ To build Teal-0 (the default) run:
./gradlew jar test
#+END_SRC
If you want to build without running the tests, run:
#+begin_src sh
./gradlew jar
#+end_src
For other layers of Teal, set suitable parameters; e.g., for Teal-3, run:
#+BEGIN_SRC sh
~./gradlew -PlangVersion=teal-3 jar test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment