Commit 968e52ff authored by Alfons Laarman's avatar Alfons Laarman

NDA incomplete

parent 5addfe60
......@@ -2391,6 +2391,40 @@ void dve_compiler::gen_transition_info()
block_end();
line();
////////////////////////////////////////////////
// EXPORT DO NOT ACCORD MATRIX //
////////////////////////////////////////////////
// guard nes matrix (#guards x #transitions)
snprintf(buf, BUFLEN, "int nda[%zu][%zu] = ", transitions.size(), transitions.size());
line(buf);
block_begin();
for(size_int_t i=0; i < transitions.size(); i++) {
append("{");
for(size_int_t j=0; j < transitions.size(); j++) {
if (j != 0) append(", ");
append(is_nda(transitions[i], transitions[j])?"1":"0");
}
if (i == guard.size() - 1)
line("}");
else
line("},");
}
block_end();
line(";");
line();
// guard nes function
line ("extern \"C\" const int* get_nda_matrix(int t) " );
block_begin();
snprintf(buf, BUFLEN, "if (t >= 0 && t < %zu) return nda[t];", transitions.size());
line(buf);
snprintf(buf, BUFLEN, "return NULL;");
line(buf);
block_end();
line();
////////////////////////////////////////////////
// EXPORT NECESSARY DISABLING SETS FOR GUARDS //
////////////////////////////////////////////////
......@@ -2476,6 +2510,13 @@ bool dve_compiler::is_guard_nds( guard& g, ext_transition_t& t ) {
return true;
}
bool dve_compiler::is_nda( ext_transition_t& t1, ext_transition_t& t2 ) {
if (t1.) {
}
return true;
}
bool dve_compiler::may_be_coenabled( guard& ga, guard& gb) {
// if type different, return default
if (ga.type == gb.type || ga.type == GUARD_COMMITED_FIRST) {
......
......@@ -236,6 +236,7 @@ struct dve_compiler: public dve_explicit_system_t
bool get_const_expression( dve_expression_t & expr, int & value);
bool is_guard_nes( guard& g, ext_transition_t& t );
bool is_guard_nds( guard& g, ext_transition_t& t );
bool dve_compiler::is_nda( ext_transition_t& t1, ext_transition_t& t2);
bool may_be_coenabled( guard& ga, guard& gb);
void extract_predicates( std::vector<simple_predicate>& p, dve_expression_t& e);
bool is_conflict_predicate(simple_predicate& p1, simple_predicate p2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment