model_server/lde/src/lde_smt_flowchart.cxx
//
// build a chart node for absent else; instead of else condition
// and a branch body there will be two FLOW_EMPTY nodes for the
// routing purposes; connectors will be of the same type.
build a chart node for absent else; instead of else condition
and a branch body there will be two FLOW_EMPTY nodes for the
routing purposes; connectors will be of the same type.
build a chart node for absent else ; instead of else condition and a branch body there will be two FLOW_EMPTY nodes for the routing purposes ; connectors will be of the same type .
void build_fake_else (ldrNodePtr &ldr_prev,         
                       ldrChartNodePtr &ldr_prev_cond,    
                       ldrSymbolNodePtr if_exit, int level)
{
  ldrChartNodePtr      ldr_branch;         
  ldrChartNodePtr      ldr_cond;           
  ldrConnectionNodePtr cond_branch_connect,
                       if_else_connect,
                       end_else_connect;
  Initialize(build_fake_else);
  ldr_cond = build_simple_node(NULL, level, 
                              ldrFLOW_EMPTY, ldrLAST_ELSE);
  ldr_prev->put_after(ldr_cond);
  ldr_branch = build_simple_node(NULL, level + 1,
                              ldrFLOW_EMPTY, ldrFAKE_LABEL);
  ldr_cond->put_after(ldr_branch);
  cond_branch_connect = connect1_1(ldr_cond, ldr_branch,
                        ldrcTRUE_BRANCH, level+1);
  if_exit->put_first(cond_branch_connect);
  end_else_connect = connect1_1(ldr_branch, if_exit, 
                                ldrcENDELSE, level+1);
  if_exit->put_first(end_else_connect);
  if_else_connect = connect1_1(ldr_prev_cond, ldr_cond,
                               ldrcIF_ELSE, level+1);
  if_exit->put_first(if_else_connect);
  ldr_prev      = ldr_branch;
  return;
}
void build_fake_else ( ldrNodePtr & ldr_prev , ldrChartNodePtr & ldr_prev_cond , ldrSymbolNodePtr if_exit , int level ) { ldrChartNodePtr ldr_branch ; ldrChartNodePtr ldr_cond ; ldrConnectionNodePtr cond_branch_connect , if_else_connect , end_else_connect ; Initialize ( build_fake_else ) ; ldr_cond = build_simple_node ( NULL , level , ldrFLOW_EMPTY , ldrLAST_ELSE ) ; ldr_prev -> put_after ( ldr_cond ) ; ldr_branch = build_simple_node ( NULL , level + 1 , ldrFLOW_EMPTY , ldrFAKE_LABEL ) ; ldr_cond -> put_after ( ldr_branch ) ; cond_branch_connect = connect1_1 ( ldr_cond , ldr_branch , ldrcTRUE_BRANCH , level + 1 ) ; if_exit -> put_first ( cond_branch_connect ) ; end_else_connect = connect1_1 ( ldr_branch , if_exit , ldrcENDELSE , level + 1 ) ; if_exit -> put_first ( end_else_connect ) ; if_else_connect = connect1_1 ( ldr_prev_cond , ldr_cond , ldrcIF_ELSE , level + 1 ) ; if_exit -> put_first ( if_else_connect ) ; ldr_prev = ldr_branch ; return ; }
build a chart node for absent else; instead of else condition
and a branch body there will be two FLOW_EMPTY nodes for the
routing purposes; connectors will be of the same type.
build a chart node for absent else ; instead of else condition and a branch body there will be two FLOW_EMPTY nodes for the routing purposes ; connectors will be of the same type .
// true branch // if // fake branch node // fake condition node  //------  Executable code ---------------------- //--- build fake else condition //--- build fake branch statements //------------ build connectors  and put after total exit