Commit f2dacd2e authored by Elemer Lelik's avatar Elemer Lelik
Browse files

Initial contribution

parent e0fa3b58
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module FM_Nesting {
import from types all;
// nesting max 4
private function f() {
var integer i;
while (true) {
if (true) {
i := i + 1;
do {} while(false);
} else {}
}
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module FM_NumberOfParams {
import from types all;
// 5 parameters
private function f(t1 a, test_int_port b, in t1 c, out t1 d, inout t1 e) {
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module FM_OutEnvy {
import from types all;
private type integer int;
// 2 ref: test_port and t2
private function f(test_port p) {
var t1 i;
while (true) {i := i + 1;}
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module FM_ReturnPoints {
import from types all;
// 4 return points
private function f() {
var t1 i;
while (true) {return;}
if (false) {
return;
} else {
i := i + 1;
return;
}
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module FM_ReturnPoints2 {
import from types all;
// still 4 return points
private function f() {
var t1 i;
while (true) {return;}
if (false) {
return;
} else {
i := i + 1;
return;
}
return;
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_AfferentCoupling {
import from types all;
// MM_AfferentCoupling2 uses two of these definitions, 4 times
type integer aff_int;
type boolean aff_bool;
type charstring aff_charstring;
}
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_AfferentCoupling2 {
import from types all;
import from MM_AfferentCoupling all;
// it uses 4 definitions from MM_AfferentCoupling: aff_int, aff_bool, aff_int and aff_int
control {
var aff_int i := 32;
var aff_bool b := i > 23;
if (b) {
var aff_int j := i;
var aff_int k := j;
}
}
}
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_EfferentCoupling {
import from types all;
// Uses 2 definition from outside: t1 and t2
control {
var t1 i := 54;
var t2 b := i < 2;
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_InEnvy {
import from types all;
// this module reference 3 inside entities: int, int and f
private type integer int;
private function f(int i) {}
private altstep a(int i) {
[else] {f(23)}
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_Instability {
import from types all;
// this module has aff- and eff-coupling of 2, thus instability is 0.5
type integer aff_int;
type boolean aff_bool;
type charstring aff_charstring;
control {
var t1 i := 54;
var t2 b := i < 2;
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_Instability2 {
import from types all;
import from MM_Instability all;
// it uses 2 definitions from MM_Instability
control {
var aff_int i := 32;
var aff_bool b := i > 23;
}
}
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_LinesOfCode {
import from types all;
// this module has 4 lines
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_NofAltsteps {
import from types all;
// 2 altsteps
private altstep a() {
[else] {}
}
private altstep a2() {
[else] {}
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_NofFixme {
import from types all;
// 3 fixmes
// FIXME:
private function f() {} // FIXME:
control {
if (true) {
// FIXME:
}
}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_NofFunctions {
import from types all;
// 3 functions
private function f1() {}
private function f2() {}
private function f3() {}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_NofImports {
import from types all;
// 1 import
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_NofTestcases {
import from types all;
// 2 testcases
private testcase t1() runs on c1_CT {}
private testcase t2() runs on c1_CT {}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_OutEnvy {
import from types all;
// this module reference 3 outside entities, t1, t2, and c1_CT
private function f(t1 i, t2 b) {}
private testcase t() runs on c1_CT {}
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_TimesImported {
import from types all;
// imported 2 times, in MM_TimesImportee1 and ~2
}
\ No newline at end of file
/******************************************************************************
* Copyright (c) 2000-2014 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
module MM_TimesImportee1 {
import from MM_TimesImported all;
}
\ No newline at end of file
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