Skip to main content

The VITAMIN model checker python package

Project description

VITAMIN Model Checker

Core Python library for model checking multi-agent systems. It provides formula parsers, game-structure parsers, and explicit-state algorithms for CTL, ATL, LTL, and many extensions.

Requirements: Python 3.11+

Install

pip install vitamin-model-checker

Development install from a checkout:

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,docs]"

Quick start

from model_checker.algorithms.explicit.CTL.CTL import model_checking

result = model_checking("AG p", "path/to/model.txt")
print(result)

Most logics expose the same model_checking(formula, filename) entry point and return a plain dict suitable for serialization.

Higher-level helpers are available from the public API:

from model_checker import FormulaParserFactory, execute_model_checking_with_parser

parser = FormulaParserFactory.get_parser("CTL")
# execute_model_checking_with_parser(...) for integrated workflows

Supported logics

Built-in formula logics include ATL, ATLF, CapATL, CTL, IATL, ICTL, LTL, NatATL, NatATLF, NatSL, OATL, OL, RABATL, RBATL, TCTL, TOL, and Wallet_ATL. Model structures include CGS, BCGS, CostCGS, CapCGS, WalletCGS, and timedCGS. See pyproject.toml entry points (vitamin.parsers, vitamin.models, vitamin.benchmarks) for the full registry.

Documentation

  • Architecture, file formats, and logic guides live under docs/
  • API reference pages are generated with MkDocs (pip install -e ".[docs]" then mkdocs serve)

Repository role

Project Role
vitamin-model-checker Core Python library.
vitamin-benchmark-model-checker pyperf benchmark tool for this package.
vitamin-module-integrator Validates logic bundles and applies them to this repo.
vitamin-workbench User-facing web/API application that calls the model checker.

For the cross-project view, see docs/vitamin-stack.md.

Links:

Run tests

pytest model_checker/tests/unit/
pytest model_checker/tests/integration/
pytest model_checker/tests/

make test          # unit + integration style suite, excluding slow tests
make test-models   # full model_checker/tests suite

Test-suite details live in model_checker/tests/README.md.

Build docs

pip install -e ".[docs]"
mkdocs serve
mkdocs build --strict

Benchmarks

Benchmark this package with vitamin-benchmark-model-checker, a separate pip package that times model_checking() across logics via the vitamin.benchmarks entry points declared here.

pip install vitamin-benchmark-model-checker
vitamin-benchmark --logic CTL --output ctl.json

For local development with a checkout of both repos:

pip install -e .
pip install -e ../vitamin-benchmark-model-checker

See the vitamin-benchmark-model-checker README for compare mode, plots, and the full benchmark matrix.

Docker

Docker is mainly for isolated build/test checks:

cd docker
make build
make test

See docker/README.md for the Docker workflow.

Adding logic

The recommended path is to package a new logic as a VMI bundle, validate it with vitamin-module-integrator, and let the integrator apply the files and entry points to this repository.

Manual in-repo changes are still useful for maintainers working directly on the core package. See docs/adding_a_new_logic.md for both workflows.

License

Distributed under the SOURCE-AVAILABLE NON-COMMERCIAL LICENSE. See LICENSE for the full text. Commercial use requires prior written permission from the copyright holder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vitamin_model_checker-1.6.1.tar.gz (440.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vitamin_model_checker-1.6.1-py3-none-any.whl (553.1 kB view details)

Uploaded Python 3

File details

Details for the file vitamin_model_checker-1.6.1.tar.gz.

File metadata

  • Download URL: vitamin_model_checker-1.6.1.tar.gz
  • Upload date:
  • Size: 440.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for vitamin_model_checker-1.6.1.tar.gz
Algorithm Hash digest
SHA256 895150b0bc3cb6ac2898eb6ce6787478b1bd31baed3e47e4d012561f300edba6
MD5 4c04f952f9d46bcc7d0dd196555571d2
BLAKE2b-256 f5943ed84c1c885a3ab5716baa1db1171c6d2ed09a784c1b0bd1b545caf280d3

See more details on using hashes here.

File details

Details for the file vitamin_model_checker-1.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for vitamin_model_checker-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34934a46becfb92ac5cf474933715668423538346fa577130147e1858e29e855
MD5 d854dc0b23b7dda58eee6c9753c45e2a
BLAKE2b-256 78cbbd8eb8e33a15ccc7b20c3dc93840f706e68332218871672e098a6302c608

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page