The project is organized into three main folders:
- backend: Contains the backend code for the Hashi - Bridges Puzzle game.
- benches: Contains the code required for benchmarking.
- common: Shared code and resources that are used by both the backend and frontend.
- frontend: Houses the frontend code, responsible for the user interface and interactions.
- solutions: Contains the .cnf and solution .txt files for all initial test problems.
To run the project, follow these steps:
To run the project, open a terminal in the project root directory and execute the following command for frontend:
cargo run --package frontend
or for backend:
cargo run --package backend -- --mode [MODE] --input [FILEPATH] --output [FILEPATH]
We currently support three modes:
Flag | Alias | Functionality |
---|---|---|
encode | Reads a .txt file containing an ASCII hashi puzzle and generates an according .cnf in that directory | |
solve | Reads a CNF file and solves it using minisat | |
encodesolvereconstruct | esr | Reads a .txt file containing an ASCII hashi puzzle, generates a .cnf, solves the CNF file using minisat, reconstructs the solution and prints the reconstructed solved hasi puzzle. |
To build the project, open a terminal in the project root directory and execute:
cargo build --release
To execute the rlease build for test1
and print the reconstructed solution:
../target/release/backend --mode esr --input ./input/test1.txt --output ./input/test1.minisat-output.txt
To execute the integration test containing all given test scenarios and some aditional edge cases:
cargo test --package backend --test integration_test -- test_integration --exact --nocapture
To execute the criterion benchmarking open a terminal in the project backend directory and execute:
cargo bench
See Evaluation
See Clauses
Noel:
- Initialize the project.
- Develop the Command Line Interface (CLI) for our application.
- Implement SAT-Solver integration and the ability to select the appropriate solver based on input data.
- Clap integration encode or solve.
- Solver Error no DIMACS File
- Frontend Leptos/Yew integration.
- Generator
Laura:
- Handle the parsing of input files.
- Error Handling of input files.
- Establish a data structure for passing input data within the application.
- Manage the creation and formatting of output files.
- Test structure
- Benchmarking
- Game Board Format
- Evaluation of Performance
Florian:
- Translate input data into clauses.
- Implement parsing functionality for calculating DIMACS.
- Parsing for CLI output
- Rule 3 in CNF
- Reproduce / Fix unwrap errors in Rule 3
- Update instructions on how to run