Explorar o código

Check signature of add_MT before creation

Yentl Van Tendeloo %!s(int64=7) %!d(string=hai) anos
pai
achega
466a581719
Modificáronse 2 ficheiros con 3 adicións e 0 borrados
  1. BIN=BIN
      bootstrap/bootstrap.m.gz
  2. 3 0
      bootstrap/core_algorithm.alc

BIN=BIN
bootstrap/bootstrap.m.gz


+ 3 - 0
bootstrap/core_algorithm.alc

@@ -1779,6 +1779,9 @@ String function cmd_transformation_add_MT(source_models : Element, target_models
 	target = dict_create()
 	to_ramify = set_create()
 
+	if (dict_len(source_models) + dict_len(target_models) == 0):
+		return "Model transformation needs at least one formalism in its input or output signature!"!
+
 	keys = dict_keys(source_models)
 	while (set_len(keys) > 0):
 		key = set_pop(keys)