Skip to content

Examples Gallery

.qvr programs spanning probabilistic regressions, latent-variable models, state-space models, language models, encoder-decoder networks, weighted deductions, and QIEC computations. Most full pages include a ## Try it section; CI executes runnable documentation blocks and skips blocks marked as illustrative. Pages with current model limitations identify them directly.

The measured transpilation corpus lives under docs/examples/source/. Mixed QIEC case studies whose purpose is reference-machine execution live under docs/examples/qiec/, so adding one does not silently expand the promised backend matrix.

Language feature map

Use this table when you want an example of a language feature rather than a particular statistical family.

Feature Primary example What to inspect
indexed families, authored handlers, computation calls, parser search, structural attachments, grouped marginalization Amortized Bayesian Semantics mixed entry list, effect trace, target-capability diagnostics
schema and bundle elaboration, generated search and weight effects Schema-Bundled Chart Parser classic chart against run_deduction
direct deduction, learned rule weights, program-to-deduction call PCFG and CCG inside weights, parameter store, scored parser call
structural signature, encoder, decoder, loss, typed PyTorch attachments Term Autoencoder Program.run("reconstruct", term) and autograd
grouped and fibred exact marginalization Latent Dirichlet Allocation over, via, and the per-group reduction
program templates and subprogram calls Parametric Partial Pooling static object arguments, prefixed sites, labeled tuple return
open sequence extent and recursive scan lowering Vanilla RNN LM generated scan step and trajectory site addresses
network kernel computation Bayesian Neural Network MLP parameter source and reference-machine boundary
measure-algebra families Amortized Bayesian Semantics heterogeneous Mixture value used for scoring and prediction
finite collection traversal, indexed effects, nested computation calls, lexical uncertainty Lexical-Uncertainty RSA map/fold normalization, traverse over worlds and lexica, lexical marginalization, observed-or-predicted interpretation

The generated transpilation support matrix records whether each measured source reaches each backend. A successful reference-machine run and a successful transpile are distinct claims; the examples state both where they differ.

Integrated QIEC case study

  • Amortized Bayesian Semantics: a learnable categorial parser, structural logical-form autoencoder, indexed missing-data computation with a contamination measure, authored robustification handler, and hierarchical model with grouped exact marginalization.
  • Lexical-Uncertainty RSA: the specificity model of Bergen, Levy, and Goodman (2016), with a literal listener nested inside a pragmatic speaker and a listener that traverses and marginalizes over three lexica.

Regressions

Latent-variable models

State-space and time-series models

Language models

Encoder-decoder and structured outputs

Weighted deductions

  • PCFG: probabilistic context-free grammar with learnable production weights.
  • CCG: combinatory categorial grammar with forward / backward application and composition.
  • Type-Logical Grammar (Lambek): Lambek calculus with residuated slashes and tensor.
  • PMCFG: probabilistic multiple context-free grammar with WH-movement via a rank-2 non-terminal.
  • Schema-Bundled Chart Parser: pattern-polymorphic rule schemas bundled into a differentiable CKY chart parser.
  • Term Autoencoder: a signature, encoder, decoder, and loss compressing typed lambda terms.
  • Multimodal TLG: Lambek calculus extended with diamond and box modalities.
  • Custom Sequent Rules: user-defined sequents over a free residuated category.
  • Quantifier Scope: continuation-monad lift for generalized quantifiers.
  • Montague NLI: Montague-style lambda-term LFs plus modus-ponens NLI prover.