Skip to content

Commit 8d9824c

Browse files
authored
feat(pigeons): initial library version (#337)
* feat(pigeons): initial library version * fix tools nix build
1 parent 60611ff commit 8d9824c

20 files changed

+4010
-11
lines changed

.config/lingo.dic

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
39
1+
47
22
accessor
33
al
44
AllDifferent
@@ -10,14 +10,19 @@ bitwise
1010
boolean
1111
cardinality
1212
changelog
13+
checkable
1314
children's
1415
comparator
1516
decrementing
1617
encoding/S
18+
equioptimal
19+
equisatisfiable
1720
et
1821
executable/S
22+
formatter
1923
hasher
2024
incrementing
25+
initializer/S
2126
inprocessing
2227
irredundant
2328
learnt
@@ -28,6 +33,9 @@ parser/S
2833
preprocessing
2934
propagations
3035
recurse/S
36+
redundance
37+
reflexivity
38+
reification/S
3139
satisfiability
3240
satisfiable
3341
struct/S

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- kissat-tests
3333
- kissat-test-all-features
3434
- minisat-tests
35+
- pigeons-tests
3536
- pyapi-tests
3637
- pyapi-stubs
3738
- tools-tests
@@ -55,6 +56,7 @@ jobs:
5556
echo "kissat-tests: ${{ needs.kissat-tests.result }}"
5657
echo "kissat-test-all-features: ${{ needs.kissat-test-all-features.result }}"
5758
echo "minisat-tests: ${{ needs.minisat-tests.result }}"
59+
echo "pigeons-tests: ${{ needs.pigeons-tests.result }}"
5860
echo "pyapi-tests: ${{ needs.pyapi-tests.result }}"
5961
echo "pyapi-stubs: ${{ needs.pyapi-stubs.result }}"
6062
echo "tools-tests: ${{ needs.tools-tests.result }}"
@@ -439,6 +441,42 @@ jobs:
439441
- name: Test suite
440442
run: cargo nextest run --profile ci -p rustsat-minisat --verbose
441443

444+
pigeons-tests:
445+
name: Pigeons test suite
446+
strategy:
447+
matrix:
448+
os: [ubuntu-latest, macos-latest, windows-latest]
449+
runs-on: ${{ matrix.os }}
450+
needs:
451+
- build-workspace
452+
steps:
453+
- uses: actions/checkout@v4
454+
- name: Determine Rust version
455+
id: rust-versions
456+
shell: bash
457+
run: scripts/rust-versions.sh >> "$GITHUB_OUTPUT"
458+
- uses: dtolnay/rust-toolchain@master
459+
with:
460+
toolchain: ${{ steps.rust-versions.outputs.toolchain }}
461+
- uses: taiki-e/install-action@nextest
462+
- uses: Swatinem/rust-cache@v2
463+
with:
464+
shared-key: "toolchain-workspace"
465+
save-if: false
466+
- name: Set up Python
467+
uses: actions/setup-python@v5
468+
with:
469+
python-version: 3.12
470+
- name: Install VeriPB
471+
if: matrix.os == 'ubuntu-latest'
472+
run: |
473+
set -e
474+
sudo apt-get install libgmp-dev
475+
pip install https://gitlab.com/MIAOresearch/software/VeriPB/-/archive/version2/VeriPB-version2.zip
476+
echo "VERIPB_CHECKER=$(which veripb)" >> "$GITHUB_ENV"
477+
- name: Test suite
478+
run: cargo nextest run --profile ci -p pigeons --verbose
479+
442480
pyapi-tests:
443481
name: PyAPI test suite
444482
strategy:

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ members = [
1010
"capi",
1111
"pyapi",
1212
"batsat",
13+
"pigeons",
1314
]
1415
resolver = "2"
1516

@@ -33,6 +34,7 @@ git2 = "0.20.1"
3334
glob = "0.3.2"
3435
itertools = "0.14.0"
3536
nom = "7.1.3"
37+
pigeons = { version = "0.1.0", path = "./pigeons" }
3638
termcolor = "1.4.1"
3739
thiserror = "2.0.12"
3840
rand = "0.9.0"

data/all_diff.opb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* #variable= 16 #constraint= 15
2+
1 y_x1_5 1 y_x1_6 1 y_x1_7 1 y_x1_8 1 y_x1_9 >= 1 ;
3+
1 y_x2_5 1 y_x2_6 1 y_x2_7 1 y_x2_8 1 y_x2_9 >= 1 ;
4+
1 y_x3_8 1 y_x3_9 >= 1 ;
5+
1 y_x4_8 1 y_x4_9 >= 1 ;
6+
1 y_x5_8 1 y_x5_9 >= 1 ;
7+
-1 y_x1_5 -1 y_x1_6 -1 y_x1_7 -1 y_x1_8 -1 y_x1_9 >= -1 ;
8+
-1 y_x2_5 -1 y_x2_6 -1 y_x2_7 -1 y_x2_8 -1 y_x2_9 >= -1 ;
9+
-1 y_x3_8 -1 y_x3_9 >= -1 ;
10+
-1 y_x4_8 -1 y_x4_9 >= -1 ;
11+
-1 y_x5_8 -1 y_x5_9 >= -1 ;
12+
-1 y_x1_5 -1 y_x2_5 >= -1 ;
13+
-1 y_x1_6 -1 y_x2_6 >= -1 ;
14+
-1 y_x1_7 -1 y_x2_7 >= -1 ;
15+
-1 y_x1_8 -1 y_x2_8 -1 y_x3_8 -1 y_x4_8 -1 y_x5_8 >= -1 ;
16+
-1 y_x1_9 -1 y_x2_9 -1 y_x3_9 -1 y_x4_9 -1 y_x5_9 >= -1 ;

0 commit comments

Comments
 (0)