Comments (6)
Hi @nikku - for sure the 'error handling' aspects of the spec leave it all pretty open and up to the impl. What is certain is that invoking a non-existent function is a null. Now, how an impl chooses to report that either at compile time (if indeed, it has a compiler) or runtime is not defined.
Personally, I think that given the broad range of possibilities for implementors to operate as a pure 'dynamic runtime' engine with no compiler to a more advanced 'strict compiler' model would make it very hard for the spec to encompass error codes and messages and so on.
I think it is more a point of differentiation between engines how they handle errors - if (in a perfect world) we all executed in the same way, then you get choice as to how helpful a vendor's toolset is in model authoring or execution.
As a dev, I personally favour the strict compiler approach :-) ... but, others may not.
In TCK terms, a test execution is considered to have an 'error' if any error (such as a missing function), or a type null-coercion takes place. So, loosely, a test can detect an 'error' but it is not very specific.
from tck.
What is certain is that invoking a non-existent function is a null.
@StrayAlien If this is certain then you answered the main question.
I'd be happy to create a TCK test covering that behavior.
nonExistingFunction(1) = null
I agree that the spec leaves it open how error handling is done (result is null
but there can be an error still). The purpose would be to cover execution from the pure language semantics (not error handling) perspective.
from tck.
Hi @nikku there were those two PRs from you. Are those solving also this issue please? If yes, could we close it please?
from tck.
To my knowledge this one is still not verified by the TCK. I hope to find time to file a PR with respective test cases.
from tck.
Hi @nikku
I think the DMN spec covers your use case. According to DMN spec (see 10.3.2.13.2)
If f is not a function, or if the arguments do not conform to the argument list, the result of the invocation is null.
the result is null.
If you are planning to write tests, please create them in a new test file to cover section 10.3.2.13.1 and 10.3.2.13.2 (e.g. XXXX-feel-function-invocation).
Thank you.
from tck.
This is being validated via #612.
from tck.
Related Issues (20)
- Clarify mixed type workings of `+` operator HOT 3
- Cover comparisons
- Create transitive import test cases based on snippets in DMN15-58 HOT 2
- Doubtful typing on overloaded built-in function in test HOT 2
- Report does not work under windows
- The test cases table breaks up around Compliance-Level-3
- New PRs ... but deleting them. The PRs have dragged in CL/LF differences HOT 2
- Patches to test cases HOT 4
- Confused about decision service encapsulatedDecisions - ambiguous - is ch11 example correct? HOT 5
- Task list for DMN 1.6
- Optional fn params vs null values HOT 4
- Question to test case `decision_015` in `0084-feel-for-loops.dmn` HOT 1
- Quesion to test case `nested009` in `1146-feel-context-put-function.dmn` HOT 2
- 0014-loan-comparison assumes that sorting keeps the original order HOT 2
- breaking change?: what do do with range equality? What is 'undefined'? HOT 4
- Is `[100] = 100` false or null? HOT 4
- Does @"P0D" = "P0Y" give `true` or `null` (or false?) ? HOT 3
- The new text for type conversions in "10.3.2.9.4 Type conversions" misses some use cases HOT 2
- Spec permits ranges to use new `=` and `!=` comparison operators - but it doesn't make much sense (to me) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tck.