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

Refactor GeneratorBase #1510

Open
cmnrd opened this issue Dec 19, 2022 · 0 comments
Open

Refactor GeneratorBase #1510

cmnrd opened this issue Dec 19, 2022 · 0 comments
Labels

Comments

@cmnrd
Copy link
Collaborator

cmnrd commented Dec 19, 2022

GeneratorBase in its current form is not very modular and flexible in its use. It appears to be mostly written with the C target in mind and does not consider the requirements of other targets in its design. For instance, it creates the instance graph twice, which is only used by the C generator. Also many other methods in GeneratorBase only apply to specific features like modes or federation, that are not supported by all targets. These features should better be factored out in separate classes which can then be optionally used by the different targets.

#1508 makes a start at this by factoring out the AST transformation for after delays into a separate transformation class, but there is still a lot more work needed.

Currently, the AstTransfrmation interface expects a list of reactors to apply the transformation to. This should also be revisited as past of fixing this issue. Ideally, we would pass the model or the resource to the transformation.

@cmnrd cmnrd added the cleanup label Dec 19, 2022
@marcusrossel marcusrossel changed the title Refcactor GeneratorBase Refactor GeneratorBase Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant