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

Adding simplification attribute to non-constructor-based equalities #250

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

traiansf
Copy link
Member

No description provided.

@@ -42,6 +42,7 @@
public static final KLabel SetItem = KLabel("SetItem");
public static final KLabel DotMap = KLabel(".Map");
public static final KLabel List = KLabel("_List_");
public static final KLabel DotSet = KLabel(".Map");
Copy link
Contributor

Choose a reason for hiding this comment

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

.Set or .Map?

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, the order of these constants makes little sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching this! And abput the order, I agree, but it's not like it was very ordered before :-)

@traiansf traiansf force-pushed the constructor-checks branch 2 times, most recently from d2585c9 to 38055a8 Compare January 16, 2019 13:27
Copy link
Contributor

@virgil-serbanuta virgil-serbanuta left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me, but I'd like someone with more kframework experience to approve.

@@ -0,0 +1,56 @@
package org.kframework.compile
Copy link
Contributor

Choose a reason for hiding this comment

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

Some of the other files have copyright statements.

def constructorBased(m: Module, term: K): Boolean = term match {
case kapp: KApply => immutable(kapp.klist.items).forall(constructorOnly(m))
case t: KAs => constructorBased(m, t.pattern)
case other => true
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a comment explaining why returning true here works?

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.

I'd really rather we didn't add to the amount of scala we are using in the project unnecessarily as it's already a source of problems on occasion

@traiansf
Copy link
Member Author

@dwightguth what is your exact suggestion here?

@dwightguth
Copy link
Collaborator

I mean my suggestion is to write ConstructorChecks in Java.

@traiansf traiansf force-pushed the constructor-checks branch 2 times, most recently from 0b3196b to 7f8f117 Compare January 17, 2019 08:26
@traiansf
Copy link
Member Author

@dwightguth I've rewritten it in Java. Please re-review.

@traiansf traiansf force-pushed the constructor-checks branch 2 times, most recently from 6d252ea to 7367e6c Compare January 18, 2019 17:31
@traiansf traiansf merged commit 6c42cd3 into runtimeverification:master Jan 21, 2019
Baltoli pushed a commit that referenced this pull request Apr 9, 2024
Fixes #203

---------

Co-authored-by: devops <devops@runtimeverification.com>
Baltoli pushed a commit that referenced this pull request Apr 9, 2024
Fixes #203

---------

Co-authored-by: devops <devops@runtimeverification.com>
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.

4 participants