···1111## Getting dependencies
12121313The easiest way to install the required dependencies is using Nix.
1414-After [installing it](https://nixos.org/download/), simply run `nix develop`.
1515-This environment includes everything necessary for building the program, visualisations, and thesis.
1414+After [installing it](https://nixos.org/download/), simply run one of the two commands below:
16151717-You can also build the program itself with `nix build .#default`.
1616+ - `nix develop .#full` for a full environment with everything required to build the project, visualisations, and thesis. (approx 3.4G disk space)
1717+ - `nix develop .#minimal` for a smaller environment, with only enough to build the project and run tests (approx 1.9G disk space).
1818+1919+You can also build the program itself with `nix build .#default`, or see below to run a test VM.
18201921Alternatively, manually set up the following programs:
2022···2729 - To build the thesis:
2830 - Texlive, with the packages listed in `nix/tex-env.nix`
2931 - `latexmk`
3232+3333+Once you have dependencies installed, check the `README` in each directory for details on how to reproduce our results.
3434+3535+## Building a testing VM
3636+3737+The VM which we used for testing can be fully rebuilt by running `nix build .#vm`. This requires around 3.1G on disk.
3838+3939+After building, run `./result/bin/run-candelabra-vm` to start it.
4040+The credentials are `root` / `candelabra`, and you can use SSH if desired.
4141+4242+The VM has candelabra prebuilt as `candelabra-cli`, but no tools for visualisation or building the thesis.
+1-1
analysis/README.md
···10101111```
1212$ just cost-models # approx 10m
1313-$ just comparisons 2>&1 | tee ../analysis/current/log # approx 1hr 30m
1313+$ just selections --compare 2>&1 | tee ../analysis/current/log # approx 1hr 30m
1414```
15151616We need to also write the log output when comparing since we use this during analysis. To put this data in the right place, in `../analysis`:
···7788Building is done with Cargo as normal: `cargo build`. This places the executable in `./target/debug/candelabra-cli`.
991010+This is not necessary if using the testing VM, and you should replace `cargo run` with `candelabra-cli` in all commands below.
1111+1012## Creating cost models
11131212-To build and view cost models, first find an implementation to look at:
1414+To build and view a cost model, first pick an implementation to look at:
13151414-```
1515-$ cargo run -- list-library
1616-[...]
1717-Available container implementations:
1818- primrose_library::VecMap
1919- primrose_library::VecSet
2020- std::vec::Vec
2121- std::collections::BTreeSet
2222- std::collections::BTreeMap
2323- primrose_library::SortedVecSet
2424- std::collections::LinkedList
2525- primrose_library::SortedVecMap
2626- primrose_library::SortedVec
2727- std::collections::HashMap
2828- std::collections::HashSet
2929-```
1616+ - primrose_library::VecMap
1717+ - primrose_library::VecSet
1818+ - std::vec::Vec
1919+ - std::collections::BTreeSet
2020+ - std::collections::BTreeMap
2121+ - primrose_library::SortedVecSet
2222+ - std::collections::LinkedList
2323+ - primrose_library::SortedVecMap
2424+ - primrose_library::SortedVec
2525+ - std::collections::HashMap
2626+ - std::collections::HashSet
30273131-To view the cost model for a single implementation, run `cargo run -- cost-model <impl>`.
2828+To view the cost model for a single implementation, run `just cost-model <impl>`.
32293333-Alternatively, run `just cost-model <impl>` to look at a single implementation, or `just cost-models` to view models for all implementations.
3434-The latter will clear the cache before running.
3030+Alternatively, run `just cost-models` to view models for all implementations.
3131+This will clear the cache before running.
35323633Cost models are also saved to `target/candelabra/benchmark_results` as JSON files. To analyse your built cost models, copy them to `../analysis/current/candelabra/benchmark_results` and see the README in `../analysis/`.
37343835## Profiling applications
39364040-To profile an application in the `tests/` directory and display the results, run `cargo run -- --manifest-path tests/Cargo.toml -p <project> profile`.
4141-4242-Alternatively, run `just profile <project>`.
4343-3737+To profile an application in the `tests/` directory and display the results, run `just profile <project>`.
4438Profiling info is also saved to `target/candelabra/profiler_info/` as JSON.
45394640## Selecting containers
47414848-To print the estimated cost of using each implementation in a project, run `cargo run -- --manifest-path tests/Cargo.toml -p <project> select`.
4242+To print the estimated cost of using each implementation in a project, run `just select <project>`.
4343+Alternatively, run `just selections` to run selection for all test projects.
4444+4545+You can add `--compare` to either of these commands to also benchmark the project with every assignment of implementations, and print out the results.
49465050-Alternatively, run `just select <project>` for a single project, or `just selections` to run selection for all test projects.
5151-You can add `--compare` to any of these commands to also benchmark the project with every assignment of implementations, and print out the results.
4747+## Running the full test suite
4848+4949+To run everything we did, from scratch:
5050+5151+```
5252+$ just cost-models # approx 10m
5353+$ just selections --compare 2>&1 | tee ../analysis/current/log # approx 1hr 30m
5454+```