[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*From*: Jedd Haberstro <jhaberstro@xxxxxxxxx>*Date*: Wed, 2 Sep 2020 21:14:55 -0700 (PDT)*References*: <cbe356b5-8e04-44b0-a0fd-141d2a565ca7n@googlegroups.com> <21B1426F-3CCA-422A-A0FA-32C96C9A0C12@gmail.com>

Hi Stephan,

Thank you for your guidance.

I already check that my system terminates, so I believe the extra reassurance that the predicates are eventually restored is not useful since, when terminated, \A p \in ProcSet : (pc[p] \notin InvocationLabels) will also hold.

Thanks,

Jedd

On Monday, August 31, 2020 at 11:39:11 PM UTC-7 Stephan Merz wrote:

Hi,the first approach that you describe is the standard way to check that a predicate holds throughout the execution except at certain control points. TLC will help you maintain an appropriate definition of the set of exceptions.Your second suggestion is complementary: it ensures that the predicates are eventually restored [1]. If you've already checked the first property you can also write\A p \in ProcSet : []<> ~(pc[p] \notin InvocationLabels)or perhaps even\A p \in ProcSet : <>[] ~(pc[p] \notin InvocationLabels)if violations of the predicate are not recurrent.Best,Stephan[1] Remember that a safety property is true of an algorithm that does nothing. In particular, checking your invariant won't require any fairness assumption, but the liveness property will.On 1 Sep 2020, at 06:44, Jedd Haberstro <jhabe...@xxxxxxxxx> wrote:Hi all,I am modeling a concurrent data structure in PlusCal. There are invariants that may become false during method invocations, but which should become true once all such invocations have completed (during periods of "quiescence", if you will).Is there a customary way to model check such types of invariants? Two approaches immediately come to mind, but I don't know if better approaches exist.

- Check the invariant only when all processes' pc variables are equal to a label contained from within the relevant invocations' implementation. e.g. (\A p \in ProcSet : ~(pc[p] \in InvocationLabels)) => QuiescenceInvariant. This is quite a hairy approach because it will be error prone keeping InvocationLabels in sync with the PlusCal code.
- A liveness property that states that if QuiescenceInvariant is not true, then it will eventually become true. e.g. ~QuiescenceInvariant ~> QuiescenceInvariant. However, this seems too imprecise because I believe it will be trivially satisfied when the algorithm terminates. I could probably add more constraints on this, but I imagine those constraints will just introduce new issues that need new constraints.
Any better ideas? :-)Thanks,JeddP.S. It's been ~2-3 weeks since I started learning TLA+/PlusCal and already I feel very productive! Kudos to the community for creating such a wonderfully approachable tool. The syntax is simple and readable, the toolbox is proving to be a helpful development environment, and the freely available learning material (e.g. Leslie's books and video course) is top notch. So, thank you all!--

You received this message because you are subscribed to the Google Groups "tlaplus" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+u...@xxxxxxxxxxxxxxxx.

To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/cbe356b5-8e04-44b0-a0fd-141d2a565ca7n%40googlegroups.com.

You received this message because you are subscribed to the Google Groups "tlaplus" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.

To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/735f867a-8c44-4e66-b924-0948a3fdf5b0n%40googlegroups.com.

**References**:**[tlaplus] Checking invariants periods during periods of quiescence***From:*Jedd Haberstro

**Re: [tlaplus] Checking invariants periods during periods of quiescence***From:*Stephan Merz

- Prev by Date:
**Re: [tlaplus] Checking invariants periods during periods of quiescence** - Next by Date:
**[tlaplus] Postdoc position on Formal Methods and Testing @ TU Graz, Austria** - Previous by thread:
**Re: [tlaplus] Checking invariants periods during periods of quiescence** - Next by thread:
**[tlaplus] Postdoc position on Formal Methods and Testing @ TU Graz, Austria** - Index(es):