// --- update receive definitions --- // Error: there must not be two receive definitions for the same token receive B.DoubledValue ; receive B.DoubledValue using IntToInt ; // NOT HANDLED \\ Error: the token must be resolvable within the parent type // NOT HANDLED \\ receive B.NonExisting ; // Error: the Token must not be a TokenNTA (i.e., check for !Token.getNTA()) receive B.ErrorNTA ; // Error: from-type of first mapping must be byte[] or a supported primitive type receive B.ErrorTypeOfFirstMapping using ListToList ; // Error: to-type of last mapping must be type of the Token receive B.ErrorTypeOfLastMapping using StringToList ; // Error: types of mappings must match (modulo inheritance) receive B.ErrorTypeMismatch using StringToList, IntToInt ; // --- update send definitions --- // NOT HANDLED \\ Error: the token must be resolvable within the parent type // NOT HANDLED \\ receive C.NonExisting ; // Error: Token must be a TokenNTA (i.e., check for Token.getNTA()) send C.ErrorNotNTA ; // Error: from-type of first mapping must be type of Token send C.ErrorTypeOfFirstMapping using IntToInt ; // Error: to-type of last mapping must be byte[] or a supported primitive type send C.ErrorTypeOfLastMapping1 using StringToList ; send C.ErrorTypeOfLastMapping2 ; // Error: types of mappings must match (modulo inheritance) send C.ErrorTypeMismatch using StringToList, IntToInt ; // Error: no more than one send mapping for each TokenComponent send C.DoubledValue ; send C.DoubledValue using IntToInt ; // --- dependency definitions --- // NOT HANDLED \\ Error: Both, source and target must be resolvable within the parent type // NOT HANDLED \\ D.SourceNonExistingTarget canDependOn D.NonExisting as NonExistingTarget ; // NOT HANDLED \\ D.NonExisting canDependOn D.TargetNonExistingSource as NonExistingSource ; // Error: There must be a send update definition for the target token D.SourceNoWriteDef canDependOn D.TargetNoWriteDef as NoWriteDef ; // Error: The name of a dependency definition must not be equal to a list-node on the source D.SourceSameAsListNode canDependOn D.TargetSameAsListNode as MyList ; send D.TargetSameAsListNode; // Error: There must not be two dependency definitions with the same name D.SourceDoubledValue canDependOn D.TargetDoubledValue as DoubledValue ; D.SourceDoubledValue canDependOn D.TargetDoubledValue as DoubledValue ; send D.TargetDoubledValue; // --- mapping definitions --- ListToList maps java.util.List list to java.util.List {: return list; :} StringToList maps String s to List {: java.util.List result = new java.util.ArrayList<>(); result.add(s); return result; :} IntToInt maps int number to int {: return number + 1; :}