-
Notifications
You must be signed in to change notification settings - Fork 33
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
Replace the Sha256Helper static class with a service and provide non-hash implementation (HAST-240) #61
Comments
What do you mean by this, exactly? Isn't the current implementation what production always needs? We could indeed have a different or even a pretty much no-op implementation for development. |
For example we have this line in the service which creates an intermediate variable from a conditional expression. For creating new code to be transformed, the full content of |
Also keep in mind that even if e.g. conditional names needn't necessarily be globally unique, they need to be unique in their own scope. Due to inlining, this scope can change, and by the end of transformation be much larger than that of the initial expression. Since transformation happens in a parallelized fashion per member, I don't think sequential IDs can be assigned in a deterministic fashion unless you somehow pre-assign them based on the structure of the AST. |
To be clear I don't want to reinvent/replace
Do you mean that the AST visitor operates in parallel? I knew the decompilation is parallelized but I thought the individual transformers worked sequentially. |
Yep, I see. Was just referring to your second paragraph but on a second read, I was beside the point.
|
Thanks for the info, I will keep it in mind. |
Testing VHDL correctness during any core development quickly becomes cumbersome, as labels like
conditional490fbbe6120ff28cfa73a92f6fc4f384ae723eb9ad8d460306095fada72ff872
change all the time. This is becuase the hash value is derived from a technical name that contains line numbers and the full caller name.I believe a lookup-based approach (e.g. service class with
ConcurrentDictionary
) that assigns sequential IDs would be more resistant to inconsequential changes during testing. On the other hand, production could receive a different implementation that actually uses that technical name in a sanitized form, that could be helpful in debugging new code. To achieve this selection,Sha256Helper
should be replaced with anIVhdlLabelProvider
service with the mentioned two implementations.Jira issue
The text was updated successfully, but these errors were encountered: