opam install . --deps-only --with-testdune builddune testdune exec pirc -- [options] <file>if it has been installed by dune install you can run it directly:
pirc [options] <file>E.g.:
cd examples
dune exec pirc -- -ast-dump json ex1.pir
pirc -ast-dump json ex2.pirThen pirc will parse the file and dump the ASTs to the current directory (in pretty-printed format by default).
-
-ast-dump <pprint|json>: Dump the AST in pretty-printed (default) or JSON format. -
-msg-backend <domain|http|mpi>: Specify the backend for parallel execution.domain(default) for Domain(thread)-based parallelism;httpuses the HTTP backend ;mpiuses the Message Passing Interface, often across multiple machines. -
-<pprint|json|dot>: Dump the AST in pretty-printed or JSON format, or generate a DOT file for AST visualization.
035a805a22b24c518650e3499f7d2bd01ced7f52
- use
-to read the source code fromstdin. E.g.:
cat examples/ex1.pir | dune exec pirc -- -- use
-o <file>to write the output to a file. E.g.:
dune exec pirc -- -json examples/1.pir -o outTests are added by placing .pir and .ans files in test/test_src, then running
[TODO]dune test in the root directory. The test runner will compile the .pir file, run the compiled program, and compare the output to the .ans file. If the output matches the .ans file, the test passes.
make docsThen open pdf files in docs directory.
-
Install dependencies:
opam install . --deps-only --with-test --with-dev-setup -
-
Name your branch
<your-names>/<feature>
-
-
-
You can format your code using
dune fmt
-
-
You can enable repo-wide githooks to make sure your code is formatted and can build
chmod +x .githooks/pre-commit
git config core.hooksPath .githooks