Skip to content

Add a test to demonstrate the invalidity of a naive infinite loop detection algorithm #446

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

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

karenetheridge
Copy link
Member

It seems silly, but this was an error I had in my own implementation until
last week! :o

@Julian
Copy link
Member

Julian commented Nov 16, 2020

Seems reasonable, thanks! Why'd you put it in optional though? This looks required (though if we added more tests for infinite loop detection, those'd be optional)

@karenetheridge
Copy link
Member Author

karenetheridge commented Nov 16, 2020

You're right - the spec says "Validators MUST NOT fall into an infinite loop.". This isn't a test of an actual infinite loop though, as we're unable to test that with the way the tests are set up today -- we'd need some way of saying "evaluating this schema should result in an error". Since this is only a test of a (possible) false positive, we should be able to assert that no evaluator detects this as an infinite loop.. so I guess this can be a mandatory test. I'll move it.

@karenetheridge karenetheridge force-pushed the ether/infinite-loop-detection branch from e28337c to 6ef2def Compare November 16, 2020 21:16
Copy link
Member

@Julian Julian left a comment

Choose a reason for hiding this comment

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

Someone may get confused at seeing a file called infinite-loop-detection.json which contains as you say a non-infinite loop, but I suppose it's fine for now. LGTM.

@karenetheridge
Copy link
Member Author

I'm open to suggestions for a better filename.

…ection algorithm

It seems silly, but this was an error I had in my own implementation until
last week! :o
…ection algorithm

It seems silly, but this was an error I had in my own implementation until
last week! :o
@karenetheridge karenetheridge force-pushed the ether/infinite-loop-detection branch from 6ef2def to 371fcab Compare November 16, 2020 23:45
@karenetheridge karenetheridge merged commit a27c949 into master Nov 16, 2020
@karenetheridge karenetheridge deleted the ether/infinite-loop-detection branch November 16, 2020 23:45
@karenetheridge
Copy link
Member Author

oops, I botched my force-push.. whoops.

@ssilverman
Copy link
Member

ssilverman commented Nov 17, 2020

Fixed some misspelled references in: #447

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.

3 participants