From 062691f9da810b95cfe7e4bdc95e8a9f392d7781 Mon Sep 17 00:00:00 2001 From: eyihluyc Date: Wed, 7 Aug 2024 22:48:49 -0400 Subject: [PATCH] =?UTF-8?q?Add=20`R=5FDOT=5F=CF=81`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo-phi-normalizer/test/eo/phi/dataization.yaml | 2 +- eo-phi-normalizer/test/eo/phi/rules/yegor.yaml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/eo-phi-normalizer/test/eo/phi/dataization.yaml b/eo-phi-normalizer/test/eo/phi/dataization.yaml index b93058f6..7d6d8a86 100644 --- a/eo-phi-normalizer/test/eo/phi/dataization.yaml +++ b/eo-phi-normalizer/test/eo/phi/dataization.yaml @@ -79,7 +79,7 @@ tests: {⟦ x ↦ ⟦ a ↦ ⟦ b ↦ ⟦ c ↦ ξ.ρ ⟧.c ⟧.b ⟧.a , λ ⤍ Package ⟧} output: object: | - ⟦ x ↦ ⟦ b ↦ ⟦ c ↦ ξ.ρ ⟧.ρ, ρ ↦ ⟦ ρ ↦ ⟦ b ↦ ⟦ c ↦ ξ.ρ ⟧.ρ ⟧, c ↦ ξ.ρ ⟧ ⟧, λ ⤍ Package ⟧ + ⟦ x ↦ ⟦ b ↦ ⟦ c ↦ ξ.ρ ⟧.ρ, ρ ↦ ⟦ a ↦ ⟦ b ↦ ⟦ c ↦ ξ.ρ ⟧.ρ ⟧ ⟧ ⟧, λ ⤍ Package ⟧ - name: "usage of Φ with a loop" dependencies: [] diff --git a/eo-phi-normalizer/test/eo/phi/rules/yegor.yaml b/eo-phi-normalizer/test/eo/phi/rules/yegor.yaml index 4af845a3..26099088 100644 --- a/eo-phi-normalizer/test/eo/phi/rules/yegor.yaml +++ b/eo-phi-normalizer/test/eo/phi/rules/yegor.yaml @@ -65,6 +65,7 @@ rules: - apply_in_abstract_subformations: false - nf_inside_formation: '!b' - nf: '⟦ !B ⟧' + - not_equal: ['!τ', 'ρ'] tests: - name: Should match input: ⟦ hello ↦ ⟦⟧ ⟧.hello @@ -72,6 +73,9 @@ rules: - name: Shouldn't match input: ⟦ ⟧.hello output: [] + - name: Shouldn't match + input: ⟦ ρ ↦ ⟦⟧ ⟧.ρ + output: [] - name: Should apply in subformations input: ⟦ a ↦ ⟦ b ↦ ⟦ c ↦ ⟦⟧ ⟧ ⟧.b ⟧ output: ['⟦ a ↦ ⟦ c ↦ ⟦⟧, ρ ↦ ⟦ b ↦ ⟦ c ↦ ⟦⟧ ⟧ ⟧ ⟧ ⟧'] @@ -93,6 +97,19 @@ rules: # input: ⟦ ⟧.hello # output: [] + - name: R_DOT_ρ + description: 'Accessing ρ-binding' + pattern: | + ⟦ ρ ↦ !b, !B ⟧.ρ + result: | + !b + when: + - nf: '⟦ !B ⟧' + tests: + - name: Should match + input: ⟦ ρ ↦ ⟦ ⟧ ⟧.ρ + output: ['⟦ ⟧'] + - name: R_COPY2 description: 'Application of α-binding' # Warning: this is not correct for the chain variant because it only matches the first two bindings