Skip to content

Commit

Permalink
Open a new scope in relative clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed May 6, 2024
1 parent e84ef25 commit a4262b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function fix_(
return fix_(vP.right.right, newBinding, undefined);
}

if (tree.label === 'CP') {
if (tree.label === 'CP' || tree.label === 'CPrel') {
const newScope = new Scope(newBinding);
const right = fix_(tree.right, newBinding, newScope);
return {
Expand Down
11 changes: 10 additions & 1 deletion src/semantics/denote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,20 @@ test('it skolemizes exophoric DPs that depend on other variables', () => {
"\"ASSERT(λ𝘸. ∀.SING 𝘹 : ∃𝘦. τ(𝘦) ⊆ t' ∧ poq.𝘸(𝘹)(𝘦). (∃𝘦. τ(𝘦) ⊆ t'' ∧ nıe.𝘸(𝘹, F(𝘹))(𝘦) | ∃𝘦. τ(𝘦) ⊆ t ∧ bue.𝘸(F(𝘹), 𝘹)(𝘦) | inanimate(F(𝘹)) | animate(𝘹)))\"",
);
expect(d('Ní leache nä moaq tú poq é geq hó léache')).toMatchInlineSnapshot(
"\"ASSERT(λ𝘸. (∀.SING 𝘹 : ∃𝘦. τ(𝘦) ⊆ t' ∧ poq.𝘸(𝘹)(𝘦). (∃𝘦. τ(𝘦) ⊆ t ∧ AGENT(𝘦)(𝘸) = 𝘹 ∧ moaq.𝘸(F(a)(𝘹))(𝘦) | ∃𝘦 : 𝘦 = F(a)(𝘹). geq.𝘸(𝘹, a)(𝘦) | animate(𝘹)) | ∃𝘦. τ(𝘦) ⊆ t'' ∧ leache.𝘸(a)(𝘦))) | animate(a) | ∃𝘦. τ(𝘦) ⊆ t0 ∧ AGENT(𝘦)(w) = jí ∧ nıka.w(a)(𝘦)\"",
"\"ASSERT(λ𝘸. (∀.SING 𝘹 : ∃𝘦. τ(𝘦) ⊆ t ∧ poq.𝘸(𝘹)(𝘦). (∃𝘦. τ(𝘦) ⊆ t' ∧ AGENT(𝘦)(𝘸) = 𝘹 ∧ moaq.𝘸(F(a)(𝘹))(𝘦) | ∃𝘦 : 𝘦 = F(a)(𝘹). geq.𝘸(𝘹, a)(𝘦) | animate(𝘹)) | ∃𝘦. τ(𝘦) ⊆ t'' ∧ leache.𝘸(a)(𝘦))) | animate(a) | ∃𝘦. τ(𝘦) ⊆ t0 ∧ AGENT(𝘦)(w) = jí ∧ nıka.w(a)(𝘦)\"",
);
expect(d('Dua tú poq, ꝡä gırı hó')).toMatchInlineSnapshot(
"\"ASSERT(λ𝘸. ∀.SING 𝘹 : ∃𝘦. τ(𝘦) ⊆ t' ∧ poq.𝘸(𝘹)(𝘦). (∃𝘦. τ(𝘦) ⊆ t'' ∧ dua.𝘸(𝘹, F(𝘹))(𝘦) | Cont(F(𝘹))(𝘸) = λ𝘸'. ∃𝘦. τ(𝘦) ⊆ t ∧ gırı.𝘸'(𝘹)(𝘦) | animate(𝘹)))\"",
);
// TODO: Dependency chains like "Tú nhạshı nä nhạ́gu lô nhạshı nä hao nhạ́saq lô
// nhạgu"
});

test('subclauses open a new scope', () => {
expect(d('Dua jí, ꝡä dua jí sía')).toMatchInlineSnapshot(
"\"ASSERT(λ𝘸. (∃𝘦. τ(𝘦) ⊆ t'' ∧ dua.𝘸(jí, a)(𝘦) | Cont(a)(𝘸) = λ𝘸'. ¬∃𝘹 : ∃𝘦. τ(𝘦) ⊆ t ∧ raı.𝘸'(𝘹)(𝘦). ∃𝘦. τ(𝘦) ⊆ t' ∧ dua.𝘸'(jí, 𝘹)(𝘦)))\"",
);
expect(d('Gaı póq, ꝡë cho hó tú rua, rúa')).toMatchInlineSnapshot(
"\"ASSERT(λ𝘸. (∃𝘦. τ(𝘦) ⊆ t'''' ∧ gaı.𝘸(b, a)(𝘦) | (∃𝘦. τ(𝘦) ⊆ t''' ∧ poq.𝘸(b)(𝘦)) ∧ ∀.SING 𝘹 : ∃𝘦. τ(𝘦) ⊆ t' ∧ rua.𝘸(𝘹)(𝘦). (∃𝘦. τ(𝘦) ⊆ t'' ∧ cho.𝘸(b, 𝘹)(𝘦) | inanimate(𝘹)) | ∃𝘦. τ(𝘦) ⊆ t ∧ rua.𝘸(a)(𝘦))) | animate(b) | inanimate(a)\"",
);
});

0 comments on commit a4262b8

Please sign in to comment.