/******************************************************************************
 * Copyright (c) 2000-2021 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Balasko, Jeno
 *   Baranyi, Botond
 *
 ******************************************************************************/
module array_test
{
//=========================================================================
// Import Part
//=========================================================================
import from types2 all;
import from functions2 all;
//=========================================================================
// Module Parameters
//=========================================================================
modulepar {
  template AI3 tspt_array_i3_a := *
  template AI3 tspt_array_i3_q := ?
  template AI3 tspt_array_i3_v0 := {-,-,-} //error, length shall be 3
  template AI3 tspt_array_i3_v1:= {1,-,-}
  template AI3 tspt_array_i3_v2:= {1,2,-}
  template AI3 tspt_array_i3_v3v := {0, 1, 2}
  //template AI3 tspt_array_i3_v4 := {0, 1, 2, 3} //error, length shall be 3
  template AI3 tspt_array_i3_v3a := {0, *, 2}
  template AI3 tspt_array_i3_v3q := {?, 1, 2}
  //template AI3 tspt_array_i3_v3o := {omit, 1, 2} //"error: `omit' value is not allowed in this context"
  template AI3 tspt_array_i3_v3vl := {0, 1, (1,2)} //value list
  template AI3 tspt_array_i3_vl := ( {0,1,2},{9,10,11})
  template AI3 tspt_array_i3_v3r := {0, 1, (1..3)} //range
  template AI3 tspt_array_i3_v3mix := {(0,1), 1, (1..3)}
  template AI3 tspt_array_i3_v3c := {(0,1), 1, complement(2,3)}
  template AI3 tspt_array_i3_v3p := { permutation(1,2,3) } //TR: HS10539, fixed
  template AI3 tspt_array_i3_v3pa := { permutation(1,2,*) }
  
  template AI3 tspt_array_i3_mod4a := {9,10,11}
  template AI3 tspt_array_i3_mod4q := {9,10,11}
  template AI3 tspt_array_i3_mod4o := *
  template AI3 tspt_array_i3_mod4v0 := {1,2,3}
  template AI3 tspt_array_i3_mod4v1:= {-,2,3}
  template AI3 tspt_array_i3_mod4v2:= {-,-,3}
  template AI3 tspt_array_i3_mod4v3v := {-,-,-}
  //template AI3 tspt_array_i3_mod4v4 := {-,-,-}
  template AI3 tspt_array_i3_mod4v3a := {9,10,11}
  template AI3 tspt_array_i3_mod4v3q := {9,10,11}
  //template AI3 tspt_array_i3_mod4v3o := *
  template AI3 tspt_array_i3_mod4v3vl := {-,-,-}
  template AI3 tspt_array_i3_mod4vl := *
  template AI3 tspt_array_i3_mod4v3r := {-,-,-}
  template AI3 tspt_array_i3_mod4v3mix := {-,-,-}
  template AI3 tspt_array_i3_mod4v3c := {-,-,-}
  template AI3 tspt_array_i3_mod4field1 := { (0, 1), 1, (1 .. 3) }
  
  template AI3 tspt_array_i3_mod4aifp := {9,10,11}
  template AI3 tspt_array_i3_mod4qifp := {9,10,11}
  template AI3 tspt_array_i3_mod4v0ifp := *
  template AI3 tspt_array_i3_mod4v1ifp := *
  template AI3 tspt_array_i3_mod4v2ifp := *
  template AI3 tspt_array_i3_mod4v3vifp := *
  template AI3 tspt_array_i3_mod4v4 := ?
  template AI3 tspt_array_i3_mod4v3aifp := {9,10,11}
  template AI3 tspt_array_i3_mod4v3qifp := {9,10,11}
  //template AI3 tspt_array_i3_mod4v3o ifp := *
  template AI3 tspt_array_i3_mod4v3vlifp := {9,10,11}
  template AI3 tspt_array_i3_mod4vlifp := *
  template AI3 tspt_array_i3_mod4v3rifp := {9,10,11}
  template AI3 tspt_array_i3_mod4v3mixifp := ?
  template AI3 tspt_array_i3_mod4v3cifp := ?;
  // template AI3 tspt_array_i3_mod4v3crifp := *;
  // template AI3 tspt_array_i3_mod4v3pifp := *;
  template AI3 tspt_array_i3_mod4field1ifp := { (0, 1), 1, (1 .. 3) } ifpresent;
}

//=========================================================================
// Templates
//=========================================================================
//array
template AI3 t_array_i3_a := *
template AI3 t_array_i3_q := ?
template AI3 t_array_i3_v0 := {-,-,-} //error
template AI3 t_array_i3_v1:= {1,-,-} //error
template AI3 t_array_i3_v2:= {1,2,-} //error
template AI3 t_array_i3_v3v := {0, 1, 2}
//template AI3 t_array_i3_v4 := {0, 1, 2, 3}
template AI3 t_array_i3_v3a := {0, *, 2}
template AI3 t_array_i3_v3q := {?, 1, 2}
//template AI3 t_array_i3_v3o := {omit, 1, 2} //error
template AI3 t_array_i3_v3vl := {0, 1, (1,2)} //value list
template AI3 t_array_i3_vl := ( {0,1,2},{0,1,3})
template AI3 t_array_i3_v3r := {0, 1, (1..3)} //range
template AI3 t_array_i3_v3mix := {(0,1), 1, (1..3)}
template AI3 t_array_i3_v3c := {(0,1), 1, complement(2,3)}
template AI3 t_array_i3_v3cr := {(0..1), 1, complement(2,4)}
template AI3 t_array_i3_v3p := { permutation(1,2,3) } //TR: HS10539, fixed
template AI3 t_array_i3_v3pa := { permutation(1,2,*) }

template AI3 tt := { 1,2,* };
template AI3 tt1x3 := { 1,*,3 };
template AI3 ttx45 := { *,4,5 };


template REC_BAI3 t_array_bai3( template boolean t_b, template AI3 t_ai3) := {
  b:= t_b,
  ai3:=t_ai3
}

type component MyComp_CT {
  var template integer v_AI3literal[3] := { permutation(1,*,3) };
  var template integer v_AI3allfrom[3] := { permutation(all from tt) };
}


//=========================================================================
// Functions
//=========================================================================

//template string -> template conversion
//expected result: success
function f_string2ttcn_REC_BAI3_t(in charstring pl_cs, in template REC_BAI3 pl_expected_result) {
  var template REC_BAI3 vl_result;
  @try {
    string2ttcn(pl_cs, vl_result);
    setverdict(pass);
  }
  @catch(err_str) {
    log("str2ttcn() failed: ",err_str);
    setverdict(fail);
  }
  log(pl_expected_result);
  log(vl_result);
  if( log2str(pl_expected_result) == log2str(vl_result) ) { setverdict(pass) } else { setverdict(fail) }
}

//template string -> template conversion
//expected result: success, expected result struct in charstring
function f_string2ttcn_REC_BAI3_t_str(in charstring pl_cs, in charstring pl_expected_result) {
  var template REC_BAI3 vl_result;
  @try {
    string2ttcn(pl_cs, vl_result);
    setverdict(pass);
  }
  @catch(err_str) {
    log("str2ttcn() failed: ",err_str);
    setverdict(fail);
  }
  log("Expected result: ", pl_expected_result);
  log("Result: ", vl_result);
  if( pl_expected_result == log2str(vl_result) ) { setverdict(pass) } else { setverdict(fail) }
}

//template string -> variable conversion
//expected result: error
function f_string2ttcn_REC_BAI3_v(in charstring pl_cs, in template REC_BAI3 pl_expected_result, in boolean pl_ok_expected) {
  var REC_BAI3 vl_result;
  if( pl_ok_expected ) {
    @try {
      string2ttcn(pl_cs, vl_result);
      setverdict(pass);
    }
    @catch(err_str) {
      log("str2ttcn() failed: ",err_str);
      setverdict(fail);
    }
    if( log2str(pl_expected_result) == log2str(vl_result) ) { setverdict(pass) } else { setverdict(fail) }
  } 
  else 
  {
    @try {
      string2ttcn(pl_cs, vl_result);
      setverdict(fail);
    }
    @catch(err_str) {
      log("str2ttcn() conversion error: ",err_str);
      setverdict(pass,"Expected error, ok");
    }
    
  }
  log("Expected result: ",pl_expected_result );
  log("Result: ", vl_result);
}

//this function is the same but uses
function f_string2ttcn_REC_BAI3_v_str(in charstring pl_cs, charstring pl_expected_result, in boolean pl_ok_expected) {
  var REC_BAI3 vl_result;
  if( pl_ok_expected ) {
    @try {
      string2ttcn(pl_cs, vl_result);
      setverdict(pass);
    }
    @catch(err_str) {
      log("str2ttcn() failed: ",err_str);
      setverdict(fail);
    }
    if( pl_expected_result == log2str(vl_result) ) { setverdict(pass) } else { setverdict(fail, match(pl_expected_result, log2str(vl_result))) }
  } 
  else 
  {
    @try {
      string2ttcn(pl_cs, vl_result);
      setverdict(fail);
    }
    @catch(err_str) {
      log("str2ttcn() conversion error: ",err_str);
      setverdict(pass,"Expected error, ok");
    }

  }
  log("Expected result: ", pl_expected_result );
  log("Result: ", vl_result);
}




//=========================================================================
// Testcases
//=========================================================================

testcase tc_array_i_NoModulePar() runs on MC {
  
  if( log2str(t_array_i3_a) != "*" ) {setverdict(fail) } else { setverdict(pass) };
  if( log2str(t_array_i3_q) != "?" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3v);
  if( log2str(t_array_i3_v3v) != "{ 0, 1, 2 }" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3a);
  if( log2str(t_array_i3_v3a) != "{ 0, *, 2 }" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3q);
  if( log2str(t_array_i3_v3q) != "{ ?, 1, 2 }" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3vl);
  if( log2str(t_array_i3_v3vl) != "{ 0, 1, (1, 2) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_vl);
  if( log2str(t_array_i3_vl) != "({ 0, 1, 2 }, { 0, 1, 3 })" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3r);
  if( log2str(t_array_i3_v3r) != "{ 0, 1, (1 .. 3) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3mix);
  if( log2str(t_array_i3_v3mix) != "{ (0, 1), 1, (1 .. 3) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3c);
  if( log2str(t_array_i3_v3c) != "{ (0, 1), 1, complement(2, 3) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(t_array_i3_v3p);
  if( log2str(t_array_i3_v3p) != "{ permutation(1, 2, 3) }" ) {setverdict(fail) } else { setverdict(pass) };
}

testcase tc_array_i_ModulePar() runs on MC {

  if( log2str(tspt_array_i3_a) != "*" ) {setverdict(fail) } else { setverdict(pass) };
  if( log2str(tspt_array_i3_q) != "?" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3v);
  if( log2str(tspt_array_i3_v3v) != "{ 0, 1, 2 }" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3a);
  if( log2str(tspt_array_i3_v3a) != "{ 0, *, 2 }" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3q);
  if( log2str(tspt_array_i3_v3q) != "{ ?, 1, 2 }" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3vl);
  if( log2str(tspt_array_i3_v3vl) != "{ 0, 1, (1, 2) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_vl);
  if( log2str(tspt_array_i3_vl) != "({ 0, 1, 2 }, { 9, 10, 11 })" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3r);
  if( log2str(tspt_array_i3_v3r) != "{ 0, 1, (1 .. 3) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3mix);
  if( log2str(tspt_array_i3_v3mix) != "{ (0, 1), 1, (1 .. 3) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3c);
  if( log2str(tspt_array_i3_v3c) != "{ (0, 1), 1, complement(2, 3) }" ) {setverdict(fail) } else { setverdict(pass) };
  log(tspt_array_i3_v3p);
  if( log2str(tspt_array_i3_v3p) != "{ permutation(1, 2, 3) }" ) {setverdict(fail) } else { setverdict(pass) }; //TR: HS10539, fixed
  log(tspt_array_i3_v3pa);
  if( log2str(tspt_array_i3_v3pa) != "{ permutation(1, 2, *) }" ) {setverdict(fail) } else { setverdict(pass) }; //TR: HS10539, fixed
}

testcase tc_array_i_v3p() runs on MC {
  var RoAI3 vl_good_values := { {1,2,3}, {1,3,2},{2,1,3},{2,3,1},{3,1,2},{3,2,1} }
  var RoAI3 vl_wrong_values := { {1,2,4}, {1,5,6},{20,10,30} }
  f_checkMatchingValues_ai3(tspt_array_i3_v3p,vl_good_values,vl_wrong_values);
  f_checkMatchingValues_ai3(t_array_i3_v3p,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3pa() runs on MC {
  var RoAI3 vl_good_values := { {1,2,3}, {1,3,2},{2,1,3},{2,3,1},{3,1,2},{3,2,1}, {1,2,4}, {5,2,1}}
  var RoAI3 vl_wrong_values := { {1,5,6},{20,10,30} }
  f_checkMatchingValues_ai3(tspt_array_i3_v3pa,vl_good_values,vl_wrong_values);
  f_checkMatchingValues_ai3(t_array_i3_v3pa,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_a() runs on MC {
  log(tspt_array_i3_a);
  var RoAI3 vl_good_values := { {1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  var RoAI3 vl_wrong_values := { };
  f_checkMatchingValues_ai3(tspt_array_i3_a,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_q() runs on MC {
  log(tspt_array_i3_q);
  var RoAI3 vl_good_values := { {1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  var RoAI3 vl_wrong_values := { };
  f_checkMatchingValues_ai3(tspt_array_i3_q,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3v() runs on MC {
  log(tspt_array_i3_v3v);
  var RoAI3 vl_good_values := { {0,1,2} };
  var RoAI3 vl_wrong_values := {{0,1,3},{0,2,2},{0,3,2},{0,-1,2},{0,-,2},{1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  f_checkMatchingValues_ai3(tspt_array_i3_v3v,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3a() runs on MC {
  log(tspt_array_i3_v3a);
  var RoAI3 vl_good_values := { {0,1,2},{0,2,2},{0,3,2},{0,-1,2},{0,-,2}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  f_checkMatchingValues_ai3(tspt_array_i3_v3a,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3q() runs on MC {
  log(tspt_array_i3_v3q);
  var RoAI3 vl_good_values := { {0,1,2},{0,2,2},{0,3,2},{0,-1,2},{0,-,2}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,3}, {0,2,3}, {1,3,3}, {0,4,9}, {1,9999,2} };
  f_checkMatchingValues_ai3(tspt_array_i3_v3a,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3vl() runs on MC {
  log(tspt_array_i3_v3vl);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,2}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,3}, {0,2,3}, {1,3,3} };
  f_checkMatchingValues_ai3(tspt_array_i3_v3vl,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_vl() runs on MC {
  log(tspt_array_i3_vl);
  var RoAI3 vl_good_values := { {0,1,2},{9,10,11}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,2}, {0,2,2}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_vl,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3r() runs on MC {
  log(tspt_array_i3_v3r);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,2},{0,1,3} };
  var RoAI3 vl_wrong_values := {{0,1,4},{0,1,0}, {0,2,2}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_v3r,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3mix() runs on MC {
  log(tspt_array_i3_v3mix);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,2},{0,1,3},{1,1,1},{1,1,2},{1,1,3} };
  var RoAI3 vl_wrong_values := {{0,1,4},{0,1,0}, {0,2,2},{1,1,4},{1,1,4},{1,1,0}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_v3mix,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_v3c() runs on MC {
  log(tspt_array_i3_v3c);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,4},{0,1,5},{1,1,1},{1,1,4},{1,1,5}, {1,1,-1} , {1,1,-100}};
  var RoAI3 vl_wrong_values := {{0,1,2},{0,1,3}, {1,1,2},{1,1,3},{1,2,4},{1,2,0}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_v3c,vl_good_values,vl_wrong_values);
}
//
testcase tc_array_i_mod4a() runs on MC {
  log(tspt_array_i3_mod4a);
  var RoAI3 vl_good_values := { {1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  var RoAI3 vl_wrong_values := { };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4a,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4q() runs on MC {
  log(tspt_array_i3_mod4q);
  var RoAI3 vl_good_values := { {1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  var RoAI3 vl_wrong_values := { };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4q,vl_good_values,vl_wrong_values);
}


testcase tc_array_i_mod4v0() runs on MC {
  log(tspt_array_i3_mod4v0);
  var RoAI3 vl_good_values := {{1,2,3} };  
  var RoAI3 vl_wrong_values := { {0,1,2} } // compilation error for {1},{1,2} TODO: put into negative test
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v0,vl_good_values,vl_wrong_values,true);
}

testcase tc_array_i_mod4v1() runs on MC {
  log(tspt_array_i3_mod4v1);
  var RoAI3 vl_good_values := {{1,2,3}};//TODO: put {{1}} into the negative test
  var RoAI3 vl_wrong_values := { {0,1,2} } // compilation error for {1},{1,2} TODO: put into neg test
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v1,vl_good_values,vl_wrong_values,true);
}

testcase tc_array_i_mod4v2() runs on MC {
  log(tspt_array_i3_mod4v2);
  var RoAI3 vl_good_values := {{1,2,3}};//TODO: put {{1,2}} into the negative test
  var RoAI3 vl_wrong_values := { {0,1,2} } // compilation error for {1},{1,2} TODO: put into neg test
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v2,vl_good_values,vl_wrong_values,true);
}


testcase tc_array_i_mod4v3v() runs on MC {
  log(tspt_array_i3_mod4v3v);
  var RoAI3 vl_good_values := { {0,1,2} };
  var RoAI3 vl_wrong_values := {{0,1,3},{0,2,2},{0,3,2},{0,-1,2},{0,-,2},{1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v3v,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3a() runs on MC {
  log(tspt_array_i3_mod4v3a);
  var RoAI3 vl_good_values := { {0,1,2},{0,2,2},{0,3,2},{0,-1,2},{0,-,2}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,3}, {1,2,3}, {1,3,3}, {1,4,3}, {1,9999,3} };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v3a,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3q() runs on MC {
  log(tspt_array_i3_mod4v3q);
  var RoAI3 vl_good_values := { {0,1,2},{0,2,2},{0,3,2},{0,-1,2},{0,-,2}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,3}, {0,2,3}, {1,3,3}, {0,4,9}, {1,9999,2} };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v3a,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3vl() runs on MC {
  log(tspt_array_i3_mod4v3vl);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,2}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,3}, {0,2,3}, {1,3,3} };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v3vl,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4vl() runs on MC {
  log(tspt_array_i3_mod4vl);
  var RoAI3 vl_good_values := { {0,1,2},{9,10,11}};
  var RoAI3 vl_wrong_values := {{0,1,3},{1,1,2}, {0,2,2}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4vl,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3r() runs on MC {
  log(tspt_array_i3_mod4v3r);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,2},{0,1,3} };
  var RoAI3 vl_wrong_values := {{0,1,4},{0,1,0}, {0,2,2}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v3r,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3mix() runs on MC {
  log(tspt_array_i3_mod4v3mix);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,2},{0,1,3},{1,1,1},{1,1,2},{1,1,3} };
  var RoAI3 vl_wrong_values := {{0,1,4},{0,1,0}, {0,2,2},{1,1,4},{1,1,4},{1,1,0}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v3mix,vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3c() runs on MC {
  log(tspt_array_i3_mod4v3c);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,4},{0,1,5},{1,1,1},{1,1,4},{1,1,5}, {1,1,-1} , {1,1,-100}};
  var RoAI3 vl_wrong_values := {{0,1,2},{0,1,3}, {1,1,2},{1,1,3},{1,2,4},{1,2,0}, {9,10,12},{9,11,11},{4,4,4}  };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4v3c,vl_good_values,vl_wrong_values);
}

//{ (0, 1), 1, (1 .. 3) } -{0, -, -}--> { 1, 1, (1 .. 3) }
testcase tc_array_i_mod4field1() runs on MC {
  log(tspt_array_i3_mod4field1);
  var RoAI3 vl_good_values := { {0,1,1},{0,1,2},{0,1,3}};
  var RoAI3 vl_wrong_values := {{0,1,4},{0,1,5}, {1,1,1},{1,1,2},{1,1,3},{1,1,4}, {9,10,12} };
  f_checkMatchingValues_ai3(tspt_array_i3_mod4field1,vl_good_values,vl_wrong_values);
}
//====

testcase tc_array_i_mod4aifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4aifp));
  var RoRAI3 vl_good_values := { {omit},{{1,1,3}}, {{1,2,3}}, {{1,3,3}}, {{1,4,3}}, {{1,9999,3}} };
  var RoRAI3 vl_wrong_values := {{}};
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4aifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4qifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4qifp));
  var RoRAI3 vl_good_values := { {omit},{{1,1,3}}, {{1,2,3}}, {{1,3,3}}, {{1,4,3}}, {{1,9999,3}} };
  var RoRAI3 vl_wrong_values := {{} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4qifp),vl_good_values,vl_wrong_values);
}
testcase tc_array_i_mod4v0ifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v0ifp));
  var RoRAI3 vl_good_values := {{omit},{}}; //TODO: put {{}} into the negative test
  var RoRAI3 vl_wrong_values := { {{0,1,2}} } // compilation error for {1},{1,2} TODO: put into negative test
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v0ifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v1ifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v1ifp));
  var RoRAI3 vl_good_values := {{omit},{}};//TODO: put {{1}} into the negative test
  var RoRAI3 vl_wrong_values := { {{0,1,2}} } // compilation error for {1},{1,2} TODO: put into neg test
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v1ifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v2ifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v2ifp));
  var RoRAI3 vl_good_values := {{omit},{}};//TODO: put {{1,2}} into the negative test
  var RoRAI3 vl_wrong_values := { {{0,1,2}} } // compilation error for {1},{1,2} TODO: put into neg test
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v2ifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3vifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v3vifp));
  var RoRAI3 vl_good_values := {{omit}, {{0,1,2}} };
  var RoRAI3 vl_wrong_values := { {{0,1,3}},{{0,2,2}},{{0,3,2}},{{0,-1,2}},{{0,-,2}},{{1,1,3}},{{1,2,3}},{{1,3,3}},{{1,4,3}},{{1,9999,3}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v3vifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3aifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v3aifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,2}},{{0,2,2}},{{0,3,2}},{{0,-1,2}},{{0,-,2}}};
  var RoRAI3 vl_wrong_values := { {{0,1,3}},{{1,1,3}},{{1,2,3}}, {{1,3,3}},{{1,4,3}},{{1,9999,3}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v3aifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3qifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v3qifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,2}},{{0,2,2}},{{0,3,2}},{{0,-1,2}},{{0,-,2}} };
  var RoRAI3 vl_wrong_values :={ {{0,1,3}},{{1,1,3}},{{0,2,3}},{{1,3,3}},{{0,4,9}},{{1,9999,2}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v3aifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3vlifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v3vlifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,1}},{{0,1,2}} };
  var RoRAI3 vl_wrong_values :={ {{0,1,3}},{{1,1,3}},{{0,2,3}},{{1,3,3}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v3vlifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4vlifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4vlifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,2}}, {{9,10,11}} };
  var RoRAI3 vl_wrong_values :={ {{0,1,3}}, {{1,1,2}}, {{0,2,2}}, {{9,10,12}}, {{9,11,11}}, {{4,4,4}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4vlifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3rifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v3rifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,1}}, {{0,1,2}}, {{0,1,3}} };
  var RoRAI3 vl_wrong_values := { {{0,1,4}}, {{0,1,0}}, {{0,2,2}}, {{9,10,12}}, {{9,11,11}}, {{4,4,4}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v3rifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3mixifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v3mixifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,1}},{{0,1,2}},{{0,1,3}},{{1,1,1}},{{1,1,2}},{{1,1,3}} } ;
  var RoRAI3 vl_wrong_values :={ {{0,1,4}}, {{0,1,0}}, {{0,2,2}}, {{1,1,4}}, {{1,1,4}}, {{1,1,0}}, {{9,10,12}}, {{9,11,11}}, {{4,4,4}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v3mixifp),vl_good_values,vl_wrong_values);
}

testcase tc_array_i_mod4v3cifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4v3cifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,1}},{{0,1,4}},{{0,1,5}},{{1,1,1}},{{1,1,4}},{{1,1,5}},{{1,1,-1}},{{1,1,-100}} };
  var RoRAI3 vl_wrong_values := { {{0,1,2}},{{0,1,3}},{{1,1,2}},{{1,1,3}},{{1,2,4}},{{1,2,0}},{{9,10,12}},{{9,11,11}},{{4,4,4}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4v3cifp),vl_good_values,vl_wrong_values);
}

//{ (0, 1), 1, (1 .. 3) } -{0, -, -}--> { 1, 1, (1 .. 3) }
testcase tc_array_i_mod4field1ifp_emb() runs on MC {
  log(t_rai3(tspt_array_i3_mod4field1ifp));
  var RoRAI3 vl_good_values := { {omit},{{0,1,1}}, {{0,1,2}}, {{0,1,3}} };
  var RoRAI3 vl_wrong_values :={ {{0,1,4}}, {{0,1,5}}, {{1,1,1}}, {{1,1,2}}, {{1,1,3}}, {{1,1,4}}, {{9,10,12}} };
  f_checkMatchingValues_rai3(t_rai3(tspt_array_i3_mod4field1ifp),vl_good_values,vl_wrong_values);
}

//=====
testcase tc_array_i_emb() runs on MC {
  log(t_array_bai3(true,tspt_array_i3_a));
  if( log2str(t_array_bai3(true,tspt_array_i3_a)) != "{ b := true, ai3 := * }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_q));
  if( log2str(t_array_bai3(true,tspt_array_i3_q)) != "{ b := true, ai3 := ? }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_v3v));
  if( log2str(t_array_bai3(true,tspt_array_i3_v3v)) != "{ b := true, ai3 := { 0, 1, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_v3a));
  if( log2str(t_array_bai3(true,tspt_array_i3_v3a)) != "{ b := true, ai3 := { 0, *, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_v3q));
  if( log2str(t_array_bai3(true,tspt_array_i3_v3q)) != "{ b := true, ai3 := { ?, 1, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_v3vl));
  if( log2str(t_array_bai3(true,tspt_array_i3_v3vl)) != "{ b := true, ai3 := { 0, 1, (1, 2) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_vl));
  if( log2str(t_array_bai3(true,tspt_array_i3_vl)) != "{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_v3r));
  if( log2str(t_array_bai3(true,tspt_array_i3_v3r)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_v3mix));
  if( log2str(t_array_bai3(true,tspt_array_i3_v3mix)) != "{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_v3c));
  if( log2str(t_array_bai3(true,tspt_array_i3_v3c)) != "{ b := true, ai3 := { (0, 1), 1, complement(2, 3) } }") {setverdict(fail)} else {setverdict(pass)}
}

//array embedded in record, modified from cfg file
testcase tc_array_i_ModulePar_emb() runs on MC {
  log(t_array_bai3(true,tspt_array_i3_mod4a));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4a)) != "{ b := true, ai3 := * }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4q));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4q)) != "{ b := true, ai3 := ? }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4o));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4o)) != "{ b := true, ai3 := omit }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v0));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v0)) != "{ b := true, ai3 := { 1, 2, 3 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v1));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v1)) != "{ b := true, ai3 := { 1, 2, 3 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v2));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v2)) != "{ b := true, ai3 := { 1, 2, 3 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3v));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3v)) != "{ b := true, ai3 := { 0, 1, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3a));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3a)) != "{ b := true, ai3 := { 0, *, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3q));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3q)) != "{ b := true, ai3 := { ?, 1, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3vl));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3vl)) != "{ b := true, ai3 := { 0, 1, (1, 2) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4vl));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4vl)) != "{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3r));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3r)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3mix));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3mix)) != "{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3c));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3c)) != "{ b := true, ai3 := { (0, 1), 1, complement(2, 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4field1ifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4field1ifp)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }") {setverdict(fail)} else {setverdict(pass)} 
}  

