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

*From*: Andrew Helwer <andrew.helwer@xxxxxxxxx>*Date*: Fri, 23 Apr 2021 18:26:42 -0700 (PDT)*Ironport-hdrordr*: A9a23:rpCxnK646Wo57h3uRAPXwFLXdLJzesId70hD6mlaTxtJfsuE0/20lPMA2hPuzBoXUncsmdePUZPwOE/035hz/IUXIPOeTBDr0VHYSr1KwIP+z1Tbak7D38FH06MISdkENPTVLXxXyfn3+xO5FdFI+qjhzImNif3Fx3lgCSFmApsQlztRMQqQHk1oSAQuP/NQf/DwiaQnxwaIQ2gdbciwGxA+Lo3+juDM/aiWAyIuOwQq802ngz+u9dfBYnyl9yZbbDNV3a1ny2LMlAv068yY382G9g==*References*: <d4b24a56-e945-48b4-af19-b8a16872a87dn@googlegroups.com>

One way to do this is to implement a Rationals module, and define your algorithm to work over the Rationals instead of the Reals. This would be amenable to finite model checking. Or, if your problem is amenable to it, define your algorithm inputs such that integer division will always give the same answer as division over the Reals.

Using floating point with model checking is difficult because you can't easily check equality between two states due to accumulation of errors.

Andrew

On Friday, April 23, 2021 at 4:49:12 PM UTC-4 christin...@xxxxxxxxx wrote:

I know that TLA+ does not reason about real numbers, but can we model an algorithm which does ?For example, if the algorithm we want to verify contains a division, and only integer division is supported in TLA+, can we go ahead and model it anyway (if we are interested in other things about it), even though the numerical answer will be wrong? My instinct is that this should not be a problem but I am not 100% sure.

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/0286ca79-4c4b-4da4-b609-c619d33d2b66n%40googlegroups.com.

**References**:**[tlaplus] Numerical correctness vs logical correctness***From:*christin...@xxxxxxxxx

- Prev by Date:
**[tlaplus] Re: Why is TLA_ complaining about this? (** - Next by Date:
**Re: [tlaplus] Numerical correctness vs logical correctness** - Previous by thread:
**[tlaplus] Numerical correctness vs logical correctness** - Next by thread:
**Re: [tlaplus] Numerical correctness vs logical correctness** - Index(es):