tamarin-prover-utils- Utility library for the tamarin prover.

Safe HaskellSafe-Infered





envIsSet :: String -> BoolSource

envIsSet k returns True if there is a v such k=v is in the environment and False otherwise.

getEnvMaybe :: String -> Maybe StringSource

getEnvMaybe k returns Just v if k=v is in the environment and Nothing otherwise

List operations

subsetOf :: Ord a => [a] -> [a] -> BoolSource

subsetOf xs ys return True if set xs is a subset of set ys

noDuplicates :: Ord a => [a] -> BoolSource

noDuplicates xs returns True if the list xs contains no duplicates

equivClasses :: (Ord a, Ord b) => [(a, b)] -> Map b (Set a)Source

Compute the equality classes given wrto a partial function.


whileTrue :: Monad m => m Bool -> m IntSource

whileTrue m iterates m until it returns False. Returns the number of iterations m was run. 0 means m never returned True.


stringSHA256 :: String -> StringSource

The SHA-256 hash of a string in base64 notation.

Set operations

setAny :: (a -> Bool) -> Set a -> BoolSource

Map operations

invertMap :: (Ord k, Ord v) => Map k v -> Map v kSource

Inverts a bijective Map.