testcase tc_array_iifp_ModulePar_emb() runs on MC {
  log(t_array_bai3(true,tspt_array_i3_mod4aifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4aifp)) != "{ b := true, ai3 := * ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4qifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4qifp)) != "{ b := true, ai3 := ? ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v0ifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v0ifp)) != "{ b := true, ai3 := omit ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v1ifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v1ifp)) != "{ b := true, ai3 := { 1 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v2ifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v2ifp)) != "{ b := true, ai3 := { 1, 2 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3aifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3aifp)) != "{ b := true, ai3 := { 0, *, 2 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3qifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3qifp)) != "{ b := true, ai3 := { ?, 1, 2 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3vlifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3vlifp)) != "{ b := true, ai3 := { 0, 1, (1, 2) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4vlifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4vlifp)) != "{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3rifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3rifp)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3mixifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3mixifp)) != "{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true, tspt_array_i3_mod4field1ifp));
  if( log2str(t_array_bai3(true, tspt_array_i3_mod4field1ifp)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
}

//=========================
// ttcn2string testcases: 
//=========================
testcase tc_array_i_ModulePar_emb_ttcn2string() runs on MC {
  log(t_array_bai3(true,tspt_array_i3_mod4a));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4a)) != "{ b := true, ai3 := * }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4q));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4q)) != "{ b := true, ai3 := ? }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4o));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4o)) != "{ b := true, ai3 := omit }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v1));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v1)) != "{ b := true, ai3 := { 1, 2, 3 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v2));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v2)) != "{ b := true, ai3 := { 1, 2, 3 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3v));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v3v)) != "{ b := true, ai3 := { 0, 1, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3a));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v3a)) != "{ b := true, ai3 := { 0, *, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3q));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v3q)) != "{ b := true, ai3 := { ?, 1, 2 } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3vl));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v3vl)) != "{ b := true, ai3 := { 0, 1, (1, 2) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4vl));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4vl)) != "{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3r));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v3r)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3mix));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v3mix)) != "{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3c));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4v3c)) != "{ b := true, ai3 := { (0, 1), 1, complement(2, 3) } }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4field1));
  if( ttcn2string(t_array_bai3(true,tspt_array_i3_mod4field1)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } }") {setverdict(fail)} else {setverdict(pass)} 
}

