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

DMN 1.5 - extra assertions for the range properties for = and !=. #671

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StrayAlien
Copy link
Contributor

I have changed the structure of the tests to make then less spread out. In effect, each range test asserts on a context of its property values. Keeps stuff together. All the previous test assertions are still here.

The values I am asserting on here are:

expression start included start end end included
=10 true 10 10 true
!=10 false 10 10 false

This is not covered in the spec, so, comments welcome.

…anged the structure of the tests to make then less spread out. In effect, each range test asserts on a context of its property values. Keeps stuff together. All the previous test assertions are still here.
@StrayAlien StrayAlien changed the title extra assertions for the range properties for = and !=. DMN 1.5 extra assertions for the range properties for = and !=. Jul 25, 2024
@StrayAlien StrayAlien changed the title DMN 1.5 extra assertions for the range properties for = and !=. DMN 1.5 - extra assertions for the range properties for = and !=. Jul 25, 2024
@SimonRinguette
Copy link
Contributor

@StrayAlien I could see =10 as a range but !=10 is two ranges: <10 and >10. The way you have it there (10..10) can't return true and does not represent != 10.

@StrayAlien
Copy link
Contributor Author

Hi @SimonRinguette ... exactly, and now we're seeing some of the weirdness of it. :-). Two ranges?

A little more here: #667

FEEL supports a compact syntax for a range of values, useful in decision table test cells and elsewhere. Ranges can be syntactically represented either:
a) as a comparison operator and a single endpoint (grammar rule 7.a.)
b) .. etc

If a range can be expressed as a "comparison operator and a single endpoint", then by implication a "comparison operator and a single endpoint" should be able to be expressed as a range?

@opatrascoiu
Copy link
Contributor

@StrayAlien The paragraph that you mentioned talks about syntactic representation (e.g. one object in the AST that contains the operator and the endpoint). The same section contains also references at the end to several tables that describe the semantics of ranges: boolean lambdas.

What the spec does not say in examples is the values of range properties for the != range (e.g. start included and start).

I don't think it makes sense to evaluate (!=10).start and (!=).end and hence treat them as errors (e.g. return null).

@StrayAlien
Copy link
Contributor Author

Thanks @opatrascoiu - if that is the case - cool - we should get it into the spec - perhaps the != comparison operator makes no sense to be described as a range.

@baldimir
Copy link
Collaborator

From discussion on the meeting: (!=10) should be raised as a ticket to DMN OMG, asking for clarification or modification to the spec.

@opatrascoiu
Copy link
Contributor

@StrayAlien I suggest commenting out test range_012 until the matter is clarified by RTF.

The rest of the other tests look good to me.

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.

4 participants