Skip to content

About

The Filament Specification Language standard: normative semantics, profiles, versioned interchange and required conformance material.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

filament-specification

Discord Filament

filament-specification is the written standard for the Filament Specification Language (FSL). It holds the semantics of the language, the profiles that select parts of it, the interchange formats programs use to hand each other checked results, and the test cases an implementation has to pass.

The compiler (filament-spec-language), the proof and code-generation backends and the verification tools read the same requirements, JSON schemas and vectors from this repository. Implementers and tool authors use it as the shared reference.

The standard is authored as requirements, test cases, schemas with vectors, and definition bytes. Today the qualification tests check the schemas, vectors and definition bytes and report each vector admitted or refused. Compiler acceptance of the test cases by filament-spec-language and the backends is planned.

Getting started

Clone the repository to read the standard:

git clone https://github.com/agent-ix/filament-specification
cd filament-specification

To use the authored definition documents from Rust, add the library as a git dependency. Its package name is filament-specification-qualification and its library name is filament_specification:

[dependencies]
filament-specification-qualification = { git = "https://github.com/agent-ix/filament-specification" }

Contents

Path What it holds
spec/ The requirements and everything that hangs off them, as Markdown artifacts. See the chart below.
proposals/ Draft grammar, profiles, JSON schemas and the vector and fixture files that specify them. One folder per proposal.
docs/ The atomic V1 capability inventory, which is the binding statement of scope, and the complete architecture.
src/lib.rs A dependency-free Rust library that exposes proposal and test-case file bytes by path, authored documents as constants, and the qualification vector rows as a typed table (QUALIFICATION_VECTORS), generated at build time from the authored test cases.
The spec/ tree holds 1129 authored artifacts in 9 kinds: assurance 16, decisions 6, functional 290, integration 19, non-functional 17, objects 177, stakeholder 2, test-cases 591, usecase 11.

Every chart number is counted from the tree, by docs/images/figures.json for the hero figure and the corpus chart.

The proposals are:

Proposal What it defines
filament-v1 The V1 language research, capability assessment and the versioned definition documents (edition, value and model packages, diagnostics, state, temporal, protocol and observation profiles).
state-core The finite-state profile: grammar, snapshots, identity-preserving references and the fixture cases.
native-source-1-draft The native source ruling, with the superseded state-finite candidate kept as history.
shared-reference-2-draft The artifact roles that verification records use.
checked-package-v2 The checked-package schema and its identity, model and operation vectors.
backend-provider-v1 The schema and vectors for how a backend advertises what it can check.
conformance-corpus-v1 The closed schema and fixture for the qualification corpus.

Historical state-core proposal example

The state-core proposal uses the unadopted state-finite/0-draft profile. Its source and snapshot files preserve that identity and authored expectations. ix:native/1-draft is the selected language edition.

The proposal's ParentPrecedes source is the parent-order fixture:

language "ix:native" edition "0-draft";
profile "state-finite/0-draft";
model M = "example/config";
invariant ParentPrecedes on M::ConfigVersion at current {
  present(self.parent) implies deref(value(self.parent)).versionNumber < self.versionNumber
}

proposals/state-core/fixtures/state-cases.json lists authored expectations for the proposed profile:

Case Authored expectation
healthy-parent-order completed, true
violating-parent-order completed, false
absent-parent-guard completed, true
equal-valued-distinct-identities completed, false
cycle-reachability, self-loop completed, true
dangling-parent refused, dangling_reference
duplicate-object refused, duplicate_object
incomplete-population incomplete, incomplete_population

The expectations in that file are authored by hand. The fixture's model is named by identity alone, so linking it refuses missing_import until a resolver supplies the domain package.

Usage

The library crate is named filament_specification. A consumer reads the documents by reference:

use filament_specification::{
    COMPLETE_VALUE_SELECTION_VECTORS, NATIVE_DIAGNOSTICS,
};

Each constant holds exactly the bytes of the file under proposals/filament-v1/definitions/. Use published_file(path) or published_files(prefix) for other files under proposals/ and the authored test cases under spec/test-cases/.

The Filament ecosystem

This repository is the language standard. It starts the main chain, ahead of the compiler and the backends that implement and consume it.

The Filament repositories. The main chain runs from the standard, filament-specification, to the compiler, filament-spec-language, then filament-contract-ir, filament-contract-codegen and filament-contract-runtime. filament-spec-language also feeds filament-protocol, and filament-contract-ir feeds filament-analyze. filament-observation feeds filament-protocol and filament-mltl. Above the chain, filament-driver runs it, filament-integration tests it and filament-verification plans verification. Below it, shared libraries used throughout: filament-eval, filament-exact, filament-semantic-value, filament-walk, quire-canonical and filament-verification-contracts.

The library has no dependencies. The tests use the filament-verification-contracts crate crate (canonical JSON identity and the operation catalog) and ix-trace-rs, which ties each test to the criterion it verifies. The compiler that implements the standard is filament-spec-language.

Building and testing

cargo test --locked
cargo fmt --all -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings
quire validate --scope . 'spec/**/*.md' --summary

The first Cargo run fetches the git dependencies; later runs can add --offline. quire validate is the quire-cli command.

make figures regenerates the figures defined in docs/images/figures.json and make figures-check reports stale or missing files without writing, both through ixd build from ix-diagrams. The corpus chart draws one bar per kind in the spec/ tree.

Contributing and license

Every contribution needs a signed contributor agreement: read CONTRIBUTING.md and CLA.md first. This repository is licensed under AGPL-3.0-or-later; see LICENSE.

About

The Filament Specification Language standard: normative semantics, profiles, versioned interchange and required conformance material.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages