tiny.machine.profile
Defined in tiny.machine.
Comparing two runs requires writing down the rules both ran under and what exactly is being claimed about them, and this namespace holds both as one execution contract, the backend chosen to run it, and the determinism claims that pairing makes (a profile), with the evidence for each claim named.
API (60)
Actions
Public operations.
auditDeterminismcontinuationTestV1: Produces the profile that continuation tests run under on a given backend, so a caller can treat stored roots as authoritative.contractFingerprintdecodeencodeinterpretedContinuationTestV1interpretedReconstructV1kvmContinuationTestV1kvmReconstructV1profileFingerprintreconstructV1: Produces the canonical reconstruct profile for one backend, so a caller can rebuild a missing root and keep going.validate: Admits a profile when it came from a canonical constructor and carries the inventory identity in force, and refuses it otherwise.
Types and contracts
Public types and contracts.
ArchitectureBackendSemanticsBootDialectCapacity: The ten bounded resources one profile pins, so a caller names one to ask for its bound: instances, checkpoint candidates, admissions, request records, event records, and the byte bounds for terminal, entropy, semantic, effect-request, and effect-result payloads.CheckpointFormatContract: Holds the rules for executing a guest that every backend of one canonical kind obeys, so a caller can compare contracts to know whether two runs obeyed the same rules.ContractFingerprint: The identity of the shared execution rules.CpuContractDeterminismAssumption: Assumptions are the dependencies a control rests on and takes on trust, listed so a reader sees what the package trusts without a check.DeterminismAuditErrorDeterminismCategory: The eleven families a divergence source can belong to are categories, so a reader sees which part of the machine a source comes from: CPU instructions, CPUID features, scheduler choices, interrupts, devices, the clock, entropy, packets, host services, the test driver, and external results.DeterminismClaimDeterminismClaimAssumptionDeterminismClaimKindDeterminismClaimWitnessDeterminismClaims: The four determinism claims one profile makes, one at each of four levels (semantic replay, whole-system replay on one backend, equivalence across hosts, and equivalence down to the instruction).DeterminismControl: A control determines whether a witness enforces a source or the source stands as an assumption, so a reader opens the value to see whether a source is held by a mechanism or by trust.DeterminismControlKindDeterminismEntry: One row of the inventory names a source with its category and its version, giving the control that holds under the portable x86-64 interpreter, or reference backend, beside the control that holds under KVM so a reader sees how that source is held on each backend.DeterminismIdentity: What identifies one inventory is its schema, how many entries it holds, and its digest, so a caller compares this value to know whether two profiles were built against the same inventory.DeterminismSchemaDeterminismSource: The places where two runs of the same program could differ that the package takes responsibility for are divergence sources, so a reader checks a source against this list to see whether the package has accounted for it.DeterminismWitness: The named, versioned mechanisms that hold a divergence source fixed are witnesses, so a reader follows a name to the mechanism.DeviceDialectEffectSemanticsEntropySemanticsErrorGeometry: The memory geometry a contract fixes gives how many vCPUs run, the page size, the base address, and the number of bytes, so a caller can check its own memory layout before constructing an instance.InstructionAdmissionMissingRootProfile: One execution contract, the backend chosen to run it, and the determinism claims that pairing makes define a profile.ProfileFingerprint: The identity of one full profile.ProfileKind: The two canonical profile kinds, so a caller says how stored roots are treated.RootSemanticsSchedulingTimeSemanticsTransport: The transport sizes a contract takes from the machine ABI fix the encoding version, the ABI major and minor numbers, and the bounds on a frame, a ring, a record, and a payload, so a caller can size its message buffers before it talks to the guest.TransportDialectUsage: A requested value per bounded resource, held as one fixed array with a getter and a setter so a caller fills one in to have a whole set of requests checked at once.
Namespaces
Public namespaces.
Values and defaults
Public values and defaults.
determinism_entries: The complete source inventory in canonical order, provided so a reader walks this to audit the whole scope of the determinism promise in one place.determinism_sourcesschema_majorschema_minorwire_bytes
Source
Source: lib/machine/src/profile/root.zig
zig
//! Comparing two runs requires writing down the rules both ran under and what exactly//! is being claimed about them, and this namespace holds both as one execution contract,//! the backend chosen to run it, and the determinism claims that pairing makes (a//! *profile*), with the evidence for each claim named.//!//! The execution rules one profile kind shares across backends (its *contract*)//! name the CPU model and the admitted instruction forms, directly boot K0, the//! restricted kernel from `lib/os` that exchanges request and event messages with//! the host through fixed rings in guest RAM, schedule the single vCPU cooperatively,//! inject time and entropy, feed back recorded effect results, and settle the RAM//! geometry, transport sizes, inventory identity, and capacity limits. The two canonical//! profile kinds govern root handling: reconstruct rebuilds a root when the stored//! value is absent, and continuation test requires authoritative roots and rejects//! a missing one. Semantic choices are versioned enum values, and geometry, transport,//! and capacity fields are fixed numbers. The `validate` function accepts only canonical//! constructor outputs carrying the current inventory identity.//!//! A promise can be checked only once its scope is written down, so the namespace//! carries the canonical list naming all 42 places where two runs could differ across//! eleven categories (the *inventory*). Each inventory entry records its control//! twice, once for the reference backend and once for KVM: enforced by a named witness,//! or resting on a named assumption. Each profile states four *determinism claims*//! about itself in the same plain terms, covering semantic replay, whole-system//! replay on one backend, equivalence across hosts, and equivalence down to the//! instruction. A portable profile enforces semantic replay, the portable continuation-test//! profile enforces whole-system replay as well, and three subjects stay assumptions://! KVM semantics, equivalence across hosts, and equivalence down to the instruction.//!//! From earlier work in the [Linux KVM API](https://docs.kernel.org/virt/kvm/api.html)//! and the//! [Intel Software Developer Manuals](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html),//! the namespace took the x86-64 CPU model with the long-mode contract it admits,//! one virtual CPU, and KVM named as one execution semantics among the backends//! of the profile.//!//! The backend is one field of the profile, so the same contract carries a second,//! portable implementation, and the inventory records what that implementation enforces//! while KVM rests on assumptions. A profile carries two fingerprints. The first//! covers the execution rules a kind shares, computed over the encoded profile with//! the backend field and the claim fields zeroed as the *contract fingerprint*,//! so a KVM profile and its portable counterpart hold the same value and can be//! run against each other. The second covers the whole profile as the *profile fingerprint*,//! with the contract, the backend, and the claims all contributing, so every pairing//! of a canonical kind with a backend gets a value of its own.pub const capacity = @import("capacity.zig");pub const determinism = @import("determinism.zig");pub const types = @import("types.zig");pub const wire = @import("wire.zig");pub const Architecture = types.Architecture;pub const BackendSemantics = types.BackendSemantics;pub const BootDialect = types.BootDialect;pub const Capacity = capacity.Capacity;pub const CheckpointFormat = types.CheckpointFormat;pub const Contract = types.Contract;pub const ContractFingerprint = wire.ContractFingerprint;pub const CpuContract = types.CpuContract;pub const DeterminismAssumption = determinism.Assumption;pub const DeterminismAuditError = determinism.AuditError;pub const DeterminismCategory = determinism.Category;pub const DeterminismClaim = determinism.Claim;pub const DeterminismClaimAssumption = determinism.ClaimAssumption;pub const DeterminismClaimKind = determinism.ClaimKind;pub const DeterminismClaims = determinism.Claims;pub const DeterminismClaimWitness = determinism.ClaimWitness;pub const DeterminismControl = determinism.Control;pub const DeterminismControlKind = determinism.ControlKind;pub const DeterminismEntry = determinism.Entry;pub const DeterminismIdentity = determinism.Identity;pub const DeterminismSchema = determinism.Schema;pub const DeterminismSource = determinism.Source;pub const DeterminismWitness = determinism.Witness;pub const DeviceDialect = types.DeviceDialect;pub const EffectSemantics = types.EffectSemantics;pub const EntropySemantics = types.EntropySemantics;pub const Error = types.Error;pub const Geometry = types.Geometry;pub const InstructionAdmission = types.InstructionAdmission;pub const MissingRoot = types.MissingRoot;pub const Profile = types.Profile;pub const ProfileFingerprint = wire.ProfileFingerprint;pub const ProfileKind = types.ProfileKind;pub const RootSemantics = types.RootSemantics;pub const Scheduling = types.Scheduling;pub const TimeSemantics = types.TimeSemantics;pub const Transport = types.Transport;pub const TransportDialect = types.TransportDialect;pub const Usage = capacity.Usage;pub const auditDeterminism = determinism.audit;pub const contractFingerprint = wire.contractFingerprint;pub const continuationTestV1 = types.continuationTestV1;pub const decode = wire.decode;pub const encode = wire.encode;pub const interpretedContinuationTestV1 = types.interpretedContinuationTestV1;pub const interpretedReconstructV1 = types.interpretedReconstructV1;pub const kvmContinuationTestV1 = types.kvmContinuationTestV1;pub const kvmReconstructV1 = types.kvmReconstructV1;pub const profileFingerprint = wire.profileFingerprint;pub const reconstructV1 = types.reconstructV1;pub const schema_major = types.schema_major;pub const schema_minor = types.schema_minor;pub const validate = types.validate;pub const wire_bytes = wire.bytes;pub const determinism_entries = determinism.entries;pub const determinism_sources = determinism.profile_sources;Source: lib/machine/src/root.zig:70
zig
pub const profile = @import("profile/root.zig");Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |