Computer apparatus, program and method for determining the equivalence of two algebraic functions
Abstract
In a compiler or program proving or verification software code, it is often useful to analyse a computer program and one way in which this might be partially achieved is by comparing algebraic expressions to see if they are equivalent, i.e. to see if they are derivable from a common template or function definition. Herein a string matching and replacement algorithm is used to compare two functions. Initially, each expression is converted to a "reduced" form by reference to a set of standard rules so as, for example, to ensure that terms comprising the same variables are combined. The variables names in each term are then replaced with symbols to produce, for each expression, a corresponding character string which, arranged in a predetermined order, are compared to determine equivalence of the expressions. To achieve this, a matrix M is formed with entries corresponding to the symbols and the matrix elements are incremented according to pre-set rules. The matrix is then processed to identify equivalence.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 2 · Forward citations: 8.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method for compiling computer-readable source code, wherein the apparatus processes first and second algebraic functions of the source code in order to produce an optimized computer program, the method including the steps of: (a) determining the symbol sets of the two functions; (b) forming a matrix having a row for each symbol of one function and a column for each symbol of the other function; (c) subjecting the functions to predetermined tests and incrementing the entries in the matrix in accordance with the results of said tests; and (d) testing the matrix against predetermined rules for
- Claim 2Depends on #1
A method according to claim 1 , including, between steps (a) and (b), carrying out the step of: (e) comparing said symbol sets to determine whether they contain the s
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