runtimeverification / llvm-backend

KORE to llvm translation
BSD 3-Clause "New" or "Revised" License
34 stars 19 forks source link

Introducing `Ordinal` KORE Attribute #1053

Closed Robertorosmaninho closed 1 month ago

Robertorosmaninho commented 1 month ago

Closes https://github.com/Pi-Squared-Inc/pi2/issues/1432 This PR introduces a new attribute specific to the LLVM Backend. It includes the ordinal attribute to the KORE definition when preprocess is called after parsing a definition. The content of the attribute is a string_sort with the value of the computed axiom_ordinal.

A new C++ tool is planned to consume this feature instead of reading a definition with a bash script. The main intention of this feature is to expose this information to the Python bindings to be used in Proof Hints integration tests.

Robertorosmaninho commented 1 month ago

@dwightguth, I added some Python tests that use the new ordinal attribute.

Baltoli commented 1 month ago

I think the ordinal attribute approach is fine; this is ultimately testing infrastructure and so the performance of a string comparison isn't critical. Avoiding modifications of the K source code is nice.