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.
Unary decomposition for H&K's Non-Branching Nodes rule.
- getUnaryChild : S → Option S
Get single child if this is a unary node
Instances
Access to semantic types, parameterized over the type system T.
- getType : S → Option T
Get the semantic type of this node
Instances
class
Core.Interfaces.SemanticStructure
(S T : Type)
extends Core.Interfaces.HasTerminals S, Core.Interfaces.HasBinaryComposition S, Core.Interfaces.HasUnaryProjection S, Core.Interfaces.HasBinding S, Core.Interfaces.HasSemanticType S T :
Full semantic structure for H&K-style interpretation.
- getTerminal : S → Option String
- getBinaryChildren : S → Option (S × S)
- getUnaryChild : S → Option S
Instances
Check if a node is a terminal.
Instances For
Check if a node is binary-branching.
Equations
Instances For
Check if a node is a binder.