Giter VIP home page Giter VIP logo

Comments (6)

StrayAlien avatar StrayAlien commented on August 22, 2024

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.

nikku avatar nikku commented on August 22, 2024

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.

baldimir avatar baldimir commented on August 22, 2024

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.

nikku avatar nikku commented on August 22, 2024

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.

opatrascoiu avatar opatrascoiu commented on August 22, 2024

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.

nikku avatar nikku commented on August 22, 2024

This is being validated via #612.

from tck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.