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

Feature/567 number encodings #596

Merged
merged 17 commits into from
Jan 27, 2025
Merged

Feature/567 number encodings #596

merged 17 commits into from
Jan 27, 2025

Conversation

Laschoking
Copy link
Collaborator

@Laschoking Laschoking commented Jan 20, 2025

This enables reading of binary (0b), octal (0o) and hexadecimal (0x) encodings in the facts and rules of a program.
The decoding of imported facts is not supported.
Encoded numbers that exceed the size of i64 are decoded into bigint and then handled as strings with iri-type xsd:integer.
closes #567.

Copy link
Member

@aannleax aannleax left a comment

Choose a reason for hiding this comment

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

Looks good overall, apart from the small issues above.

Aside from those, I would also like to see an integration test, i.e. a new test case in the nemo/resources/testcases directory, which (1) tests parsing such numbers from facts and (2) and adds to the test case arithmetic/builtin for the extension to the conversion to i64 builtin.

Copy link
Member

@aannleax aannleax left a comment

Choose a reason for hiding this comment

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

Nice, thanks :)

@aannleax aannleax merged commit 969318e into main Jan 27, 2025
8 checks passed
@aannleax aannleax deleted the feature/567-number-encodings branch January 27, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support binary and hexadecimal number encodings
3 participants