### Run Pumpkin Solver Examples Source: https://github.com/consol-lab/pumpkin/blob/main/pumpkin-solver-py/README.md Example command to run a specific example, such as the nqueens problem, with a given input size. ```python python examples/nqueens.py 5 ``` -------------------------------- ### Install Nightly Toolchain for Formatting Source: https://github.com/consol-lab/pumpkin/blob/main/README.md Installs the nightly Rust toolchain with the rustfmt component. This is specifically required for formatting the project's code according to the defined style guidelines. ```rust rustup toolchain install --component rustfmt -- nightly ``` -------------------------------- ### Install Pumpkin Solver via Cargo Source: https://github.com/consol-lab/pumpkin/blob/main/README.md This command installs the Pumpkin solver binary using Cargo, Rust's package manager. It allows you to use Pumpkin from the command line. ```sh cargo install pumpkin-solver ``` -------------------------------- ### Build and Develop Pumpkin Python Module Source: https://github.com/consol-lab/pumpkin/blob/main/pumpkin-solver-py/README.md Command to build and install the pumpkin_solver_py module using maturin. This command compiles the Rust binary, making changes to Rust code require a re-compilation. ```bash maturin develop ``` -------------------------------- ### MiniZinc Integration with Pumpkin Source: https://github.com/consol-lab/pumpkin/blob/main/README.md These steps outline how to configure Pumpkin as a backend solver for the MiniZinc modelling language. It involves building Pumpkin, installing MiniZinc, and setting the MZN_SOLVER_PATH environment variable. ```sh # Step 1: Clone the repository and build it using `cargo build --release`. # Step 2: Install MiniZinc using the [appropriate executable](https://www.minizinc.org/resources/) or [binary archive](https://www.minizinc.org/downloads/). # Step 3: Add the following to the `MZN_SOLVER_PATH` environment variable: /pumpkin-cli/minizinc # Step 4: Check whether the installation worked using the command `minizinc --help pumpkin`. ``` -------------------------------- ### Build MiniZinc Challenge Docker Image Source: https://github.com/consol-lab/pumpkin/blob/main/minizinc/README.md Builds the Docker image required for the MiniZinc challenge. This command should be executed from the project root. ```bash docker build -t : -f minizinc/Dockerfile . ``` -------------------------------- ### Build Pumpkin from Source Source: https://github.com/consol-lab/pumpkin/blob/main/README.md These commands clone the Pumpkin repository and build the project using Cargo. Building with `--release` creates an optimized build suitable for production. ```sh git clone https://github.com/ConSol-Lab/pumpkin cd pumpkin cargo build cargo build --release ``` -------------------------------- ### Generate Documentation Source: https://github.com/consol-lab/pumpkin/blob/main/README.md Generates documentation for the Pumpkin project, excluding dependencies. This command is useful for local development and understanding the project's structure. ```sh cargo doc --no-deps ``` -------------------------------- ### Configure VSCode for PyO3 Rebuilds Source: https://github.com/consol-lab/pumpkin/blob/main/pumpkin-solver-py/README.md VSCode settings to prevent PyO3 build cache invalidation by specifying a separate target directory for rust-analyzer. ```json { "rust-analyzer.server.extraEnv": { "CARGO_TARGET_DIR": "target/analyzer" }, "rust-analyzer.check.extraArgs": [ "--target-dir=target/analyzer" ] } ``` -------------------------------- ### Format Code with Nightly Toolchain Source: https://github.com/consol-lab/pumpkin/blob/main/README.md Applies code formatting to the project using the nightly Rust toolchain. This command ensures consistent code style across the project. ```rust cargo +nightly fmt ``` -------------------------------- ### Pumpkin Citation Source: https://github.com/consol-lab/pumpkin/blob/main/README.md This is the recommended citation format for the Pumpkin solver, including its title, URL, authors, year, and organization. ```misc @misc{ Pumpkin, title={Pumpkin: A Lazy Clause Generation constraint solver in Rust}, url={https://github.com/ConSol-Lab/Pumpkin}, author={Demirović, Emir and Flippo, Maarten and Marijnissen, Imko and Sidorov, Konstantin and Smits, Jeff}, year={2024}, organization={ConSol Lab - Delft University of Technology} } ``` -------------------------------- ### Register Pre-commit Hooks Source: https://github.com/consol-lab/pumpkin/blob/main/README.md Copies the pre-commit hook script to the .git/hooks directory, enabling pre-commit checks for the project. This ensures code quality and adherence to project standards. ```sh cp .githooks/pre-commit .git/hooks ``` -------------------------------- ### DRCP Proof Step: Nogood Source: https://github.com/consol-lab/pumpkin/blob/main/drcp-format/README.md Details the format for a nogood step in a DRCP proof, which encodes a partial assignment that cannot lead to a solution. It includes an optional propagation hint. ```APIDOC Nogood Step Format: n [0 ] Components: - : Unique identifier for the step. - : Space-separated list of atomic constraint identifiers forming the nogood clause. - 0 : Optional hint indicating the order of steps to derive the nogood. ``` -------------------------------- ### DRCP Proof Step: Inference Source: https://github.com/consol-lab/pumpkin/blob/main/drcp-format/README.md Describes the format for an inference step in a DRCP proof, representing the propagation of an atomic constraint. It includes optional tags for the triggering constraint and filtering algorithm. ```APIDOC Inference Step Format: i [0 ] [c:] [l:] Components: - : Unique identifier for the step. - : Space-separated list of atomic constraint identifiers. - : Atomic constraint identifier that is propagated. If absent, premises imply false. - c:: Optional hint for the triggering constraint. - l:: Optional hint for the filtering algorithm. ``` -------------------------------- ### Add Pumpkin Solver as a Library Dependency Source: https://github.com/consol-lab/pumpkin/blob/main/README.md This command adds the pumpkin-solver crate as a dependency to your Rust project using Cargo. This allows you to use Pumpkin's functionality within your Rust code. ```sh cargo add pumpkin-solver ``` -------------------------------- ### DRCP Proof Conclusion Source: https://github.com/consol-lab/pumpkin/blob/main/drcp-format/README.md Outlines the format for the conclusion of a DRCP proof, indicating either unsatisfiability or a dual bound for an objective variable. ```APIDOC Conclusion Format: c UNSAT OR c Components: - UNSAT: Indicates the problem is unsatisfiable. - : An atomic constraint ID encoding the dual bound on the objective variable. ``` -------------------------------- ### DRCP Proof Step: Deletion Source: https://github.com/consol-lab/pumpkin/blob/main/drcp-format/README.md Specifies the format for a deletion step in a DRCP proof, used to indicate that a nogood will no longer be used in derivations. ```APIDOC Deletion Step Format: d Components: - : The identifier of the nogood to be deleted. ``` -------------------------------- ### DRCP Literal Mapping File Format Source: https://github.com/consol-lab/pumpkin/blob/main/drcp-format/README.md Defines the structure of a DRCP literal mapping file, which maps integer identifiers to atomic constraints. Each line consists of an identifier followed by a space and the atomic constraint. ```APIDOC Literal Mapping File Format: [] Example: 1 [x1 >= 1] 2 [x2 <= 2] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.