Obfuscation of Abstract Data-Types - Rowan
Obfuscation of Abstract Data-Types - Rowan
Obfuscation of Abstract Data-Types - Rowan
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
CHAPTER 3. TECHNIQUES FOR OBFUSCATION 51<br />
3.2.3 Operations using tuples<br />
Let us define a function cross that applies a tuple <strong>of</strong> functions to a tuple <strong>of</strong><br />
arguments<br />
cross (f 1 ,f 2 , . . . ,f n ) (x 1 ,x 2 , . . . ,x n ) = (f 1 x 1 ,f 2 x 2 , . . . ,f n x n )<br />
Note that we cannot write this function in Haskell without writing different<br />
definition for each n since we are not able to define arbitrary tuples (also we<br />
cannot use a list as the functions may have different types). If we want to<br />
implement this function then we could use a dependently typed language such<br />
as Cayenne [4].<br />
So, for an operation<br />
f :: S 1 × S 2 × . . . × S n → T<br />
an obfuscation f O <strong>of</strong> f (with respect to the relevant abstraction functions)<br />
satisfies:<br />
f · cross (af S1 ,af S2 , . . . ,af Sn ) = af T · f O (3.8)<br />
If we have a conversion function cf T for the data-type T such that:<br />
cf T · af T = id<br />
then we can pre-compose (3.8) by cf T to give<br />
f O = cf T · f · cross (af S1 ,af S2 , . . . ,af Sn ) (3.9)<br />
3.2.4 Refinement Notation<br />
If the data-type D is refined by a data-type O then we write<br />
New-Name<br />
REFINEMENT [af ] : D<br />
declaration<br />
dti<br />
〈[f 1 ,f 2 , . . .,f n ]〉 ❀ 〈[g 1 ,g 2 , . . . ,g n ]〉<br />
[additional operations]<br />
[additional assertions]<br />
∣<br />
The notation<br />
〈[f 1 ,f 2 , . . . ,f n ]〉 ❀ 〈[g 1 ,g 2 , . . .,g n ]〉