Skip to content

User's Guide

Pacti provides three contract representations. Each representation supports assumptions, guarantees, and the contract operations implemented for its term language. The choice depends on the variables and constraints in the specification.

Polyhedral contracts

PolyhedralIoContract expresses affine equalities and inequalities over numeric interface variables. Use it for component requirements described by linear bounds. The Getting Started tutorial introduces composition, quotient, refinement, and merge. The Polyhedral contract API provides the class reference.

SMT contracts

SmtIoContract expresses assumptions and guarantees as Z3 Boolean constraints over real-valued interface variables. Use it when a requirement is more naturally written as an SMT formula. The SMT contract API provides the class reference.

GR(1) contracts

GR1IoContract expresses typed temporal contracts over Boolean, integer, and real interface variables. Assumptions and guarantees are divided into initial, invariant, and liveness clauses. Use it for requirements that relate current and next values or impose recurring liveness obligations. See the GR(1) overview, the GR(1) Getting Started tutorial, and the GR(1) contract API.