13.07.2015 Views

Verifying a Synthesized Implementation of IEEE-754 Floating-Point ...

Verifying a Synthesized Implementation of IEEE-754 Floating-Point ...

Verifying a Synthesized Implementation of IEEE-754 Floating-Point ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Verification <strong>of</strong> <strong>IEEE</strong>-<strong>754</strong> <strong>Floating</strong>-<strong>Point</strong> Exponential Function 5FIGURE 1. Overview <strong>of</strong> the specification and verification methodology.⊢ thm∀ X E. FP_EXP_ALGORIT H M(f loat (X), f loat (E)) =⇒val<strong>of</strong> (float (E)) = exp (val<strong>of</strong> (f loat (X)))+ error (X,E) ∧ abs (error (X,E))≤ error_bound (X, E) (4)In these formulas, FP_EXP_RT L and FP_EXP_ALGORIT H M are predicates describing the floatingpointexponential function in RTL and algorithmic levels,respectively. Note that the inputs and outputs in RTL are stillBoolean, however, at the algorithmic level they have floatingpointtype and we use the data conversion function floatto convert the variables from the Boolean type to <strong>IEEE</strong>-<strong>754</strong>standard-based floating-point type. Also, as can be understoodfrom the theorems, there are no finite precision effects in thetransition from gate level to RTL, and also from the RTLto algorithmic level; therefore, the corresponding correctnesstheorems are described as purely logical implications. However,for the transition from the algorithmic level to the abstractmathematical real number domain, we should consider theeffects <strong>of</strong> finite precision between floating-point numbers andreal numbers and conduct an error analysis to bound thecorresponding error. Finally using Equations (2–4), we canreach the final goal stated in Equation (1).Due to the high modularity <strong>of</strong> the design, the goals <strong>of</strong>Equations (2) and (3) could be extended to the specification andimplementation <strong>of</strong> sublevel modules, and then the verificationcontinues with these sublevel modules. These pro<strong>of</strong>s were thencomposed to yield the original goals.5. FORMAL SPECIFICATION ANDIMPLEMENTATION OF THEEXPONENTIAL FUNCTIONIn this section we describe the formal specification andimplementation <strong>of</strong> the <strong>IEEE</strong>-<strong>754</strong> floating-point exponentialfunction in the HOL theorem prover. The verification detailswill be discussed in the next section.5.1. Formal specification <strong>of</strong> the exponential functionThe original analysis <strong>of</strong> the floating-point exponential functionin the algorithmic level was performed by Harrison [7] usingthe HOL Light theorem prover. In this work, we ported thecode from HOL Light to HOL4, Kananaskis-4. We modeledthe algorithmic specification <strong>of</strong> the floating-point exponentialfunction as a predicate in HOL as follows:The Computer Journal, 2009

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!