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

Fine-grained intRange #16

Open
JLiangWaterloo opened this issue Jun 24, 2015 · 1 comment
Open

Fine-grained intRange #16

JLiangWaterloo opened this issue Jun 24, 2015 · 1 comment

Comments

@JLiangWaterloo
Copy link
Member

Specify intRange per Clafer, fallback on default if not explicitly specified, i.e., same way it works for scope.

@mantkiew
Copy link
Member

It would be great to be able to specify the domain right in the declaration, like this:

age -> integer<0..150> 1..1 

which could be desugared to

age -> integer  1..1 
    [ this >= 0 && this <= 150 ]

Also, one could set allowed values like this

age -> integer<in 2, 5, 7, 10>  1..1 

which could be desugared to

age -> integer  1..1 
    [ this in 2, 5, 7, 10 ]

It's worth discussing...

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

No branches or pull requests

2 participants