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

Task 3 (CC + LL + ANF (revised) + LLVM + Refactoring) #29

Merged
merged 14 commits into from
Jan 5, 2024
Merged

Conversation

AzimMuradov
Copy link
Owner

Краткая документация по фазам компиляции в обновленной имплементации:

Phase Resulting Representation Properties
Parsing AST SYNTACTICALLY CORRECT
Type Checking AST SEMANTICALLY CORRECT
Simplification Simplified AST NO TYPES
Identifier Relabeling Simplified AST ALL IDENTIFIERS ARE UNIQUE
Closure Conversion (CC) Simplified AST CLOSURE FREE
Lambda Lifting (LL) LFR ALL FUNCTIONS ARE TOP-LEVEL
Conversion to A-Normal Form (ANF) ANF
LLVM IR Code Generation LLVM IR

AzimMuradov and others added 12 commits December 5, 2023 00:42
- Add LLVM deps
- Add LLVM installation action
- Add cabal.project.freeze
- Downgrade versions
- Fix code to work with the older libs
- Clean up `Parser` modules
- Update `StdLib`
- Add `Trees.Common`
- Update tests
- Add `SimplifiedAst`
- Add `SimplifyAst`
- Add `Utils`
- Add lambda-free representation (`Lfr`)
- Add lambda lifting (`Ll`)
- Update cabal build script
- Simplify `Anf` tree
- Remove old modules, replace them with the new solution
- Add indents into `Anf.PrettyPrinter`
- Add debug info in `Tree.Common.Identifier'`
- Update tests
- Add draft LLVM code gen
  - Use the chain of monads to simplify the code gen
  - Add global vars code gen
  - Add stdlib declarations code gen
  - Add expressions code gen (without partial application)
- Add `Module` record for MiniML module IR
- Add runtime.c for MiniML stdlib
- Simplify the names of operator constructors
- Refactor and fix ANF
  - Change `CompIte` constructor to accept `Expression` in the branches
  - Add `AtomUnit` constructor
  - Change `CompApp` constructor to accept only `Identifier'` as a function
  - Update pretty printer
- Update cabal.project.freeze
- Add "testLlvm recursive factorial" test
- Update tests
- Refactor the code
- Fix "same names in `fun` params bug"
- Fix bugs in `Cc`
- Fix `PrettyPrinter` for `CompIte`
- Use UB-free arithmetic operations
- Add runner modules
- Update CI
- Update `Main` and tests
- Update cabal freeze
- Add partial application feature
- Add "recursive fibonacci" test
- Add "fibonacci with recursive loop" test
- Add "fibonacci with recursive cps" test
- Refactor `Cc`
- Update `Main`
Copy link
Collaborator

@Kakadu Kakadu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я поверю, что всё хорошо тут.

@AzimMuradov AzimMuradov merged commit 549238e into master Jan 5, 2024
2 checks passed
@AzimMuradov AzimMuradov deleted the task-3 branch January 5, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants