Skip to main content

Standard Library

The semantifyr package is implicitly available in every Semantifyr file. It defines the built-in datatypes, the Anything base class, and the standard annotations.

Extern Datatypes

TypeDescription
anyUniversal supertype of all types
intInteger numbers
realReal numbers
boolBoolean values
stringText values

Backend Support

Not every model checker backend supports every primitive datatype. The Theta backend currently supports:

PrimitiveTheta backend
intSupported
boolSupported
realLimited / not supported
stringLimited / not supported

Use of real and string requires a backend with the corresponding theory. The any type is a structural feature of the language and works regardless of backend.

The Anything Class

Implicit supertype of all classes. Provides empty base transitions:

class Anything {
tran { }
init { }
havoc { }
}

Every class you write inherits these. Override them with redefine.

Annotations

@VerificationCase

annotation VerificationCase(summary: string[0..1])

Marks a class as a verification target. The optional summary parameter describes what the case checks.

@Tag

annotation Tag(category: string)

Categorizes verification cases. For example, @Tag(category = "slow") marks long-running cases.

@Control

annotation Control

Signals that a variable is important to track during verification. May affect how the model checker reports counterexamples.

@Shared

annotation Shared

Instances contained in a @Shared containment feature are shared across all instances of the containing class, rather than duplicated per instance.

@Trace

annotation Trace

Calls to @Trace-annotated transitions are recorded in the verification witness, including parameter bindings at each call site.