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

Asl constant analysis #751

Closed
wants to merge 10 commits into from
Closed

Asl constant analysis #751

wants to merge 10 commits into from

Conversation

HadrienRenaud
Copy link
Collaborator

@HadrienRenaud HadrienRenaud commented Jan 9, 2024

This PR implements the following:

  • Remove polymorphism in the AST by excluding the native primitives subprograms from the AST (done in 82cea82).
  • Implement single-pass type-checking by following a DAG on declarations. This removes the possibilities for recursive functions. This will allow for some subtleties such as caching type-checking for re-used parts of ASTs, or type-checking properties where the validity of a property in a function foo depends on properties on the functions foo calls. Done in 9c85ec9.
  • Checks types for validity (e.g. expressions on which they depend should be immutable), done in 8d383cc.
  • Move print into the AST (merge with debug).
  • Remove commit DAG order in type-checking.

This PR is a follow-up on #747. Its 7 first commits are from this PR.

@HadrienRenaud HadrienRenaud marked this pull request as ready for review January 9, 2024 10:07
@HadrienRenaud
Copy link
Collaborator Author

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.

1 participant