Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-64

Type checking script needs improving and needs to be aware of overriding and interface rules

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0
    • 1.1.1
    • None
    • None

      The bytemancheck.sh script relies on an underlying class TestScript which reads one or more rule files and tries to create and typecheck a Rule instance for each contained rule. The current version does not use the Transformer to process bytecode. It uses reflection over the class named in the CLASS clause to install type info. This means it cannot test whether the rule actually matches the specified location and local variable bindings when applied to the class declared in the CLASS clause. It would be better if the checker reported that a class failed to transform even though it is type correct.

      The current version is also unaware of overriding rules and interface rules. The checking problem is more complex here. With overriding CLASS rules it is not possible to identify only the declared class rather than all the subclasses the rule might apply to. With interface rules it is not possible to identify any specific class to be checked. However, in the former case it is still possible to see if the rule applies to the declared class. Failing that the rule can be type checked against any matching method signatures as per the current checker. The latter is also an option for interface rules.

      So, the checker needs to be updated to use these two strategies, transformation for preference and, failing that, type checking against matching signatures.

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: