Documentation
Verify in CI
aristotle ci checks the properties listed in your repository's aristotle.toml, and reports each one as a test in your CI system: a proved property passes, and a refuted one fails. It comes with the CLI, and detects GitHub Actions, GitLab CI, Jenkins, Buildkite, CircleCI, and Azure Pipelines on its own.
What CI checks
CI checks the properties in aristotle.toml, a manifest you commit at the root of your repository, or of the subproject that the GitHub Action's working-directory input, or --directory on the command line, names. Each property has an id, and is either stated in plain language or names a labeled concurrent SystemVerilog assertion (SVA) or a C function in your code. A named assertion must hold, and a named C function must have no undefined behavior.
Each run checks every property in the manifest against the commit being built, without reusing an earlier run's results. It reports each property as a test named by its id, in a JUnit report. On GitHub, the job page also gets a summary of every property, and failures and properties without a verdict show as annotations on the pull request.
A proof covers the property as stated, under its assumptions entry, if any, and the assumptions listed in the run's summary. Each run is a project in the web app, in the account whose key started it. The project shows that summary, and the log links to the project.
By default, a property left without a verdict doesn't fail the build on its own. Setting the GitHub Action's fail-on input to no-verdict, or passing --fail-on no-verdict on the command line, makes it fail. A property marked expect = "refuted", a deliberate counterexample, passes when it's refuted and fails when it's proved. Properties that Aristotle proposes on its own are listed separately as suggestions, and never change the result. To check one on every run, add it to the manifest.
Aristotle verifies C, Rust, and Verilog. CI doesn't verify Lean files on their own.
1Write the manifest
At a terminal in your repository, run:
aristotle ci setup
It starts a run in which Aristotle reads the code, asks you about anything it can't settle, and proposes properties. The command writes them to aristotle.toml. Review and edit the file, check it with aristotle ci --dry-run, which starts no run, then commit it.
For a Verilog design, aristotle ci takes the build options and black boxes from the aristotle.f committed at the root of the repository or subproject, but aristotle ci setup doesn't read it. Setup uploads a black box's file with the rest of the checkout, so before you run it, match a model you mustn't send with a .gitignore rule. See Checking properties in CI.
To start from a finished project instead, such as one you worked on in the web app, run aristotle ci setup --from <project>. It writes that project's properties without a new run.
You can also write the manifest by hand. Each property is a [requested_properties.<id>] table:
[requested_properties.fifo_no_overflow]
kind = "natural_language"
property = "The FIFO never accepts a write while it is full."
[requested_properties.arbiter_one_grant]
kind = "sva"
identifier = "arbiter.a_one_grant"
[requested_properties.fifo_push_no_ub]
kind = "c_function_no_ub"
identifier = "fifo_push"
A property can also take an assumptions entry, which states in plain language what it's checked under. The log, the JUnit report, and the job summary show it with the verdict.
2Add it to your pipeline
A CI job has nobody to approve a login, so create a key in API keys and store it as a secret named ARISTOTLE_API_KEY. For a private deployment, also set ARISTOTLE_WEB_URL to its HTTPS web origin in the job's environment. In GitHub Actions, add the Aristotle action after the checkout, as in this workflow:
on:
pull_request:
paths: # every run proves every property, so run only when they could change
- "rtl/**"
- "aristotle.toml"
concurrency: # a new push cancels the job, and its run, for the commit before it
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: harmonic-ai/aristotle@v3
with:
api-key: ${{ secrets.ARISTOTLE_API_KEY }}
Each run checks every property again, so its time and cost follow the size of the manifest, not the size of the change. Under paths, list the folders your properties depend on, and aristotle.toml itself. If you make the job a required check, a pull request that touches none of those paths can't merge, since GitHub leaves a skipped workflow's check pending.
On GitLab CI, Jenkins, or another CI system, run aristotle ci in the image ghcr.io/harmonic-ai/aristotle:3, with the key in ARISTOTLE_API_KEY, and publish its JUnit report, aristotle-results.xml. Give the job longer than the step's time budget plus the job's own setup. The budget is 60 minutes unless the manifest, --timeout, or ARISTOTLE_TIMEOUT sets another. GitLab CI and Azure Pipelines end a job after 60 minutes by default, and a job ended that way writes no report.
More in the CI guide
The CI guide has the manifest format and recipes for GitLab CI, Jenkins, and other CI systems. It also covers what fails the build, aristotle review, time and cost, and what gets uploaded.