mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-09-11 14:06:13 +03:00
Update solver definitions related to /^
and %^
.
This commit is contained in:
parent
acb3ca9fae
commit
b3c4317784
@ -293,15 +293,19 @@
|
||||
)
|
||||
|
||||
(define-fun cryCeilDiv ((x InfNat) (y InfNat)) InfNat
|
||||
(ite (or (isErr x) (isErr y) (not (isFin x)) (not (isFin y))) cryErr
|
||||
(ite (= (value y) 0) cryErr (cryNat (- (div (- (value x)) (value y)))))
|
||||
)
|
||||
(ite (or (isErr x) (isErr y) (not (isFin y))) cryErr
|
||||
(ite (= (value y) 0) cryErr
|
||||
(ite (not (isFin x)) cryInf
|
||||
(cryNat (- (div (- (value x)) (value y))))
|
||||
)))
|
||||
)
|
||||
|
||||
(define-fun cryCeilMod ((x InfNat) (y InfNat)) InfNat
|
||||
(ite (or (isErr x) (isErr y) (not (isFin x)) (not (isFin y))) cryErr
|
||||
(ite (= (value y) 0) cryErr (cryNat (mod (- (value x)) (value y))))
|
||||
)
|
||||
(ite (or (isErr x) (isErr y) (not (isFin y))) cryErr
|
||||
(ite (= (value y) 0) cryErr
|
||||
(ite (not (isFin x)) (cryNat 0)
|
||||
(cryNat (mod (- (value x)) (value y)))
|
||||
)))
|
||||
)
|
||||
|
||||
(define-fun cryLenFromThenTo ((x InfNat) (y InfNat) (z InfNat)) InfNat
|
||||
|
Loading…
Reference in New Issue
Block a user