The Accellera Property Specification Language (PSL) is designed for the formal specification of hardware. The Reference Manual contains a formal semantics, which we previously encoded in a machine readable version of higher order logic. In this paper we describe how to ‘execute’ the formal semantics using proof scripts coded in the HOL theorem prover’s metalanguage ML. The goal is to see if it is feasible to implement useful tools that work directly from the official semantics by mechanised proof. Such tools will have a high assurance of conforming to the standard. We have implemented two experimental tools: an interpreter that evaluates whether a finite trace w, which may be generated by a simulator, satisfies a PSL formula f (i.e. \(w \vDash f\)), and a compiler that converts PSL formulas to checkers in an intermediate format suitable for translation to HDL for inclusion in simulation test-benches. Although our tools use logical deduction and are thus slower than hand-crafted implementations, they may be speedy enough for some applications. They can also provide a reference for more efficient implementations.
[1]
Michael J. C. Gordon,et al.
Using HOL to study Sugar 2.0 semantics
,
2002
.
[2]
Rajeev Alur,et al.
A Temporal Logic of Nested Calls and Returns
,
2004,
TACAS.
[3]
Hasan Amjad,et al.
Programming a Symbolic Model Checker in a Fully Expansive Theorem Prover
,
2003,
TPHOLs.
[4]
Ilan Beer,et al.
FoCs: Automatic Generation of Simulation Checkers from Formal Specifications
,
2000,
CAV.
[5]
Bruno Barras.
Programming and Computing in HOL
,
2000,
TPHOLs.
[6]
Tobias Nipkow,et al.
Verified Lexical Analysis
,
1998,
TPHOLs.
[7]
Michael J. C. Gordon,et al.
Validating the PSL/Sugar Semantics Using Automated Reasoning
,
2003,
Formal Aspects of Computing.
[8]
Richard J. Boulton,et al.
The PROSPER toolkit
,
2003,
International Journal on Software Tools for Technology Transfer.