Giter Club home page Giter Club logo

Comments (5)

paulthomson avatar paulthomson commented on May 18, 2024

OK, so it seems if I add an infinite cycle in the state-space then an error is found.

I would like to trigger an error at any terminal state if some condition does not hold. Is that possible?

from p.

ankushdesai avatar ankushdesai commented on May 18, 2024

Hi Paul,

The deadlock property is encoded as a safety assertion in P. If you want to
check an eventually or finally property on a finite trace it is implemented
as an assertion that at the end of execution when all the process are
terminated or blocked the system should not be in a hot state. For checking
such properties you must compile P program without liveness flag and run
normal zinger search. This error will then be caught as a safety assertion
violation. You dont need to add a infinite looping process in this case.

Note that by adding infinite looping process you made the trace infinite.

On Thu, Feb 4, 2016 at 1:32 PM Paul Thomson [email protected]
wrote:

OK, so it seems if I add an infinite cycle in the state-space then an
error is found.

I would like to trigger an error at any terminal state if some
condition does not hold. Is that possible?


Reply to this email directly or view it on GitHub
#20 (comment).

from p.

paulthomson avatar paulthomson commented on May 18, 2024

Awesome! So doing the following makes it work:

>> load TestMasterHot.p
2s
>> test
Writing TestMasterHot.zing ...
Compiling TestMasterHot.zing to TestMasterHot.dll ...
7s
>>

The error message is not very clear though:

Error:
P Assertion failed:
Expression: assert(sizeof(SM_HANDLE.enabled) != 0 || sizeof(SM_HANDLE.hot) == 0)
Comment: Deadlock

Does it make sense to have both liveness and deadlock safety checks? So a program has infinite paths but also has some terminal states? E.g. A program might be able to get stuck in an infinite failure loop without making progress but might also be able to terminate in a hot state. If so, would it make sense for the safety check be added even when using the /liveness flag?

from p.

ankushdesai avatar ankushdesai commented on May 18, 2024

Excellent point Paul !
I had exact same conversation with Shaz today morning but with the way
liveness checking and deadlock detection is implemented right now both the
checks cannot be enabled simultaneously.
But I agree with you that it would be nice to merge these two checks. I
will think about it.

On Thu, Feb 4, 2016 at 2:28 PM Paul Thomson [email protected]
wrote:

Awesome! So doing the following makes it work:

load TestMasterHot.p
2s
test
Writing TestMasterHot.zing ...
Compiling TestMasterHot.zing to TestMasterHot.dll ...
7s

The error message is not very clear though:

Error:
P Assertion failed:
Expression: assert(sizeof(SM_HANDLE.enabled) != 0 || sizeof(SM_HANDLE.hot) == 0)
Comment: Deadlock

Does it make sense to have both liveness and deadlock safety checks? So a
program has infinite paths but also has some terminal states? E.g. A
program might be able to get stuck in an infinite failure loop without
making progress but might also be able to terminate in a hot state. If so,
would it make sense for the safety check be added even when using the
/liveness flag?


Reply to this email directly or view it on GitHub
#20 (comment).

from p.

shazqadeer avatar shazqadeer commented on May 18, 2024

I am not convinced yet that merging deadlock and livelock detection is a good idea. The current design requires the programmer to explicitly consider whether she is looking for a finite (assertions and deadlocks) or an infinite (livelocks) error trace. Different options should be passed to pc and zinger (consistently) depending on that choice. These options result in significantly different encodings and search techniques.

from p.

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.