Skip to content

Commit

Permalink
refactor: fix pigeons spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjabs committed Jan 21, 2025
1 parent 05a1736 commit bec6e4a
Show file tree
Hide file tree
Showing 24 changed files with 133 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
CARGO_TERM_COLOR: always

jobs:
build-test:
name: Build and test
Expand All @@ -27,10 +27,10 @@ jobs:
with:
shared-key: "build-test"
- name: Cargo build
run: cargo build -p pidgeons --verbose
run: cargo build -p pigeons --verbose
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }}
- name: Cargo test
run: cargo test -p pidgeons --verbose
run: cargo test -p pigeons --verbose
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }}
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [
"capi",
"pyapi",
"batsat",
"pidgeons",
"pigeons",
]
resolver = "2"

Expand All @@ -36,7 +36,7 @@ git2 = "0.20.0"
glob = "0.3.2"
itertools = "0.14.0"
nom = "7.1.3"
pidgeons = { version = "0.1.0", path = "./pidgeons" }
pigeons = { version = "0.1.0", path = "./pigeons" }
termcolor = "1.4.1"
thiserror = "2.0.11"
rand = "0.8.5"
Expand Down Expand Up @@ -84,7 +84,7 @@ rand = { workspace = true, optional = true }
rustc-hash = { workspace = true, optional = true }
tempfile.workspace = true
xz2 = { workspace = true, optional = true }
pidgeons = { workspace = true, optional = true }
pigeons = { workspace = true, optional = true }

[dev-dependencies]
rustsat-minisat = { path = "./minisat" }
Expand All @@ -102,7 +102,7 @@ compression = ["dep:bzip2", "dep:flate2", "dep:xz2"]
rand = ["dep:rand"]
bench = []
ipasir-display = []
proof-logging = ["dep:pidgeons"]
proof-logging = ["dep:pigeons"]
verbose-proofs = ["proof-logging"]
all = [
"multiopt",
Expand Down
4 changes: 2 additions & 2 deletions cadical/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ v1-9-5 = []
v2-0-0 = []
v2-1-0 = []
v2-1-1 = []
pidgeons = ["dep:pidgeons", "rustsat/proof-logging"]
pigeons = ["dep:pigeons", "rustsat/proof-logging"]

[dependencies]
anyhow.workspace = true
cpu-time.workspace = true
thiserror.workspace = true
rustsat.workspace = true
pidgeons = { workspace = true, optional = true }
pigeons = { workspace = true, optional = true }

[build-dependencies]
bindgen.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions cadical/src/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,14 @@ impl CaDiCaLClause<'_> {
}
}

#[cfg(feature = "pidgeons")]
impl pidgeons::ConstraintLike<rustsat::types::Var> for CaDiCaLClause<'_> {
#[cfg(feature = "pigeons")]
impl pigeons::ConstraintLike<rustsat::types::Var> for CaDiCaLClause<'_> {
fn rhs(&self) -> isize {
1
}

