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

Java API: Provide method for converting IDs to blank names #48

Open
mkroetzsch opened this issue Jun 17, 2020 · 2 comments
Open

Java API: Provide method for converting IDs to blank names #48

mkroetzsch opened this issue Jun 17, 2020 · 2 comments

Comments

@mkroetzsch
Copy link
Collaborator

VLog's Java code currently transforms IDs val of null values into string names for blanks with the following code:
"" + (val >> 40) + "_" + ((val >> 32) & 0377) + "_" + (val & 0xffffffffL)
There is no documentation to clarify why it has to be this way, but if this is significant then it would be good to encapsulate it in a public method to enable callers to work with ids for null values. RuleWerk is currently replicating the code.

@CerielJacobs
Copy link
Contributor

CerielJacobs commented Jun 18, 2020 via email

@mkroetzsch
Copy link
Collaborator Author

Thanks for the explanation. So at least there is no danger of breaking anything if VLog should at some point change its encoding and Rulewerk still has this code as it is now. Then maybe we can just keep the code as it is.

I don't know if the rule and variable number are really interpretable on our side, since there are rewritings happening (already in Rulewerk to bypass the EDB/IDB separation restrictions in VLog), so the internal numbers may not match the rules that the user sees.

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

No branches or pull requests

2 participants