Skip to content
This repository was archived by the owner on Jun 9, 2021. It is now read-only.

Commit e2f714d

Browse files
author
Brian Huffman
committed
Add function scToIntMod to SharedTerm library.
1 parent 80c40b5 commit e2f714d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

saw-core/src/Verifier/SAW/SharedTerm.hs

+7
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ module Verifier.SAW.SharedTerm
172172
, scIntToBv, scBvToInt, scSbvToInt
173173
-- *** IntMod
174174
, scIntModType
175+
, scToIntMod
175176
-- *** Vectors
176177
, scAppend
177178
, scJoin
@@ -1709,6 +1710,12 @@ scSbvToInt sc n x = scGlobalApply sc "Prelude.sbvToInt" [n,x]
17091710
scIntModType :: SharedContext -> Term -> IO Term
17101711
scIntModType sc n = scGlobalApply sc "Prelude.IntMod" [n]
17111712

1713+
-- | Convert an integer to an integer mod n.
1714+
--
1715+
-- > toIntMod : (n : Nat) -> Integer -> IntMod n;
1716+
scToIntMod :: SharedContext -> Term -> Term -> IO Term
1717+
scToIntMod sc n x = scGlobalApply sc "Prelude.toIntMod" [n, x]
1718+
17121719

17131720
-- Primitive operations on bitvectors
17141721

0 commit comments

Comments
 (0)