testcase tc_array_iifp_ModulePar_emb_ttcn2string() runs on MC {
  log(t_array_bai3(true,tspt_array_i3_mod4aifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4aifp)) != "{ b := true, ai3 := * ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4qifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4qifp)) != "{ b := true, ai3 := ? ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v0ifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v0ifp)) != "{ b := true, ai3 := omit ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v1ifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v1ifp)) != "{ b := true, ai3 := { 1 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v2ifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v2ifp)) != "{ b := true, ai3 := { 1, 2 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3aifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3aifp)) != "{ b := true, ai3 := { 0, *, 2 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3qifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3qifp)) != "{ b := true, ai3 := { ?, 1, 2 } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3vlifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3vlifp)) != "{ b := true, ai3 := { 0, 1, (1, 2) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4vlifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4vlifp)) != "{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3rifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3rifp)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true,tspt_array_i3_mod4v3mixifp));
  if( log2str(t_array_bai3(true,tspt_array_i3_mod4v3mixifp)) != "{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
  log(t_array_bai3(true, tspt_array_i3_mod4field1ifp));
  if( log2str(t_array_bai3(true, tspt_array_i3_mod4field1ifp)) != "{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }") {setverdict(fail)} else {setverdict(pass)}
}




//=========================
// string2ttcn testcases: 
//=========================

