Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix quoting in IDs #2968

Merged
merged 5 commits into from
Oct 10, 2022
Merged

Fix quoting in IDs #2968

merged 5 commits into from
Oct 10, 2022

Conversation

Baltoli
Copy link
Contributor

@Baltoli Baltoli commented Oct 10, 2022

The problem here is that the re-wrapping of constant-folded values (i.e. after calling the compile-time Java implementation of the hook) into their argument positions will enquote a string result, even if it's of sort Id. For Id results, we want to just construct the token directly..

Fixes #2315

@Baltoli Baltoli requested a review from radumereuta October 10, 2022 14:40
@rv-jenkins rv-jenkins changed the base branch from master to develop October 10, 2022 14:40
@Baltoli Baltoli requested a review from dwightguth October 10, 2022 14:49
Copy link
Collaborator

@dwightguth dwightguth left a comment

Choose a reason for hiding this comment

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

Id is not a special sort in k; the compiler should not be providing special behavior for it. This functionality needs to be common to any token sort that isn't marked with the STRING.String or BYTES.Bytes hook

@Baltoli Baltoli requested a review from dwightguth October 10, 2022 15:19
@dwightguth
Copy link
Collaborator

I approved but you might want to add a test for a non Id sort to the test suite also.

@rv-jenkins rv-jenkins merged commit 8b0a175 into develop Oct 10, 2022
@rv-jenkins rv-jenkins deleted the id-quotes branch October 10, 2022 19:46
radumereuta pushed a commit that referenced this pull request Nov 10, 2022
…2431)

* haskell-backend/src/main/native/haskell-backend: 272a2e528 - Update dependency: deps/k_release (#2968)

* haskell-backend/src/main/native/haskell-backend: 2e5140267 - Update dependency: deps/k_release (#2970)

* haskell-backend/src/main/native/haskell-backend: 51edc9821 - Move Kore.Simplify.Rule (#2979)
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Id created by String2Id contains quotation marks
4 participants