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

Commit

Permalink
Add function scToIntMod to SharedTerm library.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Huffman committed Nov 3, 2020
1 parent 80c40b5 commit e2f714d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions saw-core/src/Verifier/SAW/SharedTerm.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ module Verifier.SAW.SharedTerm
, scIntToBv, scBvToInt, scSbvToInt
-- *** IntMod
, scIntModType
, scToIntMod
-- *** Vectors
, scAppend
, scJoin
Expand Down Expand Up @@ -1709,6 +1710,12 @@ scSbvToInt sc n x = scGlobalApply sc "Prelude.sbvToInt" [n,x]
scIntModType :: SharedContext -> Term -> IO Term
scIntModType sc n = scGlobalApply sc "Prelude.IntMod" [n]

-- | Convert an integer to an integer mod n.
--
-- > toIntMod : (n : Nat) -> Integer -> IntMod n;
scToIntMod :: SharedContext -> Term -> Term -> IO Term
scToIntMod sc n x = scGlobalApply sc "Prelude.toIntMod" [n, x]


-- Primitive operations on bitvectors

Expand Down

0 comments on commit e2f714d

Please sign in to comment.