//expected result: DTE
testcase tc_array_string2ttcn_DTE_test() runs on MC {
	var REC_BAI3 vl_result;
	@try {
		string2ttcn("{ b := true, ai3 := * }", vl_result);
		setverdict(fail)
	} @catch(e) {
		setverdict(pass, "Expected D T E")
	}
}

//template string-> template, template string-> value
testcase tc_array_string2ttcn_i3_mod4a() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := * }", t_array_bai3(true,tspt_array_i3_mod4a))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := * }", t_array_bai3(true,tspt_array_i3_mod4a),false)
}

testcase tc_array_string2ttcn_i3_mod4q() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := ? }", t_array_bai3(true,tspt_array_i3_mod4q))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := ? }", t_array_bai3(true,tspt_array_i3_mod4q),false)
}

testcase tc_array_string2ttcn_i3_mod4v0() runs on MC {
  template REC_BAI3 tl_rec := { b:= true, ai3:= {-,-,-} };
  var REC_BAI3 vl_rec := { b:= true, ai3:= {-,-,-} };
  f_string2ttcn_REC_BAI3_t_str("{ b := true, ai3 := { -, -, - } }", "{ b := true, ai3 := { <uninitialized template>, <uninitialized template>, <uninitialized template> } }" )
  //f_string2ttcn_REC_BAI3_v_str("{ b := true, ai3 := { -, -, - } }", "{ b := true, ai3 := { <unbound>, <unbound>, <unbound> } }" , true)
  // partial array values are currently deleted if the array is an optional field or a union alternative (see artf708493)
  f_string2ttcn_REC_BAI3_v_str("{ b := true, ai3 := { -, -, - } }", "{ b := true, ai3 := <unbound> }" , true);
  //TODO: Check if It is ok or not: log2str(tl_rec) gives back: "{ b := true, ai3 := <unbound> }"
  log(tl_rec);
  log(vl_rec);
}

