Alpha. Vary is under active development and not ready for production use. Syntax, APIs, performance, and behaviour may change between releases.

Glossary

This page explains terms that appear throughout the docs, especially in comparisons with other languages and in the mutation and VAST sections.

Verification terms

TermMeaning
PreconditionsRules that must be true before a function runs. In Vary these go in in {}.
PostconditionsRules that must be true after a function returns. In Vary these go in out (result) {}.
InvariantA condition that must always hold for a type or object. In Vary, invariants can be attached to classes and data types.
old(expr)The value of an expression at function entry. Used in postconditions to compare before and after state.
Design by ContractA style where code declares its assumptions and guarantees explicitly through preconditions, postconditions, and invariants.
OracleAnything that tells a test whether behaviour was correct. Assertions, expected outputs, and contracts can all act as oracles.
Mutation testingTesting by injecting small faults and checking whether the test suite notices. In Vary this is built into vary mutate.
Surviving mutantA mutated version of the program that still passes the tests. This usually means the tests did not check something important.
Killed mutantA mutated version of the program that causes a test or contract failure. This means the checks noticed the injected fault.
Proof obligationA condition the compiler or verifier must prove before accepting the program. Common in verification-oriented languages like Dafny.
SMT solverAn automated theorem prover used to check logical constraints. Dafny relies on SMT solvers such as Z3 to prove contracts.
Ghost codeVerification-only code used to help prove correctness. It does not exist in the final running program.
Frame controlA way to declare what state a function is allowed to read or modify. Dafny has reads and modifies; Vary does not.
TerminationThe guarantee that a function or loop eventually finishes. Some verification languages require explicit proof of this.
Differential testingTesting by running the same program through multiple independent implementations and checking that they agree. This is the core idea behind VAST.

Language and type-system terms

TermMeaning
Static typingTypes are checked before the program runs. Type errors fail during compilation instead of at runtime.
Nullable typeA type that may contain no value. In Vary, only T? types can be null.
Null safetyRules that prevent accidental null use unless the type explicitly allows it.
PurityA pure function has no hidden side effects and depends only on its inputs. In Vary, pure def is compiler-enforced.
Side effectAny observable change outside a function's return value, such as writing a file, printing, or mutating shared state.
PayloadData carried by an enum case. For example, Error(message: Str) has a payload.
Exhaustive matchA match where every possible case is handled. The compiler checks this for enums.
Algebraic data typeA structured type built from named cases and attached data. Vary enums with payloads are in this family of ideas.
data typeVary's compact syntax for immutable data-carrying types, similar in spirit to records or dataclasses.
Compile timeThe stage where source code is analyzed and turned into executable form.
RuntimeThe stage where the compiled program is actually executing.

Compiler and runtime terms

TermMeaning
CompilerA program that translates source code into another form that can be executed.
BytecodeA low-level instruction format for a virtual machine. It sits below source code and above raw machine code.
JVM bytecodeThe instruction format executed by the Java Virtual Machine. Vary compiles to this.
InterpretedRun directly by an interpreter instead of being compiled ahead of time to bytecode or machine code.
ClassloaderA JVM mechanism for loading classes in isolation. Vary's mutation engine uses isolated classloaders to run mutants safely.
BackendThe compiler stage that turns checked program structures into executable output such as JVM bytecode.
Code generationThe part of compilation that emits executable instructions.
OptimizationCompiler rewrites that preserve meaning while improving speed, size, or structure.
MiscompilationA compiler bug where valid source code is translated into behaviour different from what the program means.
ASTAbstract Syntax Tree. A structured representation of the program after parsing.
AST interpreterAn engine that executes the parsed program structure directly without first generating bytecode.
IRIntermediate Representation. A compiler-internal form between the parsed program and final output.
IR interpreterAn engine that executes the compiler's intermediate form directly. VAST uses this as an independent execution path.
Codegen bugA bug in code generation that produces incorrect executable output.

How these terms fit in Vary

AreaWhy the terms matter
ComparisonsPages like Related languages compare Vary to Eiffel, D, Python, and Dafny, so they use verification and type-system terms directly.
Mutation docsTerms like oracle, mutant, survivor, and side effect explain what vary mutate is measuring.
VAST docsTerms like differential testing, AST, IR, and miscompilation explain how VAST checks the compiler itself.
ContractsTerms like precondition, postcondition, invariant, and old(expr) explain how Vary expresses behaviour rules in code.