Metadata-Version: 2.4
Name: stagesat
Version: 0.1.0
Summary: A floating-point constraint solver via staged optimization
License-Expression: MIT
Project-URL: Homepage, https://github.com/stagesat-solver/stagesat
Project-URL: Repository, https://github.com/stagesat-solver/stagesat
Project-URL: Issues, https://github.com/stagesat-solver/stagesat/issues
Keywords: smt,floating-point,constraint-solving,optimization
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Cython
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<2.4,>=2.3.1
Requires-Dist: scipy<1.17,>=1.16.0
Requires-Dist: sympy<1.15,>=1.14.0
Requires-Dist: z3-solver<4.16,>=4.15.1.0
Dynamic: license-file

# StageSAT

A floating-point constraint solver via staged optimization. MIT licensed.

## Install

Release targets: CPython 3.11–3.13 on Linux x86-64 (glibc) and macOS Apple Silicon.
See [PACKAGING.md](PACKAGING.md) for validation status and release checks.

```bash
# From the repository root:
python -m pip install ./pypi
```

Solving requires Clang and the running Python's development headers, including
when installed from a wheel. On macOS install Xcode Command Line Tools with
`xcode-select --install`. On Linux install Clang and the development package
matching your Python version (for example, `python3.11-dev`). Conda Python
installations normally include their headers.

## Solve

```bash
stagesat input.smt2 --bench --time
# Equivalent module invocation:
python -m stagesat input.smt2 --bench --time
```

The command generates and compiles the objectives automatically in a private
temporary directory, passes their paths to spawned optimizer processes, and
removes temporary files on completion. It works outside the source checkout
and allows concurrent invocations from the same directory.

`--bench` suppresses debug output. Standard output contains the `sat`/`unsat`
verdict followed by solver wall time in seconds when `--time` is present.
Compilation and verification time are excluded from this solver timing, as in
the original workflow. Diagnostics go to standard error.

```bash
stagesat input.smt2 --bench --time --jobs 4
stagesat --help
stagesat --version
```

`--jobs` defaults to the CPU count. Select a particular compiler with
`--clang /path/to/clang` or `STAGESAT_CLANG`. Compilation errors exit with status
2 and an explanation; interruption exits with status 130.

The original optimizer, thresholds, and verdict rule are preserved: a zero best
residual reports `sat`; otherwise the solver reports `unsat`. The original
verification checks produce diagnostics without changing that verdict.

## Develop and release

This directory is the complete Python packaging project. The original repository's
source files are unchanged. Package metadata is in `pyproject.toml`, and the
single version source is `src/stagesat/_version.py`.

```bash
cd pypi
python -m pip install build twine
python tools/check_release.py --dependencies minimum
python tools/check_release.py --dependencies latest
```

These commands build distributions and test wheel and source installations in
fresh environments outside the checkout. See [PACKAGING.md](PACKAGING.md) for
the dependency audit, native platform CI, and PyPI publishing instructions.