testcase tc_array_string2ttcn_i3_mod4v1() runs on MC {
  template REC_BAI3 tl_rec := { b:= true, ai3:= {1,-,-} };
  var REC_BAI3 vl_rec := { b:= true, ai3:= {1,-,-} };
  f_string2ttcn_REC_BAI3_t_str("{ b := true, ai3 := { 1, -, - } }", "{ b := true, ai3 := { 1, <uninitialized template>, <uninitialized template> } }")
  //f_string2ttcn_REC_BAI3_v_str("{ b := true, ai3 := { 1, -, - } }", log2str(vl_rec),true)
  // partial array values are currently deleted if the array is an optional field or a union alternative (see artf708493)
  f_string2ttcn_REC_BAI3_v_str("{ b := true, ai3 := { 1, -, - } }", "{ b := true, ai3 := { 1, <unbound>, <unbound> } }" , true);
  log(tl_rec);
  log(vl_rec);
}

testcase tc_array_string2ttcn_i3_mod4v2() runs on MC {
  template REC_BAI3 tl_rec := { b:= true, ai3:= {1,2,-} };
  var REC_BAI3 vl_rec := { b:= true, ai3:= {1,2,-} };
  f_string2ttcn_REC_BAI3_t_str("{ b := true, ai3 := { 1, 2, - } }", "{ b := true, ai3 := { 1, 2, <uninitialized template> } }")
  //f_string2ttcn_REC_BAI3_v_str("{ b := true, ai3 := { 1, 2, - } }", log2str(vl_rec), true);
  // partial array values are currently deleted if the array is an optional field or a union alternative (see artf708493)
  f_string2ttcn_REC_BAI3_v_str("{ b := true, ai3 := { 1, 2, - } }", "{ b := true, ai3 := { 1, 2, <unbound> } }" , true);
  log(tl_rec);
  log(vl_rec);
}

