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

Add dicts and gomap packages #13

Merged
merged 27 commits into from
Mar 12, 2024
Merged

Add dicts and gomap packages #13

merged 27 commits into from
Mar 12, 2024

Conversation

dnezam
Copy link
Collaborator

@dnezam dnezam commented Feb 17, 2024

No description provided.

@dnezam dnezam requested a review from jcp19 February 17, 2024 12:15
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
@jcp19
Copy link
Collaborator

jcp19 commented Feb 19, 2024

As discussed in the meeting, I will look at the PR again when the changes to the theorems about Go maps are adapted.

gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
@dnezam dnezam requested a review from jcp19 February 27, 2024 11:09
gomap/gomap.gobra Outdated Show resolved Hide resolved
Copy link
Collaborator

@jcp19 jcp19 left a comment

Choose a reason for hiding this comment

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

I will look at dicts.gobra later.

gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
gomap/gomap.gobra Outdated Show resolved Hide resolved
jcp19
jcp19 previously approved these changes Mar 11, 2024
Copy link
Collaborator

@jcp19 jcp19 left a comment

Choose a reason for hiding this comment

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

lgtm, just a few minor comments

dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Outdated Show resolved Hide resolved
dicts/dicts.gobra Show resolved Hide resolved
gomap/gomap.gobra Show resolved Hide resolved
decreases
pure func Agree(m1, m2 map[int]int) (result bool) {
return forall k int :: {m1[k], m2[k]} k in (domain(m1) intersection domain(m2)) ==>
m1[k] == m2[k]
Copy link
Collaborator

Choose a reason for hiding this comment

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

identation looks inconsistent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree that it looks off; however, it is consistent in the sense that in forall x :: a ==> b, if b is in a new line, it is indented by one relative to forall (compare with IsMonotonic and IsInjective, for example) . Removing that indentation everywhere probably will look off again somewhere.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that, in some places, the indentation is relative to the the return. At any rate, let's ignore it for now. Hopefully, we will have an automated formatter at some point

@jcp19 jcp19 merged commit 0528eda into main Mar 12, 2024
1 check passed
@jcp19 jcp19 deleted the maps branch March 12, 2024 16:52
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