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

Initialize the project #1

Merged
merged 15 commits into from
Dec 22, 2023
Merged

Initialize the project #1

merged 15 commits into from
Dec 22, 2023

Conversation

fizruk
Copy link
Collaborator

@fizruk fizruk commented Dec 21, 2023

This initializes the Haskell part of the project. In particular, the following is added:

  • eo-phi-normalizer Haskell package
    • grammar/EO/Phi/Syntax.cf contains the EBNF for 𝜑-calculus, based on Phi.g4 grammar. Currently it contains some shift/reduce and reduce/reduce conflicts that need to be resolved (or we could use GLR mode for Happy, but I think we can have a more efficient grammar instead).
      • Grammar is simplified and optimized
    • Language.EO.Phi.Syntax.* modules are generated by BNFC (but for now included in the repository) and contain abstract syntax definitions, lexer, parser, and pretty-printer.
    • Language.EO.Phi provides the default entry point (defaultMain), and a dummy implementation of the normalizer (normalize), as well as some other utilities
    • test/Language/EO/PhiSpec.hs contains a small test for the normalizer (which currently fails because normalizer is not yet implemented).
    • app/Main.hs is the entry point for the executable (just uses defaultMain)
    • package.yaml is a Haskell package file, describing package contents, dependencies, et.
    • eo-phi-normalizer.cabal — is Cabal package file, and it is generated by Stack (which uses hpack for this) from package.yaml
    • Setup.hs contains customization for the build process. Specifically, we use it to automatically call BNFC to generate Language.EO.Phi.Syntax.* modules from the grammar file.
  • stack.yaml specifies a snapshot of all Haskell packages that may be used in dependencies of Haskell packages in this project (we have only one package now)
  • hie.yaml specifies settings for the Haskell Language Server
  • Basic README with build/test/usage information.
  • GitHub Actions workflows
    • GHC build, test, and haddock (source code documentation, published to GitHub Pages)

PR-Codex overview

This PR focuses on adding a normalizer for 𝜑-calculus expressions.

Detailed summary

  • Added eo-phi-normalizer project
  • Added normalize-phi executable
  • Added normalization rules for 𝜑-calculus expressions
  • Added tests for normalization and prettification
  • Updated README with usage instructions

The following files were skipped due to too many changes: README.md, eo-phi-normalizer/package.yaml, eo-phi-normalizer/grammar/EO/Phi/Syntax.old.cf, eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs, eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs, eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt, eo-phi-normalizer/eo-phi-normalizer.cabal, eo-phi-normalizer/src/Language/EO/Phi.hs, eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y, eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x, eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs

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

@yegor256
Copy link
Member

@fizruk GitHub action is missing

@deemp
Copy link
Member

deemp commented Dec 22, 2023

LGTM 👍

@deemp deemp merged commit a8107fe into master Dec 22, 2023
4 checks passed
@aabounegm aabounegm deleted the init-project branch December 22, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants