Documentation

Linglib.Core.Interfaces.SemanticStructure

Syntax–Semantics Interface: Semantic Structure #

Typeclasses defining what compositional semantics needs from syntax. Parameterized over an arbitrary type system T — Semantics.Montague instantiates with Ty, but other theories can supply their own.

Access to lexical/terminal content.

  • getTerminal : SOption String

    Get terminal content if this is a leaf node

Instances

    Binary decomposition for Functional Application and Predicate Modification.

    • getBinaryChildren : SOption (S × S)

      Decompose into two children if this is a binary node

    Instances

      Unary decomposition for H&K's Non-Branching Nodes rule.

      • getUnaryChild : SOption S

        Get single child if this is a unary node

      Instances

        Binding sites for λ-abstraction.

        • getBinder : SOption (Nat × S)

          Get binding index and body if this is a binder

        Instances

          Access to semantic types, parameterized over the type system T.

          • getType : SOption T

            Get the semantic type of this node

          Instances

            Check if a node is a terminal.

            Equations
            Instances For

              Check if a node is a binder.

              Equations
              Instances For