def check_arguments(self, definition, declaration, arguments):
        mandatory = set(definition['args']['mandatory'])
        optional = set(definition['args']['optional'])
        defined = set(declaration['args'].keys())

        # Case 1: Missing arguments
        missing = mandatory - defined
        for m in missing:
            fmt = "Missing argument: '{param}'"
            self.append_error(fmt, line=declaration['dbg_line'], param=m)

        # Case 2: Extra (unused) arguments
        unused = defined - (mandatory | optional)
        for m in unused:
            fmt = "Unused argument: '{param}'"
            self.append_error(fmt, line=declaration['dbg_line'], param=m)

        # Case 3: value for arg is IDENTIFIER rather than VALUE, and IDENTIFIER is not in constants
        for param, (kind, value) in declaration['args'].iteritems():
            # If kind is not IDENTIFIER we have an actual value => continue to next argument
            if kind != 'IDENTIFIER':
                continue
            # First check if the identifier (value) is provided by a wrapping component...
            if value in arguments:
                continue
            # ... and if it is not it have to be a constant or there was an error in the script.
            if value not in self.constants:
                fmt = "Undefined identifier: '{param}'"
                self.append_error(fmt, line=declaration['dbg_line'], param=value)
Verify that all arguments are present and valid when instantiating actors.
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/csparser/checker.py/Checker.check_arguments