Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Copilot.Verifier.FloatMode
Synopsis
- data FloatMode
- withFloatMode :: FloatMode -> (forall fm. FloatModeRepr fm -> r) -> r
- withInterpretedFloatExprBuilder :: ExprBuilder t st (Flags fm) -> FloatModeRepr fm -> (IsInterpretedFloatExprBuilder (ExprBuilder t st (Flags fm)) => r) -> r
Documentation
How the verifier should interpret floating-point operations.
Constructors
FloatUninterpreted | Floating-point values are treated as bitvectors of the appropriate
width, and all operations on them are translated as uninterpreted
functions. This is the verifier's default interpretation, and it is what
allows the verifier to perform any reasoning at all over floating-point
operations that are not native to SMT-LIB ( |
FloatIEEE | Floating-point values are treated as bit-precise IEEE-754 floats. This
interpretation can perform deeper reasoning about floating-point
operations that are native to SMT-LIB, but at the expense of causing the
verifier to throw an error if it encounters operations that are not
native to SMT-LIB ( |
withFloatMode :: FloatMode -> (forall fm. FloatModeRepr fm -> r) -> r Source #
Convert a FloatMode
into a What4 FloatModeRepr
and pass it to a
continuation.
withInterpretedFloatExprBuilder :: ExprBuilder t st (Flags fm) -> FloatModeRepr fm -> (IsInterpretedFloatExprBuilder (ExprBuilder t st (Flags fm)) => r) -> r Source #
Match on a FloatModeRepr
, compute evidence that it gives rise to an
instance of IsInterpretedFloatExprBuilder
, and pass the evidence to a
continutation.