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

More tasks completed #12

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

WeetHet
Copy link

@WeetHet WeetHet commented Sep 20, 2024

No description provided.

@WeetHet WeetHet marked this pull request as draft September 20, 2024 07:50
@WeetHet WeetHet marked this pull request as ready for review September 20, 2024 09:18
@WeetHet WeetHet marked this pull request as draft September 20, 2024 09:18
@WeetHet WeetHet marked this pull request as ready for review September 23, 2024 10:32
@WeetHet
Copy link
Author

WeetHet commented Sep 23, 2024

@parno could you review please?

@parno
Copy link
Contributor

parno commented Sep 23, 2024

Yes, I should be able to review this either tomorrow or Wednesday at the latest.

Copy link
Contributor

@parno parno left a comment

Choose a reason for hiding this comment

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

Thanks for all of your hard work on this! I've added a small collection of comments.

tasks/human_eval_098.rs Outdated Show resolved Hide resolved
tasks/human_eval_102.rs Outdated Show resolved Hide resolved
tasks/human_eval_102.rs Outdated Show resolved Hide resolved
tasks/human_eval_127.rs Outdated Show resolved Hide resolved
tasks/human_eval_127.rs Outdated Show resolved Hide resolved
result.len() == n + 1,
forall|i: int|
#![trigger result[i]]
0 <= i < result.len() ==> result[i].is_some() ==> result[i].unwrap() == spec_tri(
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we strengthen the None case to say that None implies that spec_tri(i) > u32::MAX?

Copy link
Author

Choose a reason for hiding this comment

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

We can, but I don't think it's very easy to prove that

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be straightforward to prove that spec_tri is monotonic, which then means that if you locally discover that your computation of spec_tri(x) overflows (i.e., doesn't stay in bounds), then you can use the monotonic property to say that spec_tri(n) for any n > x would also overflow, so you're justified in returning None

tasks/human_eval_152.rs Outdated Show resolved Hide resolved
tasks/human_eval_152.rs Outdated Show resolved Hide resolved
tasks/human_eval_157.rs Show resolved Hide resolved
tasks/human_eval_163.rs Outdated Show resolved Hide resolved
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