Przejdź do treści
Biblioteka skilli
Nauka i badania · Budowanie i kod

dcp-z3

/dcp-z3

Buduje modele ograniczeń w solverze Z3 z API Pythona: liczby całkowite, wartości logiczne i tablice, sprawdza spełnialność i optymalizuje.

Repozytorium
DCP-Skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
11.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
20
Skrypty
8
Komentarze HTML
0
Adresy URL w SKILL.md
5
Przestarzałość

Brak sygnałów. Repozytorium zmienione 11.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co sprawdzić przed instalacją
  • 8 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: assets/python/all-optimal-partition/model.py, assets/python/all-solutions-subset-sum/model.py, assets/python/infeasible-shifts/model.py, assets/python/maximise-workshop/model.py, assets/python/minimise-colours/model.py, assets/python/minimise-rental/model.py, assets/python/satisfy-magic-square/model.py, assets/python/schedule-single-machine/model.py

Co robi i kiedy

Buduje modele ograniczeń w solverze Z3 z API Pythona: liczby całkowite, wartości logiczne i tablice, sprawdza spełnialność i optymalizuje.

Oryginalny opis (EN)

Z3, an SMT solver with a Python API (pip package z3-solver, import z3) for integer, Boolean and array constraints, satisfiability checks, optimisation and solution enumeration. Use when writing, debugging or explaining Z3 models in Python, or when the user has chosen Z3 for a constraint or scheduling problem.

Jak działa

  1. Pick an interface
  2. Contents
  3. Solving
  4. All solutions
  5. Further reading
Sekcje z nagłówków SKILL.md, w oryginale · 49 linii, 264 słów
Podgląd SKILL.md
---
name: dcp-z3
description: Z3, an SMT solver with a Python API (pip package z3-solver, import z3) for integer, Boolean and array constraints, satisfiability checks, optimisation and solution enumeration. Use when writing, debugging or explaining Z3 models in Python, or when the user has chosen Z3 for a constraint or scheduling problem.
license: Apache-2.0
compatibility: "Python: Python 3 and pip, and the z3-solver package (tested with package 5.1.0.0, which reports Z3 core version 5.1.0, on Python 3.12; Z3 itself is MIT-licensed, no key or size limit)"
metadata:
  domain: constraint-programming
  solver: z3
  paradigm: smt
  interfaces: "python"
---

# Z3

Z3 is an SMT solver: it decides satisfiability of logical formulas over integers, reals,
Booleans and arrays. It has **no global constraints** (no all-different, element,
cumulative or table as built-ins), so encode them with `Distinct`, `If`, `Select` and
linear arithmetic. Integers are unbounded unless you bound them.

## Pick an interface

Read this file, then the interface file for your language.

| | Python |
|---|---|
| Read | [interfaces/python.md](interfaces/python.md) |
| Package | `z3-solver` wheel (`import z3`) |

Other bindings (the Z3 docs cover C, C++, Java, .NET, JavaScript and OCaml) are not covered yet.

## Contents
- [Solving](#solving) · [All solutions](#all-solutions) · [Further reading](#further-reading)
- Per language: [Python](interfaces/python.md); sources in [sources.md](sources.md)

## Solving

| Result of a check | Meaning |
|---|---|
| sat | a model exists |
| unsat | proven: no model exists |
| unknown | undecided, with a reason such as a timeout |

The optimum of an optimisation is proven when the best value found and the proven bound are the
same finite number; an unbounded objective has an infinite bound. The calls are in the interface files.

## All solutions

Z3 has no enumeration call: loop over `check()` and block each assignment of the
**decision** variables. Auxiliary variables (intermediate sums, makespans) must stay out
of the blocking clause, or each solution appears once per auxiliary value.
Exact calls: the interface file.

## Further reading

- Z3 guide, logic: <https://microsoft.github.io/z3guide/docs/logic/intro/>
- Z3 guide, optimisation: <https://microsoft.github.io/z3guide/docs/optimization/intro/>
- Z3 guide, arithmetic theory: <https://microsoft.github.io/z3guide/docs/theories/Arithmetic/>
- Python API reference (all functions): <https://z3prover.github.io/api/html/namespacez3py.html>
- Source and examples: <https://github.com/Z3Prover/z3> (`examples/python`)
Pliki w paczce (20)
  • SKILL.md 3 KB
  • sources.md 5 KB
  • assets/python/all-optimal-partition/README.md 1 KB
  • assets/python/all-optimal-partition/model.py 1 KB
  • assets/python/all-solutions-subset-sum/README.md 1 KB
  • assets/python/all-solutions-subset-sum/model.py 1 KB
  • assets/python/infeasible-shifts/README.md 1 KB
  • assets/python/infeasible-shifts/model.py 1 KB
  • assets/python/maximise-workshop/README.md 1 KB
  • assets/python/maximise-workshop/model.py 1 KB
  • assets/python/minimise-colours/README.md 1 KB
  • assets/python/minimise-colours/model.py 1 KB
  • assets/python/minimise-rental/README.md 1 KB
  • assets/python/minimise-rental/model.py 1 KB
  • assets/python/satisfy-magic-square/README.md 1 KB
  • assets/python/satisfy-magic-square/model.py 1 KB
  • assets/python/schedule-single-machine/README.md 1 KB
  • assets/python/schedule-single-machine/model.py 1 KB
  • evals/evals.json 4 KB
  • interfaces/python.md 13 KB

Wersje

W bazie nie ma innych skilli o nazwie dcp-z3.

Migawka bazy z 13.11.2026 · wersja paczki 3b9611ad6602 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 6 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100dcp-cvc5
    Buduje modele kombinatoryczne w solverze SMT cvc5 w Pythonie: zmienne całkowite i logiczne, sumy, tablice, no-overlap i optymalizację.
  • 100dcp-maxicp
    Buduje modele programowania z ograniczeniami w MaxiCP w Javie, z przedziałami dla harmonogramów, przeszukiwaniem i wyliczaniem rozwiązań.
  • 100formal-methods
    Weryfikuje dowody, sprawdza poprawność twierdzeń i rozwiązuje problemy spełnialności w Lean 4, Coq i solverze Z3 SMT.
  • 100formal-methods
    Weryfikuje dowody, sprawdza poprawność twierdzeń i rozwiązuje problemy spełnialności w Lean 4, Coq i solverze Z3 SMT.
  • 100scienceclaw-benchmark-for49
    Ocenia skrypty SMT-LIB z arytmetyką nieliniową i zwraca sat, unsat lub unknown dla każdego w kolejności wejścia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.