Пример #1
0
int main()
{
   unsigned a1, a2, b1, b2;

   s2e_make_symbolic(&a1, sizeof(a1), "a1");
   s2e_make_symbolic(&a2, sizeof(a2), "a2");
   s2e_make_symbolic(&b1, sizeof(b1), "b1");
   s2e_make_symbolic(&b2, sizeof(b2), "b2");

   //Just to make it a bit faster
   s2e_disable_all_apic_interrupts();

   s2e_assert(correct_overlap(a1, a2, b1, b2) == student_overlap(a1, a2, b1, b2));

   s2e_kill_state(0, "This execution path is correct (assertion check passed)");
   return 0;
}
Пример #2
0
int main() {
    uint64_t x;
    uint64_t max = 10;

    //Make x symbolic
    s2e_make_symbolic(&x, sizeof(x), "x");

    uint64_t f1 = factorial1(x, max);
    uint64_t f2 = factorial2(x, max);

    //Check the equivalence of the two functions for each path
    s2e_assert(f1 == f2);

    //In case of success, terminate the state with the
    //appropriate message
    s2e_kill_state(0, "Success");
    return 0;
}
Пример #3
0
int main()
{
	int a,b;
	scanf("%d %d\n", &a, &b);
	s2e_assert(a>b);
}
Пример #4
0
int main(int argc, char **argv)
{
    int a, b;
    s2e_assert(a>=b);
}