testcase tc_array_string2ttcn_i3_mod4v3v() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, 1, 2 } }", t_array_bai3(true,tspt_array_i3_mod4v3v))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, 2 } }", t_array_bai3(true,tspt_array_i3_mod4v3v),true)
}

testcase tc_array_string2ttcn_i3_mod4v3a() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, *, 2 } }", t_array_bai3(true,tspt_array_i3_mod4v3a))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, *, 2 } }", t_array_bai3(true,tspt_array_i3_mod4v3a),false)
}

testcase tc_array_string2ttcn_i3_mod4v3q() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { ?, 1, 2 } }", t_array_bai3(true,tspt_array_i3_mod4v3q))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { ?, 1, 2 } }", t_array_bai3(true,tspt_array_i3_mod4v3q),false)
}

testcase tc_array_string2ttcn_i3_mod4v3vl() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, 1, (1, 2) } }", t_array_bai3(true,tspt_array_i3_mod4v3vl))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, (1, 2) } }", t_array_bai3(true,tspt_array_i3_mod4v3vl),false)
}

testcase tc_array_string2ttcn_i3_mod4vl() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) }", t_array_bai3(true,tspt_array_i3_mod4vl))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) }", t_array_bai3(true,tspt_array_i3_mod4vl),false)
}

