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 4. VERIFYING CIRCUIT LAYOUTS 80<br />

Quartz AST<br />

Lexer/<br />

Parser<br />

Preprocessed<br />

Quartz<br />

Preprocessor<br />

Quartz<br />

Input<br />

Type Processing<br />

Identifier<br />

Conversion<br />

Type<br />

Inference<br />

Overloading<br />

Resolution<br />

Full Instantiation<br />

Placement checks<br />

Find dependencies<br />

for composites<br />

Generate HOL<br />

for composites<br />

Generate<br />

Isabelle scripts<br />

<strong>Layout</strong> Processing<br />

Isabelle Module<br />

Size Inference<br />

Generate HOL<br />

for primitives<br />

Generate pro<strong>of</strong><br />

goals<br />

Generate<br />

Tacticals<br />

Isabelle<br />

input<br />

Pretty<br />

printer<br />

Figure 4.7: Functions <strong>of</strong> the Quartz compiler in layout verification mode<br />

The Isabelle module is the only part <strong>of</strong> the compiler process that is specific to Isabelle.<br />

It generates Isabelle/HOL pro<strong>of</strong> scripts using the correct syntax and outputs them to disk<br />

where they can be loaded by Isabelle. The Isabelle module also does its best to automatically<br />

generate input to Isabelle’s automatic pro<strong>of</strong> tools, this is described in Section 4.6.<br />

Where blocks are part <strong>of</strong> a library and have already had their layouts proved the compiler<br />

does not generate pro<strong>of</strong> scripts, assuming that these scripts are available for loading into the<br />

theorem prover from elsewhere. This is controlled by a special “layout-proved” attribute that<br />

can be attached to blocks.<br />

4.5.2 Generating Definitions<br />

Given the model developed in the previous section, Isabelle/HOL expressions <strong>with</strong> the ex-<br />

panded functionality <strong>of</strong> the Quartz<strong>Layout</strong> Functions library now essentially implement a<br />

super-set <strong>of</strong> Quartz expressions - it is therefore possible to translate Quartz expressions into<br />

Isabelle/HOL directly merely by re-writing syntax as necessary.<br />

Quartz blocks and the statements that they are composed <strong>of</strong> must be translated into their<br />

semantic interpretations. We assign a particular semantic interpretation to each statement<br />

type, recursively defined as necessary (for example, for loop statements) and describe a block<br />

as the logical conjunction <strong>of</strong> its statement semantics. This process is syntax-directed and

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

Saved successfully!

Ooh no, something went wrong!