fn sum_iter(&self) -> impl Iterator<Item = (isize, pidgeons::Axiom<rustsat::types::Var>)> {
self.iter().map(|l| (1, pidgeons::Axiom::from(l)))
fn sum_iter(&self) -> impl Iterator<Item = (isize, pigeons::Axiom<rustsat::types::Var>)> {
self.iter().map(|l| (1, pigeons::Axiom::from(l)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion pidgeons/Cargo.toml → pigeons/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "pidgeons"
name = "pigeons"
version = "0.1.0"
edition.workspace = true
license.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions pidgeons/README.md → pigeons/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build & Test](https://github.com/chrjabs/rustsat/actions/workflows/pidgeons.yml/badge.svg)](https://github.com/chrjabs/rustsat/actions/workflows/pidgeons.yml)
[![crates.io](https://img.shields.io/crates/v/rustsat)](https://crates.io/crates/pidgeons)
[![docs.rs](https://img.shields.io/docsrs/rustsat)](https://docs.rs/pidgeons)
[![License](https://img.shields.io/crates/l/pidgeons)](./LICENSE)
[![Build & Test](https://github.com/chrjabs/rustsat/actions/workflows/pigeons.yml/badge.svg)](https://github.com/chrjabs/rustsat/actions/workflows/pigeons.yml)
[![crates.io](https://img.shields.io/crates/v/rustsat)](https://crates.io/crates/pigeons)
[![docs.rs](https://img.shields.io/docsrs/rustsat)](https://docs.rs/pigeons)
[![License](https://img.shields.io/crates/l/pigeons)](./LICENSE)

<!-- cargo-rdme start -->

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
process::Command,
};

use pidgeons::{
use pigeons::{
Conclusion, ConstraintId as Id, ConstraintLike, OperationLike, OperationSequence,
OutputGuarantee, Proof, VarLike,
};
Expand Down Expand Up @@ -47,7 +47,7 @@ impl<'slf> ConstraintLike<&'slf str> for Constr<'slf> {
self.rhs
}

fn sum_iter(&self) -> impl Iterator<Item = (isize, pidgeons::Axiom<&'slf str>)> {
fn sum_iter(&self) -> impl Iterator<Item = (isize, pigeons::Axiom<&'slf str>)> {
self.terms
.iter()
.map(|(cf, neg, v)| (*cf, (*v).axiom(*neg)))
Expand Down Expand Up @@ -75,7 +75,7 @@ fn verify_proof<P1: AsRef<Path>, P2: AsRef<Path>>(instance: P1, proof: P2) {

fn new_proof(num_constraints: usize, optimization: bool) -> Proof<tempfile::NamedTempFile> {
let file = tempfile::NamedTempFile::new().expect("failed to create temporary proof file");
pidgeons::Proof::new(file, num_constraints, optimization).expect("failed to start proof")
pigeons::Proof::new(file, num_constraints, optimization).expect("failed to start proof")
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion release-plz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ release = false
git_release_enable = false

[[package]]
name = "pidgeons"
name = "pigeons"
release = false
git_release_enable = false
6 changes: 3 additions & 3 deletions src/encodings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub trait CollectClauses {
}
}

/// Trait for collecting clauses including their [`pidgeons::AbsConstraintId`] in a proof
/// Trait for collecting clauses including their [`pigeons::AbsConstraintId`] in a proof
///
/// The default implementation of this trait simply ignores the proof log IDs
#[cfg(feature = "proof-logging")]
Expand All @@ -46,7 +46,7 @@ pub trait CollectCertClauses: CollectClauses {
/// If the collector runs out of memory, return an [`crate::OutOfMemory`] error.
fn extend_cert_clauses<T>(&mut self, cl_iter: T) -> Result<(), crate::OutOfMemory>
where
T: IntoIterator<Item = (Clause, pidgeons::AbsConstraintId)>,
T: IntoIterator<Item = (Clause, pigeons::AbsConstraintId)>,
{
self.extend_clauses(cl_iter.into_iter().map(|(cl, _)| cl))
}
Expand All @@ -58,7 +58,7 @@ pub trait CollectCertClauses: CollectClauses {
fn add_cert_clause(
&mut self,
cl: Clause,
id: pidgeons::AbsConstraintId,
id: pigeons::AbsConstraintId,
) -> Result<(), crate::OutOfMemory> {
self.extend_cert_clauses([(cl, id)])
}
Expand Down
12 changes: 6 additions & 6 deletions src/encodings/card/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub trait BoundUpper: super::Encode + super::BoundUpper {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -46,7 +46,7 @@ pub trait BoundLower: super::Encode + super::BoundLower {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -70,7 +70,7 @@ pub trait BoundBoth: BoundUpper + BoundLower {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand Down Expand Up @@ -105,7 +105,7 @@ pub trait BoundUpperIncremental: BoundUpper + super::EncodeIncremental {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -131,7 +131,7 @@ pub trait BoundLowerIncremental: BoundLower + super::EncodeIncremental {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -155,7 +155,7 @@ pub trait BoundBothIncremental: BoundUpperIncremental + BoundLowerIncremental {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand Down
8 changes: 4 additions & 4 deletions src/encodings/card/dbtotalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl super::cert::BoundUpper for DbTotalizer {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: crate::encodings::CollectCertClauses,
Expand All @@ -380,7 +380,7 @@ impl super::cert::BoundUpperIncremental for DbTotalizer {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: crate::encodings::CollectCertClauses,
Expand Down Expand Up @@ -423,7 +423,7 @@ impl super::cert::BoundLower for DbTotalizer {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: crate::encodings::CollectCertClauses,
Expand All @@ -443,7 +443,7 @@ impl super::cert::BoundLowerIncremental for DbTotalizer {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: crate::encodings::CollectCertClauses,
Expand Down
12 changes: 6 additions & 6 deletions src/encodings/pb/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub trait BoundUpper: super::Encode + super::BoundUpper {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -46,7 +46,7 @@ pub trait BoundLower: super::Encode + super::BoundLower {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -70,7 +70,7 @@ pub trait BoundBoth: BoundUpper + BoundLower {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand Down Expand Up @@ -105,7 +105,7 @@ pub trait BoundUpperIncremental: BoundUpper + super::EncodeIncremental {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -131,7 +131,7 @@ pub trait BoundLowerIncremental: BoundLower + super::EncodeIncremental {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand All @@ -155,7 +155,7 @@ pub trait BoundBothIncremental: BoundUpperIncremental + BoundLowerIncremental {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: CollectCertClauses,
Expand Down
4 changes: 2 additions & 2 deletions src/encodings/pb/dbgte.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ impl super::cert::BoundUpper for DbGte {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: crate::encodings::CollectCertClauses,
Expand All @@ -389,7 +389,7 @@ impl super::cert::BoundUpperIncremental for DbGte {
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
proof: &mut pidgeons::Proof<W>,
proof: &mut pigeons::Proof<W>,
) -> anyhow::Result<()>
where
Col: crate::encodings::CollectCertClauses,
Expand Down
Loading

0 comments on commit bec6e4a

Please sign in to comment.