100 likes | 233 Views
Final remarks. Mariano Ceccato FBK - Fondazione Bruno Kessler ceccato@fbk.eu. Opaque Predicates . T / F – always evaluates to T/F (Opaquely T/F Predicate) ? – may sometimes evaluate to T and sometimes to F. (Opaquely Unknown Predicate).
E N D
Final remarks Mariano Ceccato FBK - Fondazione Bruno Kessler ceccato@fbk.eu
Opaque Predicates • T/ F – always evaluates to T/F (Opaquely T/F Predicate) • ? – may sometimes evaluate to T and sometimes to F. (Opaquely Unknown Predicate)
Alias based opaque predicates Aliases : f = = g g ! = h Update : g = g.left( ) f = g.left().move() class A { int f1 ; int f2 ; void m ( ) { int tmp ; if ( f ==g ) { f1 = 1 ; f2 = f1 ++; } else { tmp = f1 +f2 / 5 ; f1 = f2 - tmp ; } class A { int f1 ; int f2 ; void m ( ) { int tmp ; if ( f ==g ) { f1 = 1 ; g = g.left( ) ; f2 = f1 ++; } else { g = g.left ( ) ; tmp = f1 +f2 / 5 ; f1 = f2 - tmp ; } class A { int f1 ; int f2 ; void m ( ) { int tmp ; f1 = 1 ; f2 = f1 ++; class A { int f1 ; int f2 ; void m ( ) { int tmp ; if ( f ==g ) { f1 = 1 ; f2 = f1 ++; } else { } tmp = f1 ; tmp = tmp - f1 ; f1 = f1 +f2 ; } } if ( g != h ) { tmp = f1 ; tmp = tmp - f1 ; f1 = f1 +f2 ; } else { } } } if ( g != h ) { tmp = f1 ; tmp = tmp - f1 ; f1 = f1 +f2 ; } else { f1 = tmp / f2 ; tmp = f2%59+f2 ; } } } if ( g != h ) { f = g.left().move() ; tmp = f1 ; tmp = tmp - f1 ; g = g.left( ) ; f1 = f1 +f2 ; } else { f1 = tmp / f2 ; tmp = f2%59+f2 ; f = g.left().move() ; } } } class A { int f1 ; int f2 ; void m ( ) { f1 = 1 ; f2 = f1 ++; int tmp = f1 ; tmp = tmp - f1 ; f1 = f1 + f2 ; } }
JSnapScreen 0.1 • http://sourceforge.net/projects/jsnapscreen • Open source java project (2k LoC) • It takes snapshoot of the current screen
Mandatory requirements • Work on the merged file • Break basic blocks into many sub-parts • Add opaque predicates • Add random code • Add update statements • Txl rules must be briefly commented • Deliver a “readme” describing how to run the obfuscator
Optional requirements • Work on separated source files • Transformation is non-deterministic • If applied twice, it gives different results • The changed code compiles • The changed code runs
Web testing - project 1 - download and install the StudentMarkSimulationorg application 2 - run it in a browser 3 - download the testing specification and write the test cases by using the Fitnesse - write fit-tables - update the program implementation when needed - fill the questionnaire in the test-cases specification 4 - one week before the examination, export the whole project in a new .zip file and send to the educator - it contains: (a) the new implementation of the StudentMarkSimulationorg and (b) the fit-tables implementing the testing specification. 5 - present at the exam with the and the filled test cases specification questionnaire
Delivery & Exam • The two projects must be delivered one week (7 days) before the date of the exam • Summer session: • 12th June 2009 • 9th July 2009 • Autumn session: • 27th August 2009 • 3rd September 2009