24.04.2013 Views

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

Verification of Parameterised FPGA Circuit Descriptions with Layout ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

CHAPTER 2. BACKGROUND AND RELATED WORK 32<br />

defined in Figure 2.5. This pro<strong>of</strong> can be represented in Isabelle as:<br />

theorem "A −→ A"<br />

apply (rule impI)<br />

apply (assumption)<br />

done<br />

The first instruction is for Isabelle to apply the rule impI which lifts the object level implica-<br />

tion to a meta-logic implication <strong>of</strong> the form P =⇒ P (The unknowns P and Q in the axiom<br />

are both unified <strong>with</strong> the constant A). From this state the pro<strong>of</strong> can be completed using the<br />

assumption method which attempts to solve the right hand side <strong>of</strong> a meta-implication using<br />

the assumptions on the left. A =⇒ A can be proved this way leaving an empty (complete)<br />

pro<strong>of</strong> state and the pro<strong>of</strong> is completed <strong>with</strong> the done command.<br />

Isabelle can also solve simple theorems automatically. For example, the pro<strong>of</strong> (in higher-order<br />

logic) that reversing a list twice is the same as the original list can be proved as:<br />

theorem rev rev [simp]: "rev (rev xs) = xs"<br />

apply (induct xs)<br />

apply (auto)<br />

done<br />

This theorem has been named (rev rev) and declared as a simplification rule. It is proved<br />

by the application <strong>of</strong> induction on the variable xs and then automatically by Isabelle. The<br />

auto method uses both <strong>of</strong> Isabelle’s two most useful automation tools, the simplifier and the<br />

classical reasoner.<br />

The simplifier is a term rewriting tool. It repeatedly applies equations from left to right,<br />

using declared sets <strong>of</strong> simplification rules. Virtually any theorem in the form A = B can be<br />

used as a simplification rule however it is generally the case that only rules which genuinely<br />

simplify the proposition should be declared as automatic simplification rules. In the example<br />

above,xs is clearly simpler thanrev (rev xs) so this could be safely used as a simplification<br />

rule however if the theorem were proved in reverse – xs = rev (rev xs) – then this would<br />

not be a suitable simplification rule. Not only does it not simplify the proposition but it<br />

will actually cause the simplifier to loop infinitely by continually expanding the xs on the<br />

right hand side. It is <strong>of</strong>ten useful to invoke the simplifier by itself, which can be done using<br />

Isabelle’s simp method.

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

Saved successfully!

Ooh no, something went wrong!