Giter Site home page Giter Site logo

False negative on norm(x) about cocosim HOT 5 CLOSED

mfry90 avatar mfry90 commented on September 21, 2024
False negative on norm(x)

from cocosim.

Comments (5)

hbourbouh avatar hbourbouh commented on September 21, 2024

Thanks for opening this issue.
Non-linear and trigonometric functions are not supported by current solvers we use, therefore, an abstraction is needed.
For example, in the generated files you sent us, you can check the file "lustrec_math.lus" that contains many abstractions of non-linear functions. You can modify them with more precise one if you are familiar with the Lustre language and re-run Kind2 or CoCoSim.

Most of the time, Kind2 model checker will return a non-sensical counter-example for properties such yours that require precise abstractions of non-linear blocks. Solvers like Z3 are more suited for logic-intensive properties and do badly in numeric-intensive ones.

from cocosim.

mfry90 avatar mfry90 commented on September 21, 2024

Got it, thanks for the clarification.

from cocosim.

mfry90 avatar mfry90 commented on September 21, 2024

Does this same consideration persist for power functions (y = x^n), where x\in Reals and y\in Nats? I'm getting similar problems even when I remove the sqrt() function (i.e., replace the y=norm(x) with y=dotproduct(x,x)). I see that lustrec_math.lus has an abstraction for power functions where x AND n are Reals, but is that necessary when n is Natural?

I can attach example files if that's helpful.

from cocosim.

hbourbouh avatar hbourbouh commented on September 21, 2024

Are you able to use the Simulink Power block (Math Function block with pow parameter) with machine type integers as inputs?
I get the following Simulink error when I try to do that:

Cannot set data type of input and output ports of 'pow_PP/Math Function' to uint8. The data type must be double or single when configured to be a 'pow' operation.

Currently we only support pow(x,n) where both x and n are \in Reals.

from cocosim.

mfry90 avatar mfry90 commented on September 21, 2024

No, I'm not using the Simulink Power block, I've been feeding a single variable x = [x_1, x_2, ..., x_n] into both inputs of the DotProduct block, which might be interpreted as a summation of pow(x_i, 2). I'd like to post a MWE to demonstrate the issue I'm getting with verifying over DotProduct blocks, but I'm getting different errors from (what appears to be) unrelated sources. Will post those issues as well.

from cocosim.

Related Issues (12)

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.