Skip to main content

Portfolios and Verdicts

A portfolio is a set of backend configurations that Semantifyr runs on a verification case, and a rule that decides the verdict from their answers. No backend is best on every model, so running several side by side gives a verdict more often and sooner. Each configuration in a portfolio is a leg; a portfolio runs the legs whose backend is installed, by default one per processor. The command line, Live, and the VS Code extension all verify this way, with smart as the default portfolio. The Portfolios describes each portfolio.

Soundness directions​

Each leg is trusted in one direction. An exact leg is trusted both ways. An under-approximating leg explores only part of the behaviour, so it is trusted when it finds a trace, a Failed AG or a Passed EF property, and not when it finds none. An over-approximating leg is trusted the other way round. A run may declare a narrower direction for its model, as each backend's page says.

The verdict from the answers​

A case gets one of six verdicts, which the CLI prints as PASSED, FAILED, INCONCLUSIVE, TIMEOUT, NOT_SUPPORTED, and ERRORED. It is Passed when its property holds and Failed when it does not, and the portfolio decides from the answers of its legs:

  • smart and theta race their legs: the first trusted answer is the verdict, and the other legs are stopped.
  • all-agree waits for every leg and reports the verdict its trusted legs agree on. Trusted legs that disagree make the case Errored, since one of them is unsound.
  • A single-backend portfolio reports its leg's verdict when the leg's direction trusts it, and Inconclusive otherwise, such as for Spin's Passed on an AG property.

An answer counts only when its witness reads back into the model. When no trusted answer comes, the case is Timeout when a leg ran out of time, Errored when every leg failed, Not supported when every leg refused the model, and Inconclusive otherwise, and the message lists how every leg ended. A leg refuses the model when its backend does not support one of its constructs or a run leaves a range the backend declared, as each backend's page says, and the message names the construct or variable and its source line. A leg fails when its run fails or its backend rejects the model it was given, and the message carries the backend's text.

How smart runs​

smart runs every leg at once when there are no more legs than processors, and in three stages otherwise. The first stage gives the quick configurations up to ten seconds, the second gives the provers up to thirty, and the last runs the rest until the case's time runs out. Some provers start early and keep running through the later stages. The first trusted answer of any leg is the verdict.

Validation​

A witness is validated by verifying it again, with the same compilation and a validation portfolio. The witness is valid when that verification passes, since the run it replays then exists in the model. The VS Code extension and Live validate every witness while auto-validation is on in their settings, and on request from the case.

The Portfolios​

Choose a portfolio with semantifyr verify --portfolio <id>:

  • smart, the default, runs configurations of every installed backend in stages and takes the first trusted answer.
  • all-agree runs one configuration of each installed backend and requires their trusted answers to agree.
  • theta runs Theta's CEGAR and k-induction configurations side by side and takes the first trusted answer.

Every configuration is also a portfolio of its own, named <backend>-<configuration>, such as theta-ic3. A single-backend portfolio needs its backend installed, a combined one at least one of its backends. The portfolios command of every CLI, such as semantifyr portfolios, lists each portfolio with its legs and their soundness directions and says which are available on your machine, and --portfolio answers an id that names none with the ids that do.