testcase tc_array_string2ttcn_i3_mod4v3r() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, 1, (1 .. 3) } }", t_array_bai3(true,tspt_array_i3_mod4v3r))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, (1 .. 3) } }", t_array_bai3(true,tspt_array_i3_mod4v3r),false)
}

testcase tc_array_string2ttcn_i3_mod4v3mix() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } }", t_array_bai3(true,tspt_array_i3_mod4v3mix))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } }", t_array_bai3(true,tspt_array_i3_mod4v3mix),false)
}

testcase tc_array_string2ttcn_i3_mod4v3c() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { (0, 1), 1, complement(2, 3) } }", t_array_bai3(true,tspt_array_i3_mod4v3c))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { (0, 1), 1, complement(2, 3) } }", t_array_bai3(true,tspt_array_i3_mod4v3c),false)
}

testcase tc_array_string2ttcn_i3_mod4field1() runs on MC {
  f_string2ttcn_REC_BAI3_t_str("{ b := true, ai3 := { 0, 1, (1 .. 3) } }", log2str(t_array_bai3(true,tspt_array_i3_mod4field1)));
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, (1 .. 3) } }", t_array_bai3(true,tspt_array_i3_mod4field1),false)
}

//=== string2ttcn testcases with ifpresent: =====

//template string-> template, template string-> value
testcase tc_array_string2ttcn_i3_mod4aifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := * ifpresent }", t_array_bai3(true,tspt_array_i3_mod4aifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := * ifpresent }", t_array_bai3(true,tspt_array_i3_mod4aifp),false)
}

testcase tc_array_string2ttcn_i3_mod4qifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := ? ifpresent }", t_array_bai3(true,tspt_array_i3_mod4qifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := ? ifpresent }", t_array_bai3(true,tspt_array_i3_mod4qifp),false)
}

// ???? is it acceptable ?????
testcase tc_array_string2ttcn_i3_mod4v0ifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := omit ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v0ifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := omit ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v0ifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v1ifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 1 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v1ifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 1 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v1ifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v2ifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 1, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v2ifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 1, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v2ifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v3vifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, 1, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3vifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3vifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v3aifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, *, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3aifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, *, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3aifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v3qifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { ?, 1, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3qifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { ?, 1, 2 } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3qifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v3vlifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, 1, (1, 2) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3vlifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, (1, 2) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3vlifp),false)
}

testcase tc_array_string2ttcn_i3_mod4vlifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) ifpresent }", t_array_bai3(true,tspt_array_i3_mod4vlifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := ({ 0, 1, 2 }, { 9, 10, 11 }) ifpresent }", t_array_bai3(true,tspt_array_i3_mod4vlifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v3rifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3rifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3rifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v3mixifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3mixifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { (0, 1), 1, (1 .. 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3mixifp),false)
}

