Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename Normal form to NF #627

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ applyRulesChainWith limits@ApplicationLimits{..} obj
ctx <- getContext
if isNF ctx obj
then do
logStep "Normal form" obj
logStep "NF" obj
return obj
else do
(ruleName, obj') <- choose (applyOneRule ctx obj)
Expand Down
4 changes: 2 additions & 2 deletions site/docs/src/eo-phi-normalizer/dataize.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Evaluating lambda 'Package' : ⟦
as-bytes ↦ 25.0
)

Normal form: ⟦
NF: ⟦
c ↦ Φ.org.eolang.float (
as-bytes ↦ Φ.org.eolang.number (
as-bytes ↦ Φ.org.eolang.bytes (
Expand Down Expand Up @@ -544,7 +544,7 @@ Evaluating lambda 'Package' : ⟦
x ↦ 32.0
)

Normal form: ⟦
NF: ⟦
c ↦ Φ.org.eolang.float (
as-bytes ↦ Φ.org.eolang.number (
as-bytes ↦ Φ.org.eolang.bytes (
Expand Down
8 changes: 4 additions & 4 deletions site/docs/src/eo-phi-normalizer/rewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Input:
}
====================================================
Result 1 out of 1:
[ 1 / 1 ] Normal form: {
[ 1 / 1 ] NF: {
c ↦ Φ.org.eolang.float (
as-bytes ↦ 25.0
Expand Down Expand Up @@ -167,7 +167,7 @@ This is the 1st possible chain of normalizing rewritings:
\trans [[ m -> [[ D> 42-, ^ -> [[ t -> [[ D> 42- ]] ]] ]]( )( ^ -> [[ x -> [[ D> 42- ]]( ^ -> [[ t -> [[ D> 42- ]] ]] ) ]] ) ]] \trans_{\rulename{DUP}}
\trans [[ m -> [[ D> 42-, ^ -> [[ t -> [[ D> 42- ]] ]] ]]( ^ -> [[ x -> [[ D> 42- ]]( ^ -> [[ t -> [[ D> 42- ]] ]] ) ]] ) ]] \trans_{\rulename{STAY}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]]( ) ]] \trans_{\rulename{DUP}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]] ]] \trans_{\rulename{Normal form}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]] ]] \trans_{\rulename{NF}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]] ]].
\end{phiquation*}

Expand All @@ -180,7 +180,7 @@ This is the 2nd possible chain of normalizing rewritings:
\trans [[ m -> [[ x -> [[ D> 42-, ^ -> [[ t -> [[ D> 42- ]] ]] ]] ]].x ]] \trans_{\rulename{DOT}}
\trans [[ m -> [[ D> 42-, ^ -> [[ t -> [[ D> 42- ]] ]] ]]( ^ -> [[ x -> [[ D> 42-, ^ -> [[ t -> [[ D> 42- ]] ]] ]] ]] ) ]] \trans_{\rulename{STAY}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]]( ) ]] \trans_{\rulename{DUP}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]] ]] \trans_{\rulename{Normal form}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]] ]] \trans_{\rulename{NF}}
\trans [[ m -> [[ ^ -> [[ t -> [[ D> 42- ]] ]], D> 42- ]] ]].
\end{phiquation*}

Expand All @@ -199,7 +199,7 @@ eo-phi-normalizer rewrite --json --chain --rules ./eo-phi-normalizer/test/eo/phi
"output": [
[
[
"Normal form",
"NF",
"{\n ⟦\n c ↦ Φ.org.eolang.float (\n as-bytes ↦ 25.0\n ),\n result ↦ ξ.c.times (\n x ↦ 1.8\n )\n .plus (\n x ↦ 32.0\n ),\n λ ⤍ Package\n ⟧\n}"
]
]
Expand Down