OKlibrary  0.2.1.6
ConstraintTemplateTranslation.mac
Go to the documentation of this file.
00001 /* Matthew Gwynne, 7.12.2010 (Swansea) */
00002 /* Copyright 2010 Oliver Kullmann
00003 This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
00004 it and/or modify it under the terms of the GNU General Public License as published by
00005 the Free Software Foundation and included in this library; either version 3 of the
00006 License, or any later version. */
00007 
00022 oklib_include("OKlib/ComputerAlgebra/TestSystem/Lisp/Asserts.mac")$
00023 oklib_include("OKlib/ComputerAlgebra/Cryptology/Lisp/Cryptanalysis/Rijndael/ConstraintTemplateTranslation.mac")$
00024 
00025 kill(f)$
00026 
00027 /********************************
00028  * Translation functions            *
00029  ********************************
00030 */
00031 
00032 okltest_csttl2cl(f) := block(
00033   assert(f([],[]) = []),
00034   assert(f([["xor",[1,2]]],[["xor",[lambda([a],[{-a[2][1],-a[2][2]},{a[2][1],a[2][2]}]),lambda([a], [])]]]) = [{-1,-2},{1,2}]),
00035   true)$
00036 
00037