Docs / Semantics / Composition / Basic

Type-driven interpreters

import Linglib.Semantics.Composition.Basic

The rules by which meanings combine are the symbols of a many-sorted language over the semantic types: its binary symbols are the modes of combination and its unary symbols the type shifts. A derivation is a term of the language over typed lexical items, and a structure for the language gives each derivation a value.

A derivation is all the semantics is given, and nothing is assumed of where it comes from: a syntactic theory says which derivations its objects have. One way is type-driven: an interpreter reads a bare structure, the words in their constituency and order with a label at each node, and says which rules a node admits by its label and the types of its daughters, so that the derivations over a bare structure are found from the types alone.

Main definitions

Implementation notes

Interpreter.derivs matches on the derivations of the daughters and does not project from them: a projection is unfolded again wherever it is inspected, which made checking a sentence's value some fifty times dearer. A lexicon gives each word typed items and their values separately. With the values inside the items, a statement over a model with variables in it is still slow to check. A language has more than one structure on the same domains, values at an index and values that depend on it, so a structure is an argument and not an instance.

References

Declarations

The binary rules that apply to daughters of types l and r.

@[reducible, inline] abbrev ManySorted.Language.LocallyFinite.binaryRulesL61–63
{T : Type u} {L : Language T} [L.LocallyFinite] (l r : T) :
List ((u : T) × L.Binary l r u)

Used by ManySorted.Language.motherTypes, Interpreter.typeDriven

Used in Semantics/Composition/Interpret, Semantics/Composition/Rules, ParteeBorschev2001

A derivation of a type from lexical items of the types W supplies.

@[reducible, inline] abbrev ManySorted.Language.DerivL69–71
{T : Type u} (L : Language T) (W : T → Type w) (a : T) :
Type (max u v w)

Used by ManySorted.Language.Deriv.leaf, ManySorted.Language.Deriv.unary, ManySorted.Language.Deriv.binary, ManySorted.Language.Deriv.realize_unary, ManySorted.Language.Deriv.realize_binary, Interpreter.derivs, Interpreter.values

Used in Semantics/Composition/Constituency, Semantics/Composition/Extension, Semantics/Composition/Interpret, Semantics/Composition/PredicateAbstraction, Semantics/Composition/Readings and 3 more

L78–79
L81–84
L88

A type-driven interpreter for a language of rules: the rules a node admits, by its label and the types of its daughters.

structure InterpreterL101–107
{T : Type u} (L : ManySorted.Language T) (N : Type v) :
Type (max u v)
  • unary : N → (a : T) → List ((b : T) × L.Unary a b)

    The unary rules a node labelled n over a daughter of type a admits.

  • binary : N → (l r : T) → List ((u : T) × L.Binary l r u)

    The binary rules a node labelled n over daughters of types l and r admits.

Used by Interpreter.typeDriven, Interpreter.derivs, Interpreter.length_derivs_le_one, Interpreter.values, Interpreter.mem_values_binary

Used in Semantics/Composition/CallByValue, Semantics/Composition/Constituency, Semantics/Composition/Extension, Semantics/Composition/Mode, Semantics/Composition/PredicateAbstraction and 8 more

The type-driven interpreter of a language: a node admits every rule that applies to the types of its daughters, whatever its label.

def Interpreter.typeDrivenL116–120
{T : Type u} {N : Type v} (L : ManySorted.Language T) [L.LocallyFinite] :

Built from , ,

Used by Interpreter.mem_binary_typeDriven

Used in Semantics/Composition/Extension, Semantics/Composition/Interpret, Semantics/Composition/Readings, Syntax/Minimalist/Verbal/Voice/Denotation, Barker2027 and 6 more

The derivations over a bare structure that an interpreter admits, given the typed items each word may be.

def Interpreter.derivsL127–136
{T : Type u} {L : ManySorted.Language T} {N : Type v} {Lx : Type w} {W : T → Type w} (I : Interpreter L N) (lex : Lx → List ((a : T) × W a)) :
Skeleton N Lx → List ((a : T) × L.Deriv W a)

The definition is too large to print here; read it in the source.

Built from , ,

Used by Interpreter.length_derivs_le_one, Interpreter.values

Used in Semantics/Composition/Constituency, Semantics/Composition/Extension, Semantics/Composition/Readings, Wood2023

L138–155

The values of the derivations over a bare structure, for a lexicon of typed items whose values ρ gives. The derivations are found from the types alone.

def Interpreter.valuesL157–161
{T : Type u} {L : ManySorted.Language T} {N : Type v} {Lx : Type w} {W : T → Type w} {D : T → Type x} (I : Interpreter L N) (M : L.Structure D) (ρ : {a : T} → W a → D a) (lex : Lx → List ((a : T) × W a)) (s : Skeleton N Lx) :
List ((a : T) × D a)

Built from , ,

Used by Interpreter.mem_values_binary

Used in Semantics/Composition/Extension, Semantics/Composition/Readings, Wood2023

L163–176