From 00df2b24ef56671cd069995061c5e55feab5b163 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 11 Jan 2017 19:05:23 +0100 Subject: [PATCH 001/123] Updating polynomials with auto variable insertion --- src/polynomial.hh | 177 +++++++++++++++++++++++++++++++--------------- 1 file changed, 121 insertions(+), 56 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 77ba851..d21cd63 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -38,14 +38,10 @@ using namespace std; template class polynomial { public: - /// Set the list of variable to work on for all the polynomials - static void setvars(vector & var_names) {_var_names = var_names;}; - - /// Build an empty polynomial polynomial() {_coefs.clear();}; /// Build a constant polynomial - polynomial(int u) {_coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(_var_names.size(),0), C(u)));}; + polynomial(int u) {_coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(0), C(u)));}; /// Erase a polynomial ~polynomial() {_coefs.clear();}; @@ -53,6 +49,8 @@ template class polynomial { // @{ /// Operator @f$ + @f$ for two polynomials template friend polynomial operator+ (const polynomial & l, const polynomial & r); + /// Operator @f$ - @f$ for two polynomials + template friend polynomial operator- (const polynomial & l, const polynomial & r); /// Operator @f$ \times @f$ for two polynomials template friend polynomial operator* (const polynomial & l, const polynomial & r); /// Operator @f$ != @f$ for two polynomials @@ -85,9 +83,9 @@ protected: /// Operator @f$ == @f$ for two polynomials template inline bool equal_coefs (const pair, C> & coef1, const pair, C> & coef2) { return - (coef1.second - == - coef2.second) + coef1.second == coef2.second + && + coef1.first.size() == coef2.first.size() && std::equal(coef1.first.begin(), coef1.first.end(), coef2.first.begin()); } @@ -116,7 +114,7 @@ template inline bool operator> (const polynomial l, const poly /// Operator + for two polynomials template inline polynomial operator+ (const polynomial & l, const polynomial & r) { - //cout << "[" << l << "] + [" << r << "]" << endl; + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("[" << l << "] + [" << r << "]");); // Sorting is supposed to be done before ... //sort(l._coefs.begin(),l._coefs.end()); //sort(r._coefs.begin(),r._coefs.end()); @@ -124,22 +122,22 @@ template inline polynomial operator+ (const polynomial & l, co typename vector, C > >::const_iterator i_l = l._coefs.begin(); typename vector, C > >::const_iterator i_r = r._coefs.begin(); while ( i_l != l._coefs.end() && i_r != r._coefs.end()) { - if (std::equal(i_l->first.begin(),i_l->first.end(),i_r->first.begin())) { + if (i_l->first.size() == i_r->first.size() && std::equal(i_l->first.begin(),i_l->first.end(),i_r->first.begin())) { C val = C(i_l->second) + C(i_r->second); if (val != C(0)) - result._coefs.push_back(pair, C> (vector(i_l->first), val)); + result._coefs.push_back(pair, C> (vector(i_l->first), val)); i_l++; i_r++; } else { if (i_l->first < i_r->first) { - C val = C(i_l->second); - if (val != C(0)) - result._coefs.push_back(pair, C> (vector(i_l->first), val)); + C val = C(i_l->second); + if (val != C(0)) + result._coefs.push_back(pair, C> (vector(i_l->first), val)); i_l++; } else { - C val = C(i_r->second); - if (val != C(0)) - result._coefs.push_back(pair, C> (vector(i_r->first), val)); + C val = C(i_r->second); + if (val != C(0)) + result._coefs.push_back(pair, C> (vector(i_r->first), val)); i_r++; } } @@ -156,46 +154,97 @@ template inline polynomial operator+ (const polynomial & l, co result._coefs.push_back(pair, C> (vector(i_r->first), val)); i_r++; } - - //cout << "\t = [" << result << "]" << endl; + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("\t = [" << result << "]");); + return result; +} + + + +/// Operator + for two polynomials +template inline polynomial operator- (const polynomial & l, const polynomial & r) { + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("[" << l << "] - [" << r << "]");); + // Sorting is supposed to be done before; since polynomials l and r are const here, must not be done here + //sort(l._coefs.begin(),l._coefs.end()); + //sort(r._coefs.begin(),r._coefs.end()); + polynomial result = polynomial(); + typename vector, C > >::const_iterator i_l = l._coefs.begin(); + typename vector, C > >::const_iterator i_r = r._coefs.begin(); + while ( i_l != l._coefs.end() && i_r != r._coefs.end()) { + if (i_l->first.size() == i_r->first.size() && std::equal(i_l->first.begin(),i_l->first.end(),i_r->first.begin())) { + C val = C(i_l->second) - C(i_r->second); + if (val != C(0)) + result._coefs.push_back(pair, C> (vector(i_l->first), val)); + i_l++; + i_r++; + } else { + if (i_l->first < i_r->first) { + C val = C(i_l->second); + if (val != C(0)) + result._coefs.push_back(pair, C> (vector(i_l->first), val)); + i_l++; + } else { + C val = C(0) - C(i_r->second); + if (val != C(0)) + result._coefs.push_back(pair, C> (vector(i_r->first), val)); + i_r++; + } + } + } + while (i_l != l._coefs.end()) { + C val = C(i_l->second); + if (val != C(0)) + result._coefs.push_back(pair, C> (vector(i_l->first), val)); + i_l++; + } + while (i_r != r._coefs.end()) { + C val = C(0) - C(i_r->second); + if (val != C(0)) + result._coefs.push_back(pair, C> (vector(i_r->first), val)); + i_r++; + } + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("\t = [" << result << "]");); return result; } + /// Operator @f$ \times @f$ for two polynomials template inline polynomial operator* (const polynomial & l, const polynomial & r) { - // Sorting is supposed to be done before ... + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("[" << l << "] * [" << r << "]");); + // Sorting is supposed to be done before; since polynomials l and r are const here, must not be done here //sort(l._coefs.begin(),l._coefs.end()); //sort(r._coefs.begin(),r._coefs.end()); - //cout << "[" << l << "] * [" << r << "]" << endl; - // FIXME : use a MAP HERE for map, C> tmp_coefs; for (typename vector, C > >::const_iterator i_l = l._coefs.begin(); i_l != l._coefs.end(); i_l++) { for (typename vector, C > >::const_iterator i_r = r._coefs.begin(); i_r != r._coefs.end(); i_r++) { // build the degree_vector - //assert(i_l->first.size() == i_r->first.size()); vector degree_vector; - degree_vector.reserve(i_l->first.size()); - transform(i_l->first.begin(), i_l->first.end(), i_r->first.begin(), back_inserter(degree_vector), plus()); + if (i_l->first.size() > i_r->first.size()) { + degree_vector = vector(i_l->first); + transform(i_r->first.begin(), i_r->first.end(), degree_vector.begin(), degree_vector.begin(), plus()); + } else { + degree_vector = vector(i_r->first); + transform(i_l->first.begin(), i_l->first.end(), degree_vector.begin(), degree_vector.begin(), plus()); + } // check already existance in result (log search) typename map, C>::iterator low = tmp_coefs.lower_bound(degree_vector); if (low != tmp_coefs.end()) { - if (low->first == degree_vector) - low->second = low->second + (i_l->second * i_r->second); - else - tmp_coefs.insert(low, pair,C >(vector(degree_vector), (i_l->second * i_r->second))); + if (low->first.size() == degree_vector.size() && std::equal(low->first.begin(),low->first.end(),degree_vector.begin())) + low->second = low->second + (i_l->second * i_r->second); + else + tmp_coefs.insert(low, pair,C >(vector(degree_vector), (i_l->second * i_r->second))); } else { - tmp_coefs.insert(pair, C >(vector(degree_vector), (i_l->second * i_r->second))); + tmp_coefs.insert(pair, C >(vector(degree_vector), (i_l->second * i_r->second))); } } } - + // simplify zeros polynomial result = polynomial(); for(typename map, C>::iterator it = tmp_coefs.begin(); it != tmp_coefs.end(); ++it) if (it->second != C(0)) result._coefs.push_back(pair, C> (vector(it->first),it->second)); - //cout << "\t = [" << result << "]" << endl; + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("\t = [" << result << "]");); return result; } @@ -210,12 +259,12 @@ template ostream& operator<< (ostream& os, const polynomial & p) C sign = C(1); if (p._coefs[i].second < C(0)) sign = C(-1); - + if (sign < C(0)) os << " - "; else if (i > 0) - os << " + "; + os << " + "; bool first_prod = true; // dont print '1 *' "something ..." @@ -224,15 +273,15 @@ template ostream& operator<< (ostream& os, const polynomial & p) os << abs_coef; first_prod = false; } - for (unsigned j = 0 ; j < p._var_names.size() ; j++) { + for (unsigned j = 0 ; j < p._coefs[i].first.size(); j++) { if (p._coefs[i].first[j] != 0) { - if (first_prod) - first_prod = false; - else - os << " * "; - os << p._var_names[j]; - if (p._coefs[i].first[j] != 1) - os << " ^ " << p._coefs[i].first[j]; + if (first_prod) + first_prod = false; + else + os << " * "; + os << p._var_names[j]; + if (p._coefs[i].first[j] != 1) + os << " ^ " << p._coefs[i].first[j]; } } if (first_prod) { @@ -255,7 +304,7 @@ template istream& operator>> (istream& is, polynomial & p) { while (!row.eof()) { char c_times_power_plus_symbol = ' '; C coef; - vector var_degree(p._var_names.size(),0); + vector var_degree; // read spaces until a symbol or a number occurs while (!row.eof()) { @@ -286,26 +335,42 @@ template istream& operator>> (istream& is, polynomial & p) { _ERROR("operator>>"," missing * or + symbol (found : \""<< c_times_power_plus_symbol << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^ power1] [* variable2 [^ power2] ... ] + \"coef\" * ..." << endl); } if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { - p._coefs.push_back( pair, C>(var_degree, coef * sign)); - if (c_times_power_plus_symbol == '-') - sign = C(-1); - else - sign = C(1); + p._coefs.push_back( pair, C>(var_degree, coef * sign)); + if (c_times_power_plus_symbol == '-') + sign = C(-1); + else + sign = C(1); continue; } next_variable: string var_symbol; row >> var_symbol; - //cerr << "variable:" << var_symbol << endl; + cerr << "variable:" << var_symbol << endl; int i_var = -1; + + // extend var_degree up to this variable if it is already defined + bool defined_var = false; for (unsigned i=0; i < p._var_names.size(); i++) { if (!p._var_names[i].compare(var_symbol)) { i_var = i; - var_degree[i_var] = 1; - break; + for (unsigned j=var_degree.size(); j < i; j++) + var_degree.push_back(0); + var_degree.push_back(1); + defined_var = true; + break; } } + // if not defined, create its name and extend "var_degree" + if (!defined_var) { + unsigned i = p._var_names.size(); + i_var = i; + p._var_names.push_back(var_symbol); + for (unsigned j=var_degree.size(); j < i; j++) + var_degree.push_back(0); + var_degree.push_back(1); + } + if (i_var == -1) { _ERROR("operator>>"," missing correct variable name (found : \"" << var_symbol << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^ power1] [* variable2 [^ power2] ... ] + \"coef\" * ..." << endl); } @@ -313,11 +378,11 @@ template istream& operator>> (istream& is, polynomial & p) { row >> c_times_power_plus_symbol; //cerr << "symbol2:" << c_times_power_plus_symbol << endl; if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { - p._coefs.push_back( pair, C>(var_degree, coef * sign)); - if (c_times_power_plus_symbol == '-') - sign = C(-1); - else - sign = C(1); + p._coefs.push_back( pair, C>(var_degree, coef * sign)); + if (c_times_power_plus_symbol == '-') + sign = C(-1); + else + sign = C(1); continue; } if (c_times_power_plus_symbol == '*') { From d01e079ef02eab092d1bc7ba625a7782c60c5075 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 11 Jan 2017 20:48:35 +0100 Subject: [PATCH 002/123] minor typos --- src/polynomial.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index d21cd63..9ea02e2 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -115,13 +115,13 @@ template inline bool operator> (const polynomial l, const poly /// Operator + for two polynomials template inline polynomial operator+ (const polynomial & l, const polynomial & r) { VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("[" << l << "] + [" << r << "]");); - // Sorting is supposed to be done before ... + // Sorting is supposed to be done before; since polynomials l and r are const here, must not be done here //sort(l._coefs.begin(),l._coefs.end()); //sort(r._coefs.begin(),r._coefs.end()); polynomial result = polynomial(); typename vector, C > >::const_iterator i_l = l._coefs.begin(); typename vector, C > >::const_iterator i_r = r._coefs.begin(); - while ( i_l != l._coefs.end() && i_r != r._coefs.end()) { + while (i_l != l._coefs.end() && i_r != r._coefs.end()) { if (i_l->first.size() == i_r->first.size() && std::equal(i_l->first.begin(),i_l->first.end(),i_r->first.begin())) { C val = C(i_l->second) + C(i_r->second); if (val != C(0)) @@ -160,7 +160,7 @@ template inline polynomial operator+ (const polynomial & l, co -/// Operator + for two polynomials +/// Operator - for two polynomials template inline polynomial operator- (const polynomial & l, const polynomial & r) { VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("[" << l << "] - [" << r << "]");); // Sorting is supposed to be done before; since polynomials l and r are const here, must not be done here @@ -169,7 +169,7 @@ template inline polynomial operator- (const polynomial & l, co polynomial result = polynomial(); typename vector, C > >::const_iterator i_l = l._coefs.begin(); typename vector, C > >::const_iterator i_r = r._coefs.begin(); - while ( i_l != l._coefs.end() && i_r != r._coefs.end()) { + while (i_l != l._coefs.end() && i_r != r._coefs.end()) { if (i_l->first.size() == i_r->first.size() && std::equal(i_l->first.begin(),i_l->first.end(),i_r->first.begin())) { C val = C(i_l->second) - C(i_r->second); if (val != C(0)) @@ -313,7 +313,7 @@ template istream& operator>> (istream& is, polynomial & p) { row.ignore(); continue; } else { - if ( c >= '0' && c <= '9' ) { + if (c >= '0' && c <= '9') { break; } else { coef = C(1); @@ -323,7 +323,7 @@ template istream& operator>> (istream& is, polynomial & p) { } row >> coef; - if ( row.fail() ) { + if (row.fail()) { _ERROR("operator>>"," invalid coefficient (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); } //cerr << "coef:" << coef << endl; @@ -393,7 +393,7 @@ template istream& operator>> (istream& is, polynomial & p) { } int power_value = 0; row >> power_value; - if ( row.fail() ) { + if (row.fail()) { _ERROR("operator>>"," invalid power coefficient (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^ power1] [* variable2 [^ power2] ... ] + \"coef\" * ..." << endl); } //cerr << "power:" << power_value << endl; From 93cf09efdbc8471fc3bfdace995cda82fe5ffd2f Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 11 Jan 2017 20:55:44 +0100 Subject: [PATCH 003/123] removing undefined variable name error --- src/polynomial.hh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 9ea02e2..d284315 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -371,10 +371,6 @@ template istream& operator>> (istream& is, polynomial & p) { var_degree.push_back(1); } - if (i_var == -1) { - _ERROR("operator>>"," missing correct variable name (found : \"" << var_symbol << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^ power1] [* variable2 [^ power2] ... ] + \"coef\" * ..." << endl); - } - row >> c_times_power_plus_symbol; //cerr << "symbol2:" << c_times_power_plus_symbol << endl; if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { From 03c5a199c2aa9242c42db828969d11905fb9f050 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 11 Jan 2017 20:56:27 +0100 Subject: [PATCH 004/123] minor typos --- src/polynomial.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index d284315..cc905c5 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -335,7 +335,7 @@ template istream& operator>> (istream& is, polynomial & p) { _ERROR("operator>>"," missing * or + symbol (found : \""<< c_times_power_plus_symbol << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^ power1] [* variable2 [^ power2] ... ] + \"coef\" * ..." << endl); } if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { - p._coefs.push_back( pair, C>(var_degree, coef * sign)); + p._coefs.push_back(pair, C>(var_degree, coef * sign)); if (c_times_power_plus_symbol == '-') sign = C(-1); else @@ -374,7 +374,7 @@ template istream& operator>> (istream& is, polynomial & p) { row >> c_times_power_plus_symbol; //cerr << "symbol2:" << c_times_power_plus_symbol << endl; if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { - p._coefs.push_back( pair, C>(var_degree, coef * sign)); + p._coefs.push_back(pair, C>(var_degree, coef * sign)); if (c_times_power_plus_symbol == '-') sign = C(-1); else From fdb581508098840d4ff6845d182c56ae163495a7 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 11 Jan 2017 20:58:33 +0100 Subject: [PATCH 005/123] cerr comments --- src/polynomial.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index cc905c5..165360b 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -346,7 +346,7 @@ template istream& operator>> (istream& is, polynomial & p) { next_variable: string var_symbol; row >> var_symbol; - cerr << "variable:" << var_symbol << endl; + //cerr << "variable:" << var_symbol << endl; int i_var = -1; // extend var_degree up to this variable if it is already defined From 3f246c661cbbd82657eb68675d16d82991fc243a Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 11 Jan 2017 21:30:31 +0100 Subject: [PATCH 006/123] Updating the example previously used in the main program --- src/main.cc | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/src/main.cc b/src/main.cc index b2bcf52..6574994 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3664,18 +3664,7 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - - - /*>>*/ -/* - vector vn; - vn.push_back(string("x")); - vn.push_back(string("y")); - vn.push_back(string("xp")); - vn.push_back(string("yp")); - - polynomial >::setvars(vn); - + //>> automaton > > at; std::stringstream ss; // @@ -3683,48 +3672,47 @@ int main(int argc, char * argv[]) { << "\t0\t1" << endl << "\t\t0\t1" << endl - << "\t\t\t0\t 1" << endl + << "\t\t\t0\t x" << endl << "\t\t1\t1" << endl - << "\t\t\t1\t 1" << endl + << "\t\t\t1\t 1 - x" << endl << "\t1\t0" << endl << "\t\t0\t1" << endl - << "\t\t\t2\t xp" << endl + << "\t\t\t2\t 1 - x*y" << endl << "\t\t1\t1" << endl - << "\t\t\t3\t yp" << endl + << "\t\t\t3\t x*y" << endl << "\t2\t0" << endl << "\t\t0\t1" << endl - << "\t\t\t2\t xp" << endl + << "\t\t\t2\t 1 - x" << endl << "\t\t1\t1" << endl << "\t\t\t3\t x" << endl << "\t3\t0" << endl << "\t\t0\t1" << endl - << "\t\t\t2\t y" << endl + << "\t\t\t2\t 1 - y" << endl << "\t\t1\t1" << endl - << "\t\t\t3\t yp" << endl; + << "\t\t\t3\t y" << endl; ss >> at; // test 1 automaton > > * pr = a_spr_mx_h_res->product(at, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); polynomial > pol1 = pr->Pr(gv_alignment_length,true); - cout << endl << "[" << pol1 << "]" << endl; - //polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); - //cout << endl << "{" << inv_pol1 << "}" << endl; - //cout << endl << "<" << (pol1 + inv_pol1) << ">" << endl; + cout << endl << "(a) [" << pol1 << "]" << endl; + polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); + cout << endl << "(a) {" << inv_pol1 << "}" << endl; + cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; // test 2 matrix > > * m_pr = a_spr_mx_h_res->matrix_product(at, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); - cout << endl << "[" << pol2 << "]" << endl; + cout << endl << "(b) [" << pol2 << "]" << endl; polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); - cout << endl << "{" << inv_pol2 << "}" << endl; - cout << endl << "<" << (pol2 + inv_pol2) << ">" << endl; + cout << endl << "(b) {" << inv_pol2 << "}" << endl; + cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; + //<< -*/ - /*<<*/ sens = m_pr_sens->Pr(gv_alignment_length, true); delete m_pr_sens; } From 545017f096bb0ee189476160a93f7a02233f420e Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 11 Jan 2017 23:39:22 +0100 Subject: [PATCH 007/123] some non-functionnal tests with templates --- src/automaton.hh | 113 ++++++++++++++++++++++++++++++++--------------- src/main.cc | 90 ++++++++++++++++++------------------- 2 files changed, 123 insertions(+), 80 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 5c9793b..29618d5 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -1112,16 +1112,42 @@ public: VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); // add a transition on from stateN --a--> stateNx. - switch (thisOrOtherIsProbabilist) { - case PRODUCT_NONE_IS_PROBABILIST: + if (std::is_void::value && std::is_void::value ) { result->addNewTransition(a,stateN,stateNx); - break; - case PRODUCT_THIS_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx,iterA->_prob); - break; - case PRODUCT_OTHER_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx,iterB->_prob); - break; + } else { + if (std::is_void::value) { + switch (thisOrOtherIsProbabilist) { + case PRODUCT_OTHER_IS_PROBABILIST: + result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); + break; + default: + result->addNewTransition(a,stateN,stateNx); + break; + } + } else { + if (std::is_void::value) { + switch (thisOrOtherIsProbabilist) { + case PRODUCT_THIS_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx); /* FIXME NOT CORRECt HERE : == to work*/ + break; + default: + result->addNewTransition(a,stateN,stateNx); + break; + } + } else { + switch (thisOrOtherIsProbabilist) { + case PRODUCT_NONE_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx); + break; + case PRODUCT_THIS_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx);/* FIXME NOT CORRECT HERE : == to work*/ + break; + case PRODUCT_OTHER_IS_PROBABILIST: + result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); + break; + } + } + } } }// for (listB) }// for (listA) @@ -1267,7 +1293,7 @@ public: VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); // add a transition on from stateN --a--> stateNx. - result->addNewTransition(a,stateN,stateNx,iter->_prob); + result->addNewTransition(a,stateN,stateNx); }// for (list) }// for (a) }//while stack nonempty @@ -1814,7 +1840,15 @@ public: */ inline void selfLoop(const int stateNb) { for (int a = 0; a < gv_align_alphabet_size; a++) - addNewTransition(a,stateNb,stateNb,T(+1e+0/gv_align_alphabet_size)); + addNewTransition(a,stateNb,stateNb); + } + + /**@brief make the state "stateNb" loop on itselft for any letter + * @param stateNb is the state that must be looped + */ + inline void selfLoopProb(const int stateNb) { + for (int a = 0; a < gv_align_alphabet_size; a++) + addNewTransitionProb(a,stateNb,stateNb,T(+1e+0/gv_align_alphabet_size)); } @@ -1910,22 +1944,21 @@ protected: return _states.size() - 1; } - /** @brief add a new transition between two states * @param "a" is the transition letter * @param startingState is the starting state * @param endingState is the ending state * @param prob is the new probability */ - inline void addNewTransition(const int a , const int startingState , const int endingState, const T prob = T(1.0/gv_align_alphabet_size)) { + template typename disable_if_ca ::value, void>::type addNewTransitionProb(const int a , const int startingState , const int endingState, const Q prob) { #ifdef ASSERTB if (a < 0 || a >= gv_align_alphabet_size) { - _ERROR("addNewTransition","transition letter out of range"); + _ERROR("addNewTransitionProb","transition letter out of range"); } if (startingState >= (int)_states.size() || endingState >= (int)_states.size()) { - _ERROR("addNewTransition","state required does not exist"); + _ERROR("addNewTransitionProb","state required does not exist"); } #endif @@ -1935,42 +1968,46 @@ protected: for (typename vector >::const_iterator iter = _states[startingState]._next[a].begin(); iter != _states[startingState]._next[a].end(); iter++) { if ( iter->_state == endingState) { cerr << "> when linking state q2:" << dec << endingState << " with state q1:" << dec << startingState << " on letter a:" << dec << a << endl; - _ERROR("addNewTransition"," state q2 has already a transition on \"a\" "); + _ERROR("addNewTransitionProb"," state q2 has already a transition on \"a\" "); } } #endif _states[startingState]._next[a].push_back(transition(endingState,prob)); } - /** @brief change the transition probability + + + /** @brief add a new transition between two states * @param "a" is the transition letter * @param startingState is the starting state * @param endingState is the ending state - * @param prob is the new probability - * @return 0 */ - inline int changeTransitionProb(const int a, const int startingState, const int endingState, const T prob) { + template typename enable_if_ca ::value, void>::type addNewTransition(const int a , const int startingState , const int endingState) { #ifdef ASSERTB if (a < 0 || a >= gv_align_alphabet_size) { - _ERROR(":changeTransitionProb","transition letter out of range"); + _ERROR("addNewTransition","transition letter out of range"); } if (startingState >= (int)_states.size() || endingState >= (int)_states.size()) { - _ERROR(":changeTransitionProb","state required does not exist"); + _ERROR("addNewTransition","state required does not exist"); } #endif - // forward link probability - for (typename vector >::iterator iter = _states[startingState]._next[a].begin(); iter != _states[startingState]._next[a].end(); iter++) { - if (iter->_state == endingState) { - iter->_prob = prob; - break; + // forward linking +#ifdef ASSERTB + // do not add twice the same state in the "a" backward list + for (typename vector >::const_iterator iter = _states[startingState]._next[a].begin(); iter != _states[startingState]._next[a].end(); iter++) { + if ( iter->_state == endingState) { + cerr << "> when linking state q2:" << dec << endingState << " with state q1:" << dec << startingState << " on letter a:" << dec << a << endl; + _ERROR("addNewTransition"," state q2 has already a transition on \"a\" "); } } - return 0; +#endif + _states[startingState]._next[a].push_back(transition(endingState)); } + /** @brief check if there is at least one transition from the startingState labeled with "a" * @param a is the transition letter * @param startingState is the starting state @@ -2111,9 +2148,15 @@ template int automaton::Automaton_SeedLinearMatching (const seed for (int a = 0; a < gv_align_alphabet_size; a++){ if (MATCHES_AB(a,b)){ - addNewTransition(a,Prevstate_I,Nextstate_I,T(+1e+0/gv_align_alphabet_size)); + if (std::is_void::value) + addNewTransition(a,Prevstate_I,Nextstate_I); + else + addNewTransitionProb(a,Prevstate_I,Nextstate_I,T(+1e+0/gv_align_alphabet_size)); } else { - addNewTransition(a,Prevstate_I,RejectBagstate_I,T(+1e+0/gv_align_alphabet_size)); + if (std::is_void::value) + addNewTransition(a,Prevstate_I,RejectBagstate_I); + else + addNewTransitionProb(a,Prevstate_I,RejectBagstate_I,T(+1e+0/gv_align_alphabet_size)); } } Prevstate_I = Nextstate_I; @@ -4219,7 +4262,7 @@ template int automaton::Automaton_Bernoulli(const vector & p addNewState(); int InitState_I = addNewState(); for (int a = 0; a < gv_align_alphabet_size; a++) { - addNewTransition(a, InitState_I, InitState_I, p[a]); + addNewTransitionProb(a, InitState_I, InitState_I, p[a]); } return 0; } @@ -4237,7 +4280,7 @@ template int automaton::Automaton_Markov(const vector & p, // empty ending state addNewState(TRUE); - selfLoop(0); + selfLoopProb(0); int InitState_I = addNewState(); // starting at state 1 @@ -4270,7 +4313,7 @@ template int automaton::Automaton_Markov(const vector & p, for (int buklet = 0; buklet < ApowKplus; buklet++) { int state = addNewState(); int base = state - InitState_I - 1; - addNewTransition(base%gv_align_alphabet_size, + addNewTransitionProb(base%gv_align_alphabet_size, base/gv_align_alphabet_size + InitState_I, state, proba[buklet] / probasum[buklet/gv_align_alphabet_size] /* [FIXME] */); @@ -4287,7 +4330,7 @@ template int automaton::Automaton_Markov(const vector & p, } for (int a = 0; a < gv_align_alphabet_size; a++) { - addNewTransition(a , + addNewTransitionProb(a , nextbase + (b )%ApowK, // previous word nextbase + (bplus + a)%ApowK, // next word p[bplus + a] / psum /* [FIXME] */); @@ -4374,7 +4417,7 @@ template int automaton::Automaton_CountAlphabetSymbols(const int addNewState(0); for (int i = 0; i < 2; i++) for (int a = 0; a < gv_align_alphabet_size; a++) { - addNewTransition(a, i, (a >= min_a) ? 0 : 1, 1); + addNewTransitionProb(a, i, (a >= min_a) ? 0 : 1, 1); } return 0; } diff --git a/src/main.cc b/src/main.cc index 6574994..715a38b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2880,7 +2880,7 @@ int main(int argc, char * argv[]) { } // build the lossless automaton - automaton a_lossless; + automaton a_lossless; double lossless_set_sens = 1.0; if (gv_lossless_flag) { a_lossless.Automaton_Lossless(gv_lossless_costs_vector, gv_lossless_cost_threshold); @@ -2907,7 +2907,7 @@ int main(int argc, char * argv[]) { // double pr_div_homogeneous = 1.00; - automaton * a_homogeneous = new automaton(); + automaton * a_homogeneous = new automaton(); if (gv_homogeneous_flag) { VERB_FILTER(VERBOSITY_MODERATE, INFO__("* Homogeneous automaton : {"; for (int a = 0; a < gv_align_alphabet_size; a++) { @@ -2920,7 +2920,7 @@ int main(int argc, char * argv[]) { a_homogeneous->Automaton_Homogeneous(gv_homogeneous_scores, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - size : " << (a_homogeneous->size()));); if (gv_minimize_flag) { - automaton * na = a_homogeneous->Hopcroft(); + automaton * na = a_homogeneous->Hopcroft(); delete a_homogeneous; a_homogeneous = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced size : " << (a_homogeneous->size()));); @@ -2944,7 +2944,7 @@ int main(int argc, char * argv[]) { // double pr_div_excluded = 0.00; - automaton * a_excluded = NULL; + automaton * a_excluded = NULL; if (gv_xseeds.size()) { VERB_FILTER(VERBOSITY_MODERATE, INFO__("* Excluded automaton : "; @@ -2957,12 +2957,12 @@ int main(int argc, char * argv[]) { // a) build the excluded seed automaton for (unsigned i = 0; i < gv_xseeds.size(); i++){ - automaton * a_se = new automaton(); + automaton * a_se = new automaton(); VERB_FILTER(VERBOSITY_MODERATE, INFO__(" = seed : " << (*gv_xseeds[i]));); SEEDAUTOMATON(a_se, gv_xseeds[i], gv_xseeds[i]->cycled() || gv_xseeds_multihit_flag ); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - size : " << (a_se->size()));); if (gv_minimize_flag) { - automaton * na = a_se->Hopcroft(); + automaton * na = a_se->Hopcroft(); delete a_se; a_se = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced size : " << (a_se->size()));); @@ -2972,15 +2972,15 @@ int main(int argc, char * argv[]) { // excluded seed cycle if (gv_xseeds[i]->cycled()) { - automaton * na = a_se; - automaton * a_cycle = new automaton(); + automaton * na = a_se; + automaton * a_cycle = new automaton(); a_cycle->Automaton_Cycle(gv_xseeds[i]->maxpos(), gv_xseeds[i]->pos(), gv_xseeds[i]->nbpos()); a_se = (a_se)->product(*a_cycle, gv_xseeds_multihit_flag?PRODUCT_INTERSECTION_NO_FINAL_LOOP:PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); delete a_cycle; delete na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - cycled size : " << (a_se->size()));); if (gv_minimize_flag) { - automaton * na = a_se->Hopcroft(); + automaton * na = a_se->Hopcroft(); delete a_se; a_se = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced cycled size : " << (a_se->size()));); @@ -2989,11 +2989,11 @@ int main(int argc, char * argv[]) { // excluded automaton if (i > 0) { - automaton * a_excluded_temp = a_excluded; + automaton * a_excluded_temp = a_excluded; a_excluded = a_excluded->product(*a_se, gv_xseeds_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = excluded product size : " << (a_excluded->size()));); if (gv_minimize_flag) { - automaton * na = a_excluded->Hopcroft(); + automaton * na = a_excluded->Hopcroft(); delete a_excluded; a_excluded = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced excluded product size : " << (a_excluded->size()));); @@ -3009,12 +3009,12 @@ int main(int argc, char * argv[]) { // excluded automaton multihit if (gv_xseeds_multihit_flag) { - automaton * a_excluded_temp = a_excluded; + automaton * a_excluded_temp = a_excluded; a_excluded = a_excluded->mhit(gv_xseeds_multihit_nb, gv_alignment_length); delete a_excluded_temp; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = mhits excluded size : " << (a_excluded->size()));); if (gv_minimize_flag) { - automaton * na = a_excluded->Hopcroft(); + automaton * na = a_excluded->Hopcroft(); delete a_excluded; a_excluded = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced mhits excluded size : " << (a_excluded->size()));); @@ -3026,12 +3026,12 @@ int main(int argc, char * argv[]) { // b) compute the foreground probability if (gv_homogeneous_flag) { - automaton * na = a_excluded->product(*a_homogeneous, PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + automaton * na = a_excluded->product(*a_homogeneous, PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); delete a_excluded; a_excluded = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = mhits excluded x homogeneous size : " << (a_excluded->size()));); if (gv_minimize_flag) { - automaton * na = a_excluded->Hopcroft(); + automaton * na = a_excluded->Hopcroft(); delete a_excluded; a_excluded = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced mhits excluded x homogeneous size : " << (a_excluded->size()));); @@ -3070,7 +3070,7 @@ int main(int argc, char * argv[]) { bool hillclimbing_flag = false; std::vector sel = std::vector (gv_seeds.size(),0.0); - std::vector *> a_s = std::vector*>(gv_seeds.size(),NULL); + std::vector *> a_s = std::vector*>(gv_seeds.size(),NULL); double hillclimbing_threshold = 1e-6; int seed_to_hillclimbing = rand()%gv_seeds.size(); @@ -3085,7 +3085,7 @@ int main(int argc, char * argv[]) { double selp = 0.0; #ifdef KEEP_PRODUCT_MF - std::vector*> a_s_product(gv_seeds.size(), NULL); + std::vector*> a_s_product(gv_seeds.size(), NULL); std::vector a_s_product_seed(gv_seeds.size(), -1); #endif @@ -3244,13 +3244,13 @@ int main(int argc, char * argv[]) { } } #endif - (a_s[i]) = new automaton(); + (a_s[i]) = new automaton(); SEEDAUTOMATON(a_s[i], gv_seeds[i], gv_seeds[i]->cycled() || gv_multihit_flag); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton size : " << (a_s[i]->size()));); if (gv_minimize_flag) { - automaton * na = (a_s[i])->Hopcroft(); + automaton * na = (a_s[i])->Hopcroft(); delete (a_s[i]); (a_s[i]) = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton reduced size : " << (a_s[i]->size()));); @@ -3270,8 +3270,8 @@ int main(int argc, char * argv[]) { // cycle if (gv_seeds[i]->cycled()) { - automaton * na = a_s[i]; - automaton * a_cycle = new automaton(); + automaton * na = a_s[i]; + automaton * a_cycle = new automaton(); a_cycle->Automaton_Cycle(gv_seeds[i]->maxpos(), gv_seeds[i]->pos(), gv_seeds[i]->nbpos()); a_s[i] = (a_s[i])->product(*a_cycle, gv_multihit_flag?PRODUCT_INTERSECTION_NO_FINAL_LOOP:PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton cycled size : " << (a_s[i]->size()));); @@ -3279,7 +3279,7 @@ int main(int argc, char * argv[]) { delete a_cycle; delete na; if (gv_minimize_flag) { - automaton * na = a_s[i]->Hopcroft(); + automaton * na = a_s[i]->Hopcroft(); delete a_s[i]; a_s[i] = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton reduced cycled size : " << (a_s[i]->size()));); @@ -3297,13 +3297,13 @@ int main(int argc, char * argv[]) { // (2) compute sensitivity (and lossless property when needed ...) int lossless = 0; - automaton * a_spr = NULL; + automaton * a_spr = NULL; // FIXMECOV >> if (gv_covariance_flag) { for (unsigned i = 0; i < gv_seeds.size(); i++) { if (!a_s[i]) { - a_s[i] = new automaton(); + a_s[i] = new automaton(); a_s[i]->Automaton_SeedLinearMatching(*(gv_seeds[i]),gv_subsetseed_matching_matrix); } } @@ -3315,7 +3315,7 @@ int main(int argc, char * argv[]) { if (gv_global_coverage_flag) { // (2.1) global coverage constraint - a_spr = new automaton(); + a_spr = new automaton(); a_spr->Automaton_SeedPrefixesMatching_CoverageDM(gv_seeds, gv_global_coverage_cost, gv_subsetseed_matching_matrix); @@ -3327,7 +3327,7 @@ int main(int argc, char * argv[]) { // << VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = automaton global coverage size : " << (a_spr->size()));); if (gv_minimize_flag) { - automaton * na = a_spr->Hopcroft(); + automaton * na = a_spr->Hopcroft(); delete a_spr; a_spr = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton reduced global coverage size : " << (a_spr->size()));); @@ -3384,7 +3384,7 @@ int main(int argc, char * argv[]) { ); if (gv_minimize_flag) { - automaton * na = a_spr->Hopcroft(); + automaton * na = a_spr->Hopcroft(); delete a_spr; a_spr = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" + reduced multiseed ["; @@ -3408,13 +3408,13 @@ int main(int argc, char * argv[]) { #else for (unsigned i = 0; i < gv_seeds.size(); i++) { if (i != 0) { - automaton * a_spr_temp = a_spr; + automaton * a_spr_temp = a_spr; a_spr = a_spr->product(*(a_s[i]), gv_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = multiseed 1.." << (i) << " x " << (i+1) << " product size : " << (a_spr->size()));); if (gv_minimize_flag) { - automaton * na = a_spr->Hopcroft(); + automaton * na = a_spr->Hopcroft(); delete a_spr; a_spr = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced multiseed 1.." << (i) << " x " << (i+1) << " product size : " << (a_spr->size()));); @@ -3434,7 +3434,7 @@ int main(int argc, char * argv[]) { //<< // multihit (xor) global_coverage - automaton * a_spr_mhits_or_gcov_res = a_spr; + automaton * a_spr_mhits_or_gcov_res = a_spr; if (gv_multihit_flag || gv_global_coverage_flag) { a_spr_mhits_or_gcov_res = a_spr->mhit(gv_multihit_flag?gv_multihit_nb:gv_global_coverage_nb, gv_alignment_length); @@ -3442,7 +3442,7 @@ int main(int argc, char * argv[]) { VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = mhits/gcov size : " << (a_spr_mhits_or_gcov_res->size()));); if (gv_minimize_flag) { - automaton * na = a_spr_mhits_or_gcov_res->Hopcroft(); + automaton * na = a_spr_mhits_or_gcov_res->Hopcroft(); delete a_spr_mhits_or_gcov_res; a_spr_mhits_or_gcov_res = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced mhits/gcov size : " << (a_spr_mhits_or_gcov_res->size()));); @@ -3450,14 +3450,14 @@ int main(int argc, char * argv[]) { } // homogeneous - automaton * a_spr_h_res = a_spr_mhits_or_gcov_res; + automaton * a_spr_h_res = a_spr_mhits_or_gcov_res; if (gv_homogeneous_flag) { a_spr_h_res = a_spr_mhits_or_gcov_res->product(*a_homogeneous, PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = homogeneous product size : " << (a_spr_h_res->size()));); if (gv_minimize_flag) { - automaton * na = a_spr_h_res->Hopcroft(); + automaton * na = a_spr_h_res->Hopcroft(); delete a_spr_h_res; a_spr_h_res = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced homogeneous product size : " << (a_spr_h_res->size()));); @@ -3465,14 +3465,14 @@ int main(int argc, char * argv[]) { } // excluded seeds - automaton * a_spr_mx_h_res = a_spr_h_res; + automaton * a_spr_mx_h_res = a_spr_h_res; if (gv_xseeds.size()) { a_spr_mx_h_res = a_spr_h_res->product(*a_excluded, PRODUCT_BUTNOT_NO_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = mx product size : " << (a_spr_mx_h_res->size()));); if (gv_minimize_flag) { - automaton * na = a_spr_mx_h_res->Hopcroft(); + automaton * na = a_spr_mx_h_res->Hopcroft(); delete a_spr_mx_h_res; a_spr_mx_h_res = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced mx product size : " << (a_spr_mx_h_res->size()));); @@ -3593,10 +3593,10 @@ int main(int argc, char * argv[]) { #ifndef LOSSLESS_PROB if (gv_hillclimbing_flag) { #endif - automaton * a_spr_mx_h_res_loss = a_spr_mx_h_res->product(a_lossless, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + automaton * a_spr_mx_h_res_loss = a_spr_mx_h_res->product(a_lossless, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); // @note{NOTE : both "reject" and "final" states are final so "final" should not be use to mesure probs} if (gv_minimize_flag) { - automaton * na = a_spr_mx_h_res_loss->Hopcroft(); + automaton * na = a_spr_mx_h_res_loss->Hopcroft(); delete a_spr_mx_h_res_loss; a_spr_mx_h_res_loss = na; } @@ -3672,9 +3672,9 @@ int main(int argc, char * argv[]) { << "\t0\t1" << endl << "\t\t0\t1" << endl - << "\t\t\t0\t x" << endl + << "\t\t\t0\t 1" << endl << "\t\t1\t1" << endl - << "\t\t\t1\t 1 - x" << endl + << "\t\t\t0\t 1" << endl << "\t1\t0" << endl << "\t\t0\t1" << endl @@ -3684,15 +3684,15 @@ int main(int argc, char * argv[]) { << "\t2\t0" << endl << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - x" << endl + << "\t\t\t2\t 1 - x - y" << endl << "\t\t1\t1" << endl - << "\t\t\t3\t x" << endl + << "\t\t\t3\t x + y" << endl << "\t3\t0" << endl << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - y" << endl + << "\t\t\t2\t 1 - x" << endl << "\t\t1\t1" << endl - << "\t\t\t3\t y" << endl; + << "\t\t\t3\t x" << endl; ss >> at; @@ -3762,9 +3762,9 @@ int main(int argc, char * argv[]) { delete a_x_v_j; for (int shift = -span_j+1; shift <= span_i-1; shift++) { int len = MAX(span_i - MIN(shift,0) , span_j + MAX(shift,0)); - automaton * p = a_s[i]->product(*(a_s[j]),PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, len, NULL, shift); + automaton * p = a_s[i]->product(*(a_s[j]),PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, len, NULL, shift); if (gv_minimize_flag) { - automaton * na = p->Hopcroft(); + automaton * na = p->Hopcroft(); delete p; p = na; } From 7efa159956de01004d010d85bec301e493e88800 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 00:02:12 +0100 Subject: [PATCH 008/123] some non-functionnal tests with templates : updates --- src/automaton.hh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 29618d5..6fbcc96 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -1118,7 +1118,7 @@ public: if (std::is_void::value) { switch (thisOrOtherIsProbabilist) { case PRODUCT_OTHER_IS_PROBABILIST: - result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); + result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); break; default: result->addNewTransition(a,stateN,stateNx); @@ -1950,7 +1950,7 @@ protected: * @param endingState is the ending state * @param prob is the new probability */ - template typename disable_if_ca ::value, void>::type addNewTransitionProb(const int a , const int startingState , const int endingState, const Q prob) { + template typename enable_if_ca ::value, void>::type addNewTransitionProb(const int a , const int startingState , const int endingState, const Q prob) { #ifdef ASSERTB if (a < 0 || a >= gv_align_alphabet_size) { @@ -1982,7 +1982,7 @@ protected: * @param startingState is the starting state * @param endingState is the ending state */ - template typename enable_if_ca ::value, void>::type addNewTransition(const int a , const int startingState , const int endingState) { + inline void addNewTransition(const int a , const int startingState , const int endingState) { #ifdef ASSERTB if (a < 0 || a >= gv_align_alphabet_size) { @@ -2148,15 +2148,9 @@ template int automaton::Automaton_SeedLinearMatching (const seed for (int a = 0; a < gv_align_alphabet_size; a++){ if (MATCHES_AB(a,b)){ - if (std::is_void::value) - addNewTransition(a,Prevstate_I,Nextstate_I); - else - addNewTransitionProb(a,Prevstate_I,Nextstate_I,T(+1e+0/gv_align_alphabet_size)); + addNewTransition(a,Prevstate_I,Nextstate_I); } else { - if (std::is_void::value) - addNewTransition(a,Prevstate_I,RejectBagstate_I); - else - addNewTransitionProb(a,Prevstate_I,RejectBagstate_I,T(+1e+0/gv_align_alphabet_size)); + addNewTransition(a,Prevstate_I,RejectBagstate_I); } } Prevstate_I = Nextstate_I; From a4b498683de680810bb9e073469e0a1d0379bc56 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 08:27:55 +0100 Subject: [PATCH 009/123] some non-functionnal tests with templates : updates on IsVoid --- src/automaton.hh | 15 ++++++++++----- src/matrix.hh | 18 +++++++++++++++++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 6fbcc96..25662b6 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -907,7 +907,7 @@ public: * @return a new automaton that only gives reachable states of the product * @see matrix_product */ - + template automaton * product(const automaton & other, const ProductSetFinalType productSetFinalType, const ProductProbabilityType thisOrOtherIsProbabilist = PRODUCT_NONE_IS_PROBABILIST, @@ -1112,10 +1112,13 @@ public: VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); // add a transition on from stateN --a--> stateNx. - if (std::is_void::value && std::is_void::value ) { + + if (IsVoid() && IsVoid()) { + #warning "T void, U void" result->addNewTransition(a,stateN,stateNx); } else { - if (std::is_void::value) { + if (IsVoid() && !IsVoid()) { + #warning "T void, U not void" switch (thisOrOtherIsProbabilist) { case PRODUCT_OTHER_IS_PROBABILIST: result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); @@ -1125,7 +1128,8 @@ public: break; } } else { - if (std::is_void::value) { + if (!IsVoid() && IsVoid()) { + #warning "T not Void, U void" switch (thisOrOtherIsProbabilist) { case PRODUCT_THIS_IS_PROBABILIST: result->addNewTransition(a,stateN,stateNx); /* FIXME NOT CORRECt HERE : == to work*/ @@ -1135,6 +1139,7 @@ public: break; } } else { + #warning "Both not void" switch (thisOrOtherIsProbabilist) { case PRODUCT_NONE_IS_PROBABILIST: result->addNewTransition(a,stateN,stateNx); @@ -1950,7 +1955,7 @@ protected: * @param endingState is the ending state * @param prob is the new probability */ - template typename enable_if_ca ::value, void>::type addNewTransitionProb(const int a , const int startingState , const int endingState, const Q prob) { + template typename disable_if_ca ::value, void>::type addNewTransitionProb(const int a , const int startingState , const int endingState, const Q prob) { #ifdef ASSERTB if (a < 0 || a >= gv_align_alphabet_size) { diff --git a/src/matrix.hh b/src/matrix.hh index 1035750..4213010 100644 --- a/src/matrix.hh +++ b/src/matrix.hh @@ -119,6 +119,14 @@ template typename enable_if_ca< (std::is_arithmetic::value && std /// integer count and costs template typename disable_if_ca< (std::is_arithmetic::value && std::is_floating_point::value) || std::is_same >::value || std::is_same > >::value, bool>::type IsProb() {return false;} +/** @brief IsVoid() check if \ is a void type + * @return true if \ is a void, false otherwise + */ +/// floating point and polynomial +template typename enable_if_ca< std::is_void::value && true, bool>::type IsVoid() {return true;} +/// integer count and costs +template typename disable_if_ca< std::is_void::value && true, bool>::type IsVoid() {return false;} + #else /// arithmetic templates (for double) @@ -151,10 +159,18 @@ template typename disable_if_ca < std::tr1::is_arithmetic::value * @return true if \ is a probability, false otherwise */ /// floating point and polynomials -template typename enable_if_ca< (std::tr1::is_arithmetic::value && std::tr1::is_floating_point::value) || std::tr1::is_same >::value || std::tr1::is_same > >::value, bool>::type IsProb() {return true;} +template typename enable_if_ca< (std::tr1::is_arithmetic::value && std::tr1::is_floating_point::value) || std::tr1::is_same >::value || std::tr1::is_same > >::value, bool>::type IsProb() {return true;} /// integer count and costs template typename disable_if_ca< (std::tr1::is_arithmetic::value && std::tr1::is_floating_point::value) || std::tr1::is_same >::value || std::tr1::is_same > >::value, bool>::type IsProb() {return false;} +/** @brief IsVoid() check if \ is a void type + * @return true if \ is a void, false otherwise + */ +/// floating point and polynomials +template typename enable_if_ca< std::tr1::is_void::value && true, bool>::type IsVoid() {return true;} +/// integer count and costs +template typename disable_if_ca< std::tr1::is_void::value && true, bool>::type IsVoid() {return false;} + #endif // @} From 82950fbedb01a11894134434b88b0725d3b70226 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 08:43:42 +0100 Subject: [PATCH 010/123] Updating help --- src/main.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.cc b/src/main.cc index 6574994..424c83c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -365,7 +365,8 @@ void USAGE() { cerr << " * -y/g note : -y/-g can be used with SPEARMAN/PEARSON correlation with the alignment %%id (only for -A 2)." << endl; cerr << " you can select the minimal number of matches (%%id) by setting -y before -y " << endl; cerr << " * example : \"-spaced -l 64 -y 32 -y PEARSON\" for a %%id of 50%% and PEARSON correlation computation" << endl; - cerr << " -p : activate \"Mak Benson 2009\" dominant selection and output polynomial (useful on Bernoulli only)" << endl; + cerr << " -p : activate \"Mak Benson 2009\" dominant selection and output polynomial." << endl; + cerr << " * note : this is useful for iid models only (Bernoulli,...) " << endl; cerr << " * example : \"-spaced -l 8 -m \"##-#\" -p\" must output the additional values :"<< endl; cerr << " 0,0=1;1,0=8;2,0=28;3,0=51;4,0=45;5,0=15;6,0=1;"<< endl; cerr << " 3,1=5;4,1=25;5,1=41;6,1=27;7,1=8;8,1=1;" << endl; @@ -377,6 +378,9 @@ void USAGE() { cerr << " 0 8-0 1 8-1 2 8-2 3 8-3 4 8-4 5 8-5 6 8-6" << endl; cerr << " 1.p.q + 8.p.q + 28.p.q + 51.p.q + 45.p.q + 15.p.q + 1.p.q" << endl; cerr << " " << endl; + cerr << " -pF : activate general polynomial evaluation and load the associated file automaton [ONGOING]" << endl; + cerr << " * example : [ONGOING]"<< endl; + cerr << " " << endl; cerr << " -c ,,... : consider sensitivity when each seed is indexed on 1/c of its positions" << endl; cerr << " * note : the position is enumerated or choosen randomly depending on -r parameter" << endl; cerr << " * example : \"##-#:1/5\" means that the seed \"##-#\" will be placed at 1st,6th,11th... positions" << endl; @@ -1629,8 +1633,7 @@ void SCANARG(int argc , char ** argv) { for (int i = 0; i < gv_seed_alphabet_size; i++) gv_global_coverage_cost[i] = i; } else if (!strcmp(argv[i],"-p")||!strcmp(argv[i],"--polynomial-dominance")) { - //FIXME check several parameters incompatible with dominant selection and output - //>> + ///@todo{FIXME : check several parameters incompatible with dominant selection and output} gv_polynomial_output_flag = true; gv_polynomial_dominant_selection_flag = true; #ifndef USEINFINT @@ -1638,7 +1641,6 @@ void SCANARG(int argc , char ** argv) { _WARNING("this binary has been compiled with undefined USEINFINT (no infinite precision integer)","Polynomial coefficients count on may overflow ...\n you can compile this program with USEINFINT defined (-DUSEINFINT) but it will be much slower"); } #endif - //<< } else if (!strcmp(argv[i],"-c")||!strcmp(argv[i],"--cycles")) { if (gv_motif_flag) { _ERROR("\"-c\" pattern and \"-m\" are not compatible together", "you must provide the cycle positions on the shape (e.g \" -m 100101001:1, 3, 5/6\") "); From 23106afae391f2eee60f0157b1e8d735105bc131 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 09:11:50 +0100 Subject: [PATCH 011/123] Updating the inner code for testing --- src/main.cc | 106 +++++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 51 deletions(-) diff --git a/src/main.cc b/src/main.cc index 424c83c..30ec96b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -264,6 +264,15 @@ bool gv_polynomial_output_flag = false; /// flag that activate the selection of dominant seeds as in "Mak Benson 2009", which is also true for "Chung Park 2010" /// (and not the selection according to their sensitivity only: its a more general form that may select more seeds) bool gv_polynomial_dominant_selection_flag = false; + + + +/// flag that activate multinomial evaluation (note : this is independent from the previous dominance selection). Note that this is only a polynomial evaluation, and does not have any other effect than ... FIXME +bool gv_multipoly_file_flag = false; +automaton > > * gv_multipoly_bsens_automaton = NULL; + + + // @} /** @name data management @@ -724,7 +733,7 @@ void PARSEPROBS(int & i, char ** argv, int argc, void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton ** p_a) { i++; if (i >= argc) - _ERROR("PARSEPROBAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); + _ERROR("PARSEPROBSAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); // read file ifstream ifs_file; @@ -741,6 +750,27 @@ void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton } +/// parse and check a set of polynomial probabilities as an automaton file +void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > > ** p_a) { + i++; + if (i >= argc) + _ERROR("PARSEPOLYPROBSAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); + + // read file + ifstream ifs_file; + ifs_file.open(argv[i]); + if (!ifs_file){ + _ERROR("PARSEPOLYPROBSAUTOMATONFILE","unreadable file \"" << (argv[i]) << "\" "); + } + + // read the content and set the automaton + *p_a = new automaton > >(); + + ifs_file >> (**p_a); + ifs_file.close(); +} + + /// set of states on a matrix input @see PARSEMATRIX typedef enum { @@ -1472,7 +1502,7 @@ void SCANARG(int argc , char ** argv) { } else if (!strcmp(argv[i],"-f")||!strcmp(argv[i],"--foreground")) { PARSEPROBS(i, argv, argc, gv_bsens, gv_bsens_k); } else if (!strcmp(argv[i],"-fF")||!strcmp(argv[i],"--foregroundFile")) { - PARSEPROBSAUTOMATONFILE(i, argv, argc,&gv_bsens_automaton); + PARSEPROBSAUTOMATONFILE(i, argv, argc, &gv_bsens_automaton); } else if (!strcmp(argv[i],"-l")||!strcmp(argv[i],"--length")) { PARSEINT(i, argv, argc, gv_alignment_length, 1, 1000000); if (gv_subalignment_flag && gv_subalignment_length >= gv_alignment_length) { @@ -1641,6 +1671,10 @@ void SCANARG(int argc , char ** argv) { _WARNING("this binary has been compiled with undefined USEINFINT (no infinite precision integer)","Polynomial coefficients count on may overflow ...\n you can compile this program with USEINFINT defined (-DUSEINFINT) but it will be much slower"); } #endif + } else if (!strcmp(argv[i],"-pF")||!strcmp(argv[i],"--multipolynomial-file")) { + ///@todo{FIXME : check several parameters incompatible with dominant selection and output} + gv_multipoly_file_flag = true; + PARSEMULTIPOLYAUTOMATONFILE(i, argv, argc, &gv_multipoly_bsens_automaton); } else if (!strcmp(argv[i],"-c")||!strcmp(argv[i],"--cycles")) { if (gv_motif_flag) { _ERROR("\"-c\" pattern and \"-m\" are not compatible together", "you must provide the cycle positions on the shape (e.g \" -m 100101001:1, 3, 5/6\") "); @@ -3666,55 +3700,25 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - //>> - automaton > > at; - std::stringstream ss; - // - ss << "4" << endl - - << "\t0\t1" << endl - << "\t\t0\t1" << endl - << "\t\t\t0\t x" << endl - << "\t\t1\t1" << endl - << "\t\t\t1\t 1 - x" << endl - - << "\t1\t0" << endl - << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - x*y" << endl - << "\t\t1\t1" << endl - << "\t\t\t3\t x*y" << endl - - << "\t2\t0" << endl - << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - x" << endl - << "\t\t1\t1" << endl - << "\t\t\t3\t x" << endl - - << "\t3\t0" << endl - << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - y" << endl - << "\t\t1\t1" << endl - << "\t\t\t3\t y" << endl; - - - ss >> at; - // test 1 - automaton > > * pr = a_spr_mx_h_res->product(at, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); - polynomial > pol1 = pr->Pr(gv_alignment_length,true); - cout << endl << "(a) [" << pol1 << "]" << endl; - polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); - cout << endl << "(a) {" << inv_pol1 << "}" << endl; - cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; - - // test 2 - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(at, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); - cout << endl << "(b) [" << pol2 << "]" << endl; - polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); - cout << endl << "(b) {" << inv_pol2 << "}" << endl; - cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; - //<< - + // Multinomial evaluation can be enabled in that case + if (gv_multipoly_file_flag) { + // test 1 on polynomials + automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + polynomial > pol1 = pr->Pr(gv_alignment_length,true); + cout << endl << "(a) [" << pol1 << "]" << endl; + polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); + cout << endl << "(a) {" << inv_pol1 << "}" << endl; + cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; + + // test 2 on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); + cout << endl << "(b) [" << pol2 << "]" << endl; + polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); + cout << endl << "(b) {" << inv_pol2 << "}" << endl; + cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; + } + sens = m_pr_sens->Pr(gv_alignment_length, true); delete m_pr_sens; } From b15795477e8999523c38d1176a784d68ee9d06ab Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 09:36:19 +0100 Subject: [PATCH 012/123] Updating examples with multinomial tests --- tests/iedera_gcov_test5 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/iedera_gcov_test5 b/tests/iedera_gcov_test5 index f81d9e7..d9a27d9 100755 --- a/tests/iedera_gcov_test5 +++ b/tests/iedera_gcov_test5 @@ -1,2 +1,4 @@ #!/bin/sh -./iedera_gcov -spaced -n 2 -w 11,11 -s 11,22 -r 1000 -k -z 100 +# Multinomial tests +echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x*y\n 1 1\n 3 x*y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multinomial_automaton_ +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "111011001010010111" -l 20 -pF _filein_multinomial_automaton_ || exit 99 From af9fad57998014dbd6104e23258c8041682c3da7 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 11:06:37 +0100 Subject: [PATCH 013/123] Adding multipoly to seedproperties --- src/main.cc | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/main.cc b/src/main.cc index 30ec96b..67a4380 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2114,7 +2114,7 @@ class seedproperties { public: /** @brief build a "seedproperties" object (keep current seed properties when needed) */ - seedproperties(double sel, double sens, double dist, std::string str, bool lossless = false, vector< pair,BIGINT> > * polynom = NULL) { + seedproperties(double sel, double sens, double dist, std::string str, bool lossless = false, vector< pair,BIGINT> > * polynom = NULL, polynomial > * multipoly = NULL) { this->sel = sel; this->sens = sens; @@ -2125,6 +2125,11 @@ class seedproperties { this->polynom = vector< pair,BIGINT> >(polynom->begin(),polynom->end()); else this->polynom = vector< pair,BIGINT> >(0); + if (multipoly) + this->multipoly = polynomial >(*multipoly); + else + this->multipoly = polynomial >(); + } /** @brief clone a "seedproperties" object @@ -2135,7 +2140,8 @@ class seedproperties { this->dist = other.dist; this->str = string(other.str); this->lossless = other.lossless; - this->polynom = vector< pair,BIGINT> >(other.polynom.begin(),other.polynom.end()); + this->polynom = vector< pair,BIGINT> >(other.polynom.begin(),other.polynom.end()); + this->multipoly = polynomial >(other.multipoly); } @@ -2151,7 +2157,8 @@ class seedproperties { bool lossless; /// keep polynomial factors for multihit / coverage hit /vs/ vector< pair,BIGINT> > polynom; - + /// keep multivariable polynomial for output only + polynomial > multipoly; /** @brief delete a "seedproperties" object (this is just a polynom "check and erase") */ @@ -2260,6 +2267,9 @@ std::ostream& operator<<(std::ostream& os, seedproperties& e){ os << (i->first.first) << "," << (i->first.second) << "=" << (i->second) << ";"; } } + if (gv_multipoly_file_flag) { + os << "\t[" << e.multipoly << "]"; + } return os; } @@ -3515,8 +3525,8 @@ int main(int argc, char * argv[]) { } } - std::vector< pair,BIGINT> > * polynom = NULL; - + std::vector< pair,BIGINT> > * polynom = NULL; + polynomial > * multipoly = NULL; //FIXMECOV>> if (gv_covariance_flag) goto gv_covariance_flag_1; //<< @@ -3700,8 +3710,9 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - // Multinomial evaluation can be enabled in that case + // Multinomial evaluation can be enabled in that case (FIXME : free memory) if (gv_multipoly_file_flag) { + /* // test 1 on polynomials automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); polynomial > pol1 = pr->Pr(gv_alignment_length,true); @@ -3709,7 +3720,8 @@ int main(int argc, char * argv[]) { polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); cout << endl << "(a) {" << inv_pol1 << "}" << endl; cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; - + delete pr; + // test 2 on matrices matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); @@ -3717,6 +3729,13 @@ int main(int argc, char * argv[]) { polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); cout << endl << "(b) {" << inv_pol2 << "}" << endl; cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; + delete m_pr; + */ + // implemented on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > mpol = m_pr->Pr(gv_alignment_length,true); + multipoly = new polynomial >(mpol); + delete m_pr; } sens = m_pr_sens->Pr(gv_alignment_length, true); @@ -3804,13 +3823,15 @@ int main(int argc, char * argv[]) { outs << ","; outs << (gv_seeds[i])->str(); } - seedproperties e = seedproperties(selp, sens, distance, outs.str(), lossless, polynom); + seedproperties e = seedproperties(selp, sens, distance, outs.str(), lossless, polynom, multipoly); if (gv_correlation_flag || gv_polynomial_output_flag || gv_polynomial_dominant_selection_flag) { polynom->clear(); delete polynom; } - + if (gv_multipoly_file_flag) { + delete multipoly; + } // // (5) insertion inside pareto set // From 43f47215c3bac944b01627fbe86881c2f23328ea Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 11:59:16 +0100 Subject: [PATCH 014/123] first version that compile --- src/automaton.hh | 272 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 265 insertions(+), 7 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 25662b6..708aa61 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -907,13 +907,13 @@ public: * @return a new automaton that only gives reachable states of the product * @see matrix_product */ - - template automaton * product(const automaton & other, - const ProductSetFinalType productSetFinalType, - const ProductProbabilityType thisOrOtherIsProbabilist = PRODUCT_NONE_IS_PROBABILIST, - const int depth = INT_INFINITY, - const AddHoc_Final_Func aff = NULL, - const int shift = 0) const { + template typename enable_if_ca ::value, automaton * >::type + product(const automaton & other, + const ProductSetFinalType productSetFinalType, + const ProductProbabilityType thisOrOtherIsProbabilist = PRODUCT_NONE_IS_PROBABILIST, + const int depth = INT_INFINITY, + const AddHoc_Final_Func aff = NULL, + const int shift = 0) const { VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("== Product == (productsetfinaltype:" << dec << productSetFinalType << ")");); @@ -1073,6 +1073,263 @@ public: if (!statesNbIndex[PRODINDEX(indexNx)]) { #endif +#ifdef USEQUEUEPRODUCT + if (level_i <= depth) { +#endif + // create a new state + stateNx = result->addNewState(final_state); + statesNbIndex[PRODINDEX(indexNx)] = stateNx; + statesNbRemaining.push(indexNx); + + if ( + gv_subalignment_flag && ((this->_init_states.size() > 0) || + (other._init_states.size() > 0) + ) + && + (((this->_init_states.size() > 0) && (stateAnext == this->_init_states[result->_init_states.size()%(this->_init_states.size())])) || ((this->_init_states.size() == 0) && (stateAnext == 1))) + && + (((other._init_states.size() > 0) && (stateBnext == other._init_states[result->_init_states.size()%(other._init_states.size())])) || ((other._init_states.size() == 0) && (stateBnext == 1))) + ) + { + result->_init_states.push_back(stateNx); + } + + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("$push state:" << dec << stateNx);); + +#ifdef USEQUEUEPRODUCT + + } else { + // max level reached : goes to a "non final" loop state + stateNx = result->addNewState(final_state); + result->selfLoop(stateNx); + } +#endif + } else { + stateNx = statesNbIndex[PRODINDEX(indexNx)]; + } + } + + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); + + // add a transition on from stateN --a--> stateNx. + + if (IsVoid() && IsVoid()) { + #warning "T void, U void" + result->addNewTransition(a,stateN,stateNx); + } else { + if (IsVoid() && !IsVoid()) { + #warning "T void, U not void" + switch (thisOrOtherIsProbabilist) { + case PRODUCT_OTHER_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx); + break; + default: + result->addNewTransition(a,stateN,stateNx); + break; + } + } else { + if (!IsVoid() && IsVoid()) { + #warning "T not Void, U void" + switch (thisOrOtherIsProbabilist) { + case PRODUCT_THIS_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx); /* FIXME NOT CORRECt HERE : == to work*/ + break; + default: + result->addNewTransition(a,stateN,stateNx); + break; + } + } else { + #warning "Both not void" + switch (thisOrOtherIsProbabilist) { + case PRODUCT_NONE_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx); + break; + case PRODUCT_THIS_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx);/* FIXME NOT CORRECT HERE : == to work*/ + break; + case PRODUCT_OTHER_IS_PROBABILIST: + result->addNewTransition(a,stateN,stateNx); + break; + } + } + } + } + }// for (listB) + }// for (listA) + }// for (a) + }//while stack nonempty + + // Free unused data needed to build the automaton + statesNbIndex.clear(); + return result; + } + + template typename disable_if_ca ::value, automaton * >::type + product(const automaton & other, + const ProductSetFinalType productSetFinalType, + const ProductProbabilityType thisOrOtherIsProbabilist = PRODUCT_NONE_IS_PROBABILIST, + const int depth = INT_INFINITY, + const AddHoc_Final_Func aff = NULL, + const int shift = 0) const { + + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("== Product == (productsetfinaltype:" << dec << productSetFinalType << ")");); + +#ifdef ASSERTB + if ((this->size() * other.size()) > (1 << 28)) { + _ERROR("product"," size of product automaton will \"certainly\" explode : better stop here ..."); + } +#endif + + automaton * result = new automaton(); + int StateFinal = result->addNewState(TRUE); + result->selfLoop(StateFinal); + +#ifdef USEMAPPRODUCT + typedef less< pair > lessp; + typedef map< pair, int, lessp > maptype; + maptype statesNbIndex; +#define PRODINDEX(i) (i) +#else + vector statesNbIndex( this->size() * other.size(), 0); +#define PRODINDEX(i) ((i).first * other.size() + (i).second) +#endif + +#ifdef USEQUEUEPRODUCT + queue< pair > statesNbRemaining; +#else + stack< pair > statesNbRemaining; +#endif + + // (0) final loop or not + int final_loop = (productSetFinalType == PRODUCT_UNION_FINAL_LOOP || productSetFinalType == PRODUCT_INTERSECTION_FINAL_LOOP || productSetFinalType == PRODUCT_BUTNOT_FINAL_LOOP || productSetFinalType == PRODUCT_NOTBUT_FINAL_LOOP || productSetFinalType == PRODUCT_ADDHOC_FINAL_LOOP) ? TRUE : FALSE; + + // (1) start the product init state + pair indexInit = pair(1,1); + int stateInit = result->addNewState(); + + statesNbIndex[PRODINDEX(indexInit)] = stateInit; + statesNbRemaining.push(indexInit); + + if ( + gv_subalignment_flag && ((this->_init_states.size() > 0) || + (other._init_states.size() > 0) + ) + ) { + result->_init_states.push_back(stateInit); + } + +#ifdef USEQUEUEPRODUCT + // depth of the states being built + int level_i = 0; + int stateN_of_level_i = stateInit; +#endif + + // (2) take all the non-considered interesting cases pairs on both automatons + while (!statesNbRemaining.empty()) { + + // current state remaining +#ifdef USEQUEUEPRODUCT + pair indexN = statesNbRemaining.front(); +#else + pair indexN = statesNbRemaining.top(); +#warning "the automaton product function is not compiled with a Queue, but with a Stack : \"depth\" parameter cannot be used on this implementation" +#endif + + statesNbRemaining.pop(); + + int stateNA = indexN.first; + int stateNB = indexN.second; + int stateN = statesNbIndex[PRODINDEX(indexN)]; + +#ifdef USEQUEUEPRODUCT + // compute level + if (stateN > stateN_of_level_i) { + stateN_of_level_i = (result->size() - 1); + level_i++; + } +#endif + + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("$pop state:" << stateN);); + + // compute normalizing factor if both are probabilist automata + for (int a = 0; a < gv_align_alphabet_size; a++) { + + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("a = " << a);); + + for (typename vector >::const_iterator iterA = _states[stateNA]._next[a].begin(); iterA != _states[stateNA]._next[a].end(); iterA++) { + for (typename vector >::const_iterator iterB = other._states[stateNB]._next[a].begin(); iterB != other._states[stateNB]._next[a].end(); iterB++) { + + int stateAnext = iterA->_state; + int stateBnext = iterB->_state; + pair indexNx = pair(stateAnext, stateBnext); + +#ifdef USEQUEUEPRODUCT + + // shifter rules + if (shift) { + if (shift > 0) { + if (level_i < shift) { + stateBnext = 1; + indexNx = pair(stateAnext, stateBnext); + } + } else { + if (level_i < -shift) { + stateAnext = 1; + indexNx = pair(stateAnext, stateBnext); + } + } + } +#else +#warning "the automaton product function is not compiled with Queue, but with a Stack : \"shift\" parameters cannot be used on this implementation" +#endif + + + int stateNx = 0; + + // final state + int final_state = 0; + + switch (productSetFinalType) { + + case PRODUCT_UNION_FINAL_LOOP: + case PRODUCT_UNION_NO_FINAL_LOOP: + final_state = ((this->_states[stateAnext]._final) || (other._states[stateBnext]._final)) ? TRUE : FALSE; + break; + case PRODUCT_UNION_NO_FINAL_LOOP_ADD: + final_state = ((this->_states[stateAnext]._final) + (other._states[stateBnext]._final)); + break; + + case PRODUCT_INTERSECTION_FINAL_LOOP: + case PRODUCT_INTERSECTION_NO_FINAL_LOOP: + final_state = ((this->_states[stateAnext]._final) && (other._states[stateBnext]._final)) ? TRUE : FALSE; + break; + + case PRODUCT_BUTNOT_FINAL_LOOP: + case PRODUCT_BUTNOT_NO_FINAL_LOOP: + final_state = ((this->_states[stateAnext]._final) && (!(other._states[stateBnext]._final))) ? TRUE : FALSE; + break; + + case PRODUCT_NOTBUT_FINAL_LOOP: + case PRODUCT_NOTBUT_NO_FINAL_LOOP: + final_state = ((!(this->_states[stateAnext]._final)) && (other._states[stateBnext]._final)) ? TRUE : FALSE; + break; + + case PRODUCT_ADDHOC_FINAL_LOOP: + case PRODUCT_ADDHOC_NO_FINAL_LOOP: + final_state = aff(this->_states[stateAnext]._final,other._states[stateBnext]._final); + break; + } + + // add the "new" state, considering booleans "final_state" and "final_state" + if (final_state && final_loop) { + stateNx = StateFinal; + } else { +#ifdef USEMAPPRODUCT + if (statesNbIndex.find(PRODINDEX(indexNx)) == statesNbIndex.end()) { +#else + if (!statesNbIndex[PRODINDEX(indexNx)]) { +#endif + #ifdef USEQUEUEPRODUCT if (level_i <= depth) { #endif @@ -1164,6 +1421,7 @@ public: return result; } + /** @brief Compute the multiple hit automaton * @param m is the number of hits needed to hit an alignment From 2aed369bb21294b287d3f5e3e47650935a7c234b Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 12:05:10 +0100 Subject: [PATCH 015/123] Cleaning unused parameter --- src/automaton.hh | 107 +++-------------------------------------------- src/main.cc | 34 +++++++-------- 2 files changed, 23 insertions(+), 118 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 708aa61..456a31e 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -132,14 +132,6 @@ typedef enum ProductSetFinalType { } ProductSetFinalType; -/** @brief Define the probability family of operators : this is used when performing a product of two automata. - */ -typedef enum ProductProbabilityType { - PRODUCT_NONE_IS_PROBABILIST, - PRODUCT_THIS_IS_PROBABILIST, - PRODUCT_OTHER_IS_PROBABILIST, -} ProductProbabilityType; - /** @brief Define the final value when crossing of a couple of final states values : this is used when performing a product of two automata. */ typedef int (*AddHoc_Final_Func)(int, int); @@ -896,10 +888,6 @@ public: * @li PRODUCT_ADDHOC_xxx : automata addhoc final function aff does this work * with * @li xxx : LOOP / NO_LOOP : indicates if the final state is a single one absorbant (force it, otherwise keep it as in the "true" product) - * @param thisOrOtherIsProbabilist indicates that either one or both of the automata represents a probabilistic model (false by default) - * @li PRODUCT_NONE_IS_PROBABILIST : no affectation for probabilities - * @li PRODUCT_THIS_IS_PROBABILIST : only "this" probability is taken for each transition - * @li PRODUCT_OTHER_IS_PROBABILIST : only "other" probability is taken for each transition * @param depth indicates the maximal depth that must be reached : extra states are non final selflooping states * (by default, this value is greater than 2 Billions, but the given alignment length should be enought in most cases) * @param aff function indicates the final value to be used, is is used when @param productSetFinalType = PRODUCT_ADDHOC_xxx @@ -910,7 +898,6 @@ public: template typename enable_if_ca ::value, automaton * >::type product(const automaton & other, const ProductSetFinalType productSetFinalType, - const ProductProbabilityType thisOrOtherIsProbabilist = PRODUCT_NONE_IS_PROBABILIST, const int depth = INT_INFINITY, const AddHoc_Final_Func aff = NULL, const int shift = 0) const { @@ -1109,51 +1096,10 @@ public: } } - VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); - // add a transition on from stateN --a--> stateNx. - - if (IsVoid() && IsVoid()) { - #warning "T void, U void" - result->addNewTransition(a,stateN,stateNx); - } else { - if (IsVoid() && !IsVoid()) { - #warning "T void, U not void" - switch (thisOrOtherIsProbabilist) { - case PRODUCT_OTHER_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx); - break; - default: - result->addNewTransition(a,stateN,stateNx); - break; - } - } else { - if (!IsVoid() && IsVoid()) { - #warning "T not Void, U void" - switch (thisOrOtherIsProbabilist) { - case PRODUCT_THIS_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx); /* FIXME NOT CORRECt HERE : == to work*/ - break; - default: - result->addNewTransition(a,stateN,stateNx); - break; - } - } else { - #warning "Both not void" - switch (thisOrOtherIsProbabilist) { - case PRODUCT_NONE_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx); - break; - case PRODUCT_THIS_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx);/* FIXME NOT CORRECT HERE : == to work*/ - break; - case PRODUCT_OTHER_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx); - break; - } - } - } - } + // add a transition on from stateN --a--> stateNx. + result->addNewTransition(a,stateN,stateNx); }// for (listB) }// for (listA) }// for (a) @@ -1164,10 +1110,10 @@ public: return result; } - template typename disable_if_ca ::value, automaton * >::type + +template typename disable_if_ca ::value, automaton * >::type product(const automaton & other, const ProductSetFinalType productSetFinalType, - const ProductProbabilityType thisOrOtherIsProbabilist = PRODUCT_NONE_IS_PROBABILIST, const int depth = INT_INFINITY, const AddHoc_Final_Func aff = NULL, const int shift = 0) const { @@ -1369,48 +1315,7 @@ public: VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); // add a transition on from stateN --a--> stateNx. - - if (IsVoid() && IsVoid()) { - #warning "T void, U void" - result->addNewTransition(a,stateN,stateNx); - } else { - if (IsVoid() && !IsVoid()) { - #warning "T void, U not void" - switch (thisOrOtherIsProbabilist) { - case PRODUCT_OTHER_IS_PROBABILIST: - result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); - break; - default: - result->addNewTransition(a,stateN,stateNx); - break; - } - } else { - if (!IsVoid() && IsVoid()) { - #warning "T not Void, U void" - switch (thisOrOtherIsProbabilist) { - case PRODUCT_THIS_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx); /* FIXME NOT CORRECt HERE : == to work*/ - break; - default: - result->addNewTransition(a,stateN,stateNx); - break; - } - } else { - #warning "Both not void" - switch (thisOrOtherIsProbabilist) { - case PRODUCT_NONE_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx); - break; - case PRODUCT_THIS_IS_PROBABILIST: - result->addNewTransition(a,stateN,stateNx);/* FIXME NOT CORRECT HERE : == to work*/ - break; - case PRODUCT_OTHER_IS_PROBABILIST: - result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); - break; - } - } - } - } + result->addNewTransition(a,stateN,stateNx); }// for (listB) }// for (listA) }// for (a) diff --git a/src/main.cc b/src/main.cc index 715a38b..460031c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2925,7 +2925,7 @@ int main(int argc, char * argv[]) { a_homogeneous = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - reduced size : " << (a_homogeneous->size()));); } - automaton * a_product_homogeneous_sens = a_homogeneous->product(a_sens, PRODUCT_BUTNOT_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + automaton * a_product_homogeneous_sens = a_homogeneous->product(a_sens, PRODUCT_BUTNOT_FINAL_LOOP, gv_alignment_length); if (gv_lossless_flag) { pr_div_homogeneous = a_product_homogeneous_sens->PrLossless(gv_alignment_length, gv_lossless_costs_vector, gv_lossless_cost_threshold); @@ -2975,7 +2975,7 @@ int main(int argc, char * argv[]) { automaton * na = a_se; automaton * a_cycle = new automaton(); a_cycle->Automaton_Cycle(gv_xseeds[i]->maxpos(), gv_xseeds[i]->pos(), gv_xseeds[i]->nbpos()); - a_se = (a_se)->product(*a_cycle, gv_xseeds_multihit_flag?PRODUCT_INTERSECTION_NO_FINAL_LOOP:PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + a_se = (a_se)->product(*a_cycle, gv_xseeds_multihit_flag?PRODUCT_INTERSECTION_NO_FINAL_LOOP:PRODUCT_INTERSECTION_FINAL_LOOP, gv_alignment_length); delete a_cycle; delete na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - cycled size : " << (a_se->size()));); @@ -2990,7 +2990,7 @@ int main(int argc, char * argv[]) { // excluded automaton if (i > 0) { automaton * a_excluded_temp = a_excluded; - a_excluded = a_excluded->product(*a_se, gv_xseeds_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + a_excluded = a_excluded->product(*a_se, gv_xseeds_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = excluded product size : " << (a_excluded->size()));); if (gv_minimize_flag) { automaton * na = a_excluded->Hopcroft(); @@ -3026,7 +3026,7 @@ int main(int argc, char * argv[]) { // b) compute the foreground probability if (gv_homogeneous_flag) { - automaton * na = a_excluded->product(*a_homogeneous, PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + automaton * na = a_excluded->product(*a_homogeneous, PRODUCT_INTERSECTION_FINAL_LOOP, gv_alignment_length); delete a_excluded; a_excluded = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = mhits excluded x homogeneous size : " << (a_excluded->size()));); @@ -3039,7 +3039,7 @@ int main(int argc, char * argv[]) { } - automaton * a_xpr_sens = a_excluded->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + automaton * a_xpr_sens = a_excluded->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); if (gv_lossless_flag) { pr_div_excluded = a_xpr_sens->PrLossless(gv_alignment_length, gv_lossless_costs_vector, gv_lossless_cost_threshold); } else { @@ -3260,7 +3260,7 @@ int main(int argc, char * argv[]) { if (gv_lossless_flag) { sel[i] = gv_seeds[i]->selectivityFromWeight(); } else { - automaton * a_pr_s_sel = (a_s[i])->product(a_sel, PRODUCT_UNION_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + automaton * a_pr_s_sel = (a_s[i])->product(a_sel, PRODUCT_UNION_FINAL_LOOP, gv_alignment_length); sel[i] = a_pr_s_sel->Pr(gv_seeds[i]->span()); delete a_pr_s_sel; } @@ -3273,7 +3273,7 @@ int main(int argc, char * argv[]) { automaton * na = a_s[i]; automaton * a_cycle = new automaton(); a_cycle->Automaton_Cycle(gv_seeds[i]->maxpos(), gv_seeds[i]->pos(), gv_seeds[i]->nbpos()); - a_s[i] = (a_s[i])->product(*a_cycle, gv_multihit_flag?PRODUCT_INTERSECTION_NO_FINAL_LOOP:PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + a_s[i] = (a_s[i])->product(*a_cycle, gv_multihit_flag?PRODUCT_INTERSECTION_NO_FINAL_LOOP:PRODUCT_INTERSECTION_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton cycled size : " << (a_s[i]->size()));); delete a_cycle; @@ -3374,7 +3374,7 @@ int main(int argc, char * argv[]) { } // seed not found : do the product and store it if (last_product_index >= 0) { - a_spr = a_spr->product(*(a_s[i]), gv_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + a_spr = a_spr->product(*(a_s[i]), gv_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" + multiseed ["; for (int s = 0; s <= last_product_index; s++) { if (s) cerr << " x "; cerr << (a_s_product_seed[s]+1); @@ -3409,7 +3409,7 @@ int main(int argc, char * argv[]) { for (unsigned i = 0; i < gv_seeds.size(); i++) { if (i != 0) { automaton * a_spr_temp = a_spr; - a_spr = a_spr->product(*(a_s[i]), gv_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + a_spr = a_spr->product(*(a_s[i]), gv_multihit_flag?PRODUCT_UNION_NO_FINAL_LOOP_ADD:PRODUCT_UNION_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = multiseed 1.." << (i) << " x " << (i+1) << " product size : " << (a_spr->size()));); @@ -3452,7 +3452,7 @@ int main(int argc, char * argv[]) { // homogeneous automaton * a_spr_h_res = a_spr_mhits_or_gcov_res; if (gv_homogeneous_flag) { - a_spr_h_res = a_spr_mhits_or_gcov_res->product(*a_homogeneous, PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + a_spr_h_res = a_spr_mhits_or_gcov_res->product(*a_homogeneous, PRODUCT_INTERSECTION_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = homogeneous product size : " << (a_spr_h_res->size()));); @@ -3467,7 +3467,7 @@ int main(int argc, char * argv[]) { // excluded seeds automaton * a_spr_mx_h_res = a_spr_h_res; if (gv_xseeds.size()) { - a_spr_mx_h_res = a_spr_h_res->product(*a_excluded, PRODUCT_BUTNOT_NO_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, gv_alignment_length); + a_spr_mx_h_res = a_spr_h_res->product(*a_excluded, PRODUCT_BUTNOT_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" = mx product size : " << (a_spr_mx_h_res->size()));); @@ -3593,7 +3593,7 @@ int main(int argc, char * argv[]) { #ifndef LOSSLESS_PROB if (gv_hillclimbing_flag) { #endif - automaton * a_spr_mx_h_res_loss = a_spr_mx_h_res->product(a_lossless, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + automaton * a_spr_mx_h_res_loss = a_spr_mx_h_res->product(a_lossless, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); // @note{NOTE : both "reject" and "final" states are final so "final" should not be use to mesure probs} if (gv_minimize_flag) { automaton * na = a_spr_mx_h_res_loss->Hopcroft(); @@ -3697,7 +3697,7 @@ int main(int argc, char * argv[]) { ss >> at; // test 1 - automaton > > * pr = a_spr_mx_h_res->product(at, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + automaton > > * pr = a_spr_mx_h_res->product(at, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); polynomial > pol1 = pr->Pr(gv_alignment_length,true); cout << endl << "(a) [" << pol1 << "]" << endl; polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); @@ -3752,23 +3752,23 @@ int main(int argc, char * argv[]) { double covariance = 0.0; for (unsigned i = 0; i < gv_seeds.size(); i++) { int span_i = gv_seeds[i]->span(); - automaton * a_x_v_i = a_s[i]->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, span_i); + automaton * a_x_v_i = a_s[i]->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, span_i); double x_v_i = a_x_v_i->Pr(span_i); delete a_x_v_i; for (unsigned j = i; j < gv_seeds.size(); j++) { int span_j = gv_seeds[j]->span(); - automaton * a_x_v_j = a_s[j]->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, span_j); + automaton * a_x_v_j = a_s[j]->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, span_j); double x_v_j = a_x_v_j->Pr(span_j); delete a_x_v_j; for (int shift = -span_j+1; shift <= span_i-1; shift++) { int len = MAX(span_i - MIN(shift,0) , span_j + MAX(shift,0)); - automaton * p = a_s[i]->product(*(a_s[j]),PRODUCT_INTERSECTION_FINAL_LOOP, PRODUCT_NONE_IS_PROBABILIST, len, NULL, shift); + automaton * p = a_s[i]->product(*(a_s[j]),PRODUCT_INTERSECTION_FINAL_LOOP, len, NULL, shift); if (gv_minimize_flag) { automaton * na = p->Hopcroft(); delete p; p = na; } - automaton * a_x_cov = p->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, len); + automaton * a_x_cov = p->product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, len); double x_cov = a_x_cov->Pr(len); covariance += x_cov - x_v_i*x_v_j; //cout << "i:" << i << ",j:"<< j << ",shift:" << shift << ":" << (x_cov) << endl; From 02ec747271e6d3808aa8e262d8bd583a67e0abe6 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 12:12:27 +0100 Subject: [PATCH 016/123] Bug : forgotten prob --- src/automaton.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/automaton.hh b/src/automaton.hh index 456a31e..ff354d7 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -1315,7 +1315,7 @@ template typename disable_if_ca ::value, automaton< VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); // add a transition on from stateN --a--> stateNx. - result->addNewTransition(a,stateN,stateNx); + result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); }// for (listB) }// for (listA) }// for (a) From 4fd011df2bebf458d5ab8fd308eed1e9f187e598 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 11:06:37 +0100 Subject: [PATCH 017/123] Adding multipoly to seedproperties --- src/main.cc | 103 ++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 56 deletions(-) diff --git a/src/main.cc b/src/main.cc index 460031c..6577ebb 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2078,7 +2078,7 @@ class seedproperties { public: /** @brief build a "seedproperties" object (keep current seed properties when needed) */ - seedproperties(double sel, double sens, double dist, std::string str, bool lossless = false, vector< pair,BIGINT> > * polynom = NULL) { + seedproperties(double sel, double sens, double dist, std::string str, bool lossless = false, vector< pair,BIGINT> > * polynom = NULL, polynomial > * multipoly = NULL) { this->sel = sel; this->sens = sens; @@ -2089,6 +2089,11 @@ class seedproperties { this->polynom = vector< pair,BIGINT> >(polynom->begin(),polynom->end()); else this->polynom = vector< pair,BIGINT> >(0); + if (multipoly) + this->multipoly = polynomial >(*multipoly); + else + this->multipoly = polynomial >(); + } /** @brief clone a "seedproperties" object @@ -2099,7 +2104,8 @@ class seedproperties { this->dist = other.dist; this->str = string(other.str); this->lossless = other.lossless; - this->polynom = vector< pair,BIGINT> >(other.polynom.begin(),other.polynom.end()); + this->polynom = vector< pair,BIGINT> >(other.polynom.begin(),other.polynom.end()); + this->multipoly = polynomial >(other.multipoly); } @@ -2115,7 +2121,8 @@ class seedproperties { bool lossless; /// keep polynomial factors for multihit / coverage hit /vs/ vector< pair,BIGINT> > polynom; - + /// keep multivariable polynomial for output only + polynomial > multipoly; /** @brief delete a "seedproperties" object (this is just a polynom "check and erase") */ @@ -2224,6 +2231,9 @@ std::ostream& operator<<(std::ostream& os, seedproperties& e){ os << (i->first.first) << "," << (i->first.second) << "=" << (i->second) << ";"; } } + if (gv_multipoly_file_flag) { + os << "\t[" << e.multipoly << "]"; + } return os; } @@ -3479,8 +3489,8 @@ int main(int argc, char * argv[]) { } } - std::vector< pair,BIGINT> > * polynom = NULL; - + std::vector< pair,BIGINT> > * polynom = NULL; + polynomial > * multipoly = NULL; //FIXMECOV>> if (gv_covariance_flag) goto gv_covariance_flag_1; //<< @@ -3664,55 +3674,34 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - //>> - automaton > > at; - std::stringstream ss; - // - ss << "4" << endl - - << "\t0\t1" << endl - << "\t\t0\t1" << endl - << "\t\t\t0\t 1" << endl - << "\t\t1\t1" << endl - << "\t\t\t0\t 1" << endl - - << "\t1\t0" << endl - << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - x*y" << endl - << "\t\t1\t1" << endl - << "\t\t\t3\t x*y" << endl - - << "\t2\t0" << endl - << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - x - y" << endl - << "\t\t1\t1" << endl - << "\t\t\t3\t x + y" << endl - - << "\t3\t0" << endl - << "\t\t0\t1" << endl - << "\t\t\t2\t 1 - x" << endl - << "\t\t1\t1" << endl - << "\t\t\t3\t x" << endl; - - - ss >> at; - // test 1 - automaton > > * pr = a_spr_mx_h_res->product(at, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > pol1 = pr->Pr(gv_alignment_length,true); - cout << endl << "(a) [" << pol1 << "]" << endl; - polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); - cout << endl << "(a) {" << inv_pol1 << "}" << endl; - cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; - - // test 2 - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(at, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); - cout << endl << "(b) [" << pol2 << "]" << endl; - polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); - cout << endl << "(b) {" << inv_pol2 << "}" << endl; - cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; - //<< - + // Multinomial evaluation can be enabled in that case (FIXME : free memory) + if (gv_multipoly_file_flag) { + /* + // test 1 on polynomials + automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + polynomial > pol1 = pr->Pr(gv_alignment_length,true); + cout << endl << "(a) [" << pol1 << "]" << endl; + polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); + cout << endl << "(a) {" << inv_pol1 << "}" << endl; + cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; + delete pr; + + // test 2 on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); + cout << endl << "(b) [" << pol2 << "]" << endl; + polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); + cout << endl << "(b) {" << inv_pol2 << "}" << endl; + cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; + delete m_pr; + */ + // implemented on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > mpol = m_pr->Pr(gv_alignment_length,true); + multipoly = new polynomial >(mpol); + delete m_pr; + } + sens = m_pr_sens->Pr(gv_alignment_length, true); delete m_pr_sens; } @@ -3798,13 +3787,15 @@ int main(int argc, char * argv[]) { outs << ","; outs << (gv_seeds[i])->str(); } - seedproperties e = seedproperties(selp, sens, distance, outs.str(), lossless, polynom); + seedproperties e = seedproperties(selp, sens, distance, outs.str(), lossless, polynom, multipoly); if (gv_correlation_flag || gv_polynomial_output_flag || gv_polynomial_dominant_selection_flag) { polynom->clear(); delete polynom; } - + if (gv_multipoly_file_flag) { + delete multipoly; + } // // (5) insertion inside pareto set // From cb6e5b1d831caee31929cb443845d08bb04fda41 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 11:06:37 +0100 Subject: [PATCH 018/123] Adding multipoly to seedproperties From 050101702ade388945c3dbd57b4e15f86915fe33 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 08:43:42 +0100 Subject: [PATCH 019/123] Updating help --- src/main.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.cc b/src/main.cc index 6577ebb..4dc473a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -365,7 +365,8 @@ void USAGE() { cerr << " * -y/g note : -y/-g can be used with SPEARMAN/PEARSON correlation with the alignment %%id (only for -A 2)." << endl; cerr << " you can select the minimal number of matches (%%id) by setting -y before -y " << endl; cerr << " * example : \"-spaced -l 64 -y 32 -y PEARSON\" for a %%id of 50%% and PEARSON correlation computation" << endl; - cerr << " -p : activate \"Mak Benson 2009\" dominant selection and output polynomial (useful on Bernoulli only)" << endl; + cerr << " -p : activate \"Mak Benson 2009\" dominant selection and output polynomial." << endl; + cerr << " * note : this is useful for iid models only (Bernoulli,...) " << endl; cerr << " * example : \"-spaced -l 8 -m \"##-#\" -p\" must output the additional values :"<< endl; cerr << " 0,0=1;1,0=8;2,0=28;3,0=51;4,0=45;5,0=15;6,0=1;"<< endl; cerr << " 3,1=5;4,1=25;5,1=41;6,1=27;7,1=8;8,1=1;" << endl; @@ -377,6 +378,9 @@ void USAGE() { cerr << " 0 8-0 1 8-1 2 8-2 3 8-3 4 8-4 5 8-5 6 8-6" << endl; cerr << " 1.p.q + 8.p.q + 28.p.q + 51.p.q + 45.p.q + 15.p.q + 1.p.q" << endl; cerr << " " << endl; + cerr << " -pF : activate general polynomial evaluation and load the associated file automaton [ONGOING]" << endl; + cerr << " * example : [ONGOING]"<< endl; + cerr << " " << endl; cerr << " -c ,,... : consider sensitivity when each seed is indexed on 1/c of its positions" << endl; cerr << " * note : the position is enumerated or choosen randomly depending on -r parameter" << endl; cerr << " * example : \"##-#:1/5\" means that the seed \"##-#\" will be placed at 1st,6th,11th... positions" << endl; @@ -1629,8 +1633,7 @@ void SCANARG(int argc , char ** argv) { for (int i = 0; i < gv_seed_alphabet_size; i++) gv_global_coverage_cost[i] = i; } else if (!strcmp(argv[i],"-p")||!strcmp(argv[i],"--polynomial-dominance")) { - //FIXME check several parameters incompatible with dominant selection and output - //>> + ///@todo{FIXME : check several parameters incompatible with dominant selection and output} gv_polynomial_output_flag = true; gv_polynomial_dominant_selection_flag = true; #ifndef USEINFINT @@ -1638,7 +1641,6 @@ void SCANARG(int argc , char ** argv) { _WARNING("this binary has been compiled with undefined USEINFINT (no infinite precision integer)","Polynomial coefficients count on may overflow ...\n you can compile this program with USEINFINT defined (-DUSEINFINT) but it will be much slower"); } #endif - //<< } else if (!strcmp(argv[i],"-c")||!strcmp(argv[i],"--cycles")) { if (gv_motif_flag) { _ERROR("\"-c\" pattern and \"-m\" are not compatible together", "you must provide the cycle positions on the shape (e.g \" -m 100101001:1, 3, 5/6\") "); From d4442be95389fe0c0928bff3ab58b49634536fe4 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 09:11:50 +0100 Subject: [PATCH 020/123] Merging with multivariate_polynomial --- src/.dirstamp | 0 src/main.cc | 41 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 src/.dirstamp diff --git a/src/.dirstamp b/src/.dirstamp new file mode 100644 index 0000000..e69de29 diff --git a/src/main.cc b/src/main.cc index 4dc473a..5165725 100644 --- a/src/main.cc +++ b/src/main.cc @@ -264,6 +264,15 @@ bool gv_polynomial_output_flag = false; /// flag that activate the selection of dominant seeds as in "Mak Benson 2009", which is also true for "Chung Park 2010" /// (and not the selection according to their sensitivity only: its a more general form that may select more seeds) bool gv_polynomial_dominant_selection_flag = false; + + + +/// flag that activate multinomial evaluation (note : this is independent from the previous dominance selection). Note that this is only a polynomial evaluation, and does not have any other effect than ... FIXME +bool gv_multipoly_file_flag = false; +automaton > > * gv_multipoly_bsens_automaton = NULL; + + + // @} /** @name data management @@ -724,7 +733,7 @@ void PARSEPROBS(int & i, char ** argv, int argc, void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton ** p_a) { i++; if (i >= argc) - _ERROR("PARSEPROBAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); + _ERROR("PARSEPROBSAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); // read file ifstream ifs_file; @@ -741,6 +750,27 @@ void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton } +/// parse and check a set of polynomial probabilities as an automaton file +void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > > ** p_a) { + i++; + if (i >= argc) + _ERROR("PARSEPOLYPROBSAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); + + // read file + ifstream ifs_file; + ifs_file.open(argv[i]); + if (!ifs_file){ + _ERROR("PARSEPOLYPROBSAUTOMATONFILE","unreadable file \"" << (argv[i]) << "\" "); + } + + // read the content and set the automaton + *p_a = new automaton > >(); + + ifs_file >> (**p_a); + ifs_file.close(); +} + + /// set of states on a matrix input @see PARSEMATRIX typedef enum { @@ -1472,7 +1502,7 @@ void SCANARG(int argc , char ** argv) { } else if (!strcmp(argv[i],"-f")||!strcmp(argv[i],"--foreground")) { PARSEPROBS(i, argv, argc, gv_bsens, gv_bsens_k); } else if (!strcmp(argv[i],"-fF")||!strcmp(argv[i],"--foregroundFile")) { - PARSEPROBSAUTOMATONFILE(i, argv, argc,&gv_bsens_automaton); + PARSEPROBSAUTOMATONFILE(i, argv, argc, &gv_bsens_automaton); } else if (!strcmp(argv[i],"-l")||!strcmp(argv[i],"--length")) { PARSEINT(i, argv, argc, gv_alignment_length, 1, 1000000); if (gv_subalignment_flag && gv_subalignment_length >= gv_alignment_length) { @@ -1641,6 +1671,10 @@ void SCANARG(int argc , char ** argv) { _WARNING("this binary has been compiled with undefined USEINFINT (no infinite precision integer)","Polynomial coefficients count on may overflow ...\n you can compile this program with USEINFINT defined (-DUSEINFINT) but it will be much slower"); } #endif + } else if (!strcmp(argv[i],"-pF")||!strcmp(argv[i],"--multipolynomial-file")) { + ///@todo{FIXME : check several parameters incompatible with dominant selection and output} + gv_multipoly_file_flag = true; + PARSEMULTIPOLYAUTOMATONFILE(i, argv, argc, &gv_multipoly_bsens_automaton); } else if (!strcmp(argv[i],"-c")||!strcmp(argv[i],"--cycles")) { if (gv_motif_flag) { _ERROR("\"-c\" pattern and \"-m\" are not compatible together", "you must provide the cycle positions on the shape (e.g \" -m 100101001:1, 3, 5/6\") "); @@ -3676,7 +3710,7 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - // Multinomial evaluation can be enabled in that case (FIXME : free memory) + // Multinomial evaluation can be enabled in that case if (gv_multipoly_file_flag) { /* // test 1 on polynomials @@ -3687,7 +3721,6 @@ int main(int argc, char * argv[]) { cout << endl << "(a) {" << inv_pol1 << "}" << endl; cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; delete pr; - // test 2 on matrices matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); From ded88d1053bbed32a6949e5eb32c7bdedc5245c1 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 11:06:37 +0100 Subject: [PATCH 021/123] Merging with multivariate_polynomial final step --- src/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 5165725..cdefc10 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3710,7 +3710,7 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - // Multinomial evaluation can be enabled in that case + // Multinomial evaluation can be enabled in that case (FIXME : free memory) if (gv_multipoly_file_flag) { /* // test 1 on polynomials @@ -3721,6 +3721,7 @@ int main(int argc, char * argv[]) { cout << endl << "(a) {" << inv_pol1 << "}" << endl; cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; delete pr; + // test 2 on matrices matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); From 148bcaf40a10772cd2a7e6bb986c917b83cbdb9d Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 12:55:32 +0100 Subject: [PATCH 022/123] Checking std::tr1 or std --- src/automaton.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index ff354d7..202f95f 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -895,7 +895,11 @@ public: * @return a new automaton that only gives reachable states of the product * @see matrix_product */ +#ifdef HAS_STD_TYPE_TRAITS template typename enable_if_ca ::value, automaton * >::type +#else + template typename enable_if_ca ::value, automaton * >::type +#endif product(const automaton & other, const ProductSetFinalType productSetFinalType, const int depth = INT_INFINITY, @@ -1110,8 +1114,11 @@ public: return result; } - -template typename disable_if_ca ::value, automaton * >::type +#ifdef HAS_STD_TYPE_TRAITS + template typename disable_if_ca ::value, automaton * >::type +#else + template typename disable_if_ca ::value, automaton * >::type +#endif product(const automaton & other, const ProductSetFinalType productSetFinalType, const int depth = INT_INFINITY, From 2ea5925333f40df526c9938723b08dc4097f8b58 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 12:58:39 +0100 Subject: [PATCH 023/123] Cleaning spaces --- src/automaton.hh | 32 ++++++++++++------------- src/main.cc | 62 ++++++++++++++++++++++++------------------------ 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 202f95f..9b31b9c 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -901,10 +901,10 @@ public: template typename enable_if_ca ::value, automaton * >::type #endif product(const automaton & other, - const ProductSetFinalType productSetFinalType, - const int depth = INT_INFINITY, - const AddHoc_Final_Func aff = NULL, - const int shift = 0) const { + const ProductSetFinalType productSetFinalType, + const int depth = INT_INFINITY, + const AddHoc_Final_Func aff = NULL, + const int shift = 0) const { VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("== Product == (productsetfinaltype:" << dec << productSetFinalType << ")");); @@ -1100,10 +1100,10 @@ public: } } - VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); - // add a transition on from stateN --a--> stateNx. - result->addNewTransition(a,stateN,stateNx); + // add a transition on from stateN --a--> stateNx. + result->addNewTransition(a,stateN,stateNx); }// for (listB) }// for (listA) }// for (a) @@ -1120,11 +1120,11 @@ public: template typename disable_if_ca ::value, automaton * >::type #endif product(const automaton & other, - const ProductSetFinalType productSetFinalType, - const int depth = INT_INFINITY, - const AddHoc_Final_Func aff = NULL, - const int shift = 0) const { - + const ProductSetFinalType productSetFinalType, + const int depth = INT_INFINITY, + const AddHoc_Final_Func aff = NULL, + const int shift = 0) const { + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("== Product == (productsetfinaltype:" << dec << productSetFinalType << ")");); #ifdef ASSERTB @@ -1322,7 +1322,7 @@ public: VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); // add a transition on from stateN --a--> stateNx. - result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); + result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); }// for (listB) }// for (listA) }// for (a) @@ -1333,7 +1333,7 @@ public: return result; } - + /** @brief Compute the multiple hit automaton * @param m is the number of hits needed to hit an alignment @@ -2323,9 +2323,9 @@ template int automaton::Automaton_SeedLinearMatching (const seed for (int a = 0; a < gv_align_alphabet_size; a++){ if (MATCHES_AB(a,b)){ - addNewTransition(a,Prevstate_I,Nextstate_I); + addNewTransition(a,Prevstate_I,Nextstate_I); } else { - addNewTransition(a,Prevstate_I,RejectBagstate_I); + addNewTransition(a,Prevstate_I,RejectBagstate_I); } } Prevstate_I = Nextstate_I; diff --git a/src/main.cc b/src/main.cc index cdefc10..60f0542 100644 --- a/src/main.cc +++ b/src/main.cc @@ -389,7 +389,7 @@ void USAGE() { cerr << " " << endl; cerr << " -pF : activate general polynomial evaluation and load the associated file automaton [ONGOING]" << endl; cerr << " * example : [ONGOING]"<< endl; - cerr << " " << endl; + cerr << " " << endl; cerr << " -c ,,... : consider sensitivity when each seed is indexed on 1/c of its positions" << endl; cerr << " * note : the position is enumerated or choosen randomly depending on -r parameter" << endl; cerr << " * example : \"##-#:1/5\" means that the seed \"##-#\" will be placed at 1st,6th,11th... positions" << endl; @@ -2129,7 +2129,7 @@ class seedproperties { this->multipoly = polynomial >(*multipoly); else this->multipoly = polynomial >(); - + } /** @brief clone a "seedproperties" object @@ -3710,34 +3710,34 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - // Multinomial evaluation can be enabled in that case (FIXME : free memory) - if (gv_multipoly_file_flag) { - /* - // test 1 on polynomials - automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); - polynomial > pol1 = pr->Pr(gv_alignment_length,true); - cout << endl << "(a) [" << pol1 << "]" << endl; - polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); - cout << endl << "(a) {" << inv_pol1 << "}" << endl; - cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; - delete pr; - - // test 2 on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); - cout << endl << "(b) [" << pol2 << "]" << endl; - polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); - cout << endl << "(b) {" << inv_pol2 << "}" << endl; - cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; - delete m_pr; - */ - // implemented on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > mpol = m_pr->Pr(gv_alignment_length,true); - multipoly = new polynomial >(mpol); - delete m_pr; - } - + // Multinomial evaluation can be enabled in that case + if (gv_multipoly_file_flag) { + /* + // test 1 on polynomials + automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + polynomial > pol1 = pr->Pr(gv_alignment_length,true); + cout << endl << "(a) [" << pol1 << "]" << endl; + polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); + cout << endl << "(a) {" << inv_pol1 << "}" << endl; + cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; + delete pr; + + // test 2 on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); + cout << endl << "(b) [" << pol2 << "]" << endl; + polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); + cout << endl << "(b) {" << inv_pol2 << "}" << endl; + cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; + delete m_pr; + */ + // implemented on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > mpol = m_pr->Pr(gv_alignment_length,true); + multipoly = new polynomial >(mpol); + delete m_pr; + } + sens = m_pr_sens->Pr(gv_alignment_length, true); delete m_pr_sens; } @@ -3830,7 +3830,7 @@ int main(int argc, char * argv[]) { delete polynom; } if (gv_multipoly_file_flag) { - delete multipoly; + delete multipoly; } // // (5) insertion inside pareto set From a90f77c0ff8f0831b386cb9616548f480d6d93cb Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 14:10:09 +0100 Subject: [PATCH 024/123] Updating compiling issues on g++-mp-4.7 --- src/automaton.hh | 8 +++++++- src/infint.hh | 5 ----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 9b31b9c..5491a27 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -2125,7 +2125,13 @@ protected: * @param endingState is the ending state * @param prob is the new probability */ - template typename disable_if_ca ::value, void>::type addNewTransitionProb(const int a , const int startingState , const int endingState, const Q prob) { + +#ifdef HAS_STD_TYPE_TRAITS + template typename disable_if_ca ::value, void >::type +#else + template typename disable_if_ca ::value, void >::type +#endif + addNewTransitionProb(const int a , const int startingState , const int endingState, const U prob) { #ifdef ASSERTB if (a < 0 || a >= gv_align_alphabet_size) { diff --git a/src/infint.hh b/src/infint.hh index a3cc814..ac3050b 100644 --- a/src/infint.hh +++ b/src/infint.hh @@ -59,9 +59,6 @@ #include #include - -#ifdef _WIN32 - #ifndef LONG_LONG_MIN #define LONG_LONG_MIN LLONG_MIN #endif @@ -78,8 +75,6 @@ #define ULONG_LONG_MAX ULLONG_MAX #endif -#endif - /** From d4ed0c60e348d87c5994541919092c426bf9cf73 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 14:10:15 +0100 Subject: [PATCH 025/123] Updating compiling issues on g++-mp-4.7 --- configure.ac | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index 999810e..9c07db2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,9 @@ # Check for type traits in and std namespace - -AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ +AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX11], [ AC_LANG_PUSH([C++]) - AC_MSG_CHECKING([for type traits or , for std or std:tr1, and if compiler option -std=c++0x is needed]) + AC_MSG_CHECKING([for type traits or , for std or std:tr1, and if compiler option -std=c++11 is needed]) acx_type_traits=no # (1) =========================== no compiler option =========================== @@ -14,7 +13,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -30,7 +29,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -46,7 +45,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -62,7 +61,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -77,12 +76,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -100,12 +99,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -123,12 +122,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -146,12 +145,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -193,7 +192,7 @@ CXXFLAGS="" AC_PROG_CXX AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h]) AC_CHECK_FUNCS([gettimeofday sqrt strdup strtol]) -ACX_CHECK_TYPE_TRAITS_CXX0X +ACX_CHECK_TYPE_TRAITS_CXX11 LIBS="$LIBS -lm" AC_SUBST(CXXFLAGS) AC_SUBST(LIBS) From 58a51ff48171eccd20eaf5b70f904b88fd8dd2f7 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 14:10:53 +0100 Subject: [PATCH 026/123] Updating compiling issues on g++-mp-4.7 --- configure | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 54b6f2f..94af7a7 100755 --- a/configure +++ b/configure @@ -3883,8 +3883,8 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type traits or , for std or std:tr1, and if compiler option -std=c++0x is needed" >&5 -$as_echo_n "checking for type traits or , for std or std:tr1, and if compiler option -std=c++0x is needed... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type traits or , for std or std:tr1, and if compiler option -std=c++11 is needed" >&5 +$as_echo_n "checking for type traits or , for std or std:tr1, and if compiler option -std=c++11 is needed... " >&6; } acx_type_traits=no # (1) =========================== no compiler option =========================== @@ -3897,7 +3897,7 @@ $as_echo_n "checking for type traits or , for std int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -3927,7 +3927,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; @@ -3957,7 +3957,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -3987,7 +3987,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; @@ -4013,7 +4013,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4021,7 +4021,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -4050,7 +4050,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4058,7 +4058,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; @@ -4087,7 +4087,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4095,7 +4095,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -4124,7 +4124,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4132,7 +4132,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; From f6aa58bb597604c7df87ddd3e2257424307cfe49 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 12:58:39 +0100 Subject: [PATCH 027/123] Cleaning spaces Updating compiling issues on g++-mp-4.7 Updating compiling issues on g++-mp-4.7 --- configure.ac | 31 ++++++++++++------------ src/automaton.hh | 40 ++++++++++++++++++------------- src/infint.hh | 5 ---- src/main.cc | 62 ++++++++++++++++++++++++------------------------ 4 files changed, 69 insertions(+), 69 deletions(-) diff --git a/configure.ac b/configure.ac index 999810e..9c07db2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,9 @@ # Check for type traits in and std namespace - -AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ +AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX11], [ AC_LANG_PUSH([C++]) - AC_MSG_CHECKING([for type traits or , for std or std:tr1, and if compiler option -std=c++0x is needed]) + AC_MSG_CHECKING([for type traits or , for std or std:tr1, and if compiler option -std=c++11 is needed]) acx_type_traits=no # (1) =========================== no compiler option =========================== @@ -14,7 +13,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -30,7 +29,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -46,7 +45,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -62,7 +61,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -77,12 +76,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -100,12 +99,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -123,12 +122,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::is_arithmetic isArithmeticT;]] + [[typedef std::is_void isVoidT;]] ) ], [ @@ -146,12 +145,12 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX0X], [ if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], - [[typedef std::tr1::is_arithmetic isArithmeticT;]] + [[typedef std::tr1::is_void isVoidT;]] ) ], [ @@ -193,7 +192,7 @@ CXXFLAGS="" AC_PROG_CXX AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h]) AC_CHECK_FUNCS([gettimeofday sqrt strdup strtol]) -ACX_CHECK_TYPE_TRAITS_CXX0X +ACX_CHECK_TYPE_TRAITS_CXX11 LIBS="$LIBS -lm" AC_SUBST(CXXFLAGS) AC_SUBST(LIBS) diff --git a/src/automaton.hh b/src/automaton.hh index 202f95f..5491a27 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -901,10 +901,10 @@ public: template typename enable_if_ca ::value, automaton * >::type #endif product(const automaton & other, - const ProductSetFinalType productSetFinalType, - const int depth = INT_INFINITY, - const AddHoc_Final_Func aff = NULL, - const int shift = 0) const { + const ProductSetFinalType productSetFinalType, + const int depth = INT_INFINITY, + const AddHoc_Final_Func aff = NULL, + const int shift = 0) const { VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("== Product == (productsetfinaltype:" << dec << productSetFinalType << ")");); @@ -1100,10 +1100,10 @@ public: } } - VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); - // add a transition on from stateN --a--> stateNx. - result->addNewTransition(a,stateN,stateNx); + // add a transition on from stateN --a--> stateNx. + result->addNewTransition(a,stateN,stateNx); }// for (listB) }// for (listA) }// for (a) @@ -1120,11 +1120,11 @@ public: template typename disable_if_ca ::value, automaton * >::type #endif product(const automaton & other, - const ProductSetFinalType productSetFinalType, - const int depth = INT_INFINITY, - const AddHoc_Final_Func aff = NULL, - const int shift = 0) const { - + const ProductSetFinalType productSetFinalType, + const int depth = INT_INFINITY, + const AddHoc_Final_Func aff = NULL, + const int shift = 0) const { + VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("== Product == (productsetfinaltype:" << dec << productSetFinalType << ")");); #ifdef ASSERTB @@ -1322,7 +1322,7 @@ public: VERB_FILTER(VERBOSITY_DEBUGGING, INFO__("> add transition ( a:" << dec << a << ", q1:" << dec << stateN << ", q2:" << stateNx << " ) ");); // add a transition on from stateN --a--> stateNx. - result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); + result->addNewTransitionProb(a,stateN,stateNx,iterB->_prob); }// for (listB) }// for (listA) }// for (a) @@ -1333,7 +1333,7 @@ public: return result; } - + /** @brief Compute the multiple hit automaton * @param m is the number of hits needed to hit an alignment @@ -2125,7 +2125,13 @@ protected: * @param endingState is the ending state * @param prob is the new probability */ - template typename disable_if_ca ::value, void>::type addNewTransitionProb(const int a , const int startingState , const int endingState, const Q prob) { + +#ifdef HAS_STD_TYPE_TRAITS + template typename disable_if_ca ::value, void >::type +#else + template typename disable_if_ca ::value, void >::type +#endif + addNewTransitionProb(const int a , const int startingState , const int endingState, const U prob) { #ifdef ASSERTB if (a < 0 || a >= gv_align_alphabet_size) { @@ -2323,9 +2329,9 @@ template int automaton::Automaton_SeedLinearMatching (const seed for (int a = 0; a < gv_align_alphabet_size; a++){ if (MATCHES_AB(a,b)){ - addNewTransition(a,Prevstate_I,Nextstate_I); + addNewTransition(a,Prevstate_I,Nextstate_I); } else { - addNewTransition(a,Prevstate_I,RejectBagstate_I); + addNewTransition(a,Prevstate_I,RejectBagstate_I); } } Prevstate_I = Nextstate_I; diff --git a/src/infint.hh b/src/infint.hh index a3cc814..ac3050b 100644 --- a/src/infint.hh +++ b/src/infint.hh @@ -59,9 +59,6 @@ #include #include - -#ifdef _WIN32 - #ifndef LONG_LONG_MIN #define LONG_LONG_MIN LLONG_MIN #endif @@ -78,8 +75,6 @@ #define ULONG_LONG_MAX ULLONG_MAX #endif -#endif - /** diff --git a/src/main.cc b/src/main.cc index cdefc10..60f0542 100644 --- a/src/main.cc +++ b/src/main.cc @@ -389,7 +389,7 @@ void USAGE() { cerr << " " << endl; cerr << " -pF : activate general polynomial evaluation and load the associated file automaton [ONGOING]" << endl; cerr << " * example : [ONGOING]"<< endl; - cerr << " " << endl; + cerr << " " << endl; cerr << " -c ,,... : consider sensitivity when each seed is indexed on 1/c of its positions" << endl; cerr << " * note : the position is enumerated or choosen randomly depending on -r parameter" << endl; cerr << " * example : \"##-#:1/5\" means that the seed \"##-#\" will be placed at 1st,6th,11th... positions" << endl; @@ -2129,7 +2129,7 @@ class seedproperties { this->multipoly = polynomial >(*multipoly); else this->multipoly = polynomial >(); - + } /** @brief clone a "seedproperties" object @@ -3710,34 +3710,34 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - // Multinomial evaluation can be enabled in that case (FIXME : free memory) - if (gv_multipoly_file_flag) { - /* - // test 1 on polynomials - automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); - polynomial > pol1 = pr->Pr(gv_alignment_length,true); - cout << endl << "(a) [" << pol1 << "]" << endl; - polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); - cout << endl << "(a) {" << inv_pol1 << "}" << endl; - cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; - delete pr; - - // test 2 on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); - cout << endl << "(b) [" << pol2 << "]" << endl; - polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); - cout << endl << "(b) {" << inv_pol2 << "}" << endl; - cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; - delete m_pr; - */ - // implemented on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > mpol = m_pr->Pr(gv_alignment_length,true); - multipoly = new polynomial >(mpol); - delete m_pr; - } - + // Multinomial evaluation can be enabled in that case + if (gv_multipoly_file_flag) { + /* + // test 1 on polynomials + automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + polynomial > pol1 = pr->Pr(gv_alignment_length,true); + cout << endl << "(a) [" << pol1 << "]" << endl; + polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); + cout << endl << "(a) {" << inv_pol1 << "}" << endl; + cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; + delete pr; + + // test 2 on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); + cout << endl << "(b) [" << pol2 << "]" << endl; + polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); + cout << endl << "(b) {" << inv_pol2 << "}" << endl; + cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; + delete m_pr; + */ + // implemented on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > mpol = m_pr->Pr(gv_alignment_length,true); + multipoly = new polynomial >(mpol); + delete m_pr; + } + sens = m_pr_sens->Pr(gv_alignment_length, true); delete m_pr_sens; } @@ -3830,7 +3830,7 @@ int main(int argc, char * argv[]) { delete polynom; } if (gv_multipoly_file_flag) { - delete multipoly; + delete multipoly; } // // (5) insertion inside pareto set From 093acf35dd4523d38255ffc7f25504f454bce32e Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 14:10:53 +0100 Subject: [PATCH 028/123] Updating compiling issues on g++-mp-4.7 --- configure | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 54b6f2f..94af7a7 100755 --- a/configure +++ b/configure @@ -3883,8 +3883,8 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type traits or , for std or std:tr1, and if compiler option -std=c++0x is needed" >&5 -$as_echo_n "checking for type traits or , for std or std:tr1, and if compiler option -std=c++0x is needed... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type traits or , for std or std:tr1, and if compiler option -std=c++11 is needed" >&5 +$as_echo_n "checking for type traits or , for std or std:tr1, and if compiler option -std=c++11 is needed... " >&6; } acx_type_traits=no # (1) =========================== no compiler option =========================== @@ -3897,7 +3897,7 @@ $as_echo_n "checking for type traits or , for std int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -3927,7 +3927,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; @@ -3957,7 +3957,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -3987,7 +3987,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; @@ -4013,7 +4013,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4021,7 +4021,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -4050,7 +4050,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4058,7 +4058,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; @@ -4087,7 +4087,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4095,7 +4095,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::is_arithmetic isArithmeticT; +typedef std::is_void isVoidT; ; return 0; @@ -4124,7 +4124,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_type_traits" = no; then ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + CXXFLAGS="$CXXFLAGS -std=c++11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4132,7 +4132,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main () { -typedef std::tr1::is_arithmetic isArithmeticT; +typedef std::tr1::is_void isVoidT; ; return 0; From fa00e0d376d1856ac5ad5f39c6901eab7a63f7ac Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 14:42:37 +0100 Subject: [PATCH 029/123] Updating NEWS --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f5153fd..15d413c 100644 --- a/NEWS +++ b/NEWS @@ -152,4 +152,4 @@ Version 1.07 - A Full Templating of the automaton class has been applied to the program (it can handle ,>, >,...) -- Polynomial ongoing +- Multivariate polynomial are command-lined (output only, no seed selection) From dcf946128a9c181432cfa70f53d4f29dd1eb84d5 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 14:45:59 +0100 Subject: [PATCH 030/123] Updating NEWS --- NEWS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index f5153fd..115d5c8 100644 --- a/NEWS +++ b/NEWS @@ -149,7 +149,8 @@ Version 1.06 Version 1.07 ============ - - A Full Templating of the automaton class has been applied to the program (it can handle ,>, >,...) -- Polynomial ongoing +- Multivariate polynomial are command-lined (output only, no seed selection) +- A automaton templating has been enabled (no additional unused values + are stored on transitions) From 821c5856391ff6616eb975c0d315ddab72c59746 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Jan 2017 21:19:42 +0100 Subject: [PATCH 031/123] Updating "-h" help and minor formating --- src/main.cc | 73 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/src/main.cc b/src/main.cc index 67a4380..25acb8e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -387,9 +387,20 @@ void USAGE() { cerr << " 0 8-0 1 8-1 2 8-2 3 8-3 4 8-4 5 8-5 6 8-6" << endl; cerr << " 1.p.q + 8.p.q + 28.p.q + 51.p.q + 45.p.q + 15.p.q + 1.p.q" << endl; cerr << " " << endl; - cerr << " -pF : activate general polynomial evaluation and load the associated file automaton [ONGOING]" << endl; - cerr << " * example : [ONGOING]"<< endl; + cerr << " -pF : activate general polynomial evaluation and load the associated file automaton." << endl; + cerr << " * example : \"-spaced -l 5 -m \"##-#\" -pF _file_\" where the _file_ is:" << endl; + cerr << " " << endl; + cerr << " |3 0 1 0 0" << endl; + cerr << " | 1 0" << endl; + cerr << " | 1 0 0 1 1 x" << endl; + cerr << " | 1 1 2 1 - x" << endl; + cerr << " | 2 0 0 1 1 1 - y" << endl; + cerr << " | 1 1 2 y" << endl; + cerr << " " << endl; + cerr << " will give the following result:" << endl; cerr << " " << endl; + cerr << " [y - x*y - x*y^2 + 2*x*y^3 - x^2*y + 2*x^2*y^2 - 2*x^2*y^3 + x^3*y - x^3*y^2]" << endl; + cerr << " " << endl; cerr << " -c ,,... : consider sensitivity when each seed is indexed on 1/c of its positions" << endl; cerr << " * note : the position is enumerated or choosen randomly depending on -r parameter" << endl; cerr << " * example : \"##-#:1/5\" means that the seed \"##-#\" will be placed at 1st,6th,11th... positions" << endl; @@ -3710,34 +3721,34 @@ int main(int argc, char * argv[]) { matrix * m_pr_sens = a_spr_mx_h_res->matrix_pr_product(a_sens, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); VERB_FILTER(VERBOSITY_ANNOYING, INFO__("= prob matrix product size : " << (m_pr_sens->size()));); - // Multinomial evaluation can be enabled in that case (FIXME : free memory) - if (gv_multipoly_file_flag) { - /* - // test 1 on polynomials - automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); - polynomial > pol1 = pr->Pr(gv_alignment_length,true); - cout << endl << "(a) [" << pol1 << "]" << endl; - polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); - cout << endl << "(a) {" << inv_pol1 << "}" << endl; - cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; - delete pr; - - // test 2 on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); - cout << endl << "(b) [" << pol2 << "]" << endl; - polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); - cout << endl << "(b) {" << inv_pol2 << "}" << endl; - cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; - delete m_pr; - */ - // implemented on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > mpol = m_pr->Pr(gv_alignment_length,true); - multipoly = new polynomial >(mpol); - delete m_pr; - } - + // Multinomial evaluation can be enabled in that case (FIXME : free memory) + if (gv_multipoly_file_flag) { + /* + // test 1 on polynomials + automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + polynomial > pol1 = pr->Pr(gv_alignment_length,true); + cout << endl << "(a) [" << pol1 << "]" << endl; + polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); + cout << endl << "(a) {" << inv_pol1 << "}" << endl; + cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; + delete pr; + + // test 2 on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); + cout << endl << "(b) [" << pol2 << "]" << endl; + polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); + cout << endl << "(b) {" << inv_pol2 << "}" << endl; + cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; + delete m_pr; + */ + // implemented on matrices + matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial > mpol = m_pr->Pr(gv_alignment_length,true); + multipoly = new polynomial >(mpol); + delete m_pr; + } + sens = m_pr_sens->Pr(gv_alignment_length, true); delete m_pr_sens; } @@ -3830,7 +3841,7 @@ int main(int argc, char * argv[]) { delete polynom; } if (gv_multipoly_file_flag) { - delete multipoly; + delete multipoly; } // // (5) insertion inside pareto set From a574b21ccd6cc11012cb3df47b5fdfaed23d06c5 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 13 Jan 2017 09:02:55 +0100 Subject: [PATCH 032/123] Polynomial memory cleaning --- src/polynomial.hh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 165360b..e00f43c 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -39,12 +39,12 @@ template class polynomial { public: /// Build an empty polynomial - polynomial() {_coefs.clear();}; + polynomial() {for(unsigned u = 0; u < _coefs.size(); u++) _coefs[u].first.clear(); _coefs.clear();}; /// Build a constant polynomial - polynomial(int u) {_coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(0), C(u)));}; + polynomial(int u) {for(unsigned u = 0; u < _coefs.size(); u++) _coefs[u].first.clear(); _coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(0), C(u)));}; /// Erase a polynomial - ~polynomial() {_coefs.clear();}; + ~polynomial() {for(unsigned u = 0; u < _coefs.size(); u++) _coefs[u].first.clear(); _coefs.clear();}; // @{ /// Operator @f$ + @f$ for two polynomials @@ -244,6 +244,8 @@ template inline polynomial operator* (const polynomial & l, co if (it->second != C(0)) result._coefs.push_back(pair, C> (vector(it->first),it->second)); + tmp_coefs.clear(); + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("\t = [" << result << "]");); return result; } From d5d283b20650611b9e2571700c4f3c3194e9be0b Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 13 Jan 2017 09:47:08 +0100 Subject: [PATCH 033/123] Updating memory cleaning --- src/main.cc | 19 ++++++++++++++----- src/polynomial.hh | 12 ++++++------ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/main.cc b/src/main.cc index 49d01fc..31eea42 100644 --- a/src/main.cc +++ b/src/main.cc @@ -396,9 +396,9 @@ void USAGE() { cerr << " | 1 1 2 1 - x" << endl; cerr << " | 2 0 0 1 1 1 - y" << endl; cerr << " | 1 1 2 y" << endl; - cerr << " " << endl; + cerr << " " << endl; cerr << " will give the following result:" << endl; - cerr << " " << endl; + cerr << " " << endl; cerr << " [y - x*y - x*y^2 + 2*x*y^3 - x^2*y + 2*x^2*y^2 - 2*x^2*y^3 + x^3*y - x^3*y^2]" << endl; cerr << " " << endl; cerr << " -c ,,... : consider sensitivity when each seed is indexed on 1/c of its positions" << endl; @@ -1756,8 +1756,10 @@ void SCANARG(int argc , char ** argv) { if (gv_align_alphabet_size > 2 && gv_correlation_flag) { _ERROR("\"Alignment alphabet of size greater than 2 is not compatible with correlation computation",""); } + gv_bsens.clear(); gv_bsens = std::vector(3); gv_bsens[0] = 0.15; gv_bsens[1] = 0.15; gv_bsens[2] = 0.7; gv_bsens_k = 0; + gv_bsel.clear(); gv_bsel = std::vector(3); gv_bsel[0] = 0.50; gv_bsel[1] = 0.25; gv_bsel[2] = 0.25; gv_bsel_k = 0; gv_bsel_weight = std::vector(3); gv_bsel_weight[0] = 0.0; gv_bsel_weight[1] = 0.5; gv_bsel_weight[2] = 1.0; @@ -1796,8 +1798,10 @@ void SCANARG(int argc , char ** argv) { gv_lossless_flag = false; _WARNING("\"-L\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-L\" option"); } + gv_bsens.clear(); gv_bsens = std::vector(2); gv_bsens[0] = 0.30; gv_bsens[1] = 0.70; gv_bsens_k = 0; + gv_bsel.clear(); gv_bsel = std::vector(2); gv_bsel[0] = 0.75; gv_bsel[1] = 0.25; gv_bsel_k = 0; gv_bsel_weight = std::vector(2); gv_bsel_weight[0] = 0.0; gv_bsel_weight[1] = 1.0; @@ -2662,8 +2666,10 @@ int outputPareto(list & l, char * filename) { */ void build_default_subsetseed_matching_matrix() { - // build matrix + for (unsigned u = 0; u < gv_subsetseed_matching_matrix.size(); u++) + gv_subsetseed_matching_matrix[u].clear(); gv_subsetseed_matching_matrix.clear(); + for (int a = 0; a < gv_align_alphabet_size; a++) { std::vector * v = new std::vector(gv_seed_alphabet_size, 0); gv_subsetseed_matching_matrix.push_back(*v); @@ -2689,9 +2695,10 @@ void build_default_subsetseed_matching_matrix() { */ void build_default_vectorizedsubsetseed_scoring_matrix() { - - // build matrix + for (unsigned u = 0; u < gv_vectorizedsubsetseed_scoring_matrix.size(); u++) + gv_vectorizedsubsetseed_scoring_matrix[u].clear(); gv_vectorizedsubsetseed_scoring_matrix.clear(); + for (int a = 0; a < gv_align_alphabet_size; a++) { std::vector * v = new std::vector(gv_seed_alphabet_size,-1); gv_vectorizedsubsetseed_scoring_matrix.push_back(*v); @@ -2713,8 +2720,10 @@ void build_default_vectorizedsubsetseed_scoring_matrix() { */ void build_default_probabilities() { + gv_bsens.clear(); gv_bsens = std::vector(gv_align_alphabet_size, 0); gv_bsens_k = 0; + gv_bsel.clear(); gv_bsel = std::vector(gv_align_alphabet_size, 0); gv_bsel_k = 0; diff --git a/src/polynomial.hh b/src/polynomial.hh index e00f43c..a159107 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -245,7 +245,7 @@ template inline polynomial operator* (const polynomial & l, co result._coefs.push_back(pair, C> (vector(it->first),it->second)); tmp_coefs.clear(); - + VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("\t = [" << result << "]");); return result; } @@ -267,7 +267,7 @@ template ostream& operator<< (ostream& os, const polynomial & p) else if (i > 0) os << " + "; - + bool first_prod = true; // dont print '1 *' "something ..." C abs_coef = sign * (p._coefs[i].second); @@ -341,7 +341,7 @@ template istream& operator>> (istream& is, polynomial & p) { if (c_times_power_plus_symbol == '-') sign = C(-1); else - sign = C(1); + sign = C(1); continue; } @@ -350,7 +350,7 @@ template istream& operator>> (istream& is, polynomial & p) { row >> var_symbol; //cerr << "variable:" << var_symbol << endl; int i_var = -1; - + // extend var_degree up to this variable if it is already defined bool defined_var = false; for (unsigned i=0; i < p._var_names.size(); i++) { @@ -372,7 +372,7 @@ template istream& operator>> (istream& is, polynomial & p) { var_degree.push_back(0); var_degree.push_back(1); } - + row >> c_times_power_plus_symbol; //cerr << "symbol2:" << c_times_power_plus_symbol << endl; if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { @@ -380,7 +380,7 @@ template istream& operator>> (istream& is, polynomial & p) { if (c_times_power_plus_symbol == '-') sign = C(-1); else - sign = C(1); + sign = C(1); continue; } if (c_times_power_plus_symbol == '*') { From 5a1fd4a34d38292a403996f116a97b7fe85cd5ab Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 13 Jan 2017 12:20:30 +0100 Subject: [PATCH 034/123] Minor edition --- src/main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cc b/src/main.cc index 31eea42..7caa0da 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3316,9 +3316,9 @@ int main(int argc, char * argv[]) { VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton size : " << (a_s[i]->size()));); if (gv_minimize_flag) { - automaton * na = (a_s[i])->Hopcroft(); - delete (a_s[i]); - (a_s[i]) = na; + automaton * na = a_s[i]->Hopcroft(); + delete a_s[i]; + a_s[i] = na; VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton reduced size : " << (a_s[i]->size()));); } From afca8dc32a66660707b57262ca22589a781b415b Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 13 Jan 2017 12:30:33 +0100 Subject: [PATCH 035/123] Updating variable name, possible conflict --- src/polynomial.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index a159107..9d8044b 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -39,12 +39,12 @@ template class polynomial { public: /// Build an empty polynomial - polynomial() {for(unsigned u = 0; u < _coefs.size(); u++) _coefs[u].first.clear(); _coefs.clear();}; + polynomial() {for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear();}; /// Build a constant polynomial - polynomial(int u) {for(unsigned u = 0; u < _coefs.size(); u++) _coefs[u].first.clear(); _coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(0), C(u)));}; + polynomial(int u) {for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(0), C(u)));}; /// Erase a polynomial - ~polynomial() {for(unsigned u = 0; u < _coefs.size(); u++) _coefs[u].first.clear(); _coefs.clear();}; + ~polynomial() {for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear();}; // @{ /// Operator @f$ + @f$ for two polynomials From ac7244109fac5f28d55fbffb4ce2949dd6cc186c Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 13 Jan 2017 17:01:18 +0100 Subject: [PATCH 036/123] Update doxygen doc for automaton --- src/automaton.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/automaton.hh b/src/automaton.hh index 5491a27..1aa615c 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -8,7 +8,8 @@ * @section automata-description Description * This part describes an automaton\ : each @ref automaton\ is mainly a represented by a set of @ref state\ , each itself being represented by a set of @ref transition\. * - * An automaton\ can be deterministic or not, and may bring probabilities (T = double), costs (T = cost\) or counts (T = unsigned long long). + * - An automaton\ can be deterministic or not. + * - It may bring probabilities (T = double), costs (T = cost\), counts (T = unsigned long long), or nothing (T = void). * * By default the automaton\ constructor is almost empty (it creates only a final state 0 and the init state 1), but several methods are proposed to construct @ref seed-automaton, @ref probabilistic-automaton, @ref structural-automaton (@ref automaton-construction). Several methods are also proposed to manipulate theses automata (@ref automaton-manipulate), compute properties (@ref automaton-computed-properties), convert them into matrices (@ref automaton-matrix-conversion), * @@ -878,6 +879,11 @@ public: bool isIsomorphTo(const automaton & other) const; /** @brief Generic Automata Product + * + * Two definitions exist: + * - one if the second automaton type \ is "void" (cannot be stored in the resulting automaton), + * - another one when type \ can be used for each transition built. + * * @param other is the second automaton used for the product * @param productSetFinalType indicates if product final states are the crossproduct of both automaton final states or only one of these * @li PRODUCT_UNION_xxx : automata "union" of final states, From c55c3734864cd068d59e8f84d7b3129619182e20 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 13 Jan 2017 21:35:09 +0100 Subject: [PATCH 037/123] Cleaning travis url and file --- .travis.yml | 3 ++- README.rst | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 380f73f..a8dc40b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,5 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip install --user cpp-coveralls; fi after_success: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$CC" == "gcc" ]]; then coveralls --gcov-options '\-lp'; fi; fi \ No newline at end of file + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$CC" == "gcc" ]]; then coveralls --gcov-options '\-lp'; fi; fi + \ No newline at end of file diff --git a/README.rst b/README.rst index 76f6fa9..69e3fa2 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,10 @@ .. image:: https://img.shields.io/travis/laurentnoe/iedera/master.svg?style=flat-square&label=Build%20Status%20Unix - :target: https://travis-ci.org/laurentnoe/iedera/ + :target: https://travis-ci.org/laurentnoe/iedera :alt: Build Status Unix .. image:: https://img.shields.io/appveyor/ci/laurentnoe/iedera/master.svg?style=flat-square&label=Build%20Status%20Windows - :target: https://ci.appveyor.com/project/laurentnoe/iedera/ + :target: https://ci.appveyor.com/project/laurentnoe/iedera :alt: Build Status Windows .. image:: https://img.shields.io/coveralls/laurentnoe/iedera/master.svg?style=flat-square&label=Coverage From 7e753a430814541b17ca87bab072c993ee7252e1 Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 14 Jan 2017 22:38:37 +0100 Subject: [PATCH 038/123] Cleaning variable names, allocators, mice poop --- src/main.cc | 101 ++++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 47 deletions(-) diff --git a/src/main.cc b/src/main.cc index 7caa0da..e96be61 100644 --- a/src/main.cc +++ b/src/main.cc @@ -530,13 +530,13 @@ void PARSEDINT(int & i, char ** argv, int argc, /// parse and check a list of integers void PARSEINTS(int & i, char ** argv, int argc, - std::vector & table, int neededsize = 0, bool minmax=false, int vmin=0, int vmax=1000, bool complete=false) { + std::vector & r_table, int neededsize = 0, bool minmax=false, int vmin=0, int vmax=1000, bool complete=false) { i++; if (i >= argc) _ERROR("PARSEINTS","\"" << argv[i-1] << "\" found without argument"); // read table - table.clear(); + r_table.clear(); char * pch = strtok(argv[i],",;"); while (pch){ int value = 0; @@ -547,18 +547,18 @@ void PARSEINTS(int & i, char ** argv, int argc, if (value < vmin || value > vmax) _ERROR("PARSEINTS","\"" << value << "\" is by an integer out of the range"); } - table.push_back(value); + r_table.push_back(value); pch = strtok(NULL,",;"); } // check table size if needed if (neededsize != 0) { - if (complete && (int) table.size() < neededsize) { - while ((int)table.size() < neededsize) - table.push_back(table.back()); + if (complete && (int) r_table.size() < neededsize) { + while ((int)r_table.size() < neededsize) + r_table.push_back(r_table.back()); } - if ((int)table.size() != neededsize) - _ERROR("PARSEINTS", " there is not a correct number of values (" << (table.size()) << ") given by " << argv[i-1] << " when compared with the needed size " << neededsize); + if ((int)r_table.size() != neededsize) + _ERROR("PARSEINTS", " there is not a correct number of values (" << (r_table.size()) << ") given by " << argv[i-1] << " when compared with the needed size " << neededsize); } } @@ -594,13 +594,13 @@ void PARSEDDOUBLE(int & i, char ** argv, int argc, /// parse and check a list of double void PARSEDOUBLES(int & i, char ** argv, int argc, - std::vector & table, int neededsize = 0, bool positive_values=false) { + std::vector & r_table, int neededsize = 0, bool positive_values=false) { i++; if (i >= argc) _ERROR("PARSEDOUBLES","\"" << argv[i-1] << "\" found without argument"); // read table - table.clear(); + r_table.clear(); char * pch = strtok(argv[i],",;"); while (pch){ double value = 0.0; @@ -611,14 +611,14 @@ void PARSEDOUBLES(int & i, char ** argv, int argc, if (value < 0) _ERROR("PARSEDOUBLES","\"" << value << "\" is a negative "); } - table.push_back(value); + r_table.push_back(value); pch = strtok(NULL,",;"); } // check table size if needed if (neededsize != 0) { - if ((int)table.size() != neededsize) - _ERROR("PARSEDOUBLES", " there is not a correct number of values (" << (table.size()) << ") given by " << argv[i-1] << " when compared with the needed size " << neededsize); + if ((int)r_table.size() != neededsize) + _ERROR("PARSEDOUBLES", " there is not a correct number of values (" << (r_table.size()) << ") given by " << argv[i-1] << " when compared with the needed size " << neededsize); } } @@ -654,14 +654,14 @@ void CHECKSIGNATURE() { } /// parse and check a signature (number of seed elements inside a seed) -void PARSESIGNATURE(int & i, char ** argv, int argc, std::vector & table) { +void PARSESIGNATURE(int & i, char ** argv, int argc, std::vector & r_table) { i++; if (i >= argc) _ERROR("PARSESIGNATURE","\"" << argv[i-1] << "\" found without argument"); // read table char * pch = strtok(argv[i],",;"); - table.clear(); + r_table.clear(); while (pch){ int value = 0; int i_tmp = sscanf(pch,"%d",&value); @@ -669,26 +669,26 @@ void PARSESIGNATURE(int & i, char ** argv, int argc, std::vector & table) { _ERROR("PARSESIGNATURE","\"" << pch << "\" is not a correct integer"); if (value < 0 || value >= 64) _ERROR("PARSESIGNATURE","\"" << pch << "\" is out of the range [0..N] (N=64)"); - table.push_back(value); + r_table.push_back(value); pch = strtok(NULL,",;"); } // check table size - if ((int)table.size() != gv_seed_alphabet_size) + if ((int)r_table.size() != gv_seed_alphabet_size) _ERROR("PARSESIGNATURE", " there is not a correct number of values given by " << argv[i-1] << " when compared with the current seed alphabet size B = " << gv_seed_alphabet_size); // check signature and weight interval CHECKSIGNATURE(); } /// parse and check a homogeneous scoring system -void PARSEHOMOGENEOUS(int & i, char ** argv, int argc, std::vector & table) { +void PARSEHOMOGENEOUS(int & i, char ** argv, int argc, std::vector & r_table) { i++; if (i >= argc) _ERROR("PARSEHOMOGENEOUS","\"" << argv[i-1] << "\" found without argument"); // read table char * pch = strtok(argv[i],",;"); - table.clear(); + r_table.clear(); while (pch){ int value = 0; int i_tmp = sscanf(pch,"%d",&value); @@ -696,25 +696,25 @@ void PARSEHOMOGENEOUS(int & i, char ** argv, int argc, std::vector & table) _ERROR("PARSEHOMOGENEOUS","\"" << pch << "\" is not a correct integer"); if (value < -1000 || value > 1000) _ERROR("PARSEHOMOGENEOUS","\"" << pch << "\" is out of the range [-1000..1000]"); - table.push_back(value); + r_table.push_back(value); pch = strtok(NULL,",;"); } // check table size - if ((int)table.size() != gv_align_alphabet_size) + if ((int)r_table.size() != gv_align_alphabet_size) _ERROR("PARSEHOMOGENEOUS", " there is not a correct number of values given by " << argv[i-1] << " when compared with the current align alphabet size A = " << gv_align_alphabet_size); } /// parse and check a set of probabilities void PARSEPROBS(int & i, char ** argv, int argc, - std::vector & table, int & k) { + std::vector & r_table, int & k) { i++; if (i >= argc) _ERROR("PARSEPROBS", "\"" << argv[i-1] << "\" found without argument"); // read table char * pch = strtok(argv[i], ",;"); - table.clear(); + r_table.clear(); while (pch){ double value = 0.0; int i_tmp = sscanf(pch, "%lf", &value); @@ -722,7 +722,7 @@ void PARSEPROBS(int & i, char ** argv, int argc, _ERROR("PARSEPROBS","\"" << pch << "\" is not a correct "); if (value < 0 || value > 1 ) _ERROR("PARSEPROBS","\"" << pch << "\" is out of the range [0,1]"); - table.push_back(value); + r_table.push_back(value); pch = strtok(NULL,",;"); } @@ -730,18 +730,18 @@ void PARSEPROBS(int & i, char ** argv, int argc, int a = gv_align_alphabet_size; k = 0; while(1) { - if ((int)table.size() == a) + if ((int)r_table.size() == a) break; - else if ((int)table.size() < a) - _ERROR("PARSEPROBS", " there is not a correct number of values (" << (table.size()) << ") given by " << argv[i-1] << " when compared with the current alphabet size A = " << gv_align_alphabet_size); + else if ((int)r_table.size() < a) + _ERROR("PARSEPROBS", " there is not a correct number of values (" << (r_table.size()) << ") given by " << argv[i-1] << " when compared with the current alphabet size A = " << gv_align_alphabet_size); a *= gv_align_alphabet_size; k++; } - CHECKPROB(table); + CHECKPROB(r_table); } /// parse and check a set of probabilities as an automaton file -void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton ** p_a) { +void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton * &r_automaton) { i++; if (i >= argc) _ERROR("PARSEPROBSAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); @@ -750,19 +750,21 @@ void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton ifstream ifs_file; ifs_file.open(argv[i]); if (!ifs_file){ - _ERROR("PARSEPROBSAUTOMATONFILE","unreadable file \"" << (argv[i]) << "\" "); + _ERROR("PARSEPROBSAUTOMATONFILE","unreadable file \"" << argv[i] << "\" "); } // read the content and set the automaton - *p_a = new automaton(); + if (r_automaton) + delete r_automaton; + r_automaton = new automaton(); - ifs_file >> (**p_a); + ifs_file >> (*r_automaton); ifs_file.close(); } /// parse and check a set of polynomial probabilities as an automaton file -void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > > ** p_a) { +void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > > * &r_automaton) { i++; if (i >= argc) _ERROR("PARSEPOLYPROBSAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); @@ -771,13 +773,15 @@ void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > >(); + if (r_automaton) + delete r_automaton; + r_automaton = new automaton > >(); - ifs_file >> (**p_a); + ifs_file >> (*r_automaton); ifs_file.close(); } @@ -913,7 +917,7 @@ void PARSEMATRIXFILE(int & i, char ** argv, int argc, std::vector< std::vector > & matrix ) { } } // check the '#' symbol existance - for (int a=0; a > & matrix ) { * @param argv is the command line arguments being processed * @param argc is the command line maximal number of arguments being processed * @param size is the size of the seed alphabet - * @param array is the new table where seed alphabet symbols will be stored + * @param r_str is the new str where seed alphabet symbols will be stored * @see gv_bsymbols_flag, gv_bsymbols_array */ -void PARSESYMBOLS(int & i, char ** argv, int argc, int size, char * &array) { +void PARSESYMBOLS(int & i, char ** argv, int argc, int size, char * &r_str) { i++; if (i >= argc) _ERROR("PARSESYMBOLS","\"" << argv[i-1] << "\" found without argument"); if (strlen(argv[i]) != (unsigned) size) _ERROR("PARSESYMBOLS","\"" << argv[i] << "\" is not of required length " << size); - array = new char[size]; - for (char * d = array, *s = argv[i]; *s; d++, s++){ + if (r_str) + delete[] r_str; + r_str = new char[size]; + for (char * d = r_str, *s = argv[i]; *s; d++, s++){ if (*s == ':') { _ERROR("PARSESYMBOLS","\'" << *s << "\' is a reserved symbol that must not be used in a seed"); } @@ -1513,7 +1519,7 @@ void SCANARG(int argc , char ** argv) { } else if (!strcmp(argv[i],"-f")||!strcmp(argv[i],"--foreground")) { PARSEPROBS(i, argv, argc, gv_bsens, gv_bsens_k); } else if (!strcmp(argv[i],"-fF")||!strcmp(argv[i],"--foregroundFile")) { - PARSEPROBSAUTOMATONFILE(i, argv, argc, &gv_bsens_automaton); + PARSEPROBSAUTOMATONFILE(i, argv, argc, gv_bsens_automaton); } else if (!strcmp(argv[i],"-l")||!strcmp(argv[i],"--length")) { PARSEINT(i, argv, argc, gv_alignment_length, 1, 1000000); if (gv_subalignment_flag && gv_subalignment_length >= gv_alignment_length) { @@ -1685,7 +1691,7 @@ void SCANARG(int argc , char ** argv) { } else if (!strcmp(argv[i],"-pF")||!strcmp(argv[i],"--multipolynomial-file")) { ///@todo{FIXME : check several parameters incompatible with dominant selection and output} gv_multipoly_file_flag = true; - PARSEMULTIPOLYAUTOMATONFILE(i, argv, argc, &gv_multipoly_bsens_automaton); + PARSEMULTIPOLYAUTOMATONFILE(i, argv, argc, gv_multipoly_bsens_automaton); } else if (!strcmp(argv[i],"-c")||!strcmp(argv[i],"--cycles")) { if (gv_motif_flag) { _ERROR("\"-c\" pattern and \"-m\" are not compatible together", "you must provide the cycle positions on the shape (e.g \" -m 100101001:1, 3, 5/6\") "); @@ -2973,8 +2979,9 @@ int main(int argc, char * argv[]) { // double pr_div_homogeneous = 1.00; - automaton * a_homogeneous = new automaton(); + automaton * a_homogeneous = NULL; if (gv_homogeneous_flag) { + a_homogeneous = new automaton(); VERB_FILTER(VERBOSITY_MODERATE, INFO__("* Homogeneous automaton : {"; for (int a = 0; a < gv_align_alphabet_size; a++) { if (a>0) cerr << ","; @@ -3310,7 +3317,7 @@ int main(int argc, char * argv[]) { } } #endif - (a_s[i]) = new automaton(); + a_s[i] = new automaton(); SEEDAUTOMATON(a_s[i], gv_seeds[i], gv_seeds[i]->cycled() || gv_multihit_flag); VERB_FILTER(VERBOSITY_ANNOYING, INFO__(" - automaton size : " << (a_s[i]->size()));); From 753ac82853f290d88f56cadb6f402fd44c55d6ca Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 12:14:27 +0100 Subject: [PATCH 039/123] Updating tests cleaning and "make test" --- Makefile.am | 2 ++ Makefile.in | 2 ++ tests/Makefile.am | 2 ++ tests/Makefile.in | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index d1e0a91..b26d841 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ # Makefile.am EXTRA_DIST = README doxygenconfig SUBDIRS = src tests + +test: check diff --git a/Makefile.in b/Makefile.in index f3bfa7c..de688d8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -743,6 +743,8 @@ uninstall-am: .PRECIOUS: Makefile +test: check + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/tests/Makefile.am b/tests/Makefile.am index e7b9fb7..b385d67 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,3 +10,5 @@ iedera_gcov_CXXFLAGS = -fprofile-arcs -ftest-coverage -g -O0 iedera_gcov_SOURCES = ../src/main.cc ../src/seed.cc ../src/macro.cc EXTRA_DIST = iedera_gcov_test1 iedera_gcov_test2 iedera_gcov_test3 iedera_gcov_test4 iedera_gcov_test5 iedera_gcov_test6 + +CLEANFILES = ../src/*.gcno ../src/*.gcda ../src/*.o *.trs *.log _filein*_ _fileout*_ diff --git a/tests/Makefile.in b/tests/Makefile.in index 407012f..da720ea 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -463,6 +463,7 @@ TESTS_LOGS = iedera_gcov_test1 iedera_gcov_test2 iedera_gcov_test3 iedera_gcov_t iedera_gcov_CXXFLAGS = -fprofile-arcs -ftest-coverage -g -O0 iedera_gcov_SOURCES = ../src/main.cc ../src/seed.cc ../src/macro.cc EXTRA_DIST = iedera_gcov_test1 iedera_gcov_test2 iedera_gcov_test3 iedera_gcov_test4 iedera_gcov_test5 iedera_gcov_test6 +CLEANFILES = ../src/*.gcno ../src/*.gcda ../src/*.o *.trs *.log _filein*_ _fileout*_ all: all-am .SUFFIXES: @@ -896,6 +897,7 @@ mostlyclean-generic: -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) From 4f11b5a93ba15a6c0884337fa71e6557f3b78cd2 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 16:04:06 +0100 Subject: [PATCH 040/123] Updating the output difference --- tests/_filemodel_l25_x2_n1_w12.txt | 1 + tests/_filemodel_l25_x2_n2_w14.txt | 1 + tests/_filemodel_l32_x5_n6_w11.txt | 1 + tests/_filemodel_l50_x5_n1_w12.txt | 1 + tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt | 1 + tests/_filemodel_l64_n1_w11_p.txt | 2 ++ tests/iedera_gcov_test1 | 20 +++++++++++++------- 7 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 tests/_filemodel_l25_x2_n1_w12.txt create mode 100644 tests/_filemodel_l25_x2_n2_w14.txt create mode 100644 tests/_filemodel_l32_x5_n6_w11.txt create mode 100644 tests/_filemodel_l50_x5_n1_w12.txt create mode 100644 tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt create mode 100644 tests/_filemodel_l64_n1_w11_p.txt diff --git a/tests/_filemodel_l25_x2_n1_w12.txt b/tests/_filemodel_l25_x2_n1_w12.txt new file mode 100644 index 0000000..68e2dc9 --- /dev/null +++ b/tests/_filemodel_l25_x2_n1_w12.txt @@ -0,0 +1 @@ +1110100111010011101 0.999999940395 [lossless] 0.000000 diff --git a/tests/_filemodel_l25_x2_n2_w14.txt b/tests/_filemodel_l25_x2_n2_w14.txt new file mode 100644 index 0000000..b79f834 --- /dev/null +++ b/tests/_filemodel_l25_x2_n2_w14.txt @@ -0,0 +1 @@ +11110101100111101011,101100111101011001111 0.999999992549 [lossless] 0.000000 diff --git a/tests/_filemodel_l32_x5_n6_w11.txt b/tests/_filemodel_l32_x5_n6_w11.txt new file mode 100644 index 0000000..0074ee7 --- /dev/null +++ b/tests/_filemodel_l32_x5_n6_w11.txt @@ -0,0 +1 @@ +1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111 0.999998569489 [lossless] 0.000001 diff --git a/tests/_filemodel_l50_x5_n1_w12.txt b/tests/_filemodel_l50_x5_n1_w12.txt new file mode 100644 index 0000000..8681f61 --- /dev/null +++ b/tests/_filemodel_l50_x5_n1_w12.txt @@ -0,0 +1 @@ +1010100010000010101000100000101010001 0.999999940395 [lossless] 0.000000 diff --git a/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt b/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt new file mode 100644 index 0000000..1f38261 --- /dev/null +++ b/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt @@ -0,0 +1 @@ +1010100010000010101000100000101010001:1/2 0.999999970198 [lossless] 0.000000 0,0=1;1,0=50;2,0=1225;3,0=19600;4,0=230300;5,0=2118760;6,0=15890700;7,0=99884400;8,0=536878650;9,0=2505433700;10,0=10272278170;11,0=37353738800;12,0=121399651100;13,0=354860518600;14,0=937845656300;15,0=2250829575120;16,0=4923689695575;17,0=9847379391150;18,0=18053528883775;19,0=30405943383200;20,0=47129212243960;21,0=67327446062800;22,0=88749815264600;23,0=108043253365600;24,0=121548660036300;25,0=126410606437752;26,0=121548660036300;27,0=108043253365600;28,0=88749815264600;29,0=67327446062800;30,0=47129212243960;31,0=30405943383186;32,0=18053528883444;33,0=9847379387499;34,0=4923689670600;35,0=2250829456574;36,0=937845243464;37,0=354859431634;38,0=121397451393;39,0=37350286423;40,0=10268055331;41,0=2501395659;42,0=533853274;43,0=98108817;44,0=15080336;45,0=1837123;46,0=158822;47,0=7333;31,1=14;32,1=331;33,1=3651;34,1=24975;35,1=118546;36,1=412836;37,1=1086966;38,1=2199707;39,1=3452377;40,1=4222839;41,1=4038041;42,1=3025376;43,1=1775583;44,1=810364;45,1=281637;46,1=71478;47,1=12267;48,1=1225;49,1=50;50,1=1; diff --git a/tests/_filemodel_l64_n1_w11_p.txt b/tests/_filemodel_l64_n1_w11_p.txt new file mode 100644 index 0000000..65553fa --- /dev/null +++ b/tests/_filemodel_l64_n1_w11_p.txt @@ -0,0 +1,2 @@ +11111111111 0.999999761581 0.300196 0.699804 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781770;12,0=3284214700247;13,0=13136858740568;14,0=47855698764090;15,0=159518985221470;16,0=488526796465015;17,0=1379369073324480;18,0=3601681546293320;19,0=8719837354778060;20,0=19619526360041370;21,0=41107138917552400;22,0=80344170821857243;23,0=146710222700336022;24,0=250614608358746870;25,0=400942409564252192;26,0=601314089647852938;27,0=846072885188815746;28,0=1117574871513130569;29,0=1386492079370757912;30,0=1616121948231683249;31,0=1770210255924022556;32,0=1822131365284154463;33,0=1762291375749801312;34,0=1600967620817216439;35,0=1365451736026825692;36,0=1092577605526488130;37,0=819417124590802612;38,0=575332615296241803;39,0=377618991753851540;40,0=231273825758216120;41,0=131883019620798840;42,0=69839310144356515;43,0=34236564424380010;44,0=15478054228879620;45,0=6423957399302120;46,0=2434237391562065;47,0=836558973214758;48,0=258610112972557;49,0=71185852870000;50,0=17225720307741;51,0=3604563306344;52,0=638296654490;53,0=92883026820;54,0=10655344766;55,0=905642810;56,0=51565824;57,0=1632920;58,0=18515;59,0=6;11,1=54;12,1=2809;13,1=71656;14,1=1194726;15,1=14641250;16,1=140614565;17,1=1101959040;18,1=7244724760;19,1=40770844660;20,1=199422609750;21,1=857960383280;22,1=3277621380677;23,1=11204891663658;24,1=34497110919250;25,1=96159187213600;26,1=243763479345750;27,1=564093286500926;28,1=1195421472109319;29,1=2326215369539880;30,1=4166062298664175;31,1=6879820141519780;32,1=10492775658436071;33,1=14798700315741024;34,1=19320389713130985;35,1=23366558713472100;36,1=26192687458751758;37,1=27219853884514060;38,1=26225237830956885;39,1=23419576997614252;40,1=19375279711450000;41,1=14838407971200840;42,1=10508138298881405;43,1=6871432453555670;44,1=4141671553771500;45,1=2295920726320600;46,1=1167451399456015;47,1=542811202068762;48,1=229916824107023;49,1=88333146992720;50,1=30629979651075;51,1=9532295505880;52,1=2645918048566;53,1=650712755004;54,1=140817870050;55,1=26634941702;56,1=4374599544;57,1=619583272;58,1=74955853;59,1=7624506;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; +111011001010010111 0.999999761581 0.467122 0.532878 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781777;12,0=3284214700565;13,0=13136858747458;14,0=47855698857794;15,0=159518986099945;16,0=488526802204385;17,0=1379369096282095;18,0=3601681546299789;19,0=8719836468607201;20,0=19619517499141187;21,0=41107080446425363;22,0=80343866157172783;23,0=146708890435753575;24,0=250609569910552071;25,0=400925632502881515;26,0=601264312631447468;27,0=845940164130258653;28,0=1117254821139848731;29,0=1385790635445210792;30,0=1614719381147262338;31,0=1767643947486681481;32,0=1817824562288653658;33,0=1755650543264156900;34,0=1591547502223381478;35,0=1353148889713300599;36,0=1077778533431254331;37,0=803021552527398866;38,0=558610847453807986;39,0=361933096117132953;40,0=217759100297917382;41,0=121208665847580369;42,0=62130106545519883;43,0=29162078256160894;44,0=12446316851341899;45,0=4788458918512655;46,0=1642746872975316;47,0=495710355475511;48,0=129302147880455;49,0=28506821936930;50,0=5158005916919;51,0=736493116933;52,0=78663279218;53,0=5829433985;54,0=268389309;55,0=6454323;56,0=60046;57,0=120;11,1=47;12,1=2491;13,1=64766;14,1=1101022;15,1=13762775;16,1=134875195;17,1=1079001425;18,1=7244718291;19,1=41657015519;20,1=208283509933;21,1=916431510317;22,1=3582286065137;23,1=12537156246105;24,1=39535559114049;25,1=112936248584277;26,1=293540495751220;27,1=696814345058019;28,1=1515471845391157;29,1=3027659295087000;30,1=5568629383085086;31,1=9446128578860855;32,1=14799578653936876;33,1=21439532801385436;34,1=28740508306965946;35,1=35669405026997193;36,1=40991759553985557;37,1=43615425947917806;38,1=42947005673390702;39,1=39105472634332839;40,1=32890005171748738;41,1=25512761744419311;42,1=18217341897718037;43,1=11945918621774786;44,1=7173408931309221;45,1=3931419207110065;46,1=1958941918042764;47,1=883659819808009;48,1=359224789199125;49,1=131012177925790;50,1=42697694041897;51,1=12400365695291;52,1=3205551423838;53,1=737766347839;54,1=151204825507;55,1=27534130189;56,1=4426105322;57,1=621216072;58,1=74974368;59,1=7624512;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; diff --git a/tests/iedera_gcov_test1 b/tests/iedera_gcov_test1 index f6b96f7..e45ba17 100755 --- a/tests/iedera_gcov_test1 +++ b/tests/iedera_gcov_test1 @@ -32,12 +32,17 @@ # (4) classical spaced seeds with some lossless tests ./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 15,15 -L 1,0 -X 2 -m "111111000111111" -r 10 -k || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 19,19 -L 1,0 -X 2 -m "1110100111010011101" || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 5 -m "1010100010000010101000100000101010001" || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 2 -m "1010100010000010101000100000101010001:1/2" -p || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 2 -m "11110101100111101011,101100111101011001111" || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 19,19 -L 1,0 -X 2 -m "1110100111010011101" -o _fileout_l25_x2_n1_w12.txt || exit 99 +diff _fileout_l25_x2_n1_w12.txt _filemodel_l25_x2_n1_w12.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 5 -m "1010100010000010101000100000101010001" -o _fileout_l50_x5_n1_w12.txt || exit 99 +diff _fileout_l50_x5_n1_w12.txt _filemodel_l50_x5_n1_w12.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 2 -m "1010100010000010101000100000101010001:1/2" -p -o _fileout_l50_x5_n1_w12_c1-2_p.txt || exit 99 +diff _fileout_l50_x5_n1_w12_c1-2_p.txt _filemodel_l50_x5_n1_w12_c1-2_p.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 2 -m "11110101100111101011,101100111101011001111" -o _fileout_l25_x2_n2_w14.txt || exit 99 +diff _fileout_l25_x2_n2_w14.txt _filemodel_l25_x2_n2_w14.txt || exit 99 ./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 3 -m "1000111101011001000111,11101011001000111101,1011001000111101011001,110010001111010110010001" || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 32 -L 1,0 -X 5 -m "1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111" || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 32 -L 1,0 -X 5 -m "1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111" -o _fileout_l32_x5_n6_w11.txt || exit 99 +diff _fileout_l32_x5_n6_w11.txt _filemodel_l32_x5_n6_w11.txt || exit 99 # (5) classical spaced seeds with cycle ./iedera_gcov -spaced -BSymbols 01 -w 10,10 -s 10,11 -m "11111011111:1/2" -mx "1111111111:1/2" || exit 99 @@ -66,5 +71,6 @@ ./iedera_gcov -spaced -BSymbols 01 -w 5,5 -s 5,8 -m "111011" -l 16 -u -2,1 || exit 99 # (8) dominant with input output -./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 11,11 -p -o _fileout_dominant_ || exit 99 -./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 18,18 -p -e _fileout_dominant_ -o _fileout_dominant_ -m "111011001010010111" || exit 99 +./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 11,11 -p -o _fileout_l64_n1_w11_p.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 18,18 -p -e _fileout_l64_n1_w11_p.txt -o _fileout_l64_n1_w11_p.txt -m "111011001010010111" || exit 99 +diff _fileout_l64_n1_w11_p.txt _filemodel_l64_n1_w11_p.txt || exit 99 From 8ae453bd62ae17b5730ce7e50471311fad6bc24f Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 21:09:04 +0100 Subject: [PATCH 041/123] Updating memory cleaning (end of run / seed string) --- src/main.cc | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/src/main.cc b/src/main.cc index e96be61..86cdcaa 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1118,16 +1118,16 @@ void PARSESEEDS(int & i, char ** argv, int argc) { case ';': *pch = '\0'; { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s(pch_seed); gv_seeds.push_back(new seed(s)); + pch_seed = NULL; } break; case '\0': { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s(pch_seed); gv_seeds.push_back(new seed(s)); + pch_seed = NULL; } goto eowhile; @@ -1274,16 +1274,16 @@ void PARSEXSEEDS(int & i, char ** argv, int argc) { case ';': *pch = '\0'; { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s (pch_seed); gv_xseeds.push_back(new seed(s,false)); + pch_seed = NULL; } break; case '\0': { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s (pch_seed); gv_xseeds.push_back(new seed(s,false)); + pch_seed = NULL; } goto eowhile; @@ -2677,8 +2677,7 @@ void build_default_subsetseed_matching_matrix() { gv_subsetseed_matching_matrix.clear(); for (int a = 0; a < gv_align_alphabet_size; a++) { - std::vector * v = new std::vector(gv_seed_alphabet_size, 0); - gv_subsetseed_matching_matrix.push_back(*v); + gv_subsetseed_matching_matrix.push_back(vector(gv_seed_alphabet_size, 0)); } // fill it in @@ -2706,8 +2705,7 @@ void build_default_vectorizedsubsetseed_scoring_matrix() { gv_vectorizedsubsetseed_scoring_matrix.clear(); for (int a = 0; a < gv_align_alphabet_size; a++) { - std::vector * v = new std::vector(gv_seed_alphabet_size,-1); - gv_vectorizedsubsetseed_scoring_matrix.push_back(*v); + gv_vectorizedsubsetseed_scoring_matrix.push_back(vector(gv_seed_alphabet_size,-1)); } // fill it in @@ -4115,6 +4113,28 @@ int main(int argc, char * argv[]) { }// while (1) end_loop:; + // deleting several global allocated structures + if (gv_homogeneous_flag) + delete a_homogeneous; + + if (gv_xseeds.size()) { + delete a_excluded; + for (unsigned i = 0; i < gv_xseeds.size(); i++) + delete gv_xseeds[i]; + } + + for (unsigned i = 0; i < gv_seeds.size(); i++) { + delete gv_seeds[i]; + if (a_s[i]) + delete a_s[i]; + } + + if (gv_bsens_automaton) + delete gv_bsens_automaton; + + if (gv_bsymbols_array) + delete gv_bsymbols_array; + // // (10) Display pareto set and area // From 8f754fb71ba2f7b35a12122d415309d8f4ae9b32 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 21:45:39 +0100 Subject: [PATCH 042/123] Updating memory cleaning (automaton KEEP_PRODUCT / seed string / filenames) --- src/main.cc | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/main.cc b/src/main.cc index 86cdcaa..dc8b7dc 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1091,10 +1091,10 @@ void PARSESEEDS(int & i, char ** argv, int argc) { if (i >= argc) _ERROR("PARSESEEDS","" << argv[i-1] << "\" found without argument"); gv_motif_flag = true; - gv_seeds = std::vector(0); - gv_cycles = std::vector(0); - gv_cycles_pos_nb = std::vector(0); - gv_cycles_pos_list = std::vector< std::vector >(0); + gv_seeds.clear(); + gv_cycles.clear(); + gv_cycles_pos_nb.clear(); + gv_cycles_pos_list.clear(); char * pch = argv[i]; int num = 0; @@ -1251,9 +1251,9 @@ void PARSEXSEEDS(int & i, char ** argv, int argc) { if (i >= argc) _ERROR("PARSESXEEDS","" << argv[i-1] << "\" found without argument"); - gv_xseeds_cycles = std::vector(0); - gv_xseeds_cycles_pos_nb = std::vector(0); - gv_xseeds_cycles_pos_list = std::vector< std::vector >(0); + gv_xseeds_cycles.clear(); + gv_xseeds_cycles_pos_nb.clear(); + gv_xseeds_cycles_pos_list.clear(); char * pch = argv[i]; int num = 0; @@ -4133,7 +4133,14 @@ int main(int argc, char * argv[]) { delete gv_bsens_automaton; if (gv_bsymbols_array) - delete gv_bsymbols_array; + free(gv_bsymbols_array); + +#ifdef KEEP_PRODUCT_MF + for (unsigned v = 0; v < gv_seeds.size(); v++) + if (v > 0 && a_s_product[v]) + delete a_s_product[v]; +#endif + // // (10) Display pareto set and area @@ -4151,6 +4158,12 @@ int main(int argc, char * argv[]) { list_and_areaPareto(l); else outputPareto(l, gv_output_filename); + + // cleaning filename memory + for (unsigned v = 0; v < gv_nb_input_filenames; v++) + free(gv_input_filenames[v]); + if (gv_output_filename) + free(gv_output_filename); return 0; } From 338c546a6782827ffb37330f55a3d9b36e901204 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 22:55:49 +0100 Subject: [PATCH 043/123] Updating memory cleaning (previous seeds with -spaced/-transitive) --- src/main.cc | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/src/main.cc b/src/main.cc index dc8b7dc..309e164 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1091,7 +1091,11 @@ void PARSESEEDS(int & i, char ** argv, int argc) { if (i >= argc) _ERROR("PARSESEEDS","" << argv[i-1] << "\" found without argument"); gv_motif_flag = true; + + for (unsigned v = 0; v < gv_seeds.size(); v++) + delete gv_seeds[v]; gv_seeds.clear(); + gv_cycles_flag = false; gv_cycles.clear(); gv_cycles_pos_nb.clear(); gv_cycles_pos_list.clear(); @@ -1251,6 +1255,8 @@ void PARSEXSEEDS(int & i, char ** argv, int argc) { if (i >= argc) _ERROR("PARSESXEEDS","" << argv[i-1] << "\" found without argument"); + gv_xseeds.clear(); + gv_xseeds_cycles_flag = true; gv_xseeds_cycles.clear(); gv_xseeds_cycles_pos_nb.clear(); gv_xseeds_cycles_pos_list.clear(); @@ -1465,13 +1471,15 @@ void SCANARG(int argc , char ** argv) { _WARNING("\"-BSymbols\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-BSymbols\" option"); } if (gv_xseeds.size()) { - gv_xseeds = std::vector(0); + gv_xseeds.clear(); gv_xseeds_cycles_flag = false; - gv_xseeds_multihit_flag = false; _WARNING("\"-mx\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-mx\" option"); } if (gv_motif_flag) { gv_motif_flag = false; + for (unsigned v = 0; v < gv_seeds.size(); v++) + delete gv_seeds[v]; + gv_seeds.clear(); _WARNING("\"-m\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-m\" option"); } // 1.1) subset seeds @@ -1741,18 +1749,26 @@ void SCANARG(int argc , char ** argv) { gv_align_alphabet_size = 3; gv_seed_alphabet_size = 3; if (gv_signature_flag) { - gv_signature = std::vector(0); + gv_signature.clear(); gv_signature_flag = false; _WARNING("\"-i\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-i\" option"); } if (gv_xseeds.size()) { - gv_xseeds = std::vector(0); + for (unsigned v = 0; v < gv_xseeds.size(); v++) + delete gv_xseeds[v]; + gv_xseeds.clear(); + gv_xseeds_cycles.clear(); + gv_xseeds_cycles_pos_nb.clear(); + gv_xseeds_cycles_pos_list.clear(); _WARNING("\"-mx\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-mx\" option"); } gv_xseeds_cycles_flag = false; gv_xseeds_multihit_flag = false; if (gv_motif_flag) { gv_motif_flag = false; + for (unsigned v = 0; v < gv_seeds.size(); v++) + delete gv_seeds[v]; + gv_seeds.clear(); _WARNING("\"-m\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-m\" option"); } if (gv_lossless_flag) { @@ -1786,12 +1802,17 @@ void SCANARG(int argc , char ** argv) { gv_align_alphabet_size = 2; gv_seed_alphabet_size = 2; if (gv_signature_flag) { - gv_signature = std::vector(0); + gv_signature.clear(); gv_signature_flag = false; _WARNING("\"-i\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-i\" option"); } if (gv_xseeds.size()) { - gv_xseeds = std::vector(0); + for (unsigned v = 0; v < gv_xseeds.size(); v++) + delete gv_xseeds[v]; + gv_xseeds.clear(); + gv_xseeds_cycles.clear(); + gv_xseeds_cycles_pos_nb.clear(); + gv_xseeds_cycles_pos_list.clear(); _WARNING("\"-mx\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-mx\" option"); } gv_xseeds_cycles_flag = false; @@ -3978,7 +3999,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[seed_to_hillclimbing]) { - delete (a_s[seed_to_hillclimbing]); + delete a_s[seed_to_hillclimbing]; a_s[seed_to_hillclimbing] = NULL; } if (seed_to_hillclimbing == last_seed_to_hillclimbing) { @@ -3991,7 +4012,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[seed_to_hillclimbing]) { - delete (a_s[seed_to_hillclimbing]); + delete a_s[seed_to_hillclimbing]; a_s[seed_to_hillclimbing] = NULL; } @@ -4047,7 +4068,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[i]) { - delete (a_s[i]); + delete a_s[i]; a_s[i] = NULL; } @@ -4075,7 +4096,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[j]) { - delete (a_s[j]); + delete a_s[j]; a_s[j] = NULL; } @@ -4088,12 +4109,12 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed (a_s[j]->next == 1) if (j < gv_seeds.size() && a_s[j]) { - delete (a_s[j]); + delete a_s[j]; a_s[j] = NULL; } for (unsigned i = 0; i < j; i++) { // reset the span of previous j-th seeds to min - delete (gv_seeds[i]); + delete gv_seeds[i]; gv_seeds[i] = new seed(); if (gv_cycles_flag) gv_seeds[i]->setCyclePos(gv_cycles_pos_list[i], gv_cycles[i]); From b7d4a54c2b13853c10ccbf897d4368ca1c64dbfc Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 23:02:08 +0100 Subject: [PATCH 044/123] Updating memory cleaning (previous gv_bsymbols_array with -spaced/-transitive) --- src/main.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cc b/src/main.cc index 309e164..8087b34 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1792,6 +1792,8 @@ void SCANARG(int argc , char ** argv) { gv_minweight = 9; gv_maxweight = 9; gv_weight_interval_flag = true; gv_vectorized_flag = false; + if (gv_bsymbols_flag) + free(gv_bsymbols_array); gv_bsymbols_array = strdup(string("-@#").c_str()); gv_bsymbols_flag = true; build_default_subsetseed_matching_matrix(); @@ -1839,6 +1841,8 @@ void SCANARG(int argc , char ** argv) { gv_minweight = 9; gv_maxweight = 9; gv_weight_interval_flag = true; gv_vectorized_flag = false; + if (gv_bsymbols_flag) + free(gv_bsymbols_array); gv_bsymbols_array = strdup(string("-#").c_str()); gv_bsymbols_flag = true; build_default_subsetseed_matching_matrix(); From 8b02ccc62c10a74f24b8318a610d380d8af2ff8c Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 23:58:08 +0100 Subject: [PATCH 045/123] Updating memory cleaning (removing previous "gv_seeds.clear()" with -spaced/-transitive) --- src/main.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main.cc b/src/main.cc index 8087b34..1bac21f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1477,9 +1477,10 @@ void SCANARG(int argc , char ** argv) { } if (gv_motif_flag) { gv_motif_flag = false; - for (unsigned v = 0; v < gv_seeds.size(); v++) + for (unsigned v = 0; v < gv_seeds.size(); v++) { delete gv_seeds[v]; - gv_seeds.clear(); + gv_seeds[v] = NULL; + } _WARNING("\"-m\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-m\" option"); } // 1.1) subset seeds @@ -1766,9 +1767,10 @@ void SCANARG(int argc , char ** argv) { gv_xseeds_multihit_flag = false; if (gv_motif_flag) { gv_motif_flag = false; - for (unsigned v = 0; v < gv_seeds.size(); v++) + for (unsigned v = 0; v < gv_seeds.size(); v++) { delete gv_seeds[v]; - gv_seeds.clear(); + gv_seeds[v] = NULL; + } _WARNING("\"-m\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-m\" option"); } if (gv_lossless_flag) { @@ -1821,6 +1823,9 @@ void SCANARG(int argc , char ** argv) { gv_xseeds_multihit_flag = false; if (gv_motif_flag) { gv_motif_flag = false; + for (unsigned v = 0; v < gv_seeds.size(); v++) + delete gv_seeds[v]; + gv_seeds.clear(); _WARNING("\"-m\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-m\" option"); } if (gv_lossless_flag) { From 38e5b06674a374795973ea73b8c89a18957fa5ec Mon Sep 17 00:00:00 2001 From: noe Date: Mon, 16 Jan 2017 00:19:40 +0100 Subject: [PATCH 046/123] Updating memory cleaning (removing previous "gv_seeds.clear()" with -spaced/-transitive) --- src/main.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index 1bac21f..a373656 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1823,9 +1823,10 @@ void SCANARG(int argc , char ** argv) { gv_xseeds_multihit_flag = false; if (gv_motif_flag) { gv_motif_flag = false; - for (unsigned v = 0; v < gv_seeds.size(); v++) + for (unsigned v = 0; v < gv_seeds.size(); v++) { delete gv_seeds[v]; - gv_seeds.clear(); + gv_seeds[v] = NULL; + } _WARNING("\"-m\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-m\" option"); } if (gv_lossless_flag) { From 17fc6330c1dce661d6f4eb0b23e4b5454883b56e Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 15 Jan 2017 16:04:06 +0100 Subject: [PATCH 047/123] Updating the output difference Updating memory cleaning (end of run / seed string) Updating memory cleaning (automaton KEEP_PRODUCT / seed string / filenames) Updating memory cleaning (previous seeds with -spaced/-transitive) Updating memory cleaning (previous gv_bsymbols_array with -spaced/-transitive) Updating memory cleaning (removing previous "gv_seeds.clear()" with -spaced/-transitive) Updating memory cleaning (removing previous "gv_seeds.clear()" with -spaced/-transitive) --- src/main.cc | 126 ++++++++++++++++------ tests/_filemodel_l25_x2_n1_w12.txt | 1 + tests/_filemodel_l25_x2_n2_w14.txt | 1 + tests/_filemodel_l32_x5_n6_w11.txt | 1 + tests/_filemodel_l50_x5_n1_w12.txt | 1 + tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt | 1 + tests/_filemodel_l64_n1_w11_p.txt | 2 + tests/iedera_gcov_test1 | 20 ++-- 8 files changed, 115 insertions(+), 38 deletions(-) create mode 100644 tests/_filemodel_l25_x2_n1_w12.txt create mode 100644 tests/_filemodel_l25_x2_n2_w14.txt create mode 100644 tests/_filemodel_l32_x5_n6_w11.txt create mode 100644 tests/_filemodel_l50_x5_n1_w12.txt create mode 100644 tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt create mode 100644 tests/_filemodel_l64_n1_w11_p.txt diff --git a/src/main.cc b/src/main.cc index e96be61..a373656 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1091,10 +1091,14 @@ void PARSESEEDS(int & i, char ** argv, int argc) { if (i >= argc) _ERROR("PARSESEEDS","" << argv[i-1] << "\" found without argument"); gv_motif_flag = true; - gv_seeds = std::vector(0); - gv_cycles = std::vector(0); - gv_cycles_pos_nb = std::vector(0); - gv_cycles_pos_list = std::vector< std::vector >(0); + + for (unsigned v = 0; v < gv_seeds.size(); v++) + delete gv_seeds[v]; + gv_seeds.clear(); + gv_cycles_flag = false; + gv_cycles.clear(); + gv_cycles_pos_nb.clear(); + gv_cycles_pos_list.clear(); char * pch = argv[i]; int num = 0; @@ -1118,16 +1122,16 @@ void PARSESEEDS(int & i, char ** argv, int argc) { case ';': *pch = '\0'; { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s(pch_seed); gv_seeds.push_back(new seed(s)); + pch_seed = NULL; } break; case '\0': { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s(pch_seed); gv_seeds.push_back(new seed(s)); + pch_seed = NULL; } goto eowhile; @@ -1251,9 +1255,11 @@ void PARSEXSEEDS(int & i, char ** argv, int argc) { if (i >= argc) _ERROR("PARSESXEEDS","" << argv[i-1] << "\" found without argument"); - gv_xseeds_cycles = std::vector(0); - gv_xseeds_cycles_pos_nb = std::vector(0); - gv_xseeds_cycles_pos_list = std::vector< std::vector >(0); + gv_xseeds.clear(); + gv_xseeds_cycles_flag = true; + gv_xseeds_cycles.clear(); + gv_xseeds_cycles_pos_nb.clear(); + gv_xseeds_cycles_pos_list.clear(); char * pch = argv[i]; int num = 0; @@ -1274,16 +1280,16 @@ void PARSEXSEEDS(int & i, char ** argv, int argc) { case ';': *pch = '\0'; { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s (pch_seed); gv_xseeds.push_back(new seed(s,false)); + pch_seed = NULL; } break; case '\0': { - string s = string(strdup(pch_seed)); - pch_seed = NULL; + string s (pch_seed); gv_xseeds.push_back(new seed(s,false)); + pch_seed = NULL; } goto eowhile; @@ -1465,13 +1471,16 @@ void SCANARG(int argc , char ** argv) { _WARNING("\"-BSymbols\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-BSymbols\" option"); } if (gv_xseeds.size()) { - gv_xseeds = std::vector(0); + gv_xseeds.clear(); gv_xseeds_cycles_flag = false; - gv_xseeds_multihit_flag = false; _WARNING("\"-mx\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-mx\" option"); } if (gv_motif_flag) { gv_motif_flag = false; + for (unsigned v = 0; v < gv_seeds.size(); v++) { + delete gv_seeds[v]; + gv_seeds[v] = NULL; + } _WARNING("\"-m\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-m\" option"); } // 1.1) subset seeds @@ -1741,18 +1750,27 @@ void SCANARG(int argc , char ** argv) { gv_align_alphabet_size = 3; gv_seed_alphabet_size = 3; if (gv_signature_flag) { - gv_signature = std::vector(0); + gv_signature.clear(); gv_signature_flag = false; _WARNING("\"-i\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-i\" option"); } if (gv_xseeds.size()) { - gv_xseeds = std::vector(0); + for (unsigned v = 0; v < gv_xseeds.size(); v++) + delete gv_xseeds[v]; + gv_xseeds.clear(); + gv_xseeds_cycles.clear(); + gv_xseeds_cycles_pos_nb.clear(); + gv_xseeds_cycles_pos_list.clear(); _WARNING("\"-mx\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-mx\" option"); } gv_xseeds_cycles_flag = false; gv_xseeds_multihit_flag = false; if (gv_motif_flag) { gv_motif_flag = false; + for (unsigned v = 0; v < gv_seeds.size(); v++) { + delete gv_seeds[v]; + gv_seeds[v] = NULL; + } _WARNING("\"-m\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-m\" option"); } if (gv_lossless_flag) { @@ -1776,6 +1794,8 @@ void SCANARG(int argc , char ** argv) { gv_minweight = 9; gv_maxweight = 9; gv_weight_interval_flag = true; gv_vectorized_flag = false; + if (gv_bsymbols_flag) + free(gv_bsymbols_array); gv_bsymbols_array = strdup(string("-@#").c_str()); gv_bsymbols_flag = true; build_default_subsetseed_matching_matrix(); @@ -1786,18 +1806,27 @@ void SCANARG(int argc , char ** argv) { gv_align_alphabet_size = 2; gv_seed_alphabet_size = 2; if (gv_signature_flag) { - gv_signature = std::vector(0); + gv_signature.clear(); gv_signature_flag = false; _WARNING("\"-i\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-i\" option"); } if (gv_xseeds.size()) { - gv_xseeds = std::vector(0); + for (unsigned v = 0; v < gv_xseeds.size(); v++) + delete gv_xseeds[v]; + gv_xseeds.clear(); + gv_xseeds_cycles.clear(); + gv_xseeds_cycles_pos_nb.clear(); + gv_xseeds_cycles_pos_list.clear(); _WARNING("\"-mx\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-mx\" option"); } gv_xseeds_cycles_flag = false; gv_xseeds_multihit_flag = false; if (gv_motif_flag) { gv_motif_flag = false; + for (unsigned v = 0; v < gv_seeds.size(); v++) { + delete gv_seeds[v]; + gv_seeds[v] = NULL; + } _WARNING("\"-m\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-m\" option"); } if (gv_lossless_flag) { @@ -1818,6 +1847,8 @@ void SCANARG(int argc , char ** argv) { gv_minweight = 9; gv_maxweight = 9; gv_weight_interval_flag = true; gv_vectorized_flag = false; + if (gv_bsymbols_flag) + free(gv_bsymbols_array); gv_bsymbols_array = strdup(string("-#").c_str()); gv_bsymbols_flag = true; build_default_subsetseed_matching_matrix(); @@ -2677,8 +2708,7 @@ void build_default_subsetseed_matching_matrix() { gv_subsetseed_matching_matrix.clear(); for (int a = 0; a < gv_align_alphabet_size; a++) { - std::vector * v = new std::vector(gv_seed_alphabet_size, 0); - gv_subsetseed_matching_matrix.push_back(*v); + gv_subsetseed_matching_matrix.push_back(vector(gv_seed_alphabet_size, 0)); } // fill it in @@ -2706,8 +2736,7 @@ void build_default_vectorizedsubsetseed_scoring_matrix() { gv_vectorizedsubsetseed_scoring_matrix.clear(); for (int a = 0; a < gv_align_alphabet_size; a++) { - std::vector * v = new std::vector(gv_seed_alphabet_size,-1); - gv_vectorizedsubsetseed_scoring_matrix.push_back(*v); + gv_vectorizedsubsetseed_scoring_matrix.push_back(vector(gv_seed_alphabet_size,-1)); } // fill it in @@ -3980,7 +4009,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[seed_to_hillclimbing]) { - delete (a_s[seed_to_hillclimbing]); + delete a_s[seed_to_hillclimbing]; a_s[seed_to_hillclimbing] = NULL; } if (seed_to_hillclimbing == last_seed_to_hillclimbing) { @@ -3993,7 +4022,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[seed_to_hillclimbing]) { - delete (a_s[seed_to_hillclimbing]); + delete a_s[seed_to_hillclimbing]; a_s[seed_to_hillclimbing] = NULL; } @@ -4049,7 +4078,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[i]) { - delete (a_s[i]); + delete a_s[i]; a_s[i] = NULL; } @@ -4077,7 +4106,7 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed if (a_s[j]) { - delete (a_s[j]); + delete a_s[j]; a_s[j] = NULL; } @@ -4090,12 +4119,12 @@ int main(int argc, char * argv[]) { // delete automaton associated with the modified seed (a_s[j]->next == 1) if (j < gv_seeds.size() && a_s[j]) { - delete (a_s[j]); + delete a_s[j]; a_s[j] = NULL; } for (unsigned i = 0; i < j; i++) { // reset the span of previous j-th seeds to min - delete (gv_seeds[i]); + delete gv_seeds[i]; gv_seeds[i] = new seed(); if (gv_cycles_flag) gv_seeds[i]->setCyclePos(gv_cycles_pos_list[i], gv_cycles[i]); @@ -4115,6 +4144,35 @@ int main(int argc, char * argv[]) { }// while (1) end_loop:; + // deleting several global allocated structures + if (gv_homogeneous_flag) + delete a_homogeneous; + + if (gv_xseeds.size()) { + delete a_excluded; + for (unsigned i = 0; i < gv_xseeds.size(); i++) + delete gv_xseeds[i]; + } + + for (unsigned i = 0; i < gv_seeds.size(); i++) { + delete gv_seeds[i]; + if (a_s[i]) + delete a_s[i]; + } + + if (gv_bsens_automaton) + delete gv_bsens_automaton; + + if (gv_bsymbols_array) + free(gv_bsymbols_array); + +#ifdef KEEP_PRODUCT_MF + for (unsigned v = 0; v < gv_seeds.size(); v++) + if (v > 0 && a_s_product[v]) + delete a_s_product[v]; +#endif + + // // (10) Display pareto set and area // @@ -4131,6 +4189,12 @@ int main(int argc, char * argv[]) { list_and_areaPareto(l); else outputPareto(l, gv_output_filename); + + // cleaning filename memory + for (unsigned v = 0; v < gv_nb_input_filenames; v++) + free(gv_input_filenames[v]); + if (gv_output_filename) + free(gv_output_filename); return 0; } diff --git a/tests/_filemodel_l25_x2_n1_w12.txt b/tests/_filemodel_l25_x2_n1_w12.txt new file mode 100644 index 0000000..68e2dc9 --- /dev/null +++ b/tests/_filemodel_l25_x2_n1_w12.txt @@ -0,0 +1 @@ +1110100111010011101 0.999999940395 [lossless] 0.000000 diff --git a/tests/_filemodel_l25_x2_n2_w14.txt b/tests/_filemodel_l25_x2_n2_w14.txt new file mode 100644 index 0000000..b79f834 --- /dev/null +++ b/tests/_filemodel_l25_x2_n2_w14.txt @@ -0,0 +1 @@ +11110101100111101011,101100111101011001111 0.999999992549 [lossless] 0.000000 diff --git a/tests/_filemodel_l32_x5_n6_w11.txt b/tests/_filemodel_l32_x5_n6_w11.txt new file mode 100644 index 0000000..0074ee7 --- /dev/null +++ b/tests/_filemodel_l32_x5_n6_w11.txt @@ -0,0 +1 @@ +1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111 0.999998569489 [lossless] 0.000001 diff --git a/tests/_filemodel_l50_x5_n1_w12.txt b/tests/_filemodel_l50_x5_n1_w12.txt new file mode 100644 index 0000000..8681f61 --- /dev/null +++ b/tests/_filemodel_l50_x5_n1_w12.txt @@ -0,0 +1 @@ +1010100010000010101000100000101010001 0.999999940395 [lossless] 0.000000 diff --git a/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt b/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt new file mode 100644 index 0000000..1f38261 --- /dev/null +++ b/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt @@ -0,0 +1 @@ +1010100010000010101000100000101010001:1/2 0.999999970198 [lossless] 0.000000 0,0=1;1,0=50;2,0=1225;3,0=19600;4,0=230300;5,0=2118760;6,0=15890700;7,0=99884400;8,0=536878650;9,0=2505433700;10,0=10272278170;11,0=37353738800;12,0=121399651100;13,0=354860518600;14,0=937845656300;15,0=2250829575120;16,0=4923689695575;17,0=9847379391150;18,0=18053528883775;19,0=30405943383200;20,0=47129212243960;21,0=67327446062800;22,0=88749815264600;23,0=108043253365600;24,0=121548660036300;25,0=126410606437752;26,0=121548660036300;27,0=108043253365600;28,0=88749815264600;29,0=67327446062800;30,0=47129212243960;31,0=30405943383186;32,0=18053528883444;33,0=9847379387499;34,0=4923689670600;35,0=2250829456574;36,0=937845243464;37,0=354859431634;38,0=121397451393;39,0=37350286423;40,0=10268055331;41,0=2501395659;42,0=533853274;43,0=98108817;44,0=15080336;45,0=1837123;46,0=158822;47,0=7333;31,1=14;32,1=331;33,1=3651;34,1=24975;35,1=118546;36,1=412836;37,1=1086966;38,1=2199707;39,1=3452377;40,1=4222839;41,1=4038041;42,1=3025376;43,1=1775583;44,1=810364;45,1=281637;46,1=71478;47,1=12267;48,1=1225;49,1=50;50,1=1; diff --git a/tests/_filemodel_l64_n1_w11_p.txt b/tests/_filemodel_l64_n1_w11_p.txt new file mode 100644 index 0000000..65553fa --- /dev/null +++ b/tests/_filemodel_l64_n1_w11_p.txt @@ -0,0 +1,2 @@ +11111111111 0.999999761581 0.300196 0.699804 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781770;12,0=3284214700247;13,0=13136858740568;14,0=47855698764090;15,0=159518985221470;16,0=488526796465015;17,0=1379369073324480;18,0=3601681546293320;19,0=8719837354778060;20,0=19619526360041370;21,0=41107138917552400;22,0=80344170821857243;23,0=146710222700336022;24,0=250614608358746870;25,0=400942409564252192;26,0=601314089647852938;27,0=846072885188815746;28,0=1117574871513130569;29,0=1386492079370757912;30,0=1616121948231683249;31,0=1770210255924022556;32,0=1822131365284154463;33,0=1762291375749801312;34,0=1600967620817216439;35,0=1365451736026825692;36,0=1092577605526488130;37,0=819417124590802612;38,0=575332615296241803;39,0=377618991753851540;40,0=231273825758216120;41,0=131883019620798840;42,0=69839310144356515;43,0=34236564424380010;44,0=15478054228879620;45,0=6423957399302120;46,0=2434237391562065;47,0=836558973214758;48,0=258610112972557;49,0=71185852870000;50,0=17225720307741;51,0=3604563306344;52,0=638296654490;53,0=92883026820;54,0=10655344766;55,0=905642810;56,0=51565824;57,0=1632920;58,0=18515;59,0=6;11,1=54;12,1=2809;13,1=71656;14,1=1194726;15,1=14641250;16,1=140614565;17,1=1101959040;18,1=7244724760;19,1=40770844660;20,1=199422609750;21,1=857960383280;22,1=3277621380677;23,1=11204891663658;24,1=34497110919250;25,1=96159187213600;26,1=243763479345750;27,1=564093286500926;28,1=1195421472109319;29,1=2326215369539880;30,1=4166062298664175;31,1=6879820141519780;32,1=10492775658436071;33,1=14798700315741024;34,1=19320389713130985;35,1=23366558713472100;36,1=26192687458751758;37,1=27219853884514060;38,1=26225237830956885;39,1=23419576997614252;40,1=19375279711450000;41,1=14838407971200840;42,1=10508138298881405;43,1=6871432453555670;44,1=4141671553771500;45,1=2295920726320600;46,1=1167451399456015;47,1=542811202068762;48,1=229916824107023;49,1=88333146992720;50,1=30629979651075;51,1=9532295505880;52,1=2645918048566;53,1=650712755004;54,1=140817870050;55,1=26634941702;56,1=4374599544;57,1=619583272;58,1=74955853;59,1=7624506;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; +111011001010010111 0.999999761581 0.467122 0.532878 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781777;12,0=3284214700565;13,0=13136858747458;14,0=47855698857794;15,0=159518986099945;16,0=488526802204385;17,0=1379369096282095;18,0=3601681546299789;19,0=8719836468607201;20,0=19619517499141187;21,0=41107080446425363;22,0=80343866157172783;23,0=146708890435753575;24,0=250609569910552071;25,0=400925632502881515;26,0=601264312631447468;27,0=845940164130258653;28,0=1117254821139848731;29,0=1385790635445210792;30,0=1614719381147262338;31,0=1767643947486681481;32,0=1817824562288653658;33,0=1755650543264156900;34,0=1591547502223381478;35,0=1353148889713300599;36,0=1077778533431254331;37,0=803021552527398866;38,0=558610847453807986;39,0=361933096117132953;40,0=217759100297917382;41,0=121208665847580369;42,0=62130106545519883;43,0=29162078256160894;44,0=12446316851341899;45,0=4788458918512655;46,0=1642746872975316;47,0=495710355475511;48,0=129302147880455;49,0=28506821936930;50,0=5158005916919;51,0=736493116933;52,0=78663279218;53,0=5829433985;54,0=268389309;55,0=6454323;56,0=60046;57,0=120;11,1=47;12,1=2491;13,1=64766;14,1=1101022;15,1=13762775;16,1=134875195;17,1=1079001425;18,1=7244718291;19,1=41657015519;20,1=208283509933;21,1=916431510317;22,1=3582286065137;23,1=12537156246105;24,1=39535559114049;25,1=112936248584277;26,1=293540495751220;27,1=696814345058019;28,1=1515471845391157;29,1=3027659295087000;30,1=5568629383085086;31,1=9446128578860855;32,1=14799578653936876;33,1=21439532801385436;34,1=28740508306965946;35,1=35669405026997193;36,1=40991759553985557;37,1=43615425947917806;38,1=42947005673390702;39,1=39105472634332839;40,1=32890005171748738;41,1=25512761744419311;42,1=18217341897718037;43,1=11945918621774786;44,1=7173408931309221;45,1=3931419207110065;46,1=1958941918042764;47,1=883659819808009;48,1=359224789199125;49,1=131012177925790;50,1=42697694041897;51,1=12400365695291;52,1=3205551423838;53,1=737766347839;54,1=151204825507;55,1=27534130189;56,1=4426105322;57,1=621216072;58,1=74974368;59,1=7624512;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; diff --git a/tests/iedera_gcov_test1 b/tests/iedera_gcov_test1 index f6b96f7..e45ba17 100755 --- a/tests/iedera_gcov_test1 +++ b/tests/iedera_gcov_test1 @@ -32,12 +32,17 @@ # (4) classical spaced seeds with some lossless tests ./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 15,15 -L 1,0 -X 2 -m "111111000111111" -r 10 -k || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 19,19 -L 1,0 -X 2 -m "1110100111010011101" || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 5 -m "1010100010000010101000100000101010001" || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 2 -m "1010100010000010101000100000101010001:1/2" -p || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 2 -m "11110101100111101011,101100111101011001111" || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 19,19 -L 1,0 -X 2 -m "1110100111010011101" -o _fileout_l25_x2_n1_w12.txt || exit 99 +diff _fileout_l25_x2_n1_w12.txt _filemodel_l25_x2_n1_w12.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 5 -m "1010100010000010101000100000101010001" -o _fileout_l50_x5_n1_w12.txt || exit 99 +diff _fileout_l50_x5_n1_w12.txt _filemodel_l50_x5_n1_w12.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 2 -m "1010100010000010101000100000101010001:1/2" -p -o _fileout_l50_x5_n1_w12_c1-2_p.txt || exit 99 +diff _fileout_l50_x5_n1_w12_c1-2_p.txt _filemodel_l50_x5_n1_w12_c1-2_p.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 2 -m "11110101100111101011,101100111101011001111" -o _fileout_l25_x2_n2_w14.txt || exit 99 +diff _fileout_l25_x2_n2_w14.txt _filemodel_l25_x2_n2_w14.txt || exit 99 ./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 3 -m "1000111101011001000111,11101011001000111101,1011001000111101011001,110010001111010110010001" || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 32 -L 1,0 -X 5 -m "1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111" || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 32 -L 1,0 -X 5 -m "1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111" -o _fileout_l32_x5_n6_w11.txt || exit 99 +diff _fileout_l32_x5_n6_w11.txt _filemodel_l32_x5_n6_w11.txt || exit 99 # (5) classical spaced seeds with cycle ./iedera_gcov -spaced -BSymbols 01 -w 10,10 -s 10,11 -m "11111011111:1/2" -mx "1111111111:1/2" || exit 99 @@ -66,5 +71,6 @@ ./iedera_gcov -spaced -BSymbols 01 -w 5,5 -s 5,8 -m "111011" -l 16 -u -2,1 || exit 99 # (8) dominant with input output -./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 11,11 -p -o _fileout_dominant_ || exit 99 -./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 18,18 -p -e _fileout_dominant_ -o _fileout_dominant_ -m "111011001010010111" || exit 99 +./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 11,11 -p -o _fileout_l64_n1_w11_p.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 18,18 -p -e _fileout_l64_n1_w11_p.txt -o _fileout_l64_n1_w11_p.txt -m "111011001010010111" || exit 99 +diff _fileout_l64_n1_w11_p.txt _filemodel_l64_n1_w11_p.txt || exit 99 From d8c5c6b00b6b4afddc0a72a63789aa51210f0a95 Mon Sep 17 00:00:00 2001 From: noe Date: Mon, 16 Jan 2017 08:28:35 +0100 Subject: [PATCH 048/123] -B and -u/-L --- src/main.cc | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index a373656..fea6e4b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1476,13 +1476,22 @@ void SCANARG(int argc , char ** argv) { _WARNING("\"-mx\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-mx\" option"); } if (gv_motif_flag) { - gv_motif_flag = false; + gv_motif_flag = false; for (unsigned v = 0; v < gv_seeds.size(); v++) { delete gv_seeds[v]; gv_seeds[v] = NULL; } _WARNING("\"-m\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-m\" option"); } + if (gv_lossless_flag) { + gv_lossless_flag = false; + _WARNING("\"-L\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-L\" option"); + } + if (gv_homogeneous_flag) { + gv_homogeneous_flag = false; + gv_homogeneous_scores.clear(); + _WARNING("\"-u\" OPTION DISABLED","seed alphabet size was changed \"after\" setting the \"-u\" option"); + } // 1.1) subset seeds } else if (!strcmp(argv[i],"-M")||!strcmp(argv[i],"--Matching")) { PARSEMATRIX(i, argv, argc, gv_subsetseed_matching_matrix, 0, 1, gv_align_alphabet_size, gv_seed_alphabet_size); @@ -1777,6 +1786,11 @@ void SCANARG(int argc , char ** argv) { gv_lossless_flag = false; _WARNING("\"-L\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-L\" option"); } + if (gv_homogeneous_flag) { + gv_homogeneous_flag = false; + gv_homogeneous_scores.clear(); + _WARNING("\"-u\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-u\" option"); + } if (gv_align_alphabet_size > 2 && gv_correlation_flag) { _ERROR("\"Alignment alphabet of size greater than 2 is not compatible with correlation computation",""); } @@ -1833,6 +1847,11 @@ void SCANARG(int argc , char ** argv) { gv_lossless_flag = false; _WARNING("\"-L\" OPTION DISABLED","\"-spaced\" option was set \"after\" setting the \"-L\" option"); } + if (gv_homogeneous_flag) { + gv_homogeneous_flag = false; + gv_homogeneous_scores.clear(); + _WARNING("\"-u\" OPTION DISABLED","\"-transitive\" option was set \"after\" setting the \"-u\" option"); + } gv_bsens.clear(); gv_bsens = std::vector(2); gv_bsens[0] = 0.30; gv_bsens[1] = 0.70; gv_bsens_k = 0; From 530375b162a847da3243cb67cde9be729a4c1478 Mon Sep 17 00:00:00 2001 From: noe Date: Mon, 16 Jan 2017 09:21:01 +0100 Subject: [PATCH 049/123] Updating test output filenames and rules --- tests/iedera_gcov_test1 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/iedera_gcov_test1 b/tests/iedera_gcov_test1 index e45ba17..6575e83 100755 --- a/tests/iedera_gcov_test1 +++ b/tests/iedera_gcov_test1 @@ -32,17 +32,17 @@ # (4) classical spaced seeds with some lossless tests ./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 15,15 -L 1,0 -X 2 -m "111111000111111" -r 10 -k || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 19,19 -L 1,0 -X 2 -m "1110100111010011101" -o _fileout_l25_x2_n1_w12.txt || exit 99 -diff _fileout_l25_x2_n1_w12.txt _filemodel_l25_x2_n1_w12.txt || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 5 -m "1010100010000010101000100000101010001" -o _fileout_l50_x5_n1_w12.txt || exit 99 -diff _fileout_l50_x5_n1_w12.txt _filemodel_l50_x5_n1_w12.txt || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 2 -m "1010100010000010101000100000101010001:1/2" -p -o _fileout_l50_x5_n1_w12_c1-2_p.txt || exit 99 -diff _fileout_l50_x5_n1_w12_c1-2_p.txt _filemodel_l50_x5_n1_w12_c1-2_p.txt || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 2 -m "11110101100111101011,101100111101011001111" -o _fileout_l25_x2_n2_w14.txt || exit 99 -diff _fileout_l25_x2_n2_w14.txt _filemodel_l25_x2_n2_w14.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 25 -w 12,12 -s 19,19 -L 1,0 -X 2 -m "1110100111010011101" -o _fileout_l25_x2_n1_w12_ || exit 99 +diff _fileout_l25_x2_n1_w12_ _filemodel_l25_x2_n1_w12.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 5 -m "1010100010000010101000100000101010001" -o _fileout_l50_x5_n1_w12_ || exit 99 +diff _fileout_l50_x5_n1_w12_ _filemodel_l50_x5_n1_w12.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 50 -w 12,12 -L 1,0 -X 2 -m "1010100010000010101000100000101010001:1/2" -p -o _fileout_l50_x5_n1_w12_c1-2_p_ || exit 99 +diff _fileout_l50_x5_n1_w12_c1-2_p_ _filemodel_l50_x5_n1_w12_c1-2_p.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 2 -m "11110101100111101011,101100111101011001111" -o _fileout_l25_x2_n2_w14_ || exit 99 +diff _fileout_l25_x2_n2_w14_ _filemodel_l25_x2_n2_w14.txt || exit 99 ./iedera_gcov -spaced -BSymbols 01 -l 25 -L 1,0 -X 3 -m "1000111101011001000111,11101011001000111101,1011001000111101011001,110010001111010110010001" || exit 99 -./iedera_gcov -spaced -BSymbols 01 -l 32 -L 1,0 -X 5 -m "1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111" -o _fileout_l32_x5_n6_w11.txt || exit 99 -diff _fileout_l32_x5_n6_w11.txt _filemodel_l32_x5_n6_w11.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -l 32 -L 1,0 -X 5 -m "1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111" -o _fileout_l32_x5_n6_w11_ || exit 99 +diff _fileout_l32_x5_n6_w11_ _filemodel_l32_x5_n6_w11.txt || exit 99 # (5) classical spaced seeds with cycle ./iedera_gcov -spaced -BSymbols 01 -w 10,10 -s 10,11 -m "11111011111:1/2" -mx "1111111111:1/2" || exit 99 @@ -71,6 +71,6 @@ diff _fileout_l32_x5_n6_w11.txt _filemodel_l32_x5_n6_w11.txt || exit 99 ./iedera_gcov -spaced -BSymbols 01 -w 5,5 -s 5,8 -m "111011" -l 16 -u -2,1 || exit 99 # (8) dominant with input output -./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 11,11 -p -o _fileout_l64_n1_w11_p.txt || exit 99 -./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 18,18 -p -e _fileout_l64_n1_w11_p.txt -o _fileout_l64_n1_w11_p.txt -m "111011001010010111" || exit 99 -diff _fileout_l64_n1_w11_p.txt _filemodel_l64_n1_w11_p.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 11,11 -p -o _fileout_l64_n1_w11_p_ || exit 99 +./iedera_gcov -spaced -BSymbols 01 -w 11,11 -s 18,18 -p -e _fileout_l64_n1_w11_p_ -o _fileout_l64_n1_w11_p_ -m "111011001010010111" || exit 99 +diff _fileout_l64_n1_w11_p_ _filemodel_l64_n1_w11_p.txt || exit 99 From bcd918f336b045c44671591d4845d857466169aa Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 17 Jan 2017 07:57:21 +0100 Subject: [PATCH 050/123] Cleaning -pF automaton --- src/main.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cc b/src/main.cc index fea6e4b..c970835 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3904,9 +3904,11 @@ int main(int argc, char * argv[]) { polynom->clear(); delete polynom; } + if (gv_multipoly_file_flag) { delete multipoly; } + // // (5) insertion inside pareto set // @@ -4182,6 +4184,9 @@ int main(int argc, char * argv[]) { if (gv_bsens_automaton) delete gv_bsens_automaton; + if (gv_multipoly_file_flag) + delete gv_multipoly_bsens_automaton; + if (gv_bsymbols_array) free(gv_bsymbols_array); From bdf9eafe9963f0d49a0c8cf24b8bae46c647e730 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 17 Jan 2017 09:02:13 +0100 Subject: [PATCH 051/123] Updating test6 with large integer polynomials --- tests/iedera_gcov_test6 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/iedera_gcov_test6 b/tests/iedera_gcov_test6 index 3b5b6c4..60fc8ee 100755 --- a/tests/iedera_gcov_test6 +++ b/tests/iedera_gcov_test6 @@ -1,2 +1,8 @@ #!/bin/sh -./iedera_gcov -spaced -y 2 -r 10 -k -z 1 +# Multinomial tests +echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multinomial_automaton_ +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multinomial_automaton_ || exit 99 +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multinomial_automaton_ || exit 99 +echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multinomial_automaton_ +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multinomial_automaton_ || exit 99 +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multinomial_automaton_ || exit 99 From 2f9eae98cef5d7edc936c074332257d470ecc86b Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 19 Jan 2017 12:37:53 +0100 Subject: [PATCH 052/123] Putting infint as optional parameter --- src/main.cc | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/main.cc b/src/main.cc index c970835..dc0a3f1 100644 --- a/src/main.cc +++ b/src/main.cc @@ -64,7 +64,7 @@ using namespace std; #define BIGINT infint #else /// BIGINT polynomial coefs computation defined as long long (quite fast ... but overflows quickly ...) -#define BIGINT unsigned long long +#define BIGINT long long #endif @@ -269,7 +269,7 @@ bool gv_polynomial_dominant_selection_flag = false; /// flag that activate multinomial evaluation (note : this is independent from the previous dominance selection). Note that this is only a polynomial evaluation, and does not have any other effect than ... FIXME bool gv_multipoly_file_flag = false; -automaton > > * gv_multipoly_bsens_automaton = NULL; +automaton > * gv_multipoly_bsens_automaton = NULL; @@ -764,7 +764,7 @@ void PARSEPROBSAUTOMATONFILE(int & i, char ** argv, int argc, automaton /// parse and check a set of polynomial probabilities as an automaton file -void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > > * &r_automaton) { +void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > * &r_automaton) { i++; if (i >= argc) _ERROR("PARSEPOLYPROBSAUTOMATONFILE","\"" << argv[i-1] << "\" found without argument"); @@ -779,7 +779,7 @@ void PARSEMULTIPOLYAUTOMATONFILE(int & i, char ** argv, int argc, automaton > >(); + r_automaton = new automaton >(); ifs_file >> (*r_automaton); ifs_file.close(); @@ -1708,6 +1708,9 @@ void SCANARG(int argc , char ** argv) { #endif } else if (!strcmp(argv[i],"-pF")||!strcmp(argv[i],"--multipolynomial-file")) { ///@todo{FIXME : check several parameters incompatible with dominant selection and output} +#ifndef USEINFINT + _WARNING("this binary has been compiled with undefined USEINFINT (no infinite precision integer)","these specific functions : Multivariate polynomial evaluation on may overflow ...\n you can compile this program with USEINFINT defined (-DUSEINFINT) but it will be much slower"); +#endif gv_multipoly_file_flag = true; PARSEMULTIPOLYAUTOMATONFILE(i, argv, argc, gv_multipoly_bsens_automaton); } else if (!strcmp(argv[i],"-c")||!strcmp(argv[i],"--cycles")) { @@ -2185,7 +2188,7 @@ class seedproperties { public: /** @brief build a "seedproperties" object (keep current seed properties when needed) */ - seedproperties(double sel, double sens, double dist, std::string str, bool lossless = false, vector< pair,BIGINT> > * polynom = NULL, polynomial > * multipoly = NULL) { + seedproperties(double sel, double sens, double dist, std::string str, bool lossless = false, vector< pair,BIGINT> > * polynom = NULL, polynomial * multipoly = NULL) { this->sel = sel; this->sens = sens; @@ -2197,9 +2200,9 @@ class seedproperties { else this->polynom = vector< pair,BIGINT> >(0); if (multipoly) - this->multipoly = polynomial >(*multipoly); + this->multipoly = polynomial(*multipoly); else - this->multipoly = polynomial >(); + this->multipoly = polynomial(); } @@ -2212,7 +2215,7 @@ class seedproperties { this->str = string(other.str); this->lossless = other.lossless; this->polynom = vector< pair,BIGINT> >(other.polynom.begin(),other.polynom.end()); - this->multipoly = polynomial >(other.multipoly); + this->multipoly = polynomial(other.multipoly); } @@ -2229,7 +2232,7 @@ class seedproperties { /// keep polynomial factors for multihit / coverage hit /vs/ vector< pair,BIGINT> > polynom; /// keep multivariable polynomial for output only - polynomial > multipoly; + polynomial multipoly; /** @brief delete a "seedproperties" object (this is just a polynom "check and erase") */ @@ -3601,7 +3604,7 @@ int main(int argc, char * argv[]) { } std::vector< pair,BIGINT> > * polynom = NULL; - polynomial > * multipoly = NULL; + polynomial * multipoly = NULL; //FIXMECOV>> if (gv_covariance_flag) goto gv_covariance_flag_1; //<< @@ -3789,27 +3792,27 @@ int main(int argc, char * argv[]) { if (gv_multipoly_file_flag) { /* // test 1 on polynomials - automaton > > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); - polynomial > pol1 = pr->Pr(gv_alignment_length,true); + automaton > * pr = a_spr_mx_h_res->product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, PRODUCT_OTHER_IS_PROBABILIST, gv_alignment_length); + polynomial pol1 = pr->Pr(gv_alignment_length,true); cout << endl << "(a) [" << pol1 << "]" << endl; - polynomial > inv_pol1 = pr->Pr(gv_alignment_length,false); + polynomial inv_pol1 = pr->Pr(gv_alignment_length,false); cout << endl << "(a) {" << inv_pol1 << "}" << endl; cout << endl << "(a) <" << (pol1 + inv_pol1) << ">" << endl; delete pr; // test 2 on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > pol2 = m_pr->Pr(gv_alignment_length,true); + matrix > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial pol2 = m_pr->Pr(gv_alignment_length,true); cout << endl << "(b) [" << pol2 << "]" << endl; - polynomial > inv_pol2 = m_pr->Pr(gv_alignment_length,false); + polynomial inv_pol2 = m_pr->Pr(gv_alignment_length,false); cout << endl << "(b) {" << inv_pol2 << "}" << endl; cout << endl << "(b) <" << (pol2 + inv_pol2) << ">" << endl; delete m_pr; */ // implemented on matrices - matrix > > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); - polynomial > mpol = m_pr->Pr(gv_alignment_length,true); - multipoly = new polynomial >(mpol); + matrix > * m_pr = a_spr_mx_h_res->matrix_product(*gv_multipoly_bsens_automaton, PRODUCT_UNION_NO_FINAL_LOOP, gv_alignment_length); + polynomial mpol = m_pr->Pr(gv_alignment_length,true); + multipoly = new polynomial(mpol); delete m_pr; } From e7be79ca82a5d7df77ceb7e9ee36adb5bce21e7d Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 20 Jan 2017 22:44:35 +0100 Subject: [PATCH 053/123] Merge with master --- src/automaton.hh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/automaton.hh b/src/automaton.hh index f42c208..1aa615c 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -230,6 +230,41 @@ template inline istream& operator>>(istream& is, transition& tr) return is; } +/** + * @class transition + * @brief transition to a given state (on a given letter) + */ +template<> class transition { +public: + /** @brief build a transition object + * @param state gives the state number reached by this transition + */ + inline transition(int state = 0) : _state(state) {}; + /// Erase a transition + inline ~transition() {;}; + + +protected : + /// state number to be reached + int _state; + + /// state is a friend class to ease access + friend class state; + /// automaton is a friend class to ease access + friend class automaton; + /// print transition information is friend + friend ostream& operator<<(ostream& os, const transition& tr); + /// read transition information is friend + friend istream& operator>>(istream& is, transition& tr); + /// print state information is friend + friend ostream& operator<<(ostream& os, const state& st); + /// read state information is friend + friend istream& operator>>(istream& is, state& st); + /// print automaton information is friend + friend ostream& operator<<(ostream& os, const automaton& au); + /// read automaton information is friend + friend istream& operator>>(istream& is, automaton& au); +}; /** * @class state From 6d5b15c4afbab1dcfc4c8248de4d497a0d9e8aaa Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 31 Jan 2017 20:27:03 +0100 Subject: [PATCH 054/123] Updating lifl.fr to cristal.univ-lille.fr --- Makefile.in | 2 +- README | 4 +++- README.rst | 12 ++++++------ configure | 26 +++++++++++++------------- configure.ac | 2 +- src/main.cc | 4 ++-- tests/iedera_gcov_test3 | 2 +- 7 files changed, 27 insertions(+), 25 deletions(-) diff --git a/Makefile.in b/Makefile.in index de688d8..d76711c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -154,7 +154,7 @@ CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \ - INSTALL NEWS README depcomp install-sh missing mkinstalldirs + INSTALL NEWS README install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) diff --git a/README b/README index 6284f97..d08727c 100644 --- a/README +++ b/README @@ -4,7 +4,9 @@ seeds devoted to DNA and protein similarity search. This command line tool is implemented in C++ and provided for research purposes only. Help on this program can be obtained with the --help (-h) parameter, -or from the homepage : http://bioinfo.lifl.fr/yass/iedera.php +or from the homepage : + http://bioinfo.cristal.univ-lille.fr/yass/iedera.php + Several specific examples and papers are also provided on this webpage, depending on the specific usage you would need. diff --git a/README.rst b/README.rst index d41088f..3219173 100644 --- a/README.rst +++ b/README.rst @@ -11,15 +11,15 @@ :target: https://coveralls.io/github/laurentnoe/iedera :alt: Coverage -.. image:: https://img.shields.io/website-up-down-green-red/http/bioinfo.lifl.fr.svg?style=flat-square&label=Website - :target: https://bioinfo.lifl.fr/yass/iedera.php +.. image:: https://img.shields.io/website-up-down-green-red/http/bioinfo.cristal.univ-lille.fr.svg?style=flat-square&label=Website + :target: https://bioinfo.cristal.univ-lille.fr/yass/iedera.php :alt: Website iedera ====== -(more at ) +(more at ) ``iedera`` is a tool to select and design *spaced seeds*, *transition constrained spaced seeds*, or more generally *subset seeds*, and @@ -29,7 +29,7 @@ constrained spaced seeds*, or more generally *subset seeds*, and Installation ------------ -(more at ) +(more at ) You need a C++ compiler and the autotools. On Linux, you can install ``g++``, ``autoconf``, ``automake``. On Mac, you can install @@ -64,7 +64,7 @@ or copy the binary directly to your homedir:: Command-line ------------ -(more at ) +(more at ) **First, use** one of these two parameters : @@ -112,7 +112,7 @@ consider the two following: to activate the hill-climbing algorithm on previous parameter -r -(more at ) +(more at ) Examples diff --git a/configure b/configure index 94af7a7..c12e5a6 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for iedera 1.07. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -267,9 +267,9 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and laurent DT noe AT -$0: univ-lille1 DT fr about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a +$0: univ-lille DT fr about your system, including any error +$0: possibly output before this message. Then install a +$0: modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 @@ -582,8 +582,8 @@ PACKAGE_NAME='iedera' PACKAGE_TARNAME='iedera' PACKAGE_VERSION='1.07' PACKAGE_STRING='iedera 1.07' -PACKAGE_BUGREPORT='laurent DT noe AT univ-lille1 DT fr' -PACKAGE_URL='http://bioinfo.lifl.fr/yass/iedera' +PACKAGE_BUGREPORT='laurent DT noe AT univ-lille DT fr' +PACKAGE_URL='http://bioinfo.cristal.univ-lille.fr/yass/iedera' ac_unique_file="src/main.cc" # Factoring default headers for most tests. @@ -1361,8 +1361,8 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . -iedera home page: . +Report bugs to . +iedera home page: . _ACEOF ac_status=$? fi @@ -1584,9 +1584,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## -------------------------------------------------- ## -## Report this to laurent DT noe AT univ-lille1 DT fr ## -## -------------------------------------------------- ##" +( $as_echo "## ------------------------------------------------- ## +## Report this to laurent DT noe AT univ-lille DT fr ## +## ------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -4793,8 +4793,8 @@ $config_files Configuration commands: $config_commands -Report bugs to . -iedera home page: ." +Report bugs to . +iedera home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 diff --git a/configure.ac b/configure.ac index 9c07db2..387f2cd 100644 --- a/configure.ac +++ b/configure.ac @@ -181,7 +181,7 @@ AC_DEFUN([ACX_CHECK_TYPE_TRAITS_CXX11], [ -AC_INIT([iedera],[1.07],[laurent DT noe AT univ-lille1 DT fr],[iedera],[http://bioinfo.lifl.fr/yass/iedera]) +AC_INIT([iedera],[1.07],[laurent DT noe AT univ-lille DT fr],[iedera],[http://bioinfo.cristal.univ-lille.fr/yass/iedera]) AC_CONFIG_SRCDIR([src/main.cc]) AC_LANG([C++]) AM_INIT_AUTOMAKE([subdir-objects diff --git a/src/main.cc b/src/main.cc index 0c9a20c..2cfceea 100644 --- a/src/main.cc +++ b/src/main.cc @@ -11,7 +11,7 @@ * * @section Download * Download the iedera source code and binaries on the following web page:\n - * http://bioinfo.lifl.fr/yass/iedera.php\n + * http://bioinfo.cristal.univ-lille.fr/yass/iedera.php\n * A small tutorial to use iedera is also provided on this web page.\n * * @author Laurent Noe @@ -333,7 +333,7 @@ void USAGE() { cerr << " -b ,,... : set the Bernoulli/Markov background distribution (size |'A'|^k)" << endl; cerr << " -f ,,... : set the Bernoulli/Markov foreground distribution (size |'A'|^k)" << endl; cerr << " -fF : set the foreground model (as a probabilistic NFA)" << endl; - cerr << " for more details, see http://bioinfo.lifl.fr/yass/iedera.php#fFFormat" << endl; + cerr << " for more details, see http://bioinfo.cristal.univ-lille.fr/yass/iedera.php#fFFormat" << endl; cerr << " -l : set the alignment length (default = " << gv_alignment_length << ") " << endl; cerr << " -ll : select the sub-align window computation and set its length (default = disabled)" << endl; cerr << " -llf : set the sub-align function used to merge the results (default = \"min\")" << endl; diff --git a/tests/iedera_gcov_test3 b/tests/iedera_gcov_test3 index f38e577..9c95cf6 100755 --- a/tests/iedera_gcov_test3 +++ b/tests/iedera_gcov_test3 @@ -1,5 +1,5 @@ #!/bin/sh -# the protein non-tree-transitive from http://bioinfo.lifl.fr/yass/iedera_proteins/Makefile.sh +# the protein non-tree-transitive from http://bioinfo.cristal.univ-lille.fr/yass/iedera_proteins/Makefile.sh ./iedera_gcov -z 1 -w 3,6 -j 0.05 -n 2 -r 100 -k -l 16 -s 1,7 -A 47 -B 22 -M \{\{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{1,1,1,1,1,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{0,0,1,0,1,1,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1\},\{0,0,0,1,1,0,0,1,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,1,0,0,1,1,0,0,1,1,0,1,1,1,0,1,1,1,1,1,1,0,1,1,1\},\{0,0,0,0,0,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,0,1,1,0,1,1,0,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,0,0,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,1,1,1,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,1,0,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,0,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1\},\{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1\}\} -f 0.01612,0.01412,0.02288,0.00065,0.14347,0.00154,0.00168,0.01030,0.01514,0.01052,0.01076,0.01056,0.00419,0.00591,0.00192,0.00081,0.02840,0.05675,0.00273,0.00330,0.00029,0.01035,0.00191,0.03588,0.00030,0.02367,0.00466,0.00046,0.02768,0.00072,0.00759,0.01365,0.00286,0.01994,0.00964,0.00210,0.00983,0.04172,0.01117,0.00940,0.00744,0.00986,0.03641,0.00347,0.00708,0.00848,0.33169 -b 0.05108,0.03647,0.06770,0.00256,0.27712,0.00366,0.00485,0.01880,0.02941,0.01701,0.01457,0.01731,0.00757,0.00956,0.00389,0.00193,0.03584,0.07233,0.00571,0.00690,0.00064,0.01405,0.00281,0.04220,0.00068,0.02704,0.00418,0.00129,0.03316,0.00190,0.00860,0.01192,0.00234,0.01605,0.00704,0.00180,0.00583,0.02786,0.00752,0.00583,0.00479,0.00494,0.01591,0.00208,0.00372,0.00306,0.05849 || exit 99 ./iedera_gcov -z 1 -j 0.05 -l 16 -A 64 -B 64 -m "#53;v3R,L34K" || exit 99 From 1b3ac88c0a7c39f99cce5537837bc90bac623f7d Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 3 Mar 2017 08:48:50 +0100 Subject: [PATCH 055/123] Updating the constant polynomials and the reading function --- src/polynomial.hh | 67 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 9d8044b..600cee4 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -39,9 +39,37 @@ template class polynomial { public: /// Build an empty polynomial - polynomial() {for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear();}; + polynomial() { + for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); + }; + /// Build a constant polynomial - polynomial(int u) {for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(0), C(u)));}; + polynomial(int u) { + for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); + if (u != 0) + _coefs.push_back(pair, C> (vector(0), C(u))); + + /* extends all the coef vectors to size "_var_names.size()" by adding extra zeros, sort them */ + for (typename vector, C > >::iterator i_p = _coefs.begin(); i_p != _coefs.end(); i_p++) + i_p->first.resize(_var_names.size(),0); + sort(_coefs.begin(), _coefs.end()); + }; + + /// Copy Constructor + polynomial(const polynomial &other) { + for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); + + /* copy */ + for (unsigned i = 0; i < other._coefs.size(); i++) + _coefs.push_back(pair, C> (vector(other._coefs[i].first), C(other._coefs[i].second))); + + /* extends all the coef vectors to size "p._var_names.size()" by adding extra zeros, sort them */ + for (typename vector, C > >::iterator i_p = _coefs.begin(); i_p != _coefs.end(); i_p++) + i_p->first.resize(_var_names.size(),0); + sort(_coefs.begin(), _coefs.end()); + }; + + /// Erase a polynomial ~polynomial() {for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear();}; @@ -310,21 +338,32 @@ template istream& operator>> (istream& is, polynomial & p) { // read spaces until a symbol or a number occurs while (!row.eof()) { - char c = row.peek(); - if (c == ' ' || c == '\t') { - row.ignore(); - continue; - } else { - if (c >= '0' && c <= '9') { - break; + char c = row.peek(); + if (c == ' ' || c == '\t') { + row.ignore(); + continue; } else { - coef = C(1); - goto next_variable; + if (c >= '0' && c <= '9') { + break; + } else { + if (c == '+' || c == '-') { + if (c == '-') { + sign = C(-1); + } else { + sign = C(1); + } + row.ignore(); + continue; + } else { + coef = C(1); + goto next_variable; + } + } } } - } row >> coef; + if (row.fail()) { _ERROR("operator>>"," invalid coefficient (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); } @@ -399,7 +438,9 @@ template istream& operator>> (istream& is, polynomial & p) { goto next_symbol; } } - + /* extends all the coef vectors to size "p._var_names.size()" by adding extra zeros, sort them */ + for (typename vector, C > >::iterator i_p = p._coefs.begin(); i_p != p._coefs.end(); i_p++) + i_p->first.resize(p._var_names.size(),0); sort(p._coefs.begin(), p._coefs.end()); return is; } From 935576fa7784e0745238ec0eef96c792eeb55c34 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 3 Mar 2017 08:51:25 +0100 Subject: [PATCH 056/123] Updating depcomp --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index d76711c..de688d8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -154,7 +154,7 @@ CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \ - INSTALL NEWS README install-sh missing mkinstalldirs + INSTALL NEWS README depcomp install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) From 8ab57beed82ae38e9c96b9e3c1c920465b82bb98 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 21 Mar 2017 10:14:36 +0100 Subject: [PATCH 057/123] Updating url --- README.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 3219173..60d61df 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,10 @@ .. image:: https://img.shields.io/travis/laurentnoe/iedera/master.svg?style=flat-square&label=Build%20Status%20Unix - :target: https://travis-ci.org/laurentnoe/iedera + :target: https://travis-ci.org/laurentnoe/iedera/ :alt: Build Status Unix .. image:: https://img.shields.io/appveyor/ci/laurentnoe/iedera/master.svg?style=flat-square&label=Build%20Status%20Windows - :target: https://ci.appveyor.com/project/laurentnoe/iedera + :target: https://ci.appveyor.com/project/laurentnoe/iedera/ :alt: Build Status Windows .. image:: https://img.shields.io/coveralls/laurentnoe/iedera/master.svg?style=flat-square&label=Coverage @@ -184,10 +184,21 @@ will also probably improve the sensitivity result. Polynomial form --------------- -When the probability *p* to generate a *match* is not fixed (for example *p=0.7* was set in all the previous examples), Mak & Benson have proposed to use a polynomial form and select what they called **dominant seeds**. We have noticed that this dominance applies as well for any other i.i.d criteria as the *Hit Integration* (Chung & Park), for *Lossless seeds*, and several discrete models ... (see ) so the flag : +When the probability *p* to generate a *match* is not fixed (for example *p=0.7* was set in all the previous examples), Mak & Benson have proposed to use a polynomial form and select what they called **dominant seeds**. We have noticed that this dominance applies as well for any other i.i.d criteria as the *Hit Integration* (Chung & Park), for *Lossless seeds*, and several discrete models ... (see ) so the flag : -p to activate dominant selection and output polynomial coefficients is added in the current commited version of iedera (master branch). + + +References +---------- + +how to cite this tool: + + Kucherov G., Noe L., Roytberg, M., A unifying framework for seed sensitivity and its application to subset seeds, Journal of Bioinformatics and Computational Biology, 4(2):553-569, 2006 + + Noe L., Best hits of 11110110111: model-free selection and parameter-free sensitivity calculation of spaced seeds, Algorithms for Molecular Biology, 12(1). 2017 + From ba0423dba3352570b85e7136159ecaa12de2c44e Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 25 Apr 2017 20:01:06 +0200 Subject: [PATCH 058/123] Corrected : large weight bug selection due to 1e-12 : replaced with 1e-32 --- src/main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cc b/src/main.cc index 2cfceea..d96f225 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2553,7 +2553,7 @@ double insertPareto(list & l, seedproperties & e) { // seach the position where to insert list::iterator i = l.begin(); list::iterator j = l.begin(); - while(i != l.end() && i->sel + 1e-12 < e.sel) { + while(i != l.end() && i->sel + 1e-32 < e.sel) { j = i; i++; } @@ -2567,7 +2567,7 @@ double insertPareto(list & l, seedproperties & e) { } else { // e.sel <= i->sel // same sel - if (i->sel + 1e-12 >= e.sel && i->sel - 1e-12 <= e.sel) { + if (i->sel + 1e-32 >= e.sel && i->sel - 1e-32 <= e.sel) { bool lossless = e.lossless && (!(i->lossless)); double dist = e.sens - i->sens; if (!gv_polynomial_dominant_selection_flag && (lossless || (dist > 0))) { @@ -2578,7 +2578,7 @@ double insertPareto(list & l, seedproperties & e) { } else { if (gv_polynomial_dominant_selection_flag) { bool inserted = false; - while (i != l.end() && i->sel + 1e-12 >= e.sel && i->sel - 1e-12 <= e.sel) { + while (i != l.end() && i->sel + 1e-32 >= e.sel && i->sel - 1e-32 <= e.sel) { if ((*i) == e) return 0; dist = MIN(dist, e.sens - i->sens); From 05001e940d8fdb942c7565981a465d55e9e0738f Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 25 Apr 2017 21:36:39 +0200 Subject: [PATCH 059/123] Corrected : polynomial pareto input was incorrect due to missing border pareto polynomials --- src/main.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main.cc b/src/main.cc index d96f225..9191e29 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2327,7 +2327,7 @@ bool operator==(const seedproperties & e1, const seedproperties & e2) { */ std::ostream& operator<<(std::ostream& os, seedproperties& e){ os.setf(ios_base::fixed, ios_base::floatfield); - os.precision(12); + os.precision(13); os << e.str << "\t" << e.sel << "\t"; os.precision(6); if (gv_lossless_flag && e.lossless) @@ -2392,8 +2392,6 @@ double areaConvex(list & l) { // (1) push border seedproperties and sort l.sort(); - l.push_front(seedproperties(0.0, 1.0, 1.0, string(""), gv_lossless_flag)); - l.push_back( seedproperties(1.0, 0.0, 1.0, string(""), false)); // (2) compute convex hull list::iterator i = l.begin(); @@ -2553,7 +2551,7 @@ double insertPareto(list & l, seedproperties & e) { // seach the position where to insert list::iterator i = l.begin(); list::iterator j = l.begin(); - while(i != l.end() && i->sel + 1e-32 < e.sel) { + while(i != l.end() && i->sel + 1e-13 < e.sel) { j = i; i++; } @@ -2567,7 +2565,7 @@ double insertPareto(list & l, seedproperties & e) { } else { // e.sel <= i->sel // same sel - if (i->sel + 1e-32 >= e.sel && i->sel - 1e-32 <= e.sel) { + if (i->sel + 1e-13 >= e.sel && i->sel - 1e-13 <= e.sel) { bool lossless = e.lossless && (!(i->lossless)); double dist = e.sens - i->sens; if (!gv_polynomial_dominant_selection_flag && (lossless || (dist > 0))) { @@ -2578,7 +2576,7 @@ double insertPareto(list & l, seedproperties & e) { } else { if (gv_polynomial_dominant_selection_flag) { bool inserted = false; - while (i != l.end() && i->sel + 1e-32 >= e.sel && i->sel - 1e-32 <= e.sel) { + while (i != l.end() && i->sel + 1e-13 >= e.sel && i->sel - 1e-13 <= e.sel) { if ((*i) == e) return 0; dist = MIN(dist, e.sens - i->sens); @@ -2948,8 +2946,10 @@ int main(int argc, char * argv[]) { SCANARG(argc, argv); l = list(); - l.push_front(seedproperties(0.0, 1.0, 1.0, string(""), gv_lossless_flag)); - l.push_back( seedproperties(1.0, 0.0, 1.0, string(""), false)); + vector< pair,BIGINT> > v1_one = vector< pair,BIGINT> >(1,pair,BIGINT>(pair(0,1),1)); + vector< pair,BIGINT> > v0_one = vector< pair,BIGINT> >(1,pair,BIGINT>(pair(0,0),1)); + l.push_front(seedproperties(0.0, 1.0, 1.0, string(""), gv_lossless_flag, &v1_one)); + l.push_back( seedproperties(1.0, 0.0, 1.0, string(""), false, &v0_one)); // randomize srand(GETMSTIME()*GETPID()); From 0c2f901426debabd5d92165bd3b2d675abdeebc2 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 25 Apr 2017 23:05:24 +0200 Subject: [PATCH 060/123] Updating tests with selectivity precision from 12 to 13 --- tests/_filemodel_l25_x2_n1_w12.txt | 2 +- tests/_filemodel_l25_x2_n2_w14.txt | 2 +- tests/_filemodel_l32_x5_n6_w11.txt | 2 +- tests/_filemodel_l50_x5_n1_w12.txt | 2 +- tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt | 2 +- tests/_filemodel_l64_n1_w11_p.txt | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/_filemodel_l25_x2_n1_w12.txt b/tests/_filemodel_l25_x2_n1_w12.txt index 68e2dc9..33fe003 100644 --- a/tests/_filemodel_l25_x2_n1_w12.txt +++ b/tests/_filemodel_l25_x2_n1_w12.txt @@ -1 +1 @@ -1110100111010011101 0.999999940395 [lossless] 0.000000 +1110100111010011101 0.9999999403954 [lossless] 0.000000 diff --git a/tests/_filemodel_l25_x2_n2_w14.txt b/tests/_filemodel_l25_x2_n2_w14.txt index b79f834..48a3a32 100644 --- a/tests/_filemodel_l25_x2_n2_w14.txt +++ b/tests/_filemodel_l25_x2_n2_w14.txt @@ -1 +1 @@ -11110101100111101011,101100111101011001111 0.999999992549 [lossless] 0.000000 +11110101100111101011,101100111101011001111 0.9999999925494 [lossless] 0.000000 diff --git a/tests/_filemodel_l32_x5_n6_w11.txt b/tests/_filemodel_l32_x5_n6_w11.txt index 0074ee7..1568001 100644 --- a/tests/_filemodel_l32_x5_n6_w11.txt +++ b/tests/_filemodel_l32_x5_n6_w11.txt @@ -1 +1 @@ -1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111 0.999998569489 [lossless] 0.000001 +1111000100000000010001001111,111001001100000000101111,11110000100100110111,111010100011001111,11101101100101011,11110110101111 0.9999985694885 [lossless] 0.000001 diff --git a/tests/_filemodel_l50_x5_n1_w12.txt b/tests/_filemodel_l50_x5_n1_w12.txt index 8681f61..40ba94f 100644 --- a/tests/_filemodel_l50_x5_n1_w12.txt +++ b/tests/_filemodel_l50_x5_n1_w12.txt @@ -1 +1 @@ -1010100010000010101000100000101010001 0.999999940395 [lossless] 0.000000 +1010100010000010101000100000101010001 0.9999999403954 [lossless] 0.000000 diff --git a/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt b/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt index 1f38261..3c45904 100644 --- a/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt +++ b/tests/_filemodel_l50_x5_n1_w12_c1-2_p.txt @@ -1 +1 @@ -1010100010000010101000100000101010001:1/2 0.999999970198 [lossless] 0.000000 0,0=1;1,0=50;2,0=1225;3,0=19600;4,0=230300;5,0=2118760;6,0=15890700;7,0=99884400;8,0=536878650;9,0=2505433700;10,0=10272278170;11,0=37353738800;12,0=121399651100;13,0=354860518600;14,0=937845656300;15,0=2250829575120;16,0=4923689695575;17,0=9847379391150;18,0=18053528883775;19,0=30405943383200;20,0=47129212243960;21,0=67327446062800;22,0=88749815264600;23,0=108043253365600;24,0=121548660036300;25,0=126410606437752;26,0=121548660036300;27,0=108043253365600;28,0=88749815264600;29,0=67327446062800;30,0=47129212243960;31,0=30405943383186;32,0=18053528883444;33,0=9847379387499;34,0=4923689670600;35,0=2250829456574;36,0=937845243464;37,0=354859431634;38,0=121397451393;39,0=37350286423;40,0=10268055331;41,0=2501395659;42,0=533853274;43,0=98108817;44,0=15080336;45,0=1837123;46,0=158822;47,0=7333;31,1=14;32,1=331;33,1=3651;34,1=24975;35,1=118546;36,1=412836;37,1=1086966;38,1=2199707;39,1=3452377;40,1=4222839;41,1=4038041;42,1=3025376;43,1=1775583;44,1=810364;45,1=281637;46,1=71478;47,1=12267;48,1=1225;49,1=50;50,1=1; +1010100010000010101000100000101010001:1/2 0.9999999701977 [lossless] 0.000000 0,0=1;1,0=50;2,0=1225;3,0=19600;4,0=230300;5,0=2118760;6,0=15890700;7,0=99884400;8,0=536878650;9,0=2505433700;10,0=10272278170;11,0=37353738800;12,0=121399651100;13,0=354860518600;14,0=937845656300;15,0=2250829575120;16,0=4923689695575;17,0=9847379391150;18,0=18053528883775;19,0=30405943383200;20,0=47129212243960;21,0=67327446062800;22,0=88749815264600;23,0=108043253365600;24,0=121548660036300;25,0=126410606437752;26,0=121548660036300;27,0=108043253365600;28,0=88749815264600;29,0=67327446062800;30,0=47129212243960;31,0=30405943383186;32,0=18053528883444;33,0=9847379387499;34,0=4923689670600;35,0=2250829456574;36,0=937845243464;37,0=354859431634;38,0=121397451393;39,0=37350286423;40,0=10268055331;41,0=2501395659;42,0=533853274;43,0=98108817;44,0=15080336;45,0=1837123;46,0=158822;47,0=7333;31,1=14;32,1=331;33,1=3651;34,1=24975;35,1=118546;36,1=412836;37,1=1086966;38,1=2199707;39,1=3452377;40,1=4222839;41,1=4038041;42,1=3025376;43,1=1775583;44,1=810364;45,1=281637;46,1=71478;47,1=12267;48,1=1225;49,1=50;50,1=1; diff --git a/tests/_filemodel_l64_n1_w11_p.txt b/tests/_filemodel_l64_n1_w11_p.txt index 65553fa..f9c18f5 100644 --- a/tests/_filemodel_l64_n1_w11_p.txt +++ b/tests/_filemodel_l64_n1_w11_p.txt @@ -1,2 +1,2 @@ -11111111111 0.999999761581 0.300196 0.699804 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781770;12,0=3284214700247;13,0=13136858740568;14,0=47855698764090;15,0=159518985221470;16,0=488526796465015;17,0=1379369073324480;18,0=3601681546293320;19,0=8719837354778060;20,0=19619526360041370;21,0=41107138917552400;22,0=80344170821857243;23,0=146710222700336022;24,0=250614608358746870;25,0=400942409564252192;26,0=601314089647852938;27,0=846072885188815746;28,0=1117574871513130569;29,0=1386492079370757912;30,0=1616121948231683249;31,0=1770210255924022556;32,0=1822131365284154463;33,0=1762291375749801312;34,0=1600967620817216439;35,0=1365451736026825692;36,0=1092577605526488130;37,0=819417124590802612;38,0=575332615296241803;39,0=377618991753851540;40,0=231273825758216120;41,0=131883019620798840;42,0=69839310144356515;43,0=34236564424380010;44,0=15478054228879620;45,0=6423957399302120;46,0=2434237391562065;47,0=836558973214758;48,0=258610112972557;49,0=71185852870000;50,0=17225720307741;51,0=3604563306344;52,0=638296654490;53,0=92883026820;54,0=10655344766;55,0=905642810;56,0=51565824;57,0=1632920;58,0=18515;59,0=6;11,1=54;12,1=2809;13,1=71656;14,1=1194726;15,1=14641250;16,1=140614565;17,1=1101959040;18,1=7244724760;19,1=40770844660;20,1=199422609750;21,1=857960383280;22,1=3277621380677;23,1=11204891663658;24,1=34497110919250;25,1=96159187213600;26,1=243763479345750;27,1=564093286500926;28,1=1195421472109319;29,1=2326215369539880;30,1=4166062298664175;31,1=6879820141519780;32,1=10492775658436071;33,1=14798700315741024;34,1=19320389713130985;35,1=23366558713472100;36,1=26192687458751758;37,1=27219853884514060;38,1=26225237830956885;39,1=23419576997614252;40,1=19375279711450000;41,1=14838407971200840;42,1=10508138298881405;43,1=6871432453555670;44,1=4141671553771500;45,1=2295920726320600;46,1=1167451399456015;47,1=542811202068762;48,1=229916824107023;49,1=88333146992720;50,1=30629979651075;51,1=9532295505880;52,1=2645918048566;53,1=650712755004;54,1=140817870050;55,1=26634941702;56,1=4374599544;57,1=619583272;58,1=74955853;59,1=7624506;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; -111011001010010111 0.999999761581 0.467122 0.532878 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781777;12,0=3284214700565;13,0=13136858747458;14,0=47855698857794;15,0=159518986099945;16,0=488526802204385;17,0=1379369096282095;18,0=3601681546299789;19,0=8719836468607201;20,0=19619517499141187;21,0=41107080446425363;22,0=80343866157172783;23,0=146708890435753575;24,0=250609569910552071;25,0=400925632502881515;26,0=601264312631447468;27,0=845940164130258653;28,0=1117254821139848731;29,0=1385790635445210792;30,0=1614719381147262338;31,0=1767643947486681481;32,0=1817824562288653658;33,0=1755650543264156900;34,0=1591547502223381478;35,0=1353148889713300599;36,0=1077778533431254331;37,0=803021552527398866;38,0=558610847453807986;39,0=361933096117132953;40,0=217759100297917382;41,0=121208665847580369;42,0=62130106545519883;43,0=29162078256160894;44,0=12446316851341899;45,0=4788458918512655;46,0=1642746872975316;47,0=495710355475511;48,0=129302147880455;49,0=28506821936930;50,0=5158005916919;51,0=736493116933;52,0=78663279218;53,0=5829433985;54,0=268389309;55,0=6454323;56,0=60046;57,0=120;11,1=47;12,1=2491;13,1=64766;14,1=1101022;15,1=13762775;16,1=134875195;17,1=1079001425;18,1=7244718291;19,1=41657015519;20,1=208283509933;21,1=916431510317;22,1=3582286065137;23,1=12537156246105;24,1=39535559114049;25,1=112936248584277;26,1=293540495751220;27,1=696814345058019;28,1=1515471845391157;29,1=3027659295087000;30,1=5568629383085086;31,1=9446128578860855;32,1=14799578653936876;33,1=21439532801385436;34,1=28740508306965946;35,1=35669405026997193;36,1=40991759553985557;37,1=43615425947917806;38,1=42947005673390702;39,1=39105472634332839;40,1=32890005171748738;41,1=25512761744419311;42,1=18217341897718037;43,1=11945918621774786;44,1=7173408931309221;45,1=3931419207110065;46,1=1958941918042764;47,1=883659819808009;48,1=359224789199125;49,1=131012177925790;50,1=42697694041897;51,1=12400365695291;52,1=3205551423838;53,1=737766347839;54,1=151204825507;55,1=27534130189;56,1=4426105322;57,1=621216072;58,1=74974368;59,1=7624512;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; +11111111111 0.9999997615814 0.300196 0.699804 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781770;12,0=3284214700247;13,0=13136858740568;14,0=47855698764090;15,0=159518985221470;16,0=488526796465015;17,0=1379369073324480;18,0=3601681546293320;19,0=8719837354778060;20,0=19619526360041370;21,0=41107138917552400;22,0=80344170821857243;23,0=146710222700336022;24,0=250614608358746870;25,0=400942409564252192;26,0=601314089647852938;27,0=846072885188815746;28,0=1117574871513130569;29,0=1386492079370757912;30,0=1616121948231683249;31,0=1770210255924022556;32,0=1822131365284154463;33,0=1762291375749801312;34,0=1600967620817216439;35,0=1365451736026825692;36,0=1092577605526488130;37,0=819417124590802612;38,0=575332615296241803;39,0=377618991753851540;40,0=231273825758216120;41,0=131883019620798840;42,0=69839310144356515;43,0=34236564424380010;44,0=15478054228879620;45,0=6423957399302120;46,0=2434237391562065;47,0=836558973214758;48,0=258610112972557;49,0=71185852870000;50,0=17225720307741;51,0=3604563306344;52,0=638296654490;53,0=92883026820;54,0=10655344766;55,0=905642810;56,0=51565824;57,0=1632920;58,0=18515;59,0=6;11,1=54;12,1=2809;13,1=71656;14,1=1194726;15,1=14641250;16,1=140614565;17,1=1101959040;18,1=7244724760;19,1=40770844660;20,1=199422609750;21,1=857960383280;22,1=3277621380677;23,1=11204891663658;24,1=34497110919250;25,1=96159187213600;26,1=243763479345750;27,1=564093286500926;28,1=1195421472109319;29,1=2326215369539880;30,1=4166062298664175;31,1=6879820141519780;32,1=10492775658436071;33,1=14798700315741024;34,1=19320389713130985;35,1=23366558713472100;36,1=26192687458751758;37,1=27219853884514060;38,1=26225237830956885;39,1=23419576997614252;40,1=19375279711450000;41,1=14838407971200840;42,1=10508138298881405;43,1=6871432453555670;44,1=4141671553771500;45,1=2295920726320600;46,1=1167451399456015;47,1=542811202068762;48,1=229916824107023;49,1=88333146992720;50,1=30629979651075;51,1=9532295505880;52,1=2645918048566;53,1=650712755004;54,1=140817870050;55,1=26634941702;56,1=4374599544;57,1=619583272;58,1=74955853;59,1=7624506;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; +111011001010010111 0.9999997615814 0.467122 0.532878 0,0=1;1,0=64;2,0=2016;3,0=41664;4,0=635376;5,0=7624512;6,0=74974368;7,0=621216192;8,0=4426165368;9,0=27540584512;10,0=151473214816;11,0=743595781777;12,0=3284214700565;13,0=13136858747458;14,0=47855698857794;15,0=159518986099945;16,0=488526802204385;17,0=1379369096282095;18,0=3601681546299789;19,0=8719836468607201;20,0=19619517499141187;21,0=41107080446425363;22,0=80343866157172783;23,0=146708890435753575;24,0=250609569910552071;25,0=400925632502881515;26,0=601264312631447468;27,0=845940164130258653;28,0=1117254821139848731;29,0=1385790635445210792;30,0=1614719381147262338;31,0=1767643947486681481;32,0=1817824562288653658;33,0=1755650543264156900;34,0=1591547502223381478;35,0=1353148889713300599;36,0=1077778533431254331;37,0=803021552527398866;38,0=558610847453807986;39,0=361933096117132953;40,0=217759100297917382;41,0=121208665847580369;42,0=62130106545519883;43,0=29162078256160894;44,0=12446316851341899;45,0=4788458918512655;46,0=1642746872975316;47,0=495710355475511;48,0=129302147880455;49,0=28506821936930;50,0=5158005916919;51,0=736493116933;52,0=78663279218;53,0=5829433985;54,0=268389309;55,0=6454323;56,0=60046;57,0=120;11,1=47;12,1=2491;13,1=64766;14,1=1101022;15,1=13762775;16,1=134875195;17,1=1079001425;18,1=7244718291;19,1=41657015519;20,1=208283509933;21,1=916431510317;22,1=3582286065137;23,1=12537156246105;24,1=39535559114049;25,1=112936248584277;26,1=293540495751220;27,1=696814345058019;28,1=1515471845391157;29,1=3027659295087000;30,1=5568629383085086;31,1=9446128578860855;32,1=14799578653936876;33,1=21439532801385436;34,1=28740508306965946;35,1=35669405026997193;36,1=40991759553985557;37,1=43615425947917806;38,1=42947005673390702;39,1=39105472634332839;40,1=32890005171748738;41,1=25512761744419311;42,1=18217341897718037;43,1=11945918621774786;44,1=7173408931309221;45,1=3931419207110065;46,1=1958941918042764;47,1=883659819808009;48,1=359224789199125;49,1=131012177925790;50,1=42697694041897;51,1=12400365695291;52,1=3205551423838;53,1=737766347839;54,1=151204825507;55,1=27534130189;56,1=4426105322;57,1=621216072;58,1=74974368;59,1=7624512;60,1=635376;61,1=41664;62,1=2016;63,1=64;64,1=1; From f3e358a8a14ec91d4bceb63709d1df65743f758e Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 25 Apr 2017 23:05:24 +0200 Subject: [PATCH 061/123] Updating tests with selectivity precision from 12 to 13 From eacd64491a5b1a235b42211238815aedc39c6ba3 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 26 Apr 2017 09:24:27 +0200 Subject: [PATCH 062/123] Update : insertPareto code simplified --- src/main.cc | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/src/main.cc b/src/main.cc index 9191e29..2889b3e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2550,33 +2550,34 @@ double list_and_areaPareto(list & l) { double insertPareto(list & l, seedproperties & e) { // seach the position where to insert list::iterator i = l.begin(); - list::iterator j = l.begin(); + double last_sens = 1.0; while(i != l.end() && i->sel + 1e-13 < e.sel) { - j = i; + last_sens = i->sens; i++; } // insert (front/back/between) if ( i == l.end()) { + // "e" is the first seed, or has higher selectivity l.push_back(e); - return (e.sens - j->sens); - } else if ( i == l.begin() ) { - l.push_front(e); - return (e.sens - i->sens); + return (e.sens - last_sens); } else { - // e.sel <= i->sel - // same sel - if (i->sel + 1e-13 >= e.sel && i->sel - 1e-13 <= e.sel) { + // "e" has lower selectivity + if (i->sel - 1e-13 > e.sel) { + l.insert(i, e); + return (e.sens - last_sens); + } else { + // "e" has approximately the same selectivity : (i->sel - 1e-13 <= e.sel && i->sel + 1e+13) bool lossless = e.lossless && (!(i->lossless)); double dist = e.sens - i->sens; if (!gv_polynomial_dominant_selection_flag && (lossless || (dist > 0))) { - // replace i by e + // better lossy seed, or "first" new lossless seed : replace i by e l.insert(i, e); l.erase(i); return dist; } else { if (gv_polynomial_dominant_selection_flag) { bool inserted = false; - while (i != l.end() && i->sel + 1e-13 >= e.sel && i->sel - 1e-13 <= e.sel) { + while (i != l.end() && i->sel - 1e-13 <= e.sel && e.sel <= i->sel + 1e-13) { if ((*i) == e) return 0; dist = MIN(dist, e.sens - i->sens); @@ -2603,23 +2604,11 @@ double insertPareto(list & l, seedproperties & e) { l.insert(i, e); } return dist; - } else { - return dist; } } - } else { - bool lossless = e.lossless && (!(i->lossless)); - double dist = e.sens - i->sens; - // j->sel < e.sel < i->sel - if (lossless || (dist > 0) || gv_polynomial_dominant_selection_flag) { - // add e before i (so between j and i) - l.insert(i, e); - return dist; - } else { - return dist; - } } } + return 0; } From d358835f42d5967db6137c92e2f45c7d2d4b977d Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 14 Dec 2017 08:31:05 +0100 Subject: [PATCH 063/123] Updating the pF multivariate example, very first example --- README.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.rst b/README.rst index 60d61df..98dbaac 100644 --- a/README.rst +++ b/README.rst @@ -184,6 +184,9 @@ will also probably improve the sensitivity result. Polynomial form --------------- +Bernoulli model +~~~~~~~~~~~~~~~ + When the probability *p* to generate a *match* is not fixed (for example *p=0.7* was set in all the previous examples), Mak & Benson have proposed to use a polynomial form and select what they called **dominant seeds**. We have noticed that this dominance applies as well for any other i.i.d criteria as the *Hit Integration* (Chung & Park), for *Lossless seeds*, and several discrete models ... (see ) so the flag : -p @@ -192,6 +195,32 @@ When the probability *p* to generate a *match* is not fixed (for example *p=0.7* is added in the current commited version of iedera (master branch). +Other multivariate models +~~~~~~~~~~~~~~~~~~~~~~~~~ + +When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag : + +-pF + to activate the output only (pareto selection made) of the multivariate polynomial coefficients, according to this model + +is added in this local branch. The following example, compute the sensitivity of the seed 1101 on alignments of length 8 : + + iedera -spaced -pF model_bernoulli_simple_x_xp.txt -m "##-#" -l 8 + +on the bernoulli model given by the file *model_bernoulli_simple_x_xp.txt* : + + 2 + 0 1 + 0 1 + 0 x + 1 1 + 0 xp + 1 0 + 0 1 + 1 x + 1 1 + 1 xp + References ---------- From f27f593504ff2cad4b1198373060b428b40f9bcd Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 14 Dec 2017 08:34:15 +0100 Subject: [PATCH 064/123] Updating the pF multivariate example, typos --- README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 98dbaac..118b973 100644 --- a/README.rst +++ b/README.rst @@ -198,16 +198,16 @@ is added in the current commited version of iedera (master branch). Other multivariate models ~~~~~~~~~~~~~~~~~~~~~~~~~ -When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag : +When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag : --pF - to activate the output only (pareto selection made) of the multivariate polynomial coefficients, according to this model +-pF + to activate the output of the multivariate polynomial on the given model -is added in this local branch. The following example, compute the sensitivity of the seed 1101 on alignments of length 8 : +is added in this local branch. The following example, compute the sensitivity of the seed 1101 on alignments of length 8 :: iedera -spaced -pF model_bernoulli_simple_x_xp.txt -m "##-#" -l 8 -on the bernoulli model given by the file *model_bernoulli_simple_x_xp.txt* : +on the bernoulli model given by the file *model_bernoulli_simple_x_xp.txt* :: 2 0 1 From 452c776d1038481666315c909ad02a9dbd9437b2 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 14 Dec 2017 08:36:20 +0100 Subject: [PATCH 065/123] Updating the pF multivariate example, typos --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 118b973..54263fa 100644 --- a/README.rst +++ b/README.rst @@ -203,11 +203,11 @@ When the probabilitic model is more complex compared to a simple Bernoulli model -pF to activate the output of the multivariate polynomial on the given model -is added in this local branch. The following example, compute the sensitivity of the seed 1101 on alignments of length 8 :: +is added in this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: iedera -spaced -pF model_bernoulli_simple_x_xp.txt -m "##-#" -l 8 -on the bernoulli model given by the file *model_bernoulli_simple_x_xp.txt* :: +on the bernoulli model provided by the file *model_bernoulli_simple_x_xp.txt* :: 2 0 1 From ffd3a8ebd5c848a72cf513d48a70847a5fc3c020 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 14 Dec 2017 08:40:10 +0100 Subject: [PATCH 066/123] Updating the pF multivariate example, typos --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 54263fa..d055003 100644 --- a/README.rst +++ b/README.rst @@ -187,22 +187,23 @@ Polynomial form Bernoulli model ~~~~~~~~~~~~~~~ -When the probability *p* to generate a *match* is not fixed (for example *p=0.7* was set in all the previous examples), Mak & Benson have proposed to use a polynomial form and select what they called **dominant seeds**. We have noticed that this dominance applies as well for any other i.i.d criteria as the *Hit Integration* (Chung & Park), for *Lossless seeds*, and several discrete models ... (see ) so the flag : +When the probability *p* to generate a *match* is not fixed (for example *p=0.7* was set in all the previous examples), Mak & Benson have proposed to use a polynomial form and select what they called **dominant seeds**. We have noticed that this dominance applies as well for any other i.i.d criteria as the *Hit Integration* (Chung & Park), for *Lossless seeds*, and several discrete models ... (see ) so the flag: -p to activate dominant selection and output polynomial coefficients - + is added in the current commited version of iedera (master branch). Other multivariate models ~~~~~~~~~~~~~~~~~~~~~~~~~ -When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag : +When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag: -pF to activate the output of the multivariate polynomial on the given model + is added in this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: iedera -spaced -pF model_bernoulli_simple_x_xp.txt -m "##-#" -l 8 From 4526dadf0f1e9aa0444975135b86cfa24a7a0c8d Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 19 Dec 2017 09:35:27 +0100 Subject: [PATCH 067/123] table view of -pF parameter --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index d055003..9d78e79 100644 --- a/README.rst +++ b/README.rst @@ -200,9 +200,9 @@ Other multivariate models When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag: --pF - to activate the output of the multivariate polynomial on the given model - ++================+==========================================================================+ +| -pF | to activate the output of the multivariate polynomial on the given model | ++----------------+--------------------------------------------------------------------------+ is added in this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: From 2a60b24ebd805baf5a0932c565d34c37b4dca612 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 19 Dec 2017 09:37:35 +0100 Subject: [PATCH 068/123] table view of -pF parameter --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 9d78e79..fe30a87 100644 --- a/README.rst +++ b/README.rst @@ -200,9 +200,9 @@ Other multivariate models When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag: -+================+==========================================================================+ -| -pF | to activate the output of the multivariate polynomial on the given model | +----------------+--------------------------------------------------------------------------+ +| -pF | to activate the output of the multivariate polynomial on the given model | ++================+==========================================================================+ is added in this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: From b2729c70213e157f3a26ab3feb59e1b69ff693d2 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 19 Dec 2017 09:40:27 +0100 Subject: [PATCH 069/123] inline view of -pF parameter --- README.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.rst b/README.rst index fe30a87..a1fe6f0 100644 --- a/README.rst +++ b/README.rst @@ -198,13 +198,7 @@ is added in the current commited version of iedera (master branch). Other multivariate models ~~~~~~~~~~~~~~~~~~~~~~~~~ -When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag: - -+----------------+--------------------------------------------------------------------------+ -| -pF | to activate the output of the multivariate polynomial on the given model | -+================+==========================================================================+ - -is added in this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: +When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag `` -pF `` activates the output of the multivariate polynomial on the given model. This flag is added on this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: iedera -spaced -pF model_bernoulli_simple_x_xp.txt -m "##-#" -l 8 From 6add126fc76229497ccd9a7a8e9cdbb791ae1015 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 19 Dec 2017 09:42:31 +0100 Subject: [PATCH 070/123] inline view of -pF parameter --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a1fe6f0..e623bdf 100644 --- a/README.rst +++ b/README.rst @@ -198,7 +198,7 @@ is added in the current commited version of iedera (master branch). Other multivariate models ~~~~~~~~~~~~~~~~~~~~~~~~~ -When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag `` -pF `` activates the output of the multivariate polynomial on the given model. This flag is added on this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: +When the probabilitic model is more complex compared to a simple Bernoulli model on a binary alphabet, it is possible to compute the probability as a multivariate polynomial form. For a given seed provided with the *-m* parameter, the output will contain this polynomial form set in square brackets. *Selection of the best seeds is left as an exercice for the reader.* The flag ``-pF `` activates the output of the multivariate polynomial on the given model. This flag is added on this local branch. The next example gives sensitivity of the seed 1101 on alignments of length 8 :: iedera -spaced -pF model_bernoulli_simple_x_xp.txt -m "##-#" -l 8 From 2bce0fb068da99173ae35a9928b7644867595b82 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 29 Mar 2018 13:25:05 +0200 Subject: [PATCH 071/123] Changing the doxygenconfig from 1.8.7 to 1.8.13 --- doxygenconfig | 354 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 232 insertions(+), 122 deletions(-) diff --git a/doxygenconfig b/doxygenconfig index 12166ac..ec89bce 100644 --- a/doxygenconfig +++ b/doxygenconfig @@ -1,4 +1,4 @@ -# Doxyfile 1.8.7 +# Doxyfile 1.8.13 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = 1.07 PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -135,7 +135,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -205,9 +205,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -276,7 +276,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -293,10 +293,19 @@ EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -336,13 +345,20 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent @@ -401,7 +417,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -411,35 +427,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -464,21 +480,21 @@ HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -492,7 +508,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -501,12 +517,19 @@ INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -534,14 +557,14 @@ INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -586,27 +609,25 @@ SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -631,8 +652,8 @@ ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -680,8 +701,7 @@ LAYOUT_FILE = # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. +# search path. See also \cite for info how to create references. CITE_BIB_FILES = @@ -697,7 +717,7 @@ CITE_BIB_FILES = QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -705,7 +725,7 @@ QUIET = NO WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -722,12 +742,18 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated @@ -751,7 +777,7 @@ WARN_LOGFILE = # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with -# spaces. +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = src @@ -767,12 +793,17 @@ INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = *.cc \ *.h \ @@ -860,6 +891,10 @@ IMAGE_PATH = # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. INPUT_FILTER = @@ -869,11 +904,15 @@ INPUT_FILTER = # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -933,7 +972,7 @@ REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -1010,7 +1049,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1072,13 +1111,15 @@ HTML_FOOTER = HTML_STYLESHEET = -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = @@ -1094,7 +1135,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1125,8 +1166,9 @@ HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES @@ -1222,28 +1264,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1357,7 +1399,7 @@ DISABLE_INDEX = NO # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1385,7 +1427,7 @@ ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1414,7 +1456,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1500,7 +1542,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1513,7 +1555,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1551,7 +1593,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = YES @@ -1582,7 +1624,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1600,9 +1642,12 @@ COMPACT_LATEX = NO PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names -# that should be included in the LaTeX output. To get the times font for -# instance you can specify -# EXTRA_PACKAGES=times +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1616,23 +1661,36 @@ EXTRA_PACKAGES = # # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, -# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will -# replace them by respectively the title of the page, the current date and time, -# only the current date, the version number of doxygen, the project name (see -# PROJECT_NAME), or the project number (see PROJECT_NUMBER). +# $datetime, $date, $doxygenversion, $projectname, $projectnumber, +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last -# chapter. If it is left blank doxygen will generate a standard footer. +# chapter. If it is left blank doxygen will generate a standard footer. See +# LATEX_HEADER for more information on how to generate a default footer and what +# special commands can be used inside the footer. # # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1650,8 +1708,8 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES -# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1692,11 +1750,19 @@ LATEX_SOURCE_CODE = NO LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1711,7 +1777,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1748,11 +1814,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1796,7 +1872,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1810,7 +1886,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1823,7 +1899,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1837,14 +1913,23 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the +# program listings (including syntax highlighting and cross-referencing +# information) to the DOCBOOK output. Note that enabling this will significantly +# increase the size of the DOCBOOK output. +# The default value is: NO. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_PROGRAMLISTING = NO + #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1853,7 +1938,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1861,7 +1946,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1869,9 +1954,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1891,14 +1976,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1914,7 +1999,7 @@ MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -1990,20 +2075,21 @@ TAGFILES = GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2020,7 +2106,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2045,7 +2131,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2070,7 +2156,7 @@ HAVE_DOT = YES DOT_NUM_THREADS = 0 -# When you want a differently looking font n the dot files that doxygen +# When you want a differently looking font in the dot files that doxygen # generates you can specify the font name using DOT_FONTNAME. You need to make # sure dot is able to find the font, which can be done by putting it in a # standard location or by setting the DOTFONTPATH environment variable or by @@ -2118,7 +2204,7 @@ COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2170,7 +2256,8 @@ INCLUDED_BY_GRAPH = YES # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2181,7 +2268,8 @@ CALL_GRAPH = NO # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2204,11 +2292,15 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). -# Possible values are: png, jpg, gif and svg. +# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2251,6 +2343,24 @@ MSCFILE_DIRS = DIAFILE_DIRS = +# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the +# path where java can find the plantuml.jar file. If left blank, it is assumed +# PlantUML is not used or called during a preprocessing step. Doxygen will +# generate a warning when it encounters a \startuml command in this case and +# will not generate output for the diagram. + +PLANTUML_JAR_PATH = + +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2287,7 +2397,7 @@ MAX_DOT_GRAPH_DEPTH = 0 DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2304,7 +2414,7 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. From c0470339ea9bb853de983e5c33167e73ca1a9d62 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 29 Mar 2018 15:41:41 +0200 Subject: [PATCH 072/123] Changing the Makefile.in from 1.15 to 1.16.1 --- Makefile.in | 23 ++++++++++++---------- src/Makefile.in | 39 ++++++++++++++++++++++++------------ tests/Makefile.in | 50 +++++++++++++++++++++++++++++++---------------- 3 files changed, 73 insertions(+), 39 deletions(-) diff --git a/Makefile.in b/Makefile.in index de688d8..2149cbf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -131,7 +131,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -312,8 +312,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -431,7 +431,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -496,7 +499,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -522,7 +525,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -540,7 +543,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -550,7 +553,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff --git a/src/Makefile.in b/src/Makefile.in index 6ce99c4..f19fdc7 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -118,7 +118,9 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/iedera-macro.Po \ + ./$(DEPDIR)/iedera-main.Po ./$(DEPDIR)/iedera-seed.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -292,8 +294,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -357,9 +359,15 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iedera-macro.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iedera-main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iedera-seed.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iedera-macro.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iedera-main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iedera-seed.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -471,7 +479,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -543,7 +554,9 @@ clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/iedera-macro.Po + -rm -f ./$(DEPDIR)/iedera-main.Po + -rm -f ./$(DEPDIR)/iedera-seed.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -589,7 +602,9 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/iedera-macro.Po + -rm -f ./$(DEPDIR)/iedera-main.Po + -rm -f ./$(DEPDIR)/iedera-seed.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -609,7 +624,7 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ diff --git a/tests/Makefile.in b/tests/Makefile.in index da720ea..29984e6 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -119,7 +119,10 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ../src/$(DEPDIR)/iedera_gcov-macro.Po \ + ../src/$(DEPDIR)/iedera_gcov-main.Po \ + ../src/$(DEPDIR)/iedera_gcov-seed.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -485,8 +488,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -524,9 +527,15 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/iedera_gcov-macro.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/iedera_gcov-main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/iedera_gcov-seed.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/iedera_gcov-macro.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/iedera_gcov-main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/iedera_gcov-seed.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -758,7 +767,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -836,7 +845,10 @@ iedera_gcov_test6.log: iedera_gcov_test6 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -913,7 +925,9 @@ clean: clean-am clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am distclean: distclean-am - -rm -rf ../src/$(DEPDIR) + -rm -f ../src/$(DEPDIR)/iedera_gcov-macro.Po + -rm -f ../src/$(DEPDIR)/iedera_gcov-main.Po + -rm -f ../src/$(DEPDIR)/iedera_gcov-seed.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -959,7 +973,9 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ../src/$(DEPDIR) + -rm -f ../src/$(DEPDIR)/iedera_gcov-macro.Po + -rm -f ../src/$(DEPDIR)/iedera_gcov-main.Po + -rm -f ../src/$(DEPDIR)/iedera_gcov-seed.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -979,11 +995,11 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ From 84c475902b88d60c1c53f00ce9c17ab8762b5910 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 29 Mar 2018 15:41:58 +0200 Subject: [PATCH 073/123] Changing the Makefile.in from 1.15 to 1.16.1 --- aclocal.m4 | 202 ++++++++++++++++++++++++++--------------------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index bf79d07..5377885 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,13 +332,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -346,49 +345,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -397,18 +388,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -495,8 +485,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -563,7 +553,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -605,7 +595,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,7 +616,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -647,7 +637,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -655,49 +645,42 @@ AC_SUBST([am__leading_dot])]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -736,7 +719,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -765,9 +748,26 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -848,7 +848,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -908,7 +908,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -936,7 +936,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -955,7 +955,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, From ea261067c9344664edae59865aa6175b1ae11bb1 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 29 Mar 2018 15:42:25 +0200 Subject: [PATCH 074/123] Changing the Makefile.in from 1.15 to 1.16.1 --- configure | 191 +++++++++++++++++++++++++++--------------------------- 1 file changed, 96 insertions(+), 95 deletions(-) diff --git a/configure b/configure index c12e5a6..1c52473 100755 --- a/configure +++ b/configure @@ -636,7 +636,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -710,7 +709,8 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -2149,7 +2149,7 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -am__api_version='1.15' +am__api_version='1.16' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2694,8 +2694,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -2746,7 +2746,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3268,45 +3268,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -4908,7 +4908,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF @@ -5355,29 +5355,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -5395,53 +5401,48 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)$/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; From 67a3fd95de4057b753d4e48d6012d26bc9959b19 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 29 Mar 2018 15:42:31 +0200 Subject: [PATCH 075/123] Changing the Makefile.in from 1.15 to 1.16.1 --- depcomp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/depcomp b/depcomp index fc98710..65cbf70 100755 --- a/depcomp +++ b/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,9 +783,9 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: From cfbd8a4cc984b475aff15f955e1673ad73da569c Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 29 Mar 2018 15:43:40 +0200 Subject: [PATCH 076/123] Changing the NEWS with last option, no example proposed yet --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 115d5c8..d5c5efd 100644 --- a/NEWS +++ b/NEWS @@ -154,3 +154,6 @@ Version 1.07 - Multivariate polynomial are command-lined (output only, no seed selection) - A automaton templating has been enabled (no additional unused values are stored on transitions) +- Adding the "-pF" polynomial computation : it will output polynomials according + to a probabilistic model in several variables. + \ No newline at end of file From d802d85f80742bcdab5ed17d2b020a43934ec13d Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 29 Mar 2018 16:31:02 +0200 Subject: [PATCH 077/123] Updating polynomial and FIXME elements --- src/automaton.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index 1aa615c..c4199c4 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -9,7 +9,7 @@ * This part describes an automaton\ : each @ref automaton\ is mainly a represented by a set of @ref state\ , each itself being represented by a set of @ref transition\. * * - An automaton\ can be deterministic or not. - * - It may bring probabilities (T = double), costs (T = cost\), counts (T = unsigned long long), or nothing (T = void). + * - It may bring probabilities (T = double, T = polynomial\), costs (T = cost\), counts (T = unsigned long long), or nothing (T = void). * * By default the automaton\ constructor is almost empty (it creates only a final state 0 and the init state 1), but several methods are proposed to construct @ref seed-automaton, @ref probabilistic-automaton, @ref structural-automaton (@ref automaton-construction). Several methods are also proposed to manipulate theses automata (@ref automaton-manipulate), compute properties (@ref automaton-computed-properties), convert them into matrices (@ref automaton-matrix-conversion), * @@ -35,12 +35,12 @@ * * @section automaton-computed-properties Computing properties * - * From the probabilities attached to each transition (@ref automaton::Prob), it is possible to compute the probability (T = double), cost (T = cost\) or count (T = unsigned long long) to be at any final state after some @f$n@f$ steps without any restriction (@ref automaton::Pr), or with the restriction to be in the lossless accepted language (@ref automaton::PrLossless). + * From the probabilities attached to each transition (@ref automaton::Prob), it is possible to compute the probability (T = double, T = polynomial\), cost (T = cost\) or count (T = unsigned long long) to be at any final state after some @f$n@f$ steps without any restriction (@ref automaton::Pr), or with the restriction to be in the lossless accepted language (@ref automaton::PrLossless). * * @section automaton-matrix-conversion Converting into matrices * Several methods are proposed to convert the @f$ Automaton \times ProbabilisticModel @f$, @f$ Automaton \times CostModel @f$, or @f$ Automaton \times CountModel @f$ into matrices for more convenient computations. The probability @ref automaton::matrix_pr_product , the cost @ref automaton::matrix_cost_product and the counting @ref automaton::matrix_count_product give the product of two automata into a resulting matrix @f$M@f$ (that store either probabilities, costs, or counts) so that @f$M^n@f$ usually compute the needed properties. There are also three "stepwise equivalent" methods @ref automaton::matrices_step_pr_product, @ref automaton::matrices_step_cost_product, and @ref automaton::matrices_step_count_product : these three methods give the "breadth first" product as an ordered set of matrices @f$M_1,M_2,M_3\ldots,M_l@f$, thus enabling any computation @f$M_i,M_{i+1}\ldots,M_{j}@f$ @f$\forall 0 \leq i < j \leq l@f$ @see matrix @see matrices_slicer . * - * @todo FIXME : to be continued + * @todo{FIXME : to be continued} */ /** @defgroup automaton automaton class templates @@ -156,7 +156,7 @@ public: /** @brief build a transition object * @param state gives the state number reached by this transition * @param prob gives the probability of this transition - * @todo{[FIXME] : clear is here needed for composed T types, since T must be delete ; check if the automatic deletion work for T = polynomial} + * @todo{FIXME : clear() function is here needed for "composed T types", since T must also be deleted to free memory; check if the automatic deletion works for T = polynomial} */ transition(int state = 0, const T prob = One()) : _state(state), _prob(prob) {}; @@ -206,8 +206,8 @@ template inline ostream& operator<<(ostream& os, const transition */ template inline istream& operator>>(istream& is, transition& tr) { // previous data removed if any - //tr._prob.clear(); //[FIXME] must be done for polynomial but doesnt work for - ///@todo{[FIXME] : clear is here needed for composed T types, since T must be delete ; check if the automatic deletion work for T = polynomial} + //tr._prob.clear(); //FIXME : this must be done for polynomial but it doesnt obviously work for + ///@todo{FIXME : clear() function is here needed for "composed T types", since T must also be deleted to free memory; check if the automatic deletion works for T = polynomial} tr._state = 0; // reading state From 159c974871e1d221c26966d58659398d2084ce66 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 12:27:31 +0200 Subject: [PATCH 078/123] Updating travis : first deploy attempt following https://github.com/forexample/github-binary-release --- .travis.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8dc40b..8d2a8c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,4 +20,18 @@ before_install: after_success: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$CC" == "gcc" ]]; then coveralls --gcov-options '\-lp'; fi; fi - \ No newline at end of file + + + +before_deploy: + - export FILE_TO_UPLOAD=$(ls _builds/*/iedera-*.tar.gz) + +deploy: + provider: releases + api_key: + - secure: "eS0Q2bRKM4SgtXvZSKYd7Kh8EASN4xg3Ne5/4XWvbYkJsHX7y/WdkmxsKlUfHhh4PnWSz/DmXHg6RWAtjajKs+fuHhbBo+3SKJ3NkrsaUMUgeP09QwX8CyOz4dr6ZzAHTtwdVHdMN/xRqkOn+brBg4S4IGYgOKc3WsDB1ED0Y8G4Htq9w1ItSgarx7NbSRMDzTebr40AGZuPxl4ghoryRCLYvNiq1c6AEuw69yvXJwHT+yOzbxu/ZA6u3y/gEP77d8M3cH/iswYkae0N7oKqqfmMN8xU3RVKemKhrfPI4AXdrjRnojNOAmfe4oDLguSCzzK4Qhp1TQ8ntulAzk+gkxWTgINc+pXibW9TzmdwG6nNv9F1+cbuqMtWLO6QDhr5s4wUsfDTX62S8qiysunfwg0CiqTnxmGj4a+sN1uVnDr0uk7jHeDN5Fxm3uv6r1q8YjNp5lPrJHblAgIsFpG/xUmR6WJLOXiFGySD5NrYRBE6K1Nrgwx5b/eYdEnAcguc1THTVm10UFr8kU7iCFCj94CbcfdA7L0EieHToeId1R55E8LnNxxa6dOs/cb7i8rBhJXSLNt6n2n27JjrD+GVsV1n9WZ1iSz14L3b4bAU7MYsNjceK+nloRt0NOhld4bDL6Eo18mDccsNv54wjl1eV5s8IRuvBEi6NAsd210Elc8=" + file_glob: true + file: "${FILE_TO_UPLOAD}" + skip_cleanup: true + on: + tags: true \ No newline at end of file From 4e0109f7e28afc7209d8851ebfc7761dd415f7ff Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 12:40:58 +0200 Subject: [PATCH 079/123] Updating travis : printing envar https://github.com/forexample/github-binary-release --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d2a8c1..c3a5a10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,8 @@ after_success: before_deploy: - - export FILE_TO_UPLOAD=$(ls _builds/*/iedera-*.tar.gz) + - export FILE_TO_UPLOAD=$(ls _builds/*/iedera-*) + - echo ${FILE_TO_UPLOAD} deploy: provider: releases From c545446e0ff7b959e5dcbd596e36164b08e99967 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 12:52:19 +0200 Subject: [PATCH 080/123] Updating travis : setting all_branches to deploy https://github.com/forexample/github-binary-release --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c3a5a10..8deb318 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,4 +35,6 @@ deploy: file: "${FILE_TO_UPLOAD}" skip_cleanup: true on: - tags: true \ No newline at end of file + tags: true + repo: laurentnoe/iedera + all_branches: true From ab84bec156e84f15b71510d5e216cf9485bd4e94 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 13:30:54 +0200 Subject: [PATCH 081/123] Updating travis : updating xcode version --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8deb318..a3109ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,9 @@ matrix: - os: linux dist: trusty sudo: false - compiler: clang + compiler: clang - os: osx - osx_image: xcode8.2 + osx_image: xcode8.3 sudo: false script: - autoreconf && ./configure && automake && make && make check From 11441eec16d31fd98392c391815ec0f72b126cfd Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 14:36:30 +0200 Subject: [PATCH 082/123] Updating travis : tag and email --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a3109ad..b325f6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,8 @@ deploy: file: "${FILE_TO_UPLOAD}" skip_cleanup: true on: - tags: true + tags: false repo: laurentnoe/iedera all_branches: true + notifications: + email: false From efaff8580d1aa02a026bd334aba681906b4abfb8 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 14:53:31 +0200 Subject: [PATCH 083/123] Updating travis : deploy dir --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b325f6a..2441c5f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,8 @@ after_success: before_deploy: - - export FILE_TO_UPLOAD=$(ls _builds/*/iedera-*) - - echo ${FILE_TO_UPLOAD} + - export FILE_TO_UPLOAD=$(ls src/iedera*) + - echo ${FILE_TO_UPLOAD} deploy: provider: releases From b552c5bc6117a74b6225cf36d0a32655258b0a9a Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 15:23:49 +0200 Subject: [PATCH 084/123] Updating travis : deploy listing --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2441c5f..aef9ed8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,9 @@ after_success: before_deploy: - - export FILE_TO_UPLOAD=$(ls src/iedera*) + - export FILE_TO_UPLOAD=$(ls src/iedera) + - echo ${PWD} + - ls - echo ${FILE_TO_UPLOAD} deploy: From 34be7ae7e929834cf347f93bfe7c95d8d0e62952 Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 20:49:28 +0200 Subject: [PATCH 085/123] Updating travis with strict deploy from https://github.com/forexample/github-binary-release --- .travis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index aef9ed8..f3f6fa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,6 @@ after_success: before_deploy: - export FILE_TO_UPLOAD=$(ls src/iedera) - - echo ${PWD} - - ls - - echo ${FILE_TO_UPLOAD} deploy: provider: releases @@ -37,8 +34,4 @@ deploy: file: "${FILE_TO_UPLOAD}" skip_cleanup: true on: - tags: false - repo: laurentnoe/iedera - all_branches: true - notifications: - email: false + tags: true From 8576e58690e6f92620907069479db610c553e77b Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 20:49:44 +0200 Subject: [PATCH 086/123] Updating appveyor with strict deploy from https://github.com/forexample/github-binary-release --- appveyor.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e2113ab..6d3abe8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,4 +16,18 @@ build_script: - bash -lc "exec 0 Date: Fri, 30 Mar 2018 22:02:00 +0200 Subject: [PATCH 087/123] Updating travis with deploy for osx only (enought) --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3f6fa5..90e9afd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,9 @@ matrix: sudo: false compiler: clang - os: osx - osx_image: xcode8.3 + osx_image: xcode8 sudo: false + script: - autoreconf && ./configure && automake && make && make check @@ -22,7 +23,6 @@ after_success: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$CC" == "gcc" ]]; then coveralls --gcov-options '\-lp'; fi; fi - before_deploy: - export FILE_TO_UPLOAD=$(ls src/iedera) @@ -35,3 +35,4 @@ deploy: skip_cleanup: true on: tags: true + condition: "$TRAVIS_OS_NAME = osx" From 0720891321179ecb8d558a6c12f72c782bedbbfe Mon Sep 17 00:00:00 2001 From: noe Date: Fri, 30 Mar 2018 22:53:13 +0200 Subject: [PATCH 088/123] Fixing a signed integer warning --- src/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index 2889b3e..30d77e7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -4209,8 +4209,8 @@ int main(int argc, char * argv[]) { outputPareto(l, gv_output_filename); // cleaning filename memory - for (unsigned v = 0; v < gv_nb_input_filenames; v++) - free(gv_input_filenames[v]); + for (int i = 0; i < gv_nb_input_filenames; i++) + free(gv_input_filenames[i]); if (gv_output_filename) free(gv_output_filename); return 0; From bb0bb81477df9580d4026d75ee1a58d2eac17961 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 1 Apr 2018 18:00:04 +0200 Subject: [PATCH 089/123] Fixing a polynomial input bug --- src/polynomial.hh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 600cee4..9222865 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -326,6 +326,7 @@ template ostream& operator<< (ostream& os, const polynomial & p) template istream& operator>> (istream& is, polynomial & p) { p._coefs = vector, C> > (); string line; + //cerr << "\"" << line << "\"" << endl; C sign = C(1); // must be formatted only on one single line if (getline(is, line)) { @@ -395,23 +396,36 @@ template istream& operator>> (istream& is, polynomial & p) { for (unsigned i=0; i < p._var_names.size(); i++) { if (!p._var_names[i].compare(var_symbol)) { i_var = i; - for (unsigned j=var_degree.size(); j < i; j++) - var_degree.push_back(0); - var_degree.push_back(1); defined_var = true; + // already in the monomial list, so no need to extend the monomial list + if (i_var < var_degree.size()) { + if (var_degree[i_var] != 0) { // check if possibly not at zero, because this is a classical error is to set it twice + _ERROR("operator>>"," variable \""<< var_symbol<<"\" occuring twice in a monomial (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); + } else { + var_degree[i_var] = 1; + } + } else { + // or need to extend it up to "i_var" + for (unsigned j=var_degree.size(); j < i_var; j++) + var_degree.push_back(0); + var_degree.push_back(1); + } break; } } + // if not defined, create its name and extend "var_degree" if (!defined_var) { unsigned i = p._var_names.size(); i_var = i; p._var_names.push_back(var_symbol); + //cerr << "new symbol " << var_symbol << " at index " << (p._var_names.size()) << endl; for (unsigned j=var_degree.size(); j < i; j++) var_degree.push_back(0); var_degree.push_back(1); } + // possible next symbol if + or - (continue) row >> c_times_power_plus_symbol; //cerr << "symbol2:" << c_times_power_plus_symbol << endl; if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { From b2a300a1fa4b36d5a2b4be44d698d9ae43afe2a6 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 1 Apr 2018 18:00:04 +0200 Subject: [PATCH 090/123] Fixing a polynomial input bug --- src/polynomial.hh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 600cee4..9222865 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -326,6 +326,7 @@ template ostream& operator<< (ostream& os, const polynomial & p) template istream& operator>> (istream& is, polynomial & p) { p._coefs = vector, C> > (); string line; + //cerr << "\"" << line << "\"" << endl; C sign = C(1); // must be formatted only on one single line if (getline(is, line)) { @@ -395,23 +396,36 @@ template istream& operator>> (istream& is, polynomial & p) { for (unsigned i=0; i < p._var_names.size(); i++) { if (!p._var_names[i].compare(var_symbol)) { i_var = i; - for (unsigned j=var_degree.size(); j < i; j++) - var_degree.push_back(0); - var_degree.push_back(1); defined_var = true; + // already in the monomial list, so no need to extend the monomial list + if (i_var < var_degree.size()) { + if (var_degree[i_var] != 0) { // check if possibly not at zero, because this is a classical error is to set it twice + _ERROR("operator>>"," variable \""<< var_symbol<<"\" occuring twice in a monomial (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); + } else { + var_degree[i_var] = 1; + } + } else { + // or need to extend it up to "i_var" + for (unsigned j=var_degree.size(); j < i_var; j++) + var_degree.push_back(0); + var_degree.push_back(1); + } break; } } + // if not defined, create its name and extend "var_degree" if (!defined_var) { unsigned i = p._var_names.size(); i_var = i; p._var_names.push_back(var_symbol); + //cerr << "new symbol " << var_symbol << " at index " << (p._var_names.size()) << endl; for (unsigned j=var_degree.size(); j < i; j++) var_degree.push_back(0); var_degree.push_back(1); } + // possible next symbol if + or - (continue) row >> c_times_power_plus_symbol; //cerr << "symbol2:" << c_times_power_plus_symbol << endl; if (row.eof() || c_times_power_plus_symbol == '+' || c_times_power_plus_symbol == '-') { From e7859b22b75cbfa51f72a191d56522b9034d05ac Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 1 Apr 2018 22:35:20 +0200 Subject: [PATCH 091/123] Updating parsing constraints to avoid undetected bad input --- src/polynomial.hh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 9222865..a68ccf6 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -362,8 +362,9 @@ template istream& operator>> (istream& is, polynomial & p) { } } } - - row >> coef; + long long int cof; + row >> cof; + coef = C(cof); if (row.fail()) { _ERROR("operator>>"," invalid coefficient (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); @@ -388,6 +389,11 @@ template istream& operator>> (istream& is, polynomial & p) { next_variable: string var_symbol; row >> var_symbol; + for(string::iterator it = var_symbol.begin(); it != var_symbol.end(); it++) { + if ( ! ((*it >= 'a' && *it <= 'z') || (*it >= 'A' && *it <= 'Z') || *it == '_')) { + _ERROR("operator>>"," variable name \""<< var_symbol<<"\" include non alpha symbols \'"<< (*it) <<"\' (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); + } + } //cerr << "variable:" << var_symbol << endl; int i_var = -1; From 54850b0c34871a37ac1a5b64a507735e2f33f332 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 1 Apr 2018 22:46:59 +0200 Subject: [PATCH 092/123] Updating tests from strong parsing --- tests/iedera_gcov_test5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/iedera_gcov_test5 b/tests/iedera_gcov_test5 index d9a27d9..b800c10 100755 --- a/tests/iedera_gcov_test5 +++ b/tests/iedera_gcov_test5 @@ -1,4 +1,4 @@ #!/bin/sh # Multinomial tests -echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x*y\n 1 1\n 3 x*y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multinomial_automaton_ +echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x * y\n 1 1\n 3 x * y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multinomial_automaton_ ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "111011001010010111" -l 20 -pF _filein_multinomial_automaton_ || exit 99 From a0bb4a140170b561c3b75a0e340378d0502b80de Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 1 Apr 2018 22:35:20 +0200 Subject: [PATCH 093/123] Updating parsing constraints to avoid undetected bad input --- src/polynomial.hh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 9222865..a68ccf6 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -362,8 +362,9 @@ template istream& operator>> (istream& is, polynomial & p) { } } } - - row >> coef; + long long int cof; + row >> cof; + coef = C(cof); if (row.fail()) { _ERROR("operator>>"," invalid coefficient (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); @@ -388,6 +389,11 @@ template istream& operator>> (istream& is, polynomial & p) { next_variable: string var_symbol; row >> var_symbol; + for(string::iterator it = var_symbol.begin(); it != var_symbol.end(); it++) { + if ( ! ((*it >= 'a' && *it <= 'z') || (*it >= 'A' && *it <= 'Z') || *it == '_')) { + _ERROR("operator>>"," variable name \""<< var_symbol<<"\" include non alpha symbols \'"<< (*it) <<"\' (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); + } + } //cerr << "variable:" << var_symbol << endl; int i_var = -1; From 7dff16fdec5f750cfd06ee7b40890e57e8c449f6 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 1 Apr 2018 22:46:59 +0200 Subject: [PATCH 094/123] Updating tests from strong parsing --- tests/iedera_gcov_test5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/iedera_gcov_test5 b/tests/iedera_gcov_test5 index d9a27d9..b800c10 100755 --- a/tests/iedera_gcov_test5 +++ b/tests/iedera_gcov_test5 @@ -1,4 +1,4 @@ #!/bin/sh # Multinomial tests -echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x*y\n 1 1\n 3 x*y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multinomial_automaton_ +echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x * y\n 1 1\n 3 x * y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multinomial_automaton_ ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "111011001010010111" -l 20 -pF _filein_multinomial_automaton_ || exit 99 From 5f5f79efb2b75ce1d15d57387c22284bf15bf8ed Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 1 Apr 2018 23:06:05 +0200 Subject: [PATCH 095/123] Renaming Multinomial in Multivariate --- tests/iedera_gcov_test5 | 6 +++--- tests/iedera_gcov_test6 | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/iedera_gcov_test5 b/tests/iedera_gcov_test5 index b800c10..f1c0c2d 100755 --- a/tests/iedera_gcov_test5 +++ b/tests/iedera_gcov_test5 @@ -1,4 +1,4 @@ #!/bin/sh -# Multinomial tests -echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x * y\n 1 1\n 3 x * y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multinomial_automaton_ -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "111011001010010111" -l 20 -pF _filein_multinomial_automaton_ || exit 99 +# Multivariate tests +echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x * y\n 1 1\n 3 x * y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multivariate_automaton_ +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "111011001010010111" -l 20 -pF _filein_multivariate_automaton_ || exit 99 diff --git a/tests/iedera_gcov_test6 b/tests/iedera_gcov_test6 index 60fc8ee..b53149b 100755 --- a/tests/iedera_gcov_test6 +++ b/tests/iedera_gcov_test6 @@ -1,8 +1,8 @@ #!/bin/sh -# Multinomial tests -echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multinomial_automaton_ -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multinomial_automaton_ || exit 99 -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multinomial_automaton_ || exit 99 -echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multinomial_automaton_ -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multinomial_automaton_ || exit 99 -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multinomial_automaton_ || exit 99 +# Multivariate tests +echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_ +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_ || exit 99 +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_ || exit 99 +echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_ +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_ || exit 99 +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_ || exit 99 From 77f596ca6a7e9f854d1553a85f4ea4dcab94c239 Mon Sep 17 00:00:00 2001 From: noe Date: Mon, 2 Apr 2018 15:43:03 +0200 Subject: [PATCH 096/123] Updating -pF example --- src/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 30d77e7..3d5e09c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -397,7 +397,7 @@ void USAGE() { cerr << " | 2 0 0 1 1 1 - y" << endl; cerr << " | 1 1 2 y" << endl; cerr << " " << endl; - cerr << " will give the following result:" << endl; + cerr << " will give the following result (with spaces between each ^*+- symbols):" << endl; cerr << " " << endl; cerr << " [y - x*y - x*y^2 + 2*x*y^3 - x^2*y + 2*x^2*y^2 - 2*x^2*y^3 + x^3*y - x^3*y^2]" << endl; cerr << " " << endl; From 244b4b38b5b9029e02687890f101f9c77e27df13 Mon Sep 17 00:00:00 2001 From: noe Date: Mon, 2 Apr 2018 15:54:32 +0200 Subject: [PATCH 097/123] Adding output and diff to -pF tests --- tests/_filemodel_l128_n1_w11_pF.txt | 1 + tests/_filemodel_l64_n1_w11_pF.txt | 1 + tests/iedera_gcov_test6 | 9 ++++----- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 tests/_filemodel_l128_n1_w11_pF.txt create mode 100644 tests/_filemodel_l64_n1_w11_pF.txt diff --git a/tests/_filemodel_l128_n1_w11_pF.txt b/tests/_filemodel_l128_n1_w11_pF.txt new file mode 100644 index 0000000..6826322 --- /dev/null +++ b/tests/_filemodel_l128_n1_w11_pF.txt @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.534908 0.465092 [x ^ 128 + 128 * xp * x ^ 127 + 8128 * xp ^ 2 * x ^ 126 + 341376 * xp ^ 3 * x ^ 125 + 10668000 * xp ^ 4 * x ^ 124 + 264566400 * xp ^ 5 * x ^ 123 + 5423611200 * xp ^ 6 * x ^ 122 + 94525795200 * xp ^ 7 * x ^ 121 + 1429702652400 * xp ^ 8 * x ^ 120 + 19062702032000 * xp ^ 9 * x ^ 119 + 226846154180800 * xp ^ 10 * x ^ 118 + 2433440563030036 * xp ^ 11 * x ^ 117 + 23726045479894615 * xp ^ 12 * x ^ 116 + 211709323849459744 * xp ^ 13 * x ^ 115 + 1739040200861344040 * xp ^ 14 * x ^ 114 - 5230079924715358256 * xp ^ 15 * x ^ 113 + 1107463865847873641 * xp ^ 16 * x ^ 112 + 6173862949168622202 * xp ^ 17 * x ^ 111 - 8726480664811641607 * xp ^ 18 * x ^ 110 + 6710009433287212696 * xp ^ 19 * x ^ 109 - 2491969125177085682 * xp ^ 20 * x ^ 108 + 2336371173866551328 * xp ^ 21 * x ^ 107 + 466876983495202456 * xp ^ 22 * x ^ 106 + 9158667994837939768 * xp ^ 23 * x ^ 105 + 6484139380431689011 * xp ^ 24 * x ^ 104 - 4606244938579919430 * xp ^ 25 * x ^ 103 - 8795026616181758931 * xp ^ 26 * x ^ 102 + 4224048589595409476 * xp ^ 27 * x ^ 101 - 7754221149543344437 * xp ^ 28 * x ^ 100 + 5201496423363488204 * xp ^ 29 * x ^ 99 - 929380120526655526 * xp ^ 30 * x ^ 98 + 4660911039155663968 * xp ^ 31 * x ^ 97 - 7817847676111786171 * xp ^ 32 * x ^ 96 + 1624220102283952444 * xp ^ 33 * x ^ 95 + 7020612586115967707 * xp ^ 34 * x ^ 94 + 8471341782973838088 * xp ^ 35 * x ^ 93 + 2573293720131404703 * xp ^ 36 * x ^ 92 - 5962309403916189660 * xp ^ 37 * x ^ 91 + 1069474238474647657 * xp ^ 38 * x ^ 90 + 3078084822959018728 * xp ^ 39 * x ^ 89 + 7724448390557895009 * xp ^ 40 * x ^ 88 - 1956562289801792598 * xp ^ 41 * x ^ 87 - 5667928937165507965 * xp ^ 42 * x ^ 86 - 3070805508809848376 * xp ^ 43 * x ^ 85 + 3307704413088201742 * xp ^ 44 * x ^ 84 - 1731769627709009166 * xp ^ 45 * x ^ 83 - 5929963363742781255 * xp ^ 46 * x ^ 82 - 8436720569825397472 * xp ^ 47 * x ^ 81 + 4954817581363683983 * xp ^ 48 * x ^ 80 + 6790554521851129862 * xp ^ 49 * x ^ 79 + 8618713376561232900 * xp ^ 50 * x ^ 78 + 4804653900724067496 * xp ^ 51 * x ^ 77 - 5392090136942195331 * xp ^ 52 * x ^ 76 - 9033746436951784372 * xp ^ 53 * x ^ 75 - 2160879120201288889 * xp ^ 54 * x ^ 74 + 4308395710206626736 * xp ^ 55 * x ^ 73 - 8585160604279602636 * xp ^ 56 * x ^ 72 - 4033809866149824036 * xp ^ 57 * x ^ 71 - 8559963551009084040 * xp ^ 58 * x ^ 70 - 1369058939789231704 * xp ^ 59 * x ^ 69 - 8517848940449959520 * xp ^ 60 * x ^ 68 - 1925141973757781642 * xp ^ 61 * x ^ 67 + 731173588490541353 * xp ^ 62 * x ^ 66 - 8581566337083791488 * xp ^ 63 * x ^ 65 + 6387007371918573387 * xp ^ 64 * x ^ 64 + 9204292110465244456 * xp ^ 65 * x ^ 63 + 7577713588675069990 * xp ^ 66 * x ^ 62 + 8065609896749525360 * xp ^ 67 * x ^ 61 + 7498927098130547206 * xp ^ 68 * x ^ 60 + 1424424916262504286 * xp ^ 69 * x ^ 59 + 1643881456284610093 * xp ^ 70 * x ^ 58 - 6432949622936572856 * xp ^ 71 * x ^ 57 - 4872198696869838948 * xp ^ 72 * x ^ 56 - 8709600934572362574 * xp ^ 73 * x ^ 55 + 91686403283653580 * xp ^ 74 * x ^ 54 + 4439140667685622956 * xp ^ 75 * x ^ 53 - 7011549092745574734 * xp ^ 76 * x ^ 52 + 4707538986314145808 * xp ^ 77 * x ^ 51 + 6757444121756882103 * xp ^ 78 * x ^ 50 - 761427539216672688 * xp ^ 79 * x ^ 49 - 5966096249029446559 * xp ^ 80 * x ^ 48 - 7603670592091998682 * xp ^ 81 * x ^ 47 - 8097892761021405801 * xp ^ 82 * x ^ 46 - 7037265635728242744 * xp ^ 83 * x ^ 45 + 9088387215775635798 * xp ^ 84 * x ^ 44 - 6349793095303378846 * xp ^ 85 * x ^ 43 + 5453408598219297325 * xp ^ 86 * x ^ 42 + 5266306365120851400 * xp ^ 87 * x ^ 41 - 1498157198951318408 * xp ^ 88 * x ^ 40 - 5145536215859022732 * xp ^ 89 * x ^ 39 + 2613478267451561673 * xp ^ 90 * x ^ 38 + 3327344617395393228 * xp ^ 91 * x ^ 37 + 4075741322755896518 * xp ^ 92 * x ^ 36 + 8461849557763224660 * xp ^ 93 * x ^ 35 + 4050518593062497849 * xp ^ 94 * x ^ 34 - 5766360727471235552 * xp ^ 95 * x ^ 33 - 6754450254796595133 * xp ^ 96 * x ^ 32 + 6879599826537337420 * xp ^ 97 * x ^ 31 - 7645790336543595505 * xp ^ 98 * x ^ 30 - 3744351668170435832 * xp ^ 99 * x ^ 29 - 3565780590352812509 * xp ^ 100 * x ^ 28 + 5648880876423267462 * xp ^ 101 * x ^ 27 - 6807314492798606490 * xp ^ 102 * x ^ 26 - 7516199512037793248 * xp ^ 103 * x ^ 25 + 6499752966304904250 * xp ^ 104 * x ^ 24 + 812395427447031738 * xp ^ 105 * x ^ 23 + 92836928519284661 * xp ^ 106 * x ^ 22 + 9633179411382384 * xp ^ 107 * x ^ 21 + 900219955281790 * xp ^ 108 * x ^ 20 + 75012015464100 * xp ^ 109 * x ^ 19 + 5505014027448 * xp ^ 110 * x ^ 18 + 350290641792 * xp ^ 111 * x ^ 17 + 18933119829 * xp ^ 112 * x ^ 16 + 845162370 * xp ^ 113 * x ^ 15 + 29914950 * xp ^ 114 * x ^ 14 + 787176 * xp ^ 115 * x ^ 13 + 13689 * xp ^ 116 * x ^ 12 + 118 * xp ^ 117 * x ^ 11] diff --git a/tests/_filemodel_l64_n1_w11_pF.txt b/tests/_filemodel_l64_n1_w11_pF.txt new file mode 100644 index 0000000..3622e35 --- /dev/null +++ b/tests/_filemodel_l64_n1_w11_pF.txt @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] diff --git a/tests/iedera_gcov_test6 b/tests/iedera_gcov_test6 index b53149b..edba925 100755 --- a/tests/iedera_gcov_test6 +++ b/tests/iedera_gcov_test6 @@ -1,8 +1,7 @@ #!/bin/sh # Multivariate tests echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_ -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_ || exit 99 -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_ || exit 99 -echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_ -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_ || exit 99 -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_ || exit 99 +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_ -o _fileout_l64_n1_w11_pF_ || exit 99 +diff _fileout_l64_n1_w11_pF_ _filemodel_l64_n1_w11_pF.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_ -o _fileout_l128_n1_w11_pF_ || exit 99 +diff _fileout_l128_n1_w11_pF_ _filemodel_l128_n1_w11_pF.txt || exit 99 From 67b16c1168f2efe0732db82f50b00443dd681ce9 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 06:03:57 +0200 Subject: [PATCH 098/123] Updating automaton input operator>> of last expression: normalizing step to remove redundancy --- src/automaton.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index c4199c4..fc5b73f 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -220,8 +220,10 @@ template inline istream& operator>>(istream& is, transition& tr) } // reading prob - T prob; - is >> prob; + T prob_read; + is >> prob_read; + // normalize prob by using a product with T(1) : mostly here for user inputs such as "1 + 2 * y ^ 0 + 3 * x ^ 0" ... + T prob = prob_read * One(); // for T = cost template, it will "add" C(0) element // setting tr tr._state = state; From cf1ab3b9dfc57c62fac901b8fba1265a4a2deed5 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 08:22:13 +0200 Subject: [PATCH 099/123] appveyor x86 and x64 tags, deploy only x64 --- appveyor.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6d3abe8..c2fe794 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,10 @@ environment: matrix: - - MSYSTEM: MINGW64 + - platform: x64 + MSYSTEM: MINGW64 PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH% - - MSYSTEM: MINGW32 + - platform: x86 + MSYSTEM: MINGW32 PATH: C:\msys64\usr\bin;C:\msys64\mingw32\bin;C:\Windows\System32;C:\Windows;%PATH% install: @@ -31,3 +33,4 @@ deploy: prerelease: false on: appveyor_repo_tag: true + platform: x64 \ No newline at end of file From 01829e5c597bd7d79df94148199b3d4ad5e42eef Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 08:39:02 +0200 Subject: [PATCH 100/123] appveyor typo --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c2fe794..11041e9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,4 +33,4 @@ deploy: prerelease: false on: appveyor_repo_tag: true - platform: x64 \ No newline at end of file + platform: x64 From e8972a18ffcaec95bcca3d2ed0c27822c1fc1214 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:10:58 +0200 Subject: [PATCH 101/123] Updating pF tests with more precise values --- ...lein_multivariate_automaton_bernoulli_x_xp | 12 ++++++++++ .../_filein_multivariate_automaton_markov_x_y | 22 +++++++++++++++++++ ...filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt | 1 + tests/iedera_gcov_test5 | 6 +++-- tests/iedera_gcov_test6 | 10 ++++----- 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 tests/_filein_multivariate_automaton_bernoulli_x_xp create mode 100644 tests/_filein_multivariate_automaton_markov_x_y create mode 100644 tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt diff --git a/tests/_filein_multivariate_automaton_bernoulli_x_xp b/tests/_filein_multivariate_automaton_bernoulli_x_xp new file mode 100644 index 0000000..c182432 --- /dev/null +++ b/tests/_filein_multivariate_automaton_bernoulli_x_xp @@ -0,0 +1,12 @@ +2 + 0 1 + 0 1 + 0 xp + 1 1 + 0 x + 1 0 + 0 1 + 1 xp + 1 1 + 1 x + diff --git a/tests/_filein_multivariate_automaton_markov_x_y b/tests/_filein_multivariate_automaton_markov_x_y new file mode 100644 index 0000000..910c650 --- /dev/null +++ b/tests/_filein_multivariate_automaton_markov_x_y @@ -0,0 +1,22 @@ +4 + 0 1 + 0 1 + 0 x + y + 1 1 + 1 1 - x - y + 1 0 + 0 1 + 2 y + 1 1 + 3 x + 2 0 + 0 1 + 2 1 - x + 1 1 + 3 x + 3 0 + 0 1 + 2 y + 1 1 + 3 1 - y + diff --git a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt new file mode 100644 index 0000000..3622e35 --- /dev/null +++ b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] diff --git a/tests/iedera_gcov_test5 b/tests/iedera_gcov_test5 index f1c0c2d..3c1934f 100755 --- a/tests/iedera_gcov_test5 +++ b/tests/iedera_gcov_test5 @@ -1,4 +1,6 @@ #!/bin/sh # Multivariate tests -echo "4\n 0 1\n 0 1\n 0 x\n 1 1\n 1 1 - x\n 1 0\n 0 1\n 2 1 - x * y\n 1 1\n 3 x * y\n\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n\n 3 0\n 0 1\n 2 1 - y\n 1 1\n 3 y\n" > _filein_multivariate_automaton_ -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "111011001010010111" -l 20 -pF _filein_multivariate_automaton_ || exit 99 +echo "4\n 0 1\n 0 1\n 0 x + y\n 1 1\n 1 1 - x - y\n 1 0\n 0 1\n 2 y\n 1 1\n 3 x\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n 3 0\n 0 1\n 2 y\n 1 1\n 3 1 - y\n" > _filein_multivariate_automaton_markov_x_y +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 32 -pF _filein_multivariate_automaton_markov_x_y -o _fileout_multivariate_automaton_markov_x_y || exit 99 +cat _fileout_multivariate_automaton_markov_x_y | cut -f5 | sed "s/xp/0.3000000000/g" | sed "s/yp/0.7000000000/g" | sed "s/x/.7000000000/g" | sed "s/y/0.3000000000/g" | tr "[]" " " | bc > _fileout_multivariate_automaton_markov_x_0.7_y_0.3 +diff _fileout_multivariate_automaton_markov_x_0.7_y_0.3 _filemodel_multivariate_automaton_markov_x_0.7_y_0.3 || exit 99 diff --git a/tests/iedera_gcov_test6 b/tests/iedera_gcov_test6 index edba925..c9e04c7 100755 --- a/tests/iedera_gcov_test6 +++ b/tests/iedera_gcov_test6 @@ -1,7 +1,7 @@ #!/bin/sh # Multivariate tests -echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_ -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_ -o _fileout_l64_n1_w11_pF_ || exit 99 -diff _fileout_l64_n1_w11_pF_ _filemodel_l64_n1_w11_pF.txt || exit 99 -./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_ -o _fileout_l128_n1_w11_pF_ || exit 99 -diff _fileout_l128_n1_w11_pF_ _filemodel_l128_n1_w11_pF.txt || exit 99 +echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_bernoulli_x_xp +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l64_n1_w11_pF_bernoulli_x_xp || exit 99 +diff _fileout_l64_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt || exit 99 +./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l128_n1_w11_pF_bernoulli_x_xp || exit 99 +diff _fileout_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt || exit 99 From 04a1eb051d80ba4e44a66674b599fa0df091273e Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:11:47 +0200 Subject: [PATCH 102/123] Updating pF tests with more precise values --- tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt diff --git a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt deleted file mode 100644 index 3622e35..0000000 --- a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt +++ /dev/null @@ -1 +0,0 @@ -11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] From 0be8fc0ef0f1a592fc878f4660c3eb9401f74dba Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:19:38 +0200 Subject: [PATCH 103/123] test 6 filename typo --- tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp | 1 + tests/iedera_gcov_test6 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp diff --git a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp new file mode 100644 index 0000000..3622e35 --- /dev/null +++ b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] diff --git a/tests/iedera_gcov_test6 b/tests/iedera_gcov_test6 index c9e04c7..524b8c5 100755 --- a/tests/iedera_gcov_test6 +++ b/tests/iedera_gcov_test6 @@ -2,6 +2,6 @@ # Multivariate tests echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_bernoulli_x_xp ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l64_n1_w11_pF_bernoulli_x_xp || exit 99 -diff _fileout_l64_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt || exit 99 +diff _fileout_l64_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp || exit 99 ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l128_n1_w11_pF_bernoulli_x_xp || exit 99 -diff _fileout_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt || exit 99 +diff _fileout_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l128_n1_w11_pF_bernoulli_x_xp || exit 99 From 2165fee9fc94fba301bc5ca2ccd8b2d434c603d3 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:22:31 +0200 Subject: [PATCH 104/123] _filein_multivariate_automaton_markov_x_y --- tests/_filemodel_l128_n1_w11_pF.txt | 1 - tests/_filemodel_l64_n1_w11_pF.txt | 1 - 2 files changed, 2 deletions(-) delete mode 100644 tests/_filemodel_l128_n1_w11_pF.txt delete mode 100644 tests/_filemodel_l64_n1_w11_pF.txt diff --git a/tests/_filemodel_l128_n1_w11_pF.txt b/tests/_filemodel_l128_n1_w11_pF.txt deleted file mode 100644 index 6826322..0000000 --- a/tests/_filemodel_l128_n1_w11_pF.txt +++ /dev/null @@ -1 +0,0 @@ -11111111111 0.9999997615814 0.534908 0.465092 [x ^ 128 + 128 * xp * x ^ 127 + 8128 * xp ^ 2 * x ^ 126 + 341376 * xp ^ 3 * x ^ 125 + 10668000 * xp ^ 4 * x ^ 124 + 264566400 * xp ^ 5 * x ^ 123 + 5423611200 * xp ^ 6 * x ^ 122 + 94525795200 * xp ^ 7 * x ^ 121 + 1429702652400 * xp ^ 8 * x ^ 120 + 19062702032000 * xp ^ 9 * x ^ 119 + 226846154180800 * xp ^ 10 * x ^ 118 + 2433440563030036 * xp ^ 11 * x ^ 117 + 23726045479894615 * xp ^ 12 * x ^ 116 + 211709323849459744 * xp ^ 13 * x ^ 115 + 1739040200861344040 * xp ^ 14 * x ^ 114 - 5230079924715358256 * xp ^ 15 * x ^ 113 + 1107463865847873641 * xp ^ 16 * x ^ 112 + 6173862949168622202 * xp ^ 17 * x ^ 111 - 8726480664811641607 * xp ^ 18 * x ^ 110 + 6710009433287212696 * xp ^ 19 * x ^ 109 - 2491969125177085682 * xp ^ 20 * x ^ 108 + 2336371173866551328 * xp ^ 21 * x ^ 107 + 466876983495202456 * xp ^ 22 * x ^ 106 + 9158667994837939768 * xp ^ 23 * x ^ 105 + 6484139380431689011 * xp ^ 24 * x ^ 104 - 4606244938579919430 * xp ^ 25 * x ^ 103 - 8795026616181758931 * xp ^ 26 * x ^ 102 + 4224048589595409476 * xp ^ 27 * x ^ 101 - 7754221149543344437 * xp ^ 28 * x ^ 100 + 5201496423363488204 * xp ^ 29 * x ^ 99 - 929380120526655526 * xp ^ 30 * x ^ 98 + 4660911039155663968 * xp ^ 31 * x ^ 97 - 7817847676111786171 * xp ^ 32 * x ^ 96 + 1624220102283952444 * xp ^ 33 * x ^ 95 + 7020612586115967707 * xp ^ 34 * x ^ 94 + 8471341782973838088 * xp ^ 35 * x ^ 93 + 2573293720131404703 * xp ^ 36 * x ^ 92 - 5962309403916189660 * xp ^ 37 * x ^ 91 + 1069474238474647657 * xp ^ 38 * x ^ 90 + 3078084822959018728 * xp ^ 39 * x ^ 89 + 7724448390557895009 * xp ^ 40 * x ^ 88 - 1956562289801792598 * xp ^ 41 * x ^ 87 - 5667928937165507965 * xp ^ 42 * x ^ 86 - 3070805508809848376 * xp ^ 43 * x ^ 85 + 3307704413088201742 * xp ^ 44 * x ^ 84 - 1731769627709009166 * xp ^ 45 * x ^ 83 - 5929963363742781255 * xp ^ 46 * x ^ 82 - 8436720569825397472 * xp ^ 47 * x ^ 81 + 4954817581363683983 * xp ^ 48 * x ^ 80 + 6790554521851129862 * xp ^ 49 * x ^ 79 + 8618713376561232900 * xp ^ 50 * x ^ 78 + 4804653900724067496 * xp ^ 51 * x ^ 77 - 5392090136942195331 * xp ^ 52 * x ^ 76 - 9033746436951784372 * xp ^ 53 * x ^ 75 - 2160879120201288889 * xp ^ 54 * x ^ 74 + 4308395710206626736 * xp ^ 55 * x ^ 73 - 8585160604279602636 * xp ^ 56 * x ^ 72 - 4033809866149824036 * xp ^ 57 * x ^ 71 - 8559963551009084040 * xp ^ 58 * x ^ 70 - 1369058939789231704 * xp ^ 59 * x ^ 69 - 8517848940449959520 * xp ^ 60 * x ^ 68 - 1925141973757781642 * xp ^ 61 * x ^ 67 + 731173588490541353 * xp ^ 62 * x ^ 66 - 8581566337083791488 * xp ^ 63 * x ^ 65 + 6387007371918573387 * xp ^ 64 * x ^ 64 + 9204292110465244456 * xp ^ 65 * x ^ 63 + 7577713588675069990 * xp ^ 66 * x ^ 62 + 8065609896749525360 * xp ^ 67 * x ^ 61 + 7498927098130547206 * xp ^ 68 * x ^ 60 + 1424424916262504286 * xp ^ 69 * x ^ 59 + 1643881456284610093 * xp ^ 70 * x ^ 58 - 6432949622936572856 * xp ^ 71 * x ^ 57 - 4872198696869838948 * xp ^ 72 * x ^ 56 - 8709600934572362574 * xp ^ 73 * x ^ 55 + 91686403283653580 * xp ^ 74 * x ^ 54 + 4439140667685622956 * xp ^ 75 * x ^ 53 - 7011549092745574734 * xp ^ 76 * x ^ 52 + 4707538986314145808 * xp ^ 77 * x ^ 51 + 6757444121756882103 * xp ^ 78 * x ^ 50 - 761427539216672688 * xp ^ 79 * x ^ 49 - 5966096249029446559 * xp ^ 80 * x ^ 48 - 7603670592091998682 * xp ^ 81 * x ^ 47 - 8097892761021405801 * xp ^ 82 * x ^ 46 - 7037265635728242744 * xp ^ 83 * x ^ 45 + 9088387215775635798 * xp ^ 84 * x ^ 44 - 6349793095303378846 * xp ^ 85 * x ^ 43 + 5453408598219297325 * xp ^ 86 * x ^ 42 + 5266306365120851400 * xp ^ 87 * x ^ 41 - 1498157198951318408 * xp ^ 88 * x ^ 40 - 5145536215859022732 * xp ^ 89 * x ^ 39 + 2613478267451561673 * xp ^ 90 * x ^ 38 + 3327344617395393228 * xp ^ 91 * x ^ 37 + 4075741322755896518 * xp ^ 92 * x ^ 36 + 8461849557763224660 * xp ^ 93 * x ^ 35 + 4050518593062497849 * xp ^ 94 * x ^ 34 - 5766360727471235552 * xp ^ 95 * x ^ 33 - 6754450254796595133 * xp ^ 96 * x ^ 32 + 6879599826537337420 * xp ^ 97 * x ^ 31 - 7645790336543595505 * xp ^ 98 * x ^ 30 - 3744351668170435832 * xp ^ 99 * x ^ 29 - 3565780590352812509 * xp ^ 100 * x ^ 28 + 5648880876423267462 * xp ^ 101 * x ^ 27 - 6807314492798606490 * xp ^ 102 * x ^ 26 - 7516199512037793248 * xp ^ 103 * x ^ 25 + 6499752966304904250 * xp ^ 104 * x ^ 24 + 812395427447031738 * xp ^ 105 * x ^ 23 + 92836928519284661 * xp ^ 106 * x ^ 22 + 9633179411382384 * xp ^ 107 * x ^ 21 + 900219955281790 * xp ^ 108 * x ^ 20 + 75012015464100 * xp ^ 109 * x ^ 19 + 5505014027448 * xp ^ 110 * x ^ 18 + 350290641792 * xp ^ 111 * x ^ 17 + 18933119829 * xp ^ 112 * x ^ 16 + 845162370 * xp ^ 113 * x ^ 15 + 29914950 * xp ^ 114 * x ^ 14 + 787176 * xp ^ 115 * x ^ 13 + 13689 * xp ^ 116 * x ^ 12 + 118 * xp ^ 117 * x ^ 11] diff --git a/tests/_filemodel_l64_n1_w11_pF.txt b/tests/_filemodel_l64_n1_w11_pF.txt deleted file mode 100644 index 3622e35..0000000 --- a/tests/_filemodel_l64_n1_w11_pF.txt +++ /dev/null @@ -1 +0,0 @@ -11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] From e0ac8bb40fd8efef5183abeeea06998ea20b0a33 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:24:53 +0200 Subject: [PATCH 105/123] _filemodel_multivariate_automaton_markov_x_0.7_y_0.3 --- tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 diff --git a/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 b/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 new file mode 100644 index 0000000..73fa9d2 --- /dev/null +++ b/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 @@ -0,0 +1 @@ +.1407161074 From 54f18666319950c964abb10c898698c5c2d82d8b Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:28:20 +0200 Subject: [PATCH 106/123] Updating _filemodel_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp --- tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp diff --git a/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp new file mode 100644 index 0000000..6826322 --- /dev/null +++ b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.534908 0.465092 [x ^ 128 + 128 * xp * x ^ 127 + 8128 * xp ^ 2 * x ^ 126 + 341376 * xp ^ 3 * x ^ 125 + 10668000 * xp ^ 4 * x ^ 124 + 264566400 * xp ^ 5 * x ^ 123 + 5423611200 * xp ^ 6 * x ^ 122 + 94525795200 * xp ^ 7 * x ^ 121 + 1429702652400 * xp ^ 8 * x ^ 120 + 19062702032000 * xp ^ 9 * x ^ 119 + 226846154180800 * xp ^ 10 * x ^ 118 + 2433440563030036 * xp ^ 11 * x ^ 117 + 23726045479894615 * xp ^ 12 * x ^ 116 + 211709323849459744 * xp ^ 13 * x ^ 115 + 1739040200861344040 * xp ^ 14 * x ^ 114 - 5230079924715358256 * xp ^ 15 * x ^ 113 + 1107463865847873641 * xp ^ 16 * x ^ 112 + 6173862949168622202 * xp ^ 17 * x ^ 111 - 8726480664811641607 * xp ^ 18 * x ^ 110 + 6710009433287212696 * xp ^ 19 * x ^ 109 - 2491969125177085682 * xp ^ 20 * x ^ 108 + 2336371173866551328 * xp ^ 21 * x ^ 107 + 466876983495202456 * xp ^ 22 * x ^ 106 + 9158667994837939768 * xp ^ 23 * x ^ 105 + 6484139380431689011 * xp ^ 24 * x ^ 104 - 4606244938579919430 * xp ^ 25 * x ^ 103 - 8795026616181758931 * xp ^ 26 * x ^ 102 + 4224048589595409476 * xp ^ 27 * x ^ 101 - 7754221149543344437 * xp ^ 28 * x ^ 100 + 5201496423363488204 * xp ^ 29 * x ^ 99 - 929380120526655526 * xp ^ 30 * x ^ 98 + 4660911039155663968 * xp ^ 31 * x ^ 97 - 7817847676111786171 * xp ^ 32 * x ^ 96 + 1624220102283952444 * xp ^ 33 * x ^ 95 + 7020612586115967707 * xp ^ 34 * x ^ 94 + 8471341782973838088 * xp ^ 35 * x ^ 93 + 2573293720131404703 * xp ^ 36 * x ^ 92 - 5962309403916189660 * xp ^ 37 * x ^ 91 + 1069474238474647657 * xp ^ 38 * x ^ 90 + 3078084822959018728 * xp ^ 39 * x ^ 89 + 7724448390557895009 * xp ^ 40 * x ^ 88 - 1956562289801792598 * xp ^ 41 * x ^ 87 - 5667928937165507965 * xp ^ 42 * x ^ 86 - 3070805508809848376 * xp ^ 43 * x ^ 85 + 3307704413088201742 * xp ^ 44 * x ^ 84 - 1731769627709009166 * xp ^ 45 * x ^ 83 - 5929963363742781255 * xp ^ 46 * x ^ 82 - 8436720569825397472 * xp ^ 47 * x ^ 81 + 4954817581363683983 * xp ^ 48 * x ^ 80 + 6790554521851129862 * xp ^ 49 * x ^ 79 + 8618713376561232900 * xp ^ 50 * x ^ 78 + 4804653900724067496 * xp ^ 51 * x ^ 77 - 5392090136942195331 * xp ^ 52 * x ^ 76 - 9033746436951784372 * xp ^ 53 * x ^ 75 - 2160879120201288889 * xp ^ 54 * x ^ 74 + 4308395710206626736 * xp ^ 55 * x ^ 73 - 8585160604279602636 * xp ^ 56 * x ^ 72 - 4033809866149824036 * xp ^ 57 * x ^ 71 - 8559963551009084040 * xp ^ 58 * x ^ 70 - 1369058939789231704 * xp ^ 59 * x ^ 69 - 8517848940449959520 * xp ^ 60 * x ^ 68 - 1925141973757781642 * xp ^ 61 * x ^ 67 + 731173588490541353 * xp ^ 62 * x ^ 66 - 8581566337083791488 * xp ^ 63 * x ^ 65 + 6387007371918573387 * xp ^ 64 * x ^ 64 + 9204292110465244456 * xp ^ 65 * x ^ 63 + 7577713588675069990 * xp ^ 66 * x ^ 62 + 8065609896749525360 * xp ^ 67 * x ^ 61 + 7498927098130547206 * xp ^ 68 * x ^ 60 + 1424424916262504286 * xp ^ 69 * x ^ 59 + 1643881456284610093 * xp ^ 70 * x ^ 58 - 6432949622936572856 * xp ^ 71 * x ^ 57 - 4872198696869838948 * xp ^ 72 * x ^ 56 - 8709600934572362574 * xp ^ 73 * x ^ 55 + 91686403283653580 * xp ^ 74 * x ^ 54 + 4439140667685622956 * xp ^ 75 * x ^ 53 - 7011549092745574734 * xp ^ 76 * x ^ 52 + 4707538986314145808 * xp ^ 77 * x ^ 51 + 6757444121756882103 * xp ^ 78 * x ^ 50 - 761427539216672688 * xp ^ 79 * x ^ 49 - 5966096249029446559 * xp ^ 80 * x ^ 48 - 7603670592091998682 * xp ^ 81 * x ^ 47 - 8097892761021405801 * xp ^ 82 * x ^ 46 - 7037265635728242744 * xp ^ 83 * x ^ 45 + 9088387215775635798 * xp ^ 84 * x ^ 44 - 6349793095303378846 * xp ^ 85 * x ^ 43 + 5453408598219297325 * xp ^ 86 * x ^ 42 + 5266306365120851400 * xp ^ 87 * x ^ 41 - 1498157198951318408 * xp ^ 88 * x ^ 40 - 5145536215859022732 * xp ^ 89 * x ^ 39 + 2613478267451561673 * xp ^ 90 * x ^ 38 + 3327344617395393228 * xp ^ 91 * x ^ 37 + 4075741322755896518 * xp ^ 92 * x ^ 36 + 8461849557763224660 * xp ^ 93 * x ^ 35 + 4050518593062497849 * xp ^ 94 * x ^ 34 - 5766360727471235552 * xp ^ 95 * x ^ 33 - 6754450254796595133 * xp ^ 96 * x ^ 32 + 6879599826537337420 * xp ^ 97 * x ^ 31 - 7645790336543595505 * xp ^ 98 * x ^ 30 - 3744351668170435832 * xp ^ 99 * x ^ 29 - 3565780590352812509 * xp ^ 100 * x ^ 28 + 5648880876423267462 * xp ^ 101 * x ^ 27 - 6807314492798606490 * xp ^ 102 * x ^ 26 - 7516199512037793248 * xp ^ 103 * x ^ 25 + 6499752966304904250 * xp ^ 104 * x ^ 24 + 812395427447031738 * xp ^ 105 * x ^ 23 + 92836928519284661 * xp ^ 106 * x ^ 22 + 9633179411382384 * xp ^ 107 * x ^ 21 + 900219955281790 * xp ^ 108 * x ^ 20 + 75012015464100 * xp ^ 109 * x ^ 19 + 5505014027448 * xp ^ 110 * x ^ 18 + 350290641792 * xp ^ 111 * x ^ 17 + 18933119829 * xp ^ 112 * x ^ 16 + 845162370 * xp ^ 113 * x ^ 15 + 29914950 * xp ^ 114 * x ^ 14 + 787176 * xp ^ 115 * x ^ 13 + 13689 * xp ^ 116 * x ^ 12 + 118 * xp ^ 117 * x ^ 11] From 2e15d3a8ed34dcb274a149af3d3cfbded3844d2f Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:31:47 +0200 Subject: [PATCH 107/123] Updating _filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt and iedera_gcov_test6 --- tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt diff --git a/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt b/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt new file mode 100644 index 0000000..73fa9d2 --- /dev/null +++ b/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt @@ -0,0 +1 @@ +.1407161074 From 767c2a8b1d0bd2bfd4d11f36a84c7dd0e1607acb Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:33:19 +0200 Subject: [PATCH 108/123] Updating _filemodel_multivariate_automaton_markov_x_0.7_y_0.3 --- tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 diff --git a/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 b/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 deleted file mode 100644 index 73fa9d2..0000000 --- a/tests/_filemodel_multivariate_automaton_markov_x_0.7_y_0.3 +++ /dev/null @@ -1 +0,0 @@ -.1407161074 From aa584a5ffd997035918d182a9ac3f8c4d7a07158 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:33:51 +0200 Subject: [PATCH 109/123] Updating _filemodel_multivariate_automaton_markov_x_0.7_y_0.3 --- tests/iedera_gcov_test5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/iedera_gcov_test5 b/tests/iedera_gcov_test5 index 3c1934f..dbfd4ee 100755 --- a/tests/iedera_gcov_test5 +++ b/tests/iedera_gcov_test5 @@ -3,4 +3,4 @@ echo "4\n 0 1\n 0 1\n 0 x + y\n 1 1\n 1 1 - x - y\n 1 0\n 0 1\n 2 y\n 1 1\n 3 x\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n 3 0\n 0 1\n 2 y\n 1 1\n 3 1 - y\n" > _filein_multivariate_automaton_markov_x_y ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 32 -pF _filein_multivariate_automaton_markov_x_y -o _fileout_multivariate_automaton_markov_x_y || exit 99 cat _fileout_multivariate_automaton_markov_x_y | cut -f5 | sed "s/xp/0.3000000000/g" | sed "s/yp/0.7000000000/g" | sed "s/x/.7000000000/g" | sed "s/y/0.3000000000/g" | tr "[]" " " | bc > _fileout_multivariate_automaton_markov_x_0.7_y_0.3 -diff _fileout_multivariate_automaton_markov_x_0.7_y_0.3 _filemodel_multivariate_automaton_markov_x_0.7_y_0.3 || exit 99 +diff _fileout_multivariate_automaton_markov_x_0.7_y_0.3 _filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt || exit 99 From caf108c01c37907b8752ff0cb34e13fa5482e01d Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:37:59 +0200 Subject: [PATCH 110/123] cleaning files --- tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp | 1 - tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp | 1 - tests/iedera_gcov_test6 | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp delete mode 100644 tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp diff --git a/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp deleted file mode 100644 index 6826322..0000000 --- a/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp +++ /dev/null @@ -1 +0,0 @@ -11111111111 0.9999997615814 0.534908 0.465092 [x ^ 128 + 128 * xp * x ^ 127 + 8128 * xp ^ 2 * x ^ 126 + 341376 * xp ^ 3 * x ^ 125 + 10668000 * xp ^ 4 * x ^ 124 + 264566400 * xp ^ 5 * x ^ 123 + 5423611200 * xp ^ 6 * x ^ 122 + 94525795200 * xp ^ 7 * x ^ 121 + 1429702652400 * xp ^ 8 * x ^ 120 + 19062702032000 * xp ^ 9 * x ^ 119 + 226846154180800 * xp ^ 10 * x ^ 118 + 2433440563030036 * xp ^ 11 * x ^ 117 + 23726045479894615 * xp ^ 12 * x ^ 116 + 211709323849459744 * xp ^ 13 * x ^ 115 + 1739040200861344040 * xp ^ 14 * x ^ 114 - 5230079924715358256 * xp ^ 15 * x ^ 113 + 1107463865847873641 * xp ^ 16 * x ^ 112 + 6173862949168622202 * xp ^ 17 * x ^ 111 - 8726480664811641607 * xp ^ 18 * x ^ 110 + 6710009433287212696 * xp ^ 19 * x ^ 109 - 2491969125177085682 * xp ^ 20 * x ^ 108 + 2336371173866551328 * xp ^ 21 * x ^ 107 + 466876983495202456 * xp ^ 22 * x ^ 106 + 9158667994837939768 * xp ^ 23 * x ^ 105 + 6484139380431689011 * xp ^ 24 * x ^ 104 - 4606244938579919430 * xp ^ 25 * x ^ 103 - 8795026616181758931 * xp ^ 26 * x ^ 102 + 4224048589595409476 * xp ^ 27 * x ^ 101 - 7754221149543344437 * xp ^ 28 * x ^ 100 + 5201496423363488204 * xp ^ 29 * x ^ 99 - 929380120526655526 * xp ^ 30 * x ^ 98 + 4660911039155663968 * xp ^ 31 * x ^ 97 - 7817847676111786171 * xp ^ 32 * x ^ 96 + 1624220102283952444 * xp ^ 33 * x ^ 95 + 7020612586115967707 * xp ^ 34 * x ^ 94 + 8471341782973838088 * xp ^ 35 * x ^ 93 + 2573293720131404703 * xp ^ 36 * x ^ 92 - 5962309403916189660 * xp ^ 37 * x ^ 91 + 1069474238474647657 * xp ^ 38 * x ^ 90 + 3078084822959018728 * xp ^ 39 * x ^ 89 + 7724448390557895009 * xp ^ 40 * x ^ 88 - 1956562289801792598 * xp ^ 41 * x ^ 87 - 5667928937165507965 * xp ^ 42 * x ^ 86 - 3070805508809848376 * xp ^ 43 * x ^ 85 + 3307704413088201742 * xp ^ 44 * x ^ 84 - 1731769627709009166 * xp ^ 45 * x ^ 83 - 5929963363742781255 * xp ^ 46 * x ^ 82 - 8436720569825397472 * xp ^ 47 * x ^ 81 + 4954817581363683983 * xp ^ 48 * x ^ 80 + 6790554521851129862 * xp ^ 49 * x ^ 79 + 8618713376561232900 * xp ^ 50 * x ^ 78 + 4804653900724067496 * xp ^ 51 * x ^ 77 - 5392090136942195331 * xp ^ 52 * x ^ 76 - 9033746436951784372 * xp ^ 53 * x ^ 75 - 2160879120201288889 * xp ^ 54 * x ^ 74 + 4308395710206626736 * xp ^ 55 * x ^ 73 - 8585160604279602636 * xp ^ 56 * x ^ 72 - 4033809866149824036 * xp ^ 57 * x ^ 71 - 8559963551009084040 * xp ^ 58 * x ^ 70 - 1369058939789231704 * xp ^ 59 * x ^ 69 - 8517848940449959520 * xp ^ 60 * x ^ 68 - 1925141973757781642 * xp ^ 61 * x ^ 67 + 731173588490541353 * xp ^ 62 * x ^ 66 - 8581566337083791488 * xp ^ 63 * x ^ 65 + 6387007371918573387 * xp ^ 64 * x ^ 64 + 9204292110465244456 * xp ^ 65 * x ^ 63 + 7577713588675069990 * xp ^ 66 * x ^ 62 + 8065609896749525360 * xp ^ 67 * x ^ 61 + 7498927098130547206 * xp ^ 68 * x ^ 60 + 1424424916262504286 * xp ^ 69 * x ^ 59 + 1643881456284610093 * xp ^ 70 * x ^ 58 - 6432949622936572856 * xp ^ 71 * x ^ 57 - 4872198696869838948 * xp ^ 72 * x ^ 56 - 8709600934572362574 * xp ^ 73 * x ^ 55 + 91686403283653580 * xp ^ 74 * x ^ 54 + 4439140667685622956 * xp ^ 75 * x ^ 53 - 7011549092745574734 * xp ^ 76 * x ^ 52 + 4707538986314145808 * xp ^ 77 * x ^ 51 + 6757444121756882103 * xp ^ 78 * x ^ 50 - 761427539216672688 * xp ^ 79 * x ^ 49 - 5966096249029446559 * xp ^ 80 * x ^ 48 - 7603670592091998682 * xp ^ 81 * x ^ 47 - 8097892761021405801 * xp ^ 82 * x ^ 46 - 7037265635728242744 * xp ^ 83 * x ^ 45 + 9088387215775635798 * xp ^ 84 * x ^ 44 - 6349793095303378846 * xp ^ 85 * x ^ 43 + 5453408598219297325 * xp ^ 86 * x ^ 42 + 5266306365120851400 * xp ^ 87 * x ^ 41 - 1498157198951318408 * xp ^ 88 * x ^ 40 - 5145536215859022732 * xp ^ 89 * x ^ 39 + 2613478267451561673 * xp ^ 90 * x ^ 38 + 3327344617395393228 * xp ^ 91 * x ^ 37 + 4075741322755896518 * xp ^ 92 * x ^ 36 + 8461849557763224660 * xp ^ 93 * x ^ 35 + 4050518593062497849 * xp ^ 94 * x ^ 34 - 5766360727471235552 * xp ^ 95 * x ^ 33 - 6754450254796595133 * xp ^ 96 * x ^ 32 + 6879599826537337420 * xp ^ 97 * x ^ 31 - 7645790336543595505 * xp ^ 98 * x ^ 30 - 3744351668170435832 * xp ^ 99 * x ^ 29 - 3565780590352812509 * xp ^ 100 * x ^ 28 + 5648880876423267462 * xp ^ 101 * x ^ 27 - 6807314492798606490 * xp ^ 102 * x ^ 26 - 7516199512037793248 * xp ^ 103 * x ^ 25 + 6499752966304904250 * xp ^ 104 * x ^ 24 + 812395427447031738 * xp ^ 105 * x ^ 23 + 92836928519284661 * xp ^ 106 * x ^ 22 + 9633179411382384 * xp ^ 107 * x ^ 21 + 900219955281790 * xp ^ 108 * x ^ 20 + 75012015464100 * xp ^ 109 * x ^ 19 + 5505014027448 * xp ^ 110 * x ^ 18 + 350290641792 * xp ^ 111 * x ^ 17 + 18933119829 * xp ^ 112 * x ^ 16 + 845162370 * xp ^ 113 * x ^ 15 + 29914950 * xp ^ 114 * x ^ 14 + 787176 * xp ^ 115 * x ^ 13 + 13689 * xp ^ 116 * x ^ 12 + 118 * xp ^ 117 * x ^ 11] diff --git a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp deleted file mode 100644 index 3622e35..0000000 --- a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp +++ /dev/null @@ -1 +0,0 @@ -11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] diff --git a/tests/iedera_gcov_test6 b/tests/iedera_gcov_test6 index 524b8c5..c9e04c7 100755 --- a/tests/iedera_gcov_test6 +++ b/tests/iedera_gcov_test6 @@ -2,6 +2,6 @@ # Multivariate tests echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_bernoulli_x_xp ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l64_n1_w11_pF_bernoulli_x_xp || exit 99 -diff _fileout_l64_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp || exit 99 +diff _fileout_l64_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt || exit 99 ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l128_n1_w11_pF_bernoulli_x_xp || exit 99 -diff _fileout_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l128_n1_w11_pF_bernoulli_x_xp || exit 99 +diff _fileout_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt || exit 99 From 57cf0840c42ddb7e2bcf48fe552da301be20d0a0 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:40:04 +0200 Subject: [PATCH 111/123] Updating models --- tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt | 1 + tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt create mode 100644 tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt diff --git a/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt new file mode 100644 index 0000000..6826322 --- /dev/null +++ b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.534908 0.465092 [x ^ 128 + 128 * xp * x ^ 127 + 8128 * xp ^ 2 * x ^ 126 + 341376 * xp ^ 3 * x ^ 125 + 10668000 * xp ^ 4 * x ^ 124 + 264566400 * xp ^ 5 * x ^ 123 + 5423611200 * xp ^ 6 * x ^ 122 + 94525795200 * xp ^ 7 * x ^ 121 + 1429702652400 * xp ^ 8 * x ^ 120 + 19062702032000 * xp ^ 9 * x ^ 119 + 226846154180800 * xp ^ 10 * x ^ 118 + 2433440563030036 * xp ^ 11 * x ^ 117 + 23726045479894615 * xp ^ 12 * x ^ 116 + 211709323849459744 * xp ^ 13 * x ^ 115 + 1739040200861344040 * xp ^ 14 * x ^ 114 - 5230079924715358256 * xp ^ 15 * x ^ 113 + 1107463865847873641 * xp ^ 16 * x ^ 112 + 6173862949168622202 * xp ^ 17 * x ^ 111 - 8726480664811641607 * xp ^ 18 * x ^ 110 + 6710009433287212696 * xp ^ 19 * x ^ 109 - 2491969125177085682 * xp ^ 20 * x ^ 108 + 2336371173866551328 * xp ^ 21 * x ^ 107 + 466876983495202456 * xp ^ 22 * x ^ 106 + 9158667994837939768 * xp ^ 23 * x ^ 105 + 6484139380431689011 * xp ^ 24 * x ^ 104 - 4606244938579919430 * xp ^ 25 * x ^ 103 - 8795026616181758931 * xp ^ 26 * x ^ 102 + 4224048589595409476 * xp ^ 27 * x ^ 101 - 7754221149543344437 * xp ^ 28 * x ^ 100 + 5201496423363488204 * xp ^ 29 * x ^ 99 - 929380120526655526 * xp ^ 30 * x ^ 98 + 4660911039155663968 * xp ^ 31 * x ^ 97 - 7817847676111786171 * xp ^ 32 * x ^ 96 + 1624220102283952444 * xp ^ 33 * x ^ 95 + 7020612586115967707 * xp ^ 34 * x ^ 94 + 8471341782973838088 * xp ^ 35 * x ^ 93 + 2573293720131404703 * xp ^ 36 * x ^ 92 - 5962309403916189660 * xp ^ 37 * x ^ 91 + 1069474238474647657 * xp ^ 38 * x ^ 90 + 3078084822959018728 * xp ^ 39 * x ^ 89 + 7724448390557895009 * xp ^ 40 * x ^ 88 - 1956562289801792598 * xp ^ 41 * x ^ 87 - 5667928937165507965 * xp ^ 42 * x ^ 86 - 3070805508809848376 * xp ^ 43 * x ^ 85 + 3307704413088201742 * xp ^ 44 * x ^ 84 - 1731769627709009166 * xp ^ 45 * x ^ 83 - 5929963363742781255 * xp ^ 46 * x ^ 82 - 8436720569825397472 * xp ^ 47 * x ^ 81 + 4954817581363683983 * xp ^ 48 * x ^ 80 + 6790554521851129862 * xp ^ 49 * x ^ 79 + 8618713376561232900 * xp ^ 50 * x ^ 78 + 4804653900724067496 * xp ^ 51 * x ^ 77 - 5392090136942195331 * xp ^ 52 * x ^ 76 - 9033746436951784372 * xp ^ 53 * x ^ 75 - 2160879120201288889 * xp ^ 54 * x ^ 74 + 4308395710206626736 * xp ^ 55 * x ^ 73 - 8585160604279602636 * xp ^ 56 * x ^ 72 - 4033809866149824036 * xp ^ 57 * x ^ 71 - 8559963551009084040 * xp ^ 58 * x ^ 70 - 1369058939789231704 * xp ^ 59 * x ^ 69 - 8517848940449959520 * xp ^ 60 * x ^ 68 - 1925141973757781642 * xp ^ 61 * x ^ 67 + 731173588490541353 * xp ^ 62 * x ^ 66 - 8581566337083791488 * xp ^ 63 * x ^ 65 + 6387007371918573387 * xp ^ 64 * x ^ 64 + 9204292110465244456 * xp ^ 65 * x ^ 63 + 7577713588675069990 * xp ^ 66 * x ^ 62 + 8065609896749525360 * xp ^ 67 * x ^ 61 + 7498927098130547206 * xp ^ 68 * x ^ 60 + 1424424916262504286 * xp ^ 69 * x ^ 59 + 1643881456284610093 * xp ^ 70 * x ^ 58 - 6432949622936572856 * xp ^ 71 * x ^ 57 - 4872198696869838948 * xp ^ 72 * x ^ 56 - 8709600934572362574 * xp ^ 73 * x ^ 55 + 91686403283653580 * xp ^ 74 * x ^ 54 + 4439140667685622956 * xp ^ 75 * x ^ 53 - 7011549092745574734 * xp ^ 76 * x ^ 52 + 4707538986314145808 * xp ^ 77 * x ^ 51 + 6757444121756882103 * xp ^ 78 * x ^ 50 - 761427539216672688 * xp ^ 79 * x ^ 49 - 5966096249029446559 * xp ^ 80 * x ^ 48 - 7603670592091998682 * xp ^ 81 * x ^ 47 - 8097892761021405801 * xp ^ 82 * x ^ 46 - 7037265635728242744 * xp ^ 83 * x ^ 45 + 9088387215775635798 * xp ^ 84 * x ^ 44 - 6349793095303378846 * xp ^ 85 * x ^ 43 + 5453408598219297325 * xp ^ 86 * x ^ 42 + 5266306365120851400 * xp ^ 87 * x ^ 41 - 1498157198951318408 * xp ^ 88 * x ^ 40 - 5145536215859022732 * xp ^ 89 * x ^ 39 + 2613478267451561673 * xp ^ 90 * x ^ 38 + 3327344617395393228 * xp ^ 91 * x ^ 37 + 4075741322755896518 * xp ^ 92 * x ^ 36 + 8461849557763224660 * xp ^ 93 * x ^ 35 + 4050518593062497849 * xp ^ 94 * x ^ 34 - 5766360727471235552 * xp ^ 95 * x ^ 33 - 6754450254796595133 * xp ^ 96 * x ^ 32 + 6879599826537337420 * xp ^ 97 * x ^ 31 - 7645790336543595505 * xp ^ 98 * x ^ 30 - 3744351668170435832 * xp ^ 99 * x ^ 29 - 3565780590352812509 * xp ^ 100 * x ^ 28 + 5648880876423267462 * xp ^ 101 * x ^ 27 - 6807314492798606490 * xp ^ 102 * x ^ 26 - 7516199512037793248 * xp ^ 103 * x ^ 25 + 6499752966304904250 * xp ^ 104 * x ^ 24 + 812395427447031738 * xp ^ 105 * x ^ 23 + 92836928519284661 * xp ^ 106 * x ^ 22 + 9633179411382384 * xp ^ 107 * x ^ 21 + 900219955281790 * xp ^ 108 * x ^ 20 + 75012015464100 * xp ^ 109 * x ^ 19 + 5505014027448 * xp ^ 110 * x ^ 18 + 350290641792 * xp ^ 111 * x ^ 17 + 18933119829 * xp ^ 112 * x ^ 16 + 845162370 * xp ^ 113 * x ^ 15 + 29914950 * xp ^ 114 * x ^ 14 + 787176 * xp ^ 115 * x ^ 13 + 13689 * xp ^ 116 * x ^ 12 + 118 * xp ^ 117 * x ^ 11] diff --git a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt new file mode 100644 index 0000000..3622e35 --- /dev/null +++ b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] From 5bdc1dc1ab6553ca0e6f870de1732b02c1de48d1 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:33:51 +0200 Subject: [PATCH 112/123] tests: updating _filemodel_multivariate_automaton_markov_x_0.7_y_0.3 --- tests/iedera_gcov_test5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/iedera_gcov_test5 b/tests/iedera_gcov_test5 index 3c1934f..dbfd4ee 100755 --- a/tests/iedera_gcov_test5 +++ b/tests/iedera_gcov_test5 @@ -3,4 +3,4 @@ echo "4\n 0 1\n 0 1\n 0 x + y\n 1 1\n 1 1 - x - y\n 1 0\n 0 1\n 2 y\n 1 1\n 3 x\n 2 0\n 0 1\n 2 1 - x\n 1 1\n 3 x\n 3 0\n 0 1\n 2 y\n 1 1\n 3 1 - y\n" > _filein_multivariate_automaton_markov_x_y ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 32 -pF _filein_multivariate_automaton_markov_x_y -o _fileout_multivariate_automaton_markov_x_y || exit 99 cat _fileout_multivariate_automaton_markov_x_y | cut -f5 | sed "s/xp/0.3000000000/g" | sed "s/yp/0.7000000000/g" | sed "s/x/.7000000000/g" | sed "s/y/0.3000000000/g" | tr "[]" " " | bc > _fileout_multivariate_automaton_markov_x_0.7_y_0.3 -diff _fileout_multivariate_automaton_markov_x_0.7_y_0.3 _filemodel_multivariate_automaton_markov_x_0.7_y_0.3 || exit 99 +diff _fileout_multivariate_automaton_markov_x_0.7_y_0.3 _filemodel_multivariate_automaton_markov_x_0.7_y_0.3.txt || exit 99 From a6bcf9cccaaecb9de47a9bc82bf049147a0fb47f Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:37:59 +0200 Subject: [PATCH 113/123] cleaning files --- tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp | 1 - tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp | 1 - tests/iedera_gcov_test6 | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp delete mode 100644 tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp diff --git a/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp deleted file mode 100644 index 6826322..0000000 --- a/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp +++ /dev/null @@ -1 +0,0 @@ -11111111111 0.9999997615814 0.534908 0.465092 [x ^ 128 + 128 * xp * x ^ 127 + 8128 * xp ^ 2 * x ^ 126 + 341376 * xp ^ 3 * x ^ 125 + 10668000 * xp ^ 4 * x ^ 124 + 264566400 * xp ^ 5 * x ^ 123 + 5423611200 * xp ^ 6 * x ^ 122 + 94525795200 * xp ^ 7 * x ^ 121 + 1429702652400 * xp ^ 8 * x ^ 120 + 19062702032000 * xp ^ 9 * x ^ 119 + 226846154180800 * xp ^ 10 * x ^ 118 + 2433440563030036 * xp ^ 11 * x ^ 117 + 23726045479894615 * xp ^ 12 * x ^ 116 + 211709323849459744 * xp ^ 13 * x ^ 115 + 1739040200861344040 * xp ^ 14 * x ^ 114 - 5230079924715358256 * xp ^ 15 * x ^ 113 + 1107463865847873641 * xp ^ 16 * x ^ 112 + 6173862949168622202 * xp ^ 17 * x ^ 111 - 8726480664811641607 * xp ^ 18 * x ^ 110 + 6710009433287212696 * xp ^ 19 * x ^ 109 - 2491969125177085682 * xp ^ 20 * x ^ 108 + 2336371173866551328 * xp ^ 21 * x ^ 107 + 466876983495202456 * xp ^ 22 * x ^ 106 + 9158667994837939768 * xp ^ 23 * x ^ 105 + 6484139380431689011 * xp ^ 24 * x ^ 104 - 4606244938579919430 * xp ^ 25 * x ^ 103 - 8795026616181758931 * xp ^ 26 * x ^ 102 + 4224048589595409476 * xp ^ 27 * x ^ 101 - 7754221149543344437 * xp ^ 28 * x ^ 100 + 5201496423363488204 * xp ^ 29 * x ^ 99 - 929380120526655526 * xp ^ 30 * x ^ 98 + 4660911039155663968 * xp ^ 31 * x ^ 97 - 7817847676111786171 * xp ^ 32 * x ^ 96 + 1624220102283952444 * xp ^ 33 * x ^ 95 + 7020612586115967707 * xp ^ 34 * x ^ 94 + 8471341782973838088 * xp ^ 35 * x ^ 93 + 2573293720131404703 * xp ^ 36 * x ^ 92 - 5962309403916189660 * xp ^ 37 * x ^ 91 + 1069474238474647657 * xp ^ 38 * x ^ 90 + 3078084822959018728 * xp ^ 39 * x ^ 89 + 7724448390557895009 * xp ^ 40 * x ^ 88 - 1956562289801792598 * xp ^ 41 * x ^ 87 - 5667928937165507965 * xp ^ 42 * x ^ 86 - 3070805508809848376 * xp ^ 43 * x ^ 85 + 3307704413088201742 * xp ^ 44 * x ^ 84 - 1731769627709009166 * xp ^ 45 * x ^ 83 - 5929963363742781255 * xp ^ 46 * x ^ 82 - 8436720569825397472 * xp ^ 47 * x ^ 81 + 4954817581363683983 * xp ^ 48 * x ^ 80 + 6790554521851129862 * xp ^ 49 * x ^ 79 + 8618713376561232900 * xp ^ 50 * x ^ 78 + 4804653900724067496 * xp ^ 51 * x ^ 77 - 5392090136942195331 * xp ^ 52 * x ^ 76 - 9033746436951784372 * xp ^ 53 * x ^ 75 - 2160879120201288889 * xp ^ 54 * x ^ 74 + 4308395710206626736 * xp ^ 55 * x ^ 73 - 8585160604279602636 * xp ^ 56 * x ^ 72 - 4033809866149824036 * xp ^ 57 * x ^ 71 - 8559963551009084040 * xp ^ 58 * x ^ 70 - 1369058939789231704 * xp ^ 59 * x ^ 69 - 8517848940449959520 * xp ^ 60 * x ^ 68 - 1925141973757781642 * xp ^ 61 * x ^ 67 + 731173588490541353 * xp ^ 62 * x ^ 66 - 8581566337083791488 * xp ^ 63 * x ^ 65 + 6387007371918573387 * xp ^ 64 * x ^ 64 + 9204292110465244456 * xp ^ 65 * x ^ 63 + 7577713588675069990 * xp ^ 66 * x ^ 62 + 8065609896749525360 * xp ^ 67 * x ^ 61 + 7498927098130547206 * xp ^ 68 * x ^ 60 + 1424424916262504286 * xp ^ 69 * x ^ 59 + 1643881456284610093 * xp ^ 70 * x ^ 58 - 6432949622936572856 * xp ^ 71 * x ^ 57 - 4872198696869838948 * xp ^ 72 * x ^ 56 - 8709600934572362574 * xp ^ 73 * x ^ 55 + 91686403283653580 * xp ^ 74 * x ^ 54 + 4439140667685622956 * xp ^ 75 * x ^ 53 - 7011549092745574734 * xp ^ 76 * x ^ 52 + 4707538986314145808 * xp ^ 77 * x ^ 51 + 6757444121756882103 * xp ^ 78 * x ^ 50 - 761427539216672688 * xp ^ 79 * x ^ 49 - 5966096249029446559 * xp ^ 80 * x ^ 48 - 7603670592091998682 * xp ^ 81 * x ^ 47 - 8097892761021405801 * xp ^ 82 * x ^ 46 - 7037265635728242744 * xp ^ 83 * x ^ 45 + 9088387215775635798 * xp ^ 84 * x ^ 44 - 6349793095303378846 * xp ^ 85 * x ^ 43 + 5453408598219297325 * xp ^ 86 * x ^ 42 + 5266306365120851400 * xp ^ 87 * x ^ 41 - 1498157198951318408 * xp ^ 88 * x ^ 40 - 5145536215859022732 * xp ^ 89 * x ^ 39 + 2613478267451561673 * xp ^ 90 * x ^ 38 + 3327344617395393228 * xp ^ 91 * x ^ 37 + 4075741322755896518 * xp ^ 92 * x ^ 36 + 8461849557763224660 * xp ^ 93 * x ^ 35 + 4050518593062497849 * xp ^ 94 * x ^ 34 - 5766360727471235552 * xp ^ 95 * x ^ 33 - 6754450254796595133 * xp ^ 96 * x ^ 32 + 6879599826537337420 * xp ^ 97 * x ^ 31 - 7645790336543595505 * xp ^ 98 * x ^ 30 - 3744351668170435832 * xp ^ 99 * x ^ 29 - 3565780590352812509 * xp ^ 100 * x ^ 28 + 5648880876423267462 * xp ^ 101 * x ^ 27 - 6807314492798606490 * xp ^ 102 * x ^ 26 - 7516199512037793248 * xp ^ 103 * x ^ 25 + 6499752966304904250 * xp ^ 104 * x ^ 24 + 812395427447031738 * xp ^ 105 * x ^ 23 + 92836928519284661 * xp ^ 106 * x ^ 22 + 9633179411382384 * xp ^ 107 * x ^ 21 + 900219955281790 * xp ^ 108 * x ^ 20 + 75012015464100 * xp ^ 109 * x ^ 19 + 5505014027448 * xp ^ 110 * x ^ 18 + 350290641792 * xp ^ 111 * x ^ 17 + 18933119829 * xp ^ 112 * x ^ 16 + 845162370 * xp ^ 113 * x ^ 15 + 29914950 * xp ^ 114 * x ^ 14 + 787176 * xp ^ 115 * x ^ 13 + 13689 * xp ^ 116 * x ^ 12 + 118 * xp ^ 117 * x ^ 11] diff --git a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp deleted file mode 100644 index 3622e35..0000000 --- a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp +++ /dev/null @@ -1 +0,0 @@ -11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] diff --git a/tests/iedera_gcov_test6 b/tests/iedera_gcov_test6 index 524b8c5..c9e04c7 100755 --- a/tests/iedera_gcov_test6 +++ b/tests/iedera_gcov_test6 @@ -2,6 +2,6 @@ # Multivariate tests echo "2\n 0 1\n 0 1\n 0 xp\n 1 1\n 0 x\n 1 0\n 0 1\n 1 xp\n 1 1\n 1 x\n" > _filein_multivariate_automaton_bernoulli_x_xp ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 64 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l64_n1_w11_pF_bernoulli_x_xp || exit 99 -diff _fileout_l64_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp || exit 99 +diff _fileout_l64_n1_w11_pF_bernoulli_x_xp _filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt || exit 99 ./iedera_gcov -spaced -BSymbols 01 -n 1 -w 11,11 -s 11,22 -z 1 -m "11111111111" -l 128 -pF _filein_multivariate_automaton_bernoulli_x_xp -o _fileout_l128_n1_w11_pF_bernoulli_x_xp || exit 99 -diff _fileout_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l128_n1_w11_pF_bernoulli_x_xp || exit 99 +diff _fileout_l128_n1_w11_pF_bernoulli_x_xp _filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt || exit 99 From 1b33c14dc1b88e170344154f8ad3f07e08c70a44 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 3 Apr 2018 14:40:04 +0200 Subject: [PATCH 114/123] tests: updating models --- tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt | 1 + tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt create mode 100644 tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt diff --git a/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt new file mode 100644 index 0000000..6826322 --- /dev/null +++ b/tests/_filemodel_l128_n1_w11_pF_bernoulli_x_xp.txt @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.534908 0.465092 [x ^ 128 + 128 * xp * x ^ 127 + 8128 * xp ^ 2 * x ^ 126 + 341376 * xp ^ 3 * x ^ 125 + 10668000 * xp ^ 4 * x ^ 124 + 264566400 * xp ^ 5 * x ^ 123 + 5423611200 * xp ^ 6 * x ^ 122 + 94525795200 * xp ^ 7 * x ^ 121 + 1429702652400 * xp ^ 8 * x ^ 120 + 19062702032000 * xp ^ 9 * x ^ 119 + 226846154180800 * xp ^ 10 * x ^ 118 + 2433440563030036 * xp ^ 11 * x ^ 117 + 23726045479894615 * xp ^ 12 * x ^ 116 + 211709323849459744 * xp ^ 13 * x ^ 115 + 1739040200861344040 * xp ^ 14 * x ^ 114 - 5230079924715358256 * xp ^ 15 * x ^ 113 + 1107463865847873641 * xp ^ 16 * x ^ 112 + 6173862949168622202 * xp ^ 17 * x ^ 111 - 8726480664811641607 * xp ^ 18 * x ^ 110 + 6710009433287212696 * xp ^ 19 * x ^ 109 - 2491969125177085682 * xp ^ 20 * x ^ 108 + 2336371173866551328 * xp ^ 21 * x ^ 107 + 466876983495202456 * xp ^ 22 * x ^ 106 + 9158667994837939768 * xp ^ 23 * x ^ 105 + 6484139380431689011 * xp ^ 24 * x ^ 104 - 4606244938579919430 * xp ^ 25 * x ^ 103 - 8795026616181758931 * xp ^ 26 * x ^ 102 + 4224048589595409476 * xp ^ 27 * x ^ 101 - 7754221149543344437 * xp ^ 28 * x ^ 100 + 5201496423363488204 * xp ^ 29 * x ^ 99 - 929380120526655526 * xp ^ 30 * x ^ 98 + 4660911039155663968 * xp ^ 31 * x ^ 97 - 7817847676111786171 * xp ^ 32 * x ^ 96 + 1624220102283952444 * xp ^ 33 * x ^ 95 + 7020612586115967707 * xp ^ 34 * x ^ 94 + 8471341782973838088 * xp ^ 35 * x ^ 93 + 2573293720131404703 * xp ^ 36 * x ^ 92 - 5962309403916189660 * xp ^ 37 * x ^ 91 + 1069474238474647657 * xp ^ 38 * x ^ 90 + 3078084822959018728 * xp ^ 39 * x ^ 89 + 7724448390557895009 * xp ^ 40 * x ^ 88 - 1956562289801792598 * xp ^ 41 * x ^ 87 - 5667928937165507965 * xp ^ 42 * x ^ 86 - 3070805508809848376 * xp ^ 43 * x ^ 85 + 3307704413088201742 * xp ^ 44 * x ^ 84 - 1731769627709009166 * xp ^ 45 * x ^ 83 - 5929963363742781255 * xp ^ 46 * x ^ 82 - 8436720569825397472 * xp ^ 47 * x ^ 81 + 4954817581363683983 * xp ^ 48 * x ^ 80 + 6790554521851129862 * xp ^ 49 * x ^ 79 + 8618713376561232900 * xp ^ 50 * x ^ 78 + 4804653900724067496 * xp ^ 51 * x ^ 77 - 5392090136942195331 * xp ^ 52 * x ^ 76 - 9033746436951784372 * xp ^ 53 * x ^ 75 - 2160879120201288889 * xp ^ 54 * x ^ 74 + 4308395710206626736 * xp ^ 55 * x ^ 73 - 8585160604279602636 * xp ^ 56 * x ^ 72 - 4033809866149824036 * xp ^ 57 * x ^ 71 - 8559963551009084040 * xp ^ 58 * x ^ 70 - 1369058939789231704 * xp ^ 59 * x ^ 69 - 8517848940449959520 * xp ^ 60 * x ^ 68 - 1925141973757781642 * xp ^ 61 * x ^ 67 + 731173588490541353 * xp ^ 62 * x ^ 66 - 8581566337083791488 * xp ^ 63 * x ^ 65 + 6387007371918573387 * xp ^ 64 * x ^ 64 + 9204292110465244456 * xp ^ 65 * x ^ 63 + 7577713588675069990 * xp ^ 66 * x ^ 62 + 8065609896749525360 * xp ^ 67 * x ^ 61 + 7498927098130547206 * xp ^ 68 * x ^ 60 + 1424424916262504286 * xp ^ 69 * x ^ 59 + 1643881456284610093 * xp ^ 70 * x ^ 58 - 6432949622936572856 * xp ^ 71 * x ^ 57 - 4872198696869838948 * xp ^ 72 * x ^ 56 - 8709600934572362574 * xp ^ 73 * x ^ 55 + 91686403283653580 * xp ^ 74 * x ^ 54 + 4439140667685622956 * xp ^ 75 * x ^ 53 - 7011549092745574734 * xp ^ 76 * x ^ 52 + 4707538986314145808 * xp ^ 77 * x ^ 51 + 6757444121756882103 * xp ^ 78 * x ^ 50 - 761427539216672688 * xp ^ 79 * x ^ 49 - 5966096249029446559 * xp ^ 80 * x ^ 48 - 7603670592091998682 * xp ^ 81 * x ^ 47 - 8097892761021405801 * xp ^ 82 * x ^ 46 - 7037265635728242744 * xp ^ 83 * x ^ 45 + 9088387215775635798 * xp ^ 84 * x ^ 44 - 6349793095303378846 * xp ^ 85 * x ^ 43 + 5453408598219297325 * xp ^ 86 * x ^ 42 + 5266306365120851400 * xp ^ 87 * x ^ 41 - 1498157198951318408 * xp ^ 88 * x ^ 40 - 5145536215859022732 * xp ^ 89 * x ^ 39 + 2613478267451561673 * xp ^ 90 * x ^ 38 + 3327344617395393228 * xp ^ 91 * x ^ 37 + 4075741322755896518 * xp ^ 92 * x ^ 36 + 8461849557763224660 * xp ^ 93 * x ^ 35 + 4050518593062497849 * xp ^ 94 * x ^ 34 - 5766360727471235552 * xp ^ 95 * x ^ 33 - 6754450254796595133 * xp ^ 96 * x ^ 32 + 6879599826537337420 * xp ^ 97 * x ^ 31 - 7645790336543595505 * xp ^ 98 * x ^ 30 - 3744351668170435832 * xp ^ 99 * x ^ 29 - 3565780590352812509 * xp ^ 100 * x ^ 28 + 5648880876423267462 * xp ^ 101 * x ^ 27 - 6807314492798606490 * xp ^ 102 * x ^ 26 - 7516199512037793248 * xp ^ 103 * x ^ 25 + 6499752966304904250 * xp ^ 104 * x ^ 24 + 812395427447031738 * xp ^ 105 * x ^ 23 + 92836928519284661 * xp ^ 106 * x ^ 22 + 9633179411382384 * xp ^ 107 * x ^ 21 + 900219955281790 * xp ^ 108 * x ^ 20 + 75012015464100 * xp ^ 109 * x ^ 19 + 5505014027448 * xp ^ 110 * x ^ 18 + 350290641792 * xp ^ 111 * x ^ 17 + 18933119829 * xp ^ 112 * x ^ 16 + 845162370 * xp ^ 113 * x ^ 15 + 29914950 * xp ^ 114 * x ^ 14 + 787176 * xp ^ 115 * x ^ 13 + 13689 * xp ^ 116 * x ^ 12 + 118 * xp ^ 117 * x ^ 11] diff --git a/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt new file mode 100644 index 0000000..3622e35 --- /dev/null +++ b/tests/_filemodel_l64_n1_w11_pF_bernoulli_x_xp.txt @@ -0,0 +1 @@ +11111111111 0.9999997615814 0.300196 0.699804 [x ^ 64 + 64 * xp * x ^ 63 + 2016 * xp ^ 2 * x ^ 62 + 41664 * xp ^ 3 * x ^ 61 + 635376 * xp ^ 4 * x ^ 60 + 7624506 * xp ^ 5 * x ^ 59 + 74955853 * xp ^ 6 * x ^ 58 + 619583272 * xp ^ 7 * x ^ 57 + 4374599544 * xp ^ 8 * x ^ 56 + 26634941702 * xp ^ 9 * x ^ 55 + 140817870050 * xp ^ 10 * x ^ 54 + 650712755004 * xp ^ 11 * x ^ 53 + 2645918048566 * xp ^ 12 * x ^ 52 + 9532295505880 * xp ^ 13 * x ^ 51 + 30629979651075 * xp ^ 14 * x ^ 50 + 88333146992720 * xp ^ 15 * x ^ 49 + 229916824107023 * xp ^ 16 * x ^ 48 + 542811202068762 * xp ^ 17 * x ^ 47 + 1167451399456015 * xp ^ 18 * x ^ 46 + 2295920726320600 * xp ^ 19 * x ^ 45 + 4141671553771500 * xp ^ 20 * x ^ 44 + 6871432453555670 * xp ^ 21 * x ^ 43 + 10508138298881405 * xp ^ 22 * x ^ 42 + 14838407971200840 * xp ^ 23 * x ^ 41 + 19375279711450000 * xp ^ 24 * x ^ 40 + 23419576997614252 * xp ^ 25 * x ^ 39 + 26225237830956885 * xp ^ 26 * x ^ 38 + 27219853884514060 * xp ^ 27 * x ^ 37 + 26192687458751758 * xp ^ 28 * x ^ 36 + 23366558713472100 * xp ^ 29 * x ^ 35 + 19320389713130985 * xp ^ 30 * x ^ 34 + 14798700315741024 * xp ^ 31 * x ^ 33 + 10492775658436071 * xp ^ 32 * x ^ 32 + 6879820141519780 * xp ^ 33 * x ^ 31 + 4166062298664175 * xp ^ 34 * x ^ 30 + 2326215369539880 * xp ^ 35 * x ^ 29 + 1195421472109319 * xp ^ 36 * x ^ 28 + 564093286500926 * xp ^ 37 * x ^ 27 + 243763479345750 * xp ^ 38 * x ^ 26 + 96159187213600 * xp ^ 39 * x ^ 25 + 34497110919250 * xp ^ 40 * x ^ 24 + 11204891663658 * xp ^ 41 * x ^ 23 + 3277621380677 * xp ^ 42 * x ^ 22 + 857960383280 * xp ^ 43 * x ^ 21 + 199422609750 * xp ^ 44 * x ^ 20 + 40770844660 * xp ^ 45 * x ^ 19 + 7244724760 * xp ^ 46 * x ^ 18 + 1101959040 * xp ^ 47 * x ^ 17 + 140614565 * xp ^ 48 * x ^ 16 + 14641250 * xp ^ 49 * x ^ 15 + 1194726 * xp ^ 50 * x ^ 14 + 71656 * xp ^ 51 * x ^ 13 + 2809 * xp ^ 52 * x ^ 12 + 54 * xp ^ 53 * x ^ 11] From 0eb4d1e01ca66e97b4fa9b760f3b299c5dc2173c Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 4 Apr 2018 15:03:32 +0200 Subject: [PATCH 115/123] docs: Concrete FFT todo added --- src/polynomial.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/polynomial.hh b/src/polynomial.hh index a68ccf6..613bf96 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -236,6 +236,7 @@ template inline polynomial operator- (const polynomial & l, co /// Operator @f$ \times @f$ for two polynomials +// @todo{FIXME : this must be updated with Concrete FFT Polynomial product} template inline polynomial operator* (const polynomial & l, const polynomial & r) { VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("[" << l << "] * [" << r << "]");); // Sorting is supposed to be done before; since polynomials l and r are const here, must not be done here From e47cfcac1ceb8c77c2595f4740eb574f0c6750c8 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 4 Apr 2018 21:28:21 +0200 Subject: [PATCH 116/123] docs: updating the product operator with a good advice --- src/polynomial.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index 613bf96..bd55cfa 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -235,8 +235,9 @@ template inline polynomial operator- (const polynomial & l, co } -/// Operator @f$ \times @f$ for two polynomials -// @todo{FIXME : this must be updated with Concrete FFT Polynomial product} +/** Operator @f$ \times @f$ for two polynomials + * @todo{FIXME : this must be updated with Karatsuba, Toom-k or FFT/NNT methods (Strassen)} + */ template inline polynomial operator* (const polynomial & l, const polynomial & r) { VERB_FILTER(VERBOSITY_ANNOYING, MESSAGE__("[" << l << "] * [" << r << "]");); // Sorting is supposed to be done before; since polynomials l and r are const here, must not be done here From 47edb972ac6d306b83a73bbfd85f6ef17b7d77ac Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 10 Apr 2018 09:41:47 +0200 Subject: [PATCH 117/123] ci: deploy (as draft) the binaries compiled with appveyor (win64) or travis (osx) --- .travis.yml | 18 +++++++++++------- appveyor.yml | 17 ++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90e9afd..ead31e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +notifications: + email: false + language: cpp matrix: include: @@ -10,7 +13,7 @@ matrix: sudo: false compiler: clang - os: osx - osx_image: xcode8 + osx_image: xcode9 sudo: false script: @@ -22,17 +25,18 @@ before_install: after_success: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$CC" == "gcc" ]]; then coveralls --gcov-options '\-lp'; fi; fi - -before_deploy: - - export FILE_TO_UPLOAD=$(ls src/iedera) - deploy: provider: releases api_key: - secure: "eS0Q2bRKM4SgtXvZSKYd7Kh8EASN4xg3Ne5/4XWvbYkJsHX7y/WdkmxsKlUfHhh4PnWSz/DmXHg6RWAtjajKs+fuHhbBo+3SKJ3NkrsaUMUgeP09QwX8CyOz4dr6ZzAHTtwdVHdMN/xRqkOn+brBg4S4IGYgOKc3WsDB1ED0Y8G4Htq9w1ItSgarx7NbSRMDzTebr40AGZuPxl4ghoryRCLYvNiq1c6AEuw69yvXJwHT+yOzbxu/ZA6u3y/gEP77d8M3cH/iswYkae0N7oKqqfmMN8xU3RVKemKhrfPI4AXdrjRnojNOAmfe4oDLguSCzzK4Qhp1TQ8ntulAzk+gkxWTgINc+pXibW9TzmdwG6nNv9F1+cbuqMtWLO6QDhr5s4wUsfDTX62S8qiysunfwg0CiqTnxmGj4a+sN1uVnDr0uk7jHeDN5Fxm3uv6r1q8YjNp5lPrJHblAgIsFpG/xUmR6WJLOXiFGySD5NrYRBE6K1Nrgwx5b/eYdEnAcguc1THTVm10UFr8kU7iCFCj94CbcfdA7L0EieHToeId1R55E8LnNxxa6dOs/cb7i8rBhJXSLNt6n2n27JjrD+GVsV1n9WZ1iSz14L3b4bAU7MYsNjceK+nloRt0NOhld4bDL6Eo18mDccsNv54wjl1eV5s8IRuvBEi6NAsd210Elc8=" file_glob: true - file: "${FILE_TO_UPLOAD}" skip_cleanup: true + draft: true + prerelease: true + file: "src/iedera" + name: "${TRAVIS_TAG}" + body: "Mac OS X and Windows 64 binaries" + overwrite: true on: tags: true - condition: "$TRAVIS_OS_NAME = osx" + condition: "${TRAVIS_OS_NAME} = osx" diff --git a/appveyor.yml b/appveyor.yml index 11041e9..705d606 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,19 +1,16 @@ environment: matrix: - platform: x64 + MINGW_ARCH: x86_64 + MINGW_ROOT: C:\msys64\mingw64 MSYSTEM: MINGW64 PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH% - platform: x86 MSYSTEM: MINGW32 + MINGW_ROOT: C:\msys64\mingw32 + MINGW_ARCH: x86 PATH: C:\msys64\usr\bin;C:\msys64\mingw32\bin;C:\Windows\System32;C:\Windows;%PATH% -install: - # update mysy2 - - C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors" - - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy" - - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S autoconf automake bison flex" - - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-oniguruma mingw-w64-x86_64-oniguruma" - build_script: - bash -lc "exec 0 Date: Tue, 10 Apr 2018 09:53:59 +0200 Subject: [PATCH 118/123] style: formatting to avoid some compiler warnings --- src/polynomial.hh | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/polynomial.hh b/src/polynomial.hh index bd55cfa..5940850 100644 --- a/src/polynomial.hh +++ b/src/polynomial.hh @@ -40,12 +40,16 @@ template class polynomial { /// Build an empty polynomial polynomial() { - for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); + for(unsigned i = 0; i < _coefs.size(); i++) + _coefs[i].first.clear(); + _coefs.clear(); }; /// Build a constant polynomial polynomial(int u) { - for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); + for(unsigned i = 0; i < _coefs.size(); i++) + _coefs[i].first.clear(); + _coefs.clear(); if (u != 0) _coefs.push_back(pair, C> (vector(0), C(u))); @@ -57,7 +61,9 @@ template class polynomial { /// Copy Constructor polynomial(const polynomial &other) { - for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear(); + for(unsigned i = 0; i < _coefs.size(); i++) + _coefs[i].first.clear(); + _coefs.clear(); /* copy */ for (unsigned i = 0; i < other._coefs.size(); i++) @@ -72,7 +78,9 @@ template class polynomial { /// Erase a polynomial - ~polynomial() {for(unsigned i = 0; i < _coefs.size(); i++) _coefs[i].first.clear(); _coefs.clear();}; + ~polynomial() {for(unsigned i = 0; i < _coefs.size(); i++) + _coefs[i].first.clear(); + _coefs.clear();}; // @{ /// Operator @f$ + @f$ for two polynomials @@ -401,12 +409,12 @@ template istream& operator>> (istream& is, polynomial & p) { // extend var_degree up to this variable if it is already defined bool defined_var = false; - for (unsigned i=0; i < p._var_names.size(); i++) { + for (unsigned i = 0; i < p._var_names.size(); i++) { if (!p._var_names[i].compare(var_symbol)) { - i_var = i; + i_var = (int) i; defined_var = true; // already in the monomial list, so no need to extend the monomial list - if (i_var < var_degree.size()) { + if (i_var < (int) var_degree.size()) { if (var_degree[i_var] != 0) { // check if possibly not at zero, because this is a classical error is to set it twice _ERROR("operator>>"," variable \""<< var_symbol<<"\" occuring twice in a monomial (found inside : \"" << line << "\")" << endl << "\t polynom format : \"coef\" * variable1 [^power1] [* variable2 [^power2] ... ] + \"coef\" * ..." << endl); } else { @@ -414,7 +422,7 @@ template istream& operator>> (istream& is, polynomial & p) { } } else { // or need to extend it up to "i_var" - for (unsigned j=var_degree.size(); j < i_var; j++) + for (int j = (int) var_degree.size(); j < i_var; j++) var_degree.push_back(0); var_degree.push_back(1); } @@ -425,10 +433,10 @@ template istream& operator>> (istream& is, polynomial & p) { // if not defined, create its name and extend "var_degree" if (!defined_var) { unsigned i = p._var_names.size(); - i_var = i; + i_var = (int) i; p._var_names.push_back(var_symbol); //cerr << "new symbol " << var_symbol << " at index " << (p._var_names.size()) << endl; - for (unsigned j=var_degree.size(); j < i; j++) + for (unsigned j = var_degree.size(); j < i; j++) var_degree.push_back(0); var_degree.push_back(1); } @@ -467,10 +475,7 @@ template istream& operator>> (istream& is, polynomial & p) { return is; } - template vector polynomial::_var_names = vector(0); // @} #endif - - From 7f3d087d7ecf7b0755f0cf01828aea0b385fcc40 Mon Sep 17 00:00:00 2001 From: noe Date: Tue, 10 Apr 2018 09:58:27 +0200 Subject: [PATCH 119/123] build: updating install scripts from autoreconf -fi --- install-sh | 397 +++++++++++++++++++++---------------------- missing | 455 ++++++++++++++++++-------------------------------- mkinstalldirs | 93 ++++++++--- test-driver | 10 +- 4 files changed, 438 insertions(+), 517 deletions(-) diff --git a/install-sh b/install-sh index 377bb86..8175c64 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -207,6 +203,15 @@ if test $# -eq 0; then exit 0 fi +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -223,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -266,122 +271,113 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +387,51 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -450,8 +444,8 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 @@ -472,15 +466,12 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +484,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 @@ -519,9 +510,9 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/missing b/missing index fc54c64..625aeb1 100755 --- a/missing +++ b/missing @@ -1,7 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,9 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -24,313 +25,191 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - ;; -esac + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.4 - GNU automake" + echo "missing $scriptversion (GNU Automake)" + exit $? ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; - aclocal*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi +esac - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" ;; -esac - -exit 0 + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/mkinstalldirs b/mkinstalldirs index d2d5f21..36aa909 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -1,21 +1,36 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman + +scriptversion=2018-03-07.03; # UTC + +# Original author: Noah Friedman # Created: 1993-05-16 -# Public domain +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . +nl=' +' +IFS=" "" $nl" errstatus=0 -dirmode="" +dirmode= usage="\ -Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help - echo "$usage" 1>&2 - exit 0 + echo "$usage" + exit $? ;; -m) # -m PERM arg shift @@ -23,6 +38,10 @@ while test $# -gt 0 ; do dirmode=$1 shift ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; --) # stop option processing shift break @@ -50,30 +69,58 @@ case $# in 0) exit 0 ;; esac +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') - if mkdir -p -- . 2>/dev/null; then + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the 'mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because '.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version fi ;; *) - if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done fi ;; esac for file do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file shift + IFS=$oIFS - pathcomp= for d do - pathcomp="$pathcomp$d" + test "x$d" = x && continue + + pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac @@ -84,21 +131,21 @@ do mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then - errstatus=$lasterr + errstatus=$lasterr else - if test ! -z "$dirmode"; then + if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi fi fi - pathcomp="$pathcomp/" + pathcomp=$pathcomp/ done done @@ -107,5 +154,9 @@ exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" # End: -# mkinstalldirs ends here diff --git a/test-driver b/test-driver index 8e575b0..b8521a4 100755 --- a/test-driver +++ b/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,9 +140,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: From fc61cc66b4bdea8cce14a8bc8fe95dbcc34bccf2 Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Apr 2018 06:21:31 +0200 Subject: [PATCH 120/123] ci: adding '-static' to ./configure --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 705d606..0241d4f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ environment: build_script: - bash -lc "exec 0 Date: Thu, 12 Apr 2018 06:53:44 +0200 Subject: [PATCH 121/123] style(misleading-indentation): formatting to avoid some compiler warnings --- src/automaton.hh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/automaton.hh b/src/automaton.hh index fc5b73f..1cb012d 100644 --- a/src/automaton.hh +++ b/src/automaton.hh @@ -280,11 +280,18 @@ public: /// Erase a state (clear transition lists first) - inline ~state() { for(int a = 0; a < gv_align_alphabet_size; a++) _next[a].clear(); _next.clear(); }; + inline ~state() { + for(int a = 0; a < gv_align_alphabet_size; a++) + _next[a].clear(); + _next.clear(); + }; /** @brief Clear transition lists */ - inline void clear() { for(int a = 0; a < gv_align_alphabet_size; a++) _next[a].clear(); _next.clear(); }; + inline void clear() { for(int a = 0; a < gv_align_alphabet_size; a++) + _next[a].clear(); + _next.clear(); + }; protected: /// forward transitions list on letter A @@ -323,7 +330,10 @@ template inline ostream& operator<<(ostream& os, const state& st) /// input method for a state st template inline istream& operator>>(istream& is, state& st) { // previous data removed if any - for (int a = 0; a < gv_align_alphabet_size; a++) st._next[a].clear(); st._next.clear(); st._final = 0; + for (int a = 0; a < gv_align_alphabet_size; a++) + st._next[a].clear(); + st._next.clear(); + st._final = 0; // reading final int final = 0; From f222ebdacf316b66ebac09b02933c9dd57e1a0cc Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Apr 2018 09:05:40 +0200 Subject: [PATCH 122/123] docs(binaries): adding a link to the releases in github --- README.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e623bdf..0d363f5 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,9 @@ Installation (more at ) -You need a C++ compiler and the autotools. On Linux, you can install +Binaries for Windows (x64) and OS X (x64) are available [here](https://github.com/laurentnoe/iedera/releases). + +Otherwise, you need a C++ compiler and the autotools. On Linux, you can install ``g++``, ``autoconf``, ``automake``. On Mac, you can install ``xcode``, or the command line developer tools (or you can use ``macports`` to install ``g++-mp-5`` for example). @@ -61,6 +63,7 @@ or copy the binary directly to your homedir:: cp src/iedera ~/. + Command-line ------------ From 4e74e5320fe189a45c42d36fe282c9182814a97b Mon Sep 17 00:00:00 2001 From: noe Date: Thu, 12 Apr 2018 09:06:55 +0200 Subject: [PATCH 123/123] docs(binaries): adding a link to the releases in github, with url display --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0d363f5..d0a9ad3 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,7 @@ Installation (more at ) -Binaries for Windows (x64) and OS X (x64) are available [here](https://github.com/laurentnoe/iedera/releases). +Binaries for Windows (x64) and OS X (x64) are available at . Otherwise, you need a C++ compiler and the autotools. On Linux, you can install ``g++``, ``autoconf``, ``automake``. On Mac, you can install