From b779135e808bf9f80b2424e3b460aa1054f2318d Mon Sep 17 00:00:00 2001 From: Kait Lam Date: Thu, 27 Jun 2024 15:08:54 +1000 Subject: [PATCH] readme: add instructions to install package with opam This is necessary to compile OCaml projects dependent on aslp. --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8404ec7c..04f493f0 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ This interpreter consists of a single directory organized as follows ### Installing with Nix ASLp can be installed as a Nix package from https://github.com/katrinafyi/pac-nix. -_asli_ provides the base ASLp and _aslp_ provides ASLp bundled with ARM's specifications. +The _aslp_ provides ASLp bundled with ARM's specifications. If you don't plan on modifying the tool, this is a fast and easy way to get started. ### Installing dependencies @@ -123,13 +123,26 @@ You also need to execute this command To build the ASL lexer and ASL interpreter, execute this command. -``` +``` make install ``` If you get a lot of linker errors involving Z3, double-check that you installed the right version. +### Building for use in other projects + +If you need to use ASLp or libASL in a downstream OCaml project, +these steps will install the package in a location discoverable by opam and dune. + +After installing dependencies and testing the build, run these commands in this directory: +``` + opam pin . -k path + opam install . +``` +Once complete, you can verify the package is installed by running `ocamlfind query asli`. + + ### Using ASL lexer This displays a list of tokens in an ASL file including the indent