runtime
Fil-C also runtime axioms
Upstream runtime, filc_runtime.c
The runtime is what Fil-C does around one thread's program, natively libpizlo.so with FUGC: where a new object goes, what free does, and what the collector may change while the program waits at a safepoint. The model does not define it; it states it as one page of axioms, Module Type Runtime (Runtime), each with a native test in tests/c/prog/axiom-*.c.
Ten axioms:
fresh_allocation,address_space,non_moving,free_lifetime,collector_live,safepoints,retention,free_keeps_ids,free_checked,aux_round_trip.safepoint_lifetimeandrootingwere axioms too; they are now lemmas fromcollector_live. Three more readiness obligations,freed_bounds,ready_keptandsafepoint_ready, are about the runtime's own bookkeeping and have no native test.InterpRuntimeis interp.pl's runtime:interp:alloc_base/6for allocation,interp:free_res/4for free, nothing at a safepoint. It proves every axiom, so the module type is consistent andjudgeis closed.The machine runs over any runtime, so every theorem holds of all of them.
The subtlety: the model has one thread and no collector, and its safepoint action changes no region (collector_live): Fil-C's runtime never frees an object by itself. A signal handler or another thread that frees is the program's code; in the model installing a handler or starting a thread is a call to an external with no contract, which ends the run. Natively, retention and non_moving make another thread's free between a check and its access read retained bytes or trap.
Defined in Runtime.v; the axioms with their tests and sources are runtime-axioms.md.
Linked from
- Buffer.v: BufferSafe
- Chain.v: Hull
- CountLogic.v: CountLogic
- Cycle.v: CycleSafe
- Doomed.v: Doom
- ExternalCalls.v: ExternalCalls
- ExternalCalls.v: effects_preserve
- ExternalCalls.v: local_effect_kept
- ExternalCalls.v: span
- ExternalMachine.v: ExternalMachine
- ExternalMachine.v: state_ready
- ExternalMachine.v: step_ready
- FUGC
- GetoptLogic.v: GetoptLogicOn
- Guard.v: Guards
- HelloClose.v: HelloCloseOn
- HelloLeaf.v: HelloLeafOn
- HelloLocale.v: HelloLocaleOn
- HelloName.v: HelloNameOn
- HelloProgName.v: HelloProgNameOn
- HiLogic.v: HiLogic
- How Fil-C works: Free, and the collector
- How Fil-C works: Pointers at rest
- How Fil-C works: The runtime and the libc sandwich
- How Iris works: Invariants
- Identity.v: ids
- Identity.v: lifetime_ids_persists
- Invariant.v: Invariant
- Invariant.v: spares
- Iris invariant
- Language.v: Language
- LentLogic.v: LentLogicOn
- LocaleLogic.v: LocaleLogicOn
- Machine.v: Machine
- MemLogic.v: MemLogicOn
- Memory.v: reason
- Panics.v: Panics
- Persistence.v: Persistence
- Persistence.v: hull_case
- Prefix.v: PrefixSafe
- Prefix.v: prefix_module
- Renew.v: Reuse
- Run.v: Driver
- Run.v: data_base
- Runtime.v: Runtime
- Runtime.v: lifetime_step
- ScanLogic.v: ScanLogic
- Semantics.v: external_call
- Semantics.v: genv
- Single.v: Single
- SlotLogic.v: SlotLogic
- Soundness.v: Sound
- Soundness.v: unchecked_op
- Soundness.v: valid_no_unchecked
- Startup.v: pointer_slot
- StringLogic.v: StringLogicOn
- Sum.v: SumSafe
- Sum.v: sum_module
- address space
- alloc
- aux
- campaign
- concurrent separation logic
- external call
- extraction
- fresh base
- global environment
- interpreter
- live
- obligation
- poll
- ready
- region
- repeated getter
- retention
- root
- run
- snapshot
- soundness of checking
- spares
- the formal campaign: The campaigns at a glance
- the formal campaign: The proof, layer by layer