testcase tc_array_string2ttcn_i3_mod4v3cifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { (0, 1), 1, complement(2, 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3cifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { (0, 1), 1, complement(2, 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4v3cifp),false)
}

testcase tc_array_string2ttcn_i3_mod4field1ifp() runs on MC {
  f_string2ttcn_REC_BAI3_t("{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4field1ifp))
  f_string2ttcn_REC_BAI3_v("{ b := true, ai3 := { 0, 1, (1 .. 3) } ifpresent }", t_array_bai3(true,tspt_array_i3_mod4field1ifp),false)
}

testcase tc_array_allfrom_perm1() runs on MyComp_CT {
  var template AI3 vl_tcAI3literal, vl_tcAI3allFrom;
  log ("component var v_AI3literal: ", v_AI3literal);
  log ("component var v_AI3allfrom: ", v_AI3allfrom);
  vl_tcAI3literal := { permutation(1,*,3) };
  log ("TC() local var vl_tcAI3literal: ", vl_tcAI3literal);

  var RoAI3 vl_goodValues := { {1,2,3}, {1,3,2},{2,1,3},{2,3,1},{3,1,2},{3,2,1}, {1,5,3}, {5,3,1},
    {1,5,3}, {0,1,3},{3,1,-99}}
  var RoAI3 vl_badValues := { {1,2,4}, {1,5,6},{20,10,30},{3,5,6}, {5,3,6}}
  f_checkMatchingValues_ai3(vl_tcAI3literal, vl_goodValues, vl_badValues);

  vl_tcAI3allFrom := { permutation(all from tt) }
  log ("TC() local var vl_tcAI3allFrom: ", vl_tcAI3allFrom);
  vl_goodValues := { {1,2,3}, {1,3,2},{2,1,3},{2,3,1},{3,1,2},{3,2,1}, {1,5,2}, {5,2,1},
    {1,5,2}, {0,1,2},{2,1,-99}}
  vl_badValues := { {1,3,4}, {1,5,6},{20,10,30},{2,5,6}, {5,2,6}}
  f_checkMatchingValues_ai3(vl_tcAI3allFrom,vl_goodValues, vl_badValues);
}

testcase tc_array_allfrom_perm2() runs on MyComp_CT {
  var template AI2x3  vl_t24 := { {permutation(all from tt1x3)}, {permutation(all from ttx45) } };
  var RoAI2x3 vl_goodValues := { { {1,2,3},{4,4,5}}, {{1,3,2},{5,4,1}}}
  var RoAI2x3 vl_badValues := {{ {1,2,2},{4,4,5}}, {{1,3,2},{5,5,1}} }
  f_check_AI2x3( vl_t24, vl_goodValues,vl_badValues);
}
testcase tc_array_perm() runs on MyComp_CT {
  var template AI2x3  vl_t24 := { {permutation(1,*,3)}, {permutation(*,4,5) } };
  var RoAI2x3 vl_goodValues := { { {1,2,3},{4,4,5}}, {{1,3,2},{5,4,1}}}
  var RoAI2x3 vl_badValues := {{ {1,2,2},{4,4,5}}, {{1,3,2},{5,5,1}} }
  f_check_AI2x3( vl_t24, vl_goodValues,vl_badValues);
}

testcase tc_array_compl() runs on MyComp_CT {
  var RoAI3 vl_goodValues := { {0,1,1}, {0,1,3},{0,1,5}, {0,1,-500}, {1,1,1}, {1,1,3},{1,1,5}, {1,1,-500} }
  var RoAI3 vl_badValues :=  { {2,1,1}, {0,2,3},{0,1,2}, {0,1,4}, {2,1,1}, {1,2,3},{1,1,2}, {1,1,4} }
  f_checkMatchingValues_ai3( t_array_i3_v3cr, vl_goodValues,vl_badValues);
}

//=========================================================================
// Control
//=========================================================================

control {
  //array
  log("***array tests *******");
  execute(tc_array_string2ttcn_DTE_test());
  execute(tc_array_i_NoModulePar());
  execute(tc_array_i_ModulePar());
  execute(tc_array_i_v3p());
  execute(tc_array_i_v3pa());
  execute(tc_array_i_a());
  execute(tc_array_i_q());
  execute(tc_array_i_v3v());
  execute(tc_array_i_v3a());
  execute(tc_array_i_v3q());
  execute(tc_array_i_v3vl());
  execute(tc_array_i_vl());
  execute(tc_array_i_v3r());
  execute(tc_array_i_v3mix());
  execute(tc_array_i_v3c());

  execute(tc_array_i_mod4a());
  execute(tc_array_i_mod4q());
  execute(tc_array_i_mod4v0());
  execute(tc_array_i_mod4v1());
  execute(tc_array_i_mod4v2());
  execute(tc_array_i_mod4v3v());
  execute(tc_array_i_mod4v3a());
  execute(tc_array_i_mod4v3q());
  execute(tc_array_i_mod4v3vl());   
  execute(tc_array_i_mod4vl());
  execute(tc_array_i_mod4v3r());
  execute(tc_array_i_mod4v3mix());
  execute(tc_array_i_mod4v3c());
  execute(tc_array_i_mod4field1());

  execute(tc_array_i_mod4aifp_emb());
  execute(tc_array_i_mod4qifp_emb());
  execute(tc_array_i_mod4v0ifp_emb());
  execute(tc_array_i_mod4v1ifp_emb());
  execute(tc_array_i_mod4v2ifp_emb());
  execute(tc_array_i_mod4v3vifp_emb());
  execute(tc_array_i_mod4v3aifp_emb());
  execute(tc_array_i_mod4v3qifp_emb());
  execute(tc_array_i_mod4v3vlifp_emb());   
  execute(tc_array_i_mod4vlifp_emb());
  execute(tc_array_i_mod4v3rifp_emb());
  execute(tc_array_i_mod4v3mixifp_emb());
  execute(tc_array_i_mod4v3cifp_emb());
  execute(tc_array_i_mod4field1ifp_emb());

  execute(tc_array_i_emb());
  execute(tc_array_i_ModulePar_emb());
  execute(tc_array_iifp_ModulePar_emb());
  execute(tc_array_i_ModulePar_emb_ttcn2string());
  execute(tc_array_iifp_ModulePar_emb_ttcn2string());

  execute(tc_array_string2ttcn_i3_mod4a());
  execute(tc_array_string2ttcn_i3_mod4q());
  execute(tc_array_string2ttcn_i3_mod4v0());
  execute(tc_array_string2ttcn_i3_mod4v1());
  execute(tc_array_string2ttcn_i3_mod4v2());
  execute(tc_array_string2ttcn_i3_mod4v3v());
  execute(tc_array_string2ttcn_i3_mod4v3a());
  execute(tc_array_string2ttcn_i3_mod4v3q());
  execute(tc_array_string2ttcn_i3_mod4v3vl());
  execute(tc_array_string2ttcn_i3_mod4vl());
  execute(tc_array_string2ttcn_i3_mod4v3r());
  execute(tc_array_string2ttcn_i3_mod4v3mix());
  execute(tc_array_string2ttcn_i3_mod4v3c());
  execute(tc_array_string2ttcn_i3_mod4field1());

  execute(tc_array_string2ttcn_i3_mod4aifp());
  execute(tc_array_string2ttcn_i3_mod4qifp());
  execute(tc_array_string2ttcn_i3_mod4v0ifp());
  execute(tc_array_string2ttcn_i3_mod4v1ifp());
  execute(tc_array_string2ttcn_i3_mod4v2ifp());
  execute(tc_array_string2ttcn_i3_mod4v3vifp());
  execute(tc_array_string2ttcn_i3_mod4v3aifp());
  execute(tc_array_string2ttcn_i3_mod4v3qifp());
  execute(tc_array_string2ttcn_i3_mod4v3vlifp());
  execute(tc_array_string2ttcn_i3_mod4vlifp());
  execute(tc_array_string2ttcn_i3_mod4v3rifp());
  execute(tc_array_string2ttcn_i3_mod4v3mixifp());
  execute(tc_array_string2ttcn_i3_mod4v3cifp());
  execute(tc_array_string2ttcn_i3_mod4field1ifp());

  execute(tc_array_allfrom_perm1());
  execute(tc_array_allfrom_perm2());
  execute(tc_array_perm());
  execute(tc_array_compl());
}

}  // end of module
