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

Fix pipeline tests #338

Merged
merged 44 commits into from
May 31, 2024
Merged

Fix pipeline tests #338

merged 44 commits into from
May 31, 2024

Conversation

fizruk
Copy link
Collaborator

@fizruk fizruk commented May 14, 2024

The goal of this PR is to make all pipeline tests work well with the current version of the normalizer.

What's in:

  • Fix Lorg_eolang_bytes_eq atom implementation. Surprisingly, with incorrect extraction of an argument, it was looping indefinitely. This has to be fixed in the dataization procedure.
  • Fix dataization inside $\varphi$: $\xi$ needs to be substituted and we need to switch to normalization mode.
  • Fix Rule 8 to use $\xi$-substitution
  • Add support for two positional arguments ($\alpha_0, \alpha_1$)
  • Fix atoms that return boolean to actually produce boolean (not bytes).
  • Force at least one normalization step to avoid infinite loops when evaluating atoms
  • Allow to avoid explosion of stuck terms with --minimize-stuck-terms flag (temporary fix, need a proper solution in the future).
  • Add a fast builtin version of the rules in Language.EO.Phi.Rules.Fast.fastYegorInsideOut which is used by default when the rule set is unspecified
  • Do not apply rules under $\rho$-bindings (optimization).

The following EO tests are dataized into $\bot$ (termination, error):

  • malloc-tests.phi
    • malloc-scope-is-dataized-twice
    • malloc-puts-over-the-previous-data
  • seq-tests.phi
    • very-long-seq
  • while-tests.phi
    • while-dataizes-only-first-cycle

The following EO tests dataize well:

  • bool-tests.phi
  • bytes-tests.phi
  • float-tests.phi
  • int-tests.phi
  • nan-tests.phi
  • negative-infinity-tests.phi
  • positive-infinity-tests.phi
  • runtime-tests.phi
  • string-tests.phi
  • tuple-tests.phi

Other tests are untouched by the normalizer, since dataization gets blocked on unknown atoms and applying normalization blows up the term size.


PR-Codex overview

This PR updates eo-phi-normalizer by adding the cereal package, modifying normalization rules, and enhancing object substitution.

Detailed summary

  • Added cereal package dependency
  • Updated normalization rules and object substitution
  • Modified dataization YAML files

The following files were skipped due to too many changes: eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs, eo-phi-normalizer/src/Language/EO/Phi/Rules/Fast.hs, eo-phi-normalizer/app/Main.hs, eo-phi-normalizer/src/Language/EO/Phi/Dataize.hs, eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@fizruk fizruk force-pushed the fix-pipeline-tests branch 7 times, most recently from 6aee27c to 26894c6 Compare May 17, 2024 05:16
@fizruk fizruk marked this pull request as ready for review May 17, 2024 05:21
@deemp deemp mentioned this pull request May 17, 2024
@fizruk fizruk merged commit e35c090 into master May 31, 2024
8 checks passed
@fizruk fizruk deleted the fix-pipeline-tests branch May 31, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant