external call
nanofil also contract
In Fil-C libc is Fil-C code too, and only the runtime calls native code (runtime)
An external call is a call to a symbol the module does not define, in practice libc. The core model sends only free to the runtime and is stuck at every other. A contract is Campaign 4's trusted description of one external function: its ABI, the caller's premises, the roots it may write, what it may release or allocate, its observations and its endings.
Core: Semantics.v's
external_callandfree_name, which run the global environment'sge_free; interp.pl's externalcallvoid, globalfree, argp, P, which module-defined functions take precedence over.ExternalCalls.v:
contract,effects,invoke,puts_contract. ExternalMachine.v:external_site(direct calls only, never in a doomed frame),no_violation, andrun_preserve, which carries readiness, identities and both invariants through labelled runs. The extracted driver is unchanged.
The subtlety: a failed premise is an unmet caller obligation, a ContractViolation ending, not a claim that native libc traps. Within its contract a call may return, exit or exhaust resources, but never give unchecked or a capability panic.
The table of contracts is libc-contracts.md; see formal.md, Campaign 4, milestone 1.
Linked from
- ContractFrame.v: owned_live
- ExternalCalls.v: contract
- ExternalCalls.v: event
- ExternalCalls.v: puts_contract
- ExternalCalls.v: span
- ExternalMachine.v: call_site
- How Fil-C works: The runtime and the libc sandwich
- Language.v: Language
- Semantics.v: external_call
- Semantics.v: free_name
- machine
- obligation
- run
- step
- the formal campaign: Campaign 4, milestone 1: a standalone contract boundary
- the formal campaign: The proof, layer by layer