Skip to content
Snippets Groups Projects
Select Git revision
  • 84b9e1e22d21d6d0a9c651c60096c441ef064401
  • dev default protected
  • main protected
  • feature/ros-java-integration
4 results

EvaluationCounter.mustache

Blame
  • Standard.connect 3.26 KiB
    // --- 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, ListToList ;
    
    // Error: to-type of last mapping must be type of the Token
    receive B.ErrorTypeOfLastMapping using StringToString, StringToList ;
    
    // Error: types of mappings must match (modulo inheritance)
    receive B.ErrorTypeMismatch using StringToList, IntToInt ;
    
    // Error: Context-Free port not allowed for root nodes
    receive A;
    
    // Error: Clash with implied port definition of context-free port
    receive E;
    receive A.E;
    
    // --- send definitions ---
    // Error: the token must be resolvable within the parent type
    receive C.NonExisting ;
    
    // NOT HANDLED \\ // Error: from-type of first mapping must be type of Token
    // NOT HANDLED \\ send C.ErrorTypeOfFirstMapping using IntToInt ;
    
    // NOT HANDLED \\ // Error: to-type of last mapping must be byte[] or a supported primitive type
    // NOT HANDLED \\ send C.ErrorTypeOfLastMapping1 using StringToList ;
    // NOT HANDLED \\ send C.ErrorTypeOfLastMapping2 ;
    
    // NOT HANDLED \\ // Error: types of mappings must match (modulo inheritance)
    // NOT HANDLED \\ 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 ;
    
    // NOT HANDLED \\ // Error: There must be a send update definition for the target token
    // NOT HANDLED \\ 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;
    
    // non-existence of attributes is not checked by RagConnect
    send A.nonExistingAttribute(int);
    
    // Already defined ports for attributes will be reported, however
    send A.nonExistingAttribute(int);
    
    // mappings are not checked, here string would not match
    send A.anotherIntAttribute(int) using StringToString;
    
    // --- mapping definitions ---
    ListToList maps java.util.List<String> list to java.util.List<String> {:
      return list;
    :}
    
    StringToList maps String s to java.util.List<String> {:
      java.util.List<String> result = new java.util.ArrayList<>();
      result.add(s);
      return result;
    :}
    
    StringToString maps String s to String {:
      return s + "1";
    :}
    
    IntToInt maps int number to int {:
      return number + 1;
    :}