comp.lang.ada
 help / color / mirror / Atom feed
From: Paul Rubin <no.email@nospam.invalid>
Subject: Re: SPARK and integer arithmetic
Date: Mon, 19 Sep 2016 00:14:55 -0700
Date: 2016-09-19T00:14:55-07:00	[thread overview]
Message-ID: <87lgyobbtc.fsf@jester.gateway.pace.com> (raw)
In-Reply-To: 877fa9ugy2.fsf@mid.deneb.enyo.de

Florian Weimer <fw@deneb.enyo.de> writes:
>>> perhaps there is a way to express the unbounded arithmetic ...
> The actual formula in the program uses modular arithmetic, so I don't
> think this can be represented efficiently in Presburger arithmetic.

Oh I didn't understand, I saw the modular arithmetic in your post but
thought you wanted to change it to unbounded arithmetic.  Still though,
if the modulus is a known constant, then a=b(mod m) means a+mx=b+my for
some x and y, and multiplication by the constant m can be converted to
repeated additions with depth log2(m).  So it's still in Presburger
arithmetic, with even that seeming like overkill.


  reply	other threads:[~2016-09-19  7:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-18 10:10 SPARK and integer arithmetic Florian Weimer
2016-09-18 15:37 ` Simon Wright
2016-09-18 18:01   ` Florian Weimer
2016-09-18 19:33     ` Paul Rubin
2016-09-18 19:49       ` Florian Weimer
2016-09-19  7:14         ` Paul Rubin [this message]
2017-08-09 19:47     ` moy
2016-10-03 10:09 ` Mark Lorenzen
2016-10-03 15:39   ` Florian Weimer
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox