Skip to content

Add HLL lexer#2172

Open
gabrielhdt wants to merge 13 commits intorouge-ruby:masterfrom
alstom:feature.hll
Open

Add HLL lexer#2172
gabrielhdt wants to merge 13 commits intorouge-ruby:masterfrom
alstom:feature.hll

Conversation

@gabrielhdt
Copy link

@gabrielhdt gabrielhdt commented Oct 29, 2025

This pull requests adds a lexer for the High Level Language (a.k.a. HLL), a language used in formal verification for railway systems. The specification is available here or there.

u2bin
unsigned
with
X)
Copy link
Member

Choose a reason for hiding this comment

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

I'm having trouble finding this in the docs - are these keywords case insensitive, or are only the cases listed here (like true, True, TRUE) valid? If it's case-insensitive, it's probably better to upcase or downcase before checking inclusion in this set.

Copy link
Author

@gabrielhdt gabrielhdt Feb 6, 2026

Choose a reason for hiding this comment

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

Only the cases listed here are valid. In https://hal.science/hal-03356342v1/, you can see in Appendix B the correct spellings. Therefore, as you mention, I don't think it's necessary to downcase before checking.

b := ALL i:[0, NOF_PIGEONS-1] SOME j:[0, NOF_HOLES-1] (P[i,j]);

proof obligations:
~(a & b);
Copy link
Member

Choose a reason for hiding this comment

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

If it's possible, it's best to really stress-test the lexer here, rather than pasting the same example from the demo.

Copy link
Author

Choose a reason for hiding this comment

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

I created a new stress test that should cover most common syntax constructions. Don't hesitate to tell me if you prefer an even more complete coverage.

@gabrielhdt
Copy link
Author

Thanks for the review and the suggestions ! I also made the lexer more complete over the HLL grammar.

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.

2 participants