Skip to content

Commit

Permalink
Denote cleft verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed Sep 5, 2023
1 parent 0e07d46 commit 65a6386
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions src/semantics/denote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,24 @@ const boundTheBindings: Bindings = {
};

// λ𝘢. λ𝘦. ᴀɢᴇɴᴛ(𝘦)(𝘸) = 𝘢
const littleV = λ('e', ['s'], c =>
const littleVAgent = λ('e', ['s'], c =>
λ('v', c, c => equals(app(app(agent(c), v(0, c)), v(2, c)), v(1, c))),
);

// λ𝘗. 𝘗
const na = λ(['e', 't'], [], c => v(0, c));

function denoteLittleV(toaq: string | null): Expr {
switch (toaq) {
case null:
return littleVAgent;
case 'nä':
return na;
default:
throw new Error(`Unrecognized 𝘷: ${toaq}`);
}
}

function findVp(tree: StrictTree): StrictTree | null {
if (tree.label === 'VP') {
return tree;
Expand Down Expand Up @@ -503,7 +517,16 @@ function denoteLeaf(leaf: Leaf, cCommand: StrictTree | null): DTree {
covertResumptive: binding,
};
} else if (leaf.label === '𝘷') {
denotation = littleV;
let toaq: string | null;
if (typeof leaf.word === 'string') {
toaq = null;
} else if (leaf.word.entry === undefined) {
throw new Error(`Unrecognized 𝘷: ${leaf.word.text}`);
} else {
toaq = leaf.word.entry.toaq;
}

denotation = denoteLittleV(toaq);
} else if (leaf.label === '𝘷0') {
denotation = null;
} else if (leaf.label === 'Asp') {
Expand Down Expand Up @@ -757,7 +780,10 @@ function getCompositionRule(left: DTree, right: DTree): CompositionRule {
? functionalApplication
: reverseFunctionalApplication;
case '𝘷':
return eventIdentification;
return left.denotation !== null &&
typesEqual(left.denotation.type, ['e', ['v', 't']])
? eventIdentification
: functionalApplication;
case 'C':
return cComposition;
case 'Crel':
Expand Down

0 comments on commit 65a6386

Please sign in to comment.