Package-level declarations

Types

Link copied to clipboard
data class Assertion(val kind: AssertionKind, val id: String, val expect: String, val role: Role, val breaks: List<String> = emptyList())

One requirement on an environment. expect is an attribute value or a probe transcript hash; breaks names the reds this assertion tells apart from every green.

Link copied to clipboard
Link copied to clipboard
data class AssertionResult(val assertion: Assertion, val finding: Finding)
Link copied to clipboard
data class CapsuleRef(val label: String, val hash: String)

The label and canonical hash of a capsule a contract was made from.

Link copied to clipboard
data class Contract(val greens: List<CapsuleRef>, val reds: List<CapsuleRef>, val assertions: List<Assertion>)

What a program needs from an environment, as a set of assertions that every known green satisfies. With reds it is a 1-minimal set that breaks every red; with greens alone it is every value the greens share, each Role.COINCIDENTAL.

Link copied to clipboard
class ContractReport(val results: List<AssertionResult>)

One AssertionResult per assertion, in contract order.

Link copied to clipboard
sealed interface ContractResult
Link copied to clipboard
data class Finding(val status: Holds, val found: String?)

found is the value the capsule has: an attribute value or a probe transcript hash.

Link copied to clipboard
enum Holds : Enum<Holds>
Link copied to clipboard
enum Role : Enum<Role>

COINCIDENTAL means constant in every green and not yet shown to matter by a red.