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

Validate that GDL rules aren't malformed #28

Closed
samschreiber opened this issue Nov 3, 2013 · 5 comments
Closed

Validate that GDL rules aren't malformed #28

samschreiber opened this issue Nov 3, 2013 · 5 comments
Assignees

Comments

@samschreiber
Copy link
Member

There have been reports about malformed rules in game rulesheets like the following:

  (<= terminal (not (sheep_exist)))  ;; instead (<= terminal (not sheep_exist))
  (<= (base (step 1)))               ;; instead (base (step 1))

These should fail validation in the GDL validator. Currently I don't think we have anything that checks for this during validation; we should add something to do that.

@AlexLandau
Copy link
Member

Side note: the GdlCleaner transformation should fix both of these (along with a few other common problems), but this is certainly something we could add to validation. It would be easy enough to check.

@samschreiber
Copy link
Member Author

Awesome, thanks! What I'd ultimately like is to have any game that passes validation be good enough to publish (permanently!) on a public game repository with no manual review. We're not there yet, but that's my ultimate goal.

@ghost ghost assigned AlexLandau Nov 5, 2013
@AlexLandau
Copy link
Member

I have this implemented, but a lot of the test case games violate this, and it's not clear whether they're meant to test cases of games written like this or not (e.g. in test case 1a). Which is to say, do I "fix" those game descriptions, or update the StaticValidatorTest to say they're supposed to fail?

@samschreiber
Copy link
Member Author

Is the malformed GDL essential to what's being tested? If so, indicate that those test cases shouldn't pass the StaticValidator since they're deliberately malformed. Otherwise, if the malformed rules could be rewritten in a way that they validate properly, but still test what they need to test, they should be rewritten.

I definitely think we should have test cases that include malformed rules, to make sure our players can handle them; but that doesn't mean that all (or most) of the test cases have to include malformed GDL, since many test cases will be testing things unrelated to malformed GDL.

@AlexLandau
Copy link
Member

See #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants