diff --git a/src/main.cpp b/src/main.cpp index f6c7a91..223b02b 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -539,36 +539,43 @@ int main(int argc, char *argv[]) { batch_size = std::stoi(opt_batch); if (use_postgres) { - std::cout << "Importing Models and Exploits into Database: "; - import_models(parsednm, parsedxp); //directly use the strings parsednm and parsedxp as SQL commands - gettimeofday(&tf3,NULL); - double tdiff3=(tf3.tv_sec-ts3.tv_sec)*1000.0+(tf3.tv_usec-ts3.tv_usec)/1000.0; - std::cout << "Done\n"; - printf("------>The time to load .nm and .xp into the database took %lf ms.<------\n",tdiff3); - printf("\n"); + std::cout << "Importing Models and Exploits into Database: "; + import_models(parsednm, parsedxp); //directly use the strings parsednm and parsedxp as SQL commands + gettimeofday(&tf3,NULL); + double tdiff3=(tf3.tv_sec-ts3.tv_sec)*1000.0+(tf3.tv_usec-ts3.tv_usec)/1000.0; + std::cout << "Done\n"; + printf("------>The time to load .nm and .xp into the database took %lf ms.<------\n",tdiff3); + printf("\n"); } - + //------------------------------------------ //program block 3: //------------------------------------------ AGGenInstance _instance; //the following five assignments to _instance's members are all from db_function.cpp - _instance.facts = fetch_facts(); - //The above function call returned an Keyvalue object and assigned the object to facts. The object mainly contains hash table and string vector based on all initial property and value. - //the following 4 lines can be used to check the content of the facts. It is based on the initial property and value from table quality, postcondition and topology. - //for(std::string abc: _instance.facts.get_str_vector()){ - // std::cout<<"Fact: "<