eurecom-s3 / symcc

SymCC: efficient compiler-based symbolic execution

Home Page:http://www.s3.eurecom.fr/tools/symbolic_execution/symcc.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot generate new testcase for a simple case

xiaozhouqi opened this issue · comments

Hi, i have installed symcc sucessfully and tried the demo in tutorials, all thing goes well. So i want to test whether it support complex class. Below, it's my test code.
Firstly, compiling this code using "sym++ vec.cpp -o vec" command.
Secondly, "mkdir results" and "export SYMCC_OUTPUT_DIR=......."
Finally, run the instrustmented program, " cat seed | ./vec". where seed is well-defined test case.
After, it doesn't return me any new generated testcases, i donn't know the reason. Plese help me, thank you.

#include
#include
#include
#include

using namespace std;

class People
{
public:
People(string name, int age, vector entry) : name(name), age(age), entry(entry) {}
public:
string name;
int age;
vector entry;

};

bool FunA(People *p)
{
if (p->entry[0] == 1234) {
return true;
} else if (p->entry[1] == 1234) {
return true;
} else {
return false;
}
}

int main(int argc, char **argv)
{
string temp;
vector res;
while(getline(cin, temp)) {
res.push_back(temp);
}
string name = res[0];
int age = stoi(res[1]);
vector entry;
for (int i = 2; i < res.size(); ++i) {
entry.push_back(stoi(res[i]));
}
People p(name, age, entry);
FunA(&p);
return 0;
}