Skip to main content

FLUX Certify

Compile FLUX-C guard constraints and generate proof certificates for safety-critical systems.

Overview

FLUX Certify is a Python package + CLI tool for compiling .guard constraint specifications into FLUX-C bytecode and generating proof certificates. Designed for safety-critical deployment in aerospace, automotive, marine, and medical domains.

Installation

pip install flux-certify

CLI Usage

# Compile a guard constraint to FLUX-C bytecode
flux-certify compile "battery_temp in [15, 55] with priority HIGH"

# Generate a proof certificate
flux-certify prove "battery_temp in [15, 55]"

# Generate a signed certificate
flux-certify certify "sonar_frequency in [10, 50]"

# Verify a certificate file
flux-certify verify /path/to/certificate.json

# Show example constraints
flux-certify examples

# Generate signing keys
flux-certify keygen

# Check constraint certification status
flux-certify status "deceleration in [0.1, 0.8]"

Python API

from flux_certify import compile_guard, prove_guard, certify, verify_cert

# Compile
result = compile_guard("battery_temp in [15, 55]")
print(result['asm'])
print(result['guard_hash'])

# Prove
cert = prove_guard("battery_temp in [15, 55]")
print(cert['task_id'])
print(cert['theorem_status'])  # [PROVEN]

# Sign and verify
signed = certify("battery_temp in [15, 55]", signer="my-fleet")
print(verify_cert(signed))  # True

FLUX-C Assembly Format

Each guard constraint compiles to a sequence of FLUX-C opcodes:

; FLUX-C Guard Assembly
; Constraint: battery_temp in [15, 55]
LOAD_IMM  r0, 0xBD16E340  ; battery_temp
LOAD_IMM  r1, 0xBD16E341  ; in
LOAD_IMM  r2, 0xBD16E342  ; 15
LOAD_IMM  r3, 0xBD16E343  ; 55
LOAD_IMM  r0, 0xBD16E344  ; with
LOAD_IMM  r1, 0xBD16E345  ; priority
LOAD_IMM  r2, 0xBD16E346  ; HIGH
VERIFY_GUARD                  ; verify constraint
HALT                          ; end

Proof Certificate Structure

{
  "task_id": "uuid-here",
  "constraint": "battery_temp in [15, 55]",
  "guard_hash": "0xBD16E340",
  "verified": true,
  "prover": "FLUX-Certify-0.1.0",
  "proof_type": "constraint_compilation",
  "flux_c_version": "1.0",
  "theorem": "fluxc_terminates",
  "theorem_status": "[PROVEN]",
  "theorem_description": "All FLUX-C programs halt structurally. No backward jumps, bounded call stack (MAX_STACK=100)."
}

Theoretical Foundation

FLUX-C Turing-Incompleteness Theorem [PROVEN]

Theorem: All FLUX-C programs halt in bounded time.

Proof sketch:

  1. All control-flow opcodes are forward-only (no backward jumps)
  2. Call stack is bounded by hardware MAX_STACK=100
  3. Therefore no infinite loops, no unbounded recursion
  4. Every execution path is finite

This is the foundation for formal verification of FLUX-C programs in safety-critical systems.

Theorem status: [PROVEN] — mechanized in Coq (flux-certify/FluxC/FluxC.v)

Key Invariants

Invariant Status
fluxc_terminates [PROVEN]
fluxc_forward_only [PROVEN]
fluxc_halts_structurally [PROVEN]
MAX_STACK bounded [PROVEN]

License

Apache 2.0

Metadata

Release files for flux-certify 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flux-certify 0.1.0
File Size Uploaded Provenance Actions
flux_certify-0.1.0.tar.gz 2.8 kB Without provenance Details for flux_certify-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flux-certify 0.1.0
File Interpreter ABI Platform Actions
flux_certify-0.1.0-py3-none-any.whl Python 3 none any Details for flux_certify-0.1.0-py3-none-any.whl

Total release size: 5.7 kB

Release files / flux_certify-0.1.0.tar.gz

Download URL flux_certify-0.1.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3a07e19c385e866223829729dc31a86c14ebdcbb146e31b8655a26188e3cf773
BLAKE2b-256 checksum
How to use checksums
ba0e31da6e7506086fd49cf1b349465527084e3d70caf7732a31c3551c32868d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / flux_certify-0.1.0-py3-none-any.whl

Download URL flux_certify-0.1.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28b1aca8eec8c08e23301c3663d22a482eee5201bacab33ac7156583683d8d0f
BLAKE2b-256 checksum
How to use checksums
5e3f6d2325bc0207e720091beb9af2dc3138d99faa5c4b068217b51bccf40bce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for flux-certify 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page