IBM Support

INTERNAL ERROR: Unexpected AST node during analyze in Systems Tester

Question & Answer


Question

What is the reason for the INTERNAL error (Unexpected AST node) ?

Answer



The internal error "Unexpexted AST node" can occur due to inconsistent/unsupported constructs in the ASN.1 / TTCN-3 source files.
Some of the scenarios in which this error is seen are :

  1. Usage of inline enumerated definitions.

    Example:

    MyRecord ::= SEQUENCE{
    field1 INTEGER,
    field2 BIT STRING,
    field3 ENUMERATED {f0,f1,f3}
    }


    In case this it is the type of construct that's causing the INTERNAL ERROR, solution is to modify the inline ENUMERATED definition in the ASN.1 code to something like:

    MyEnumerated ::= ENUMERATED {f0,f1,f3}

    MyRecord ::= SEQUENCE{
    field1 INTEGER,
    field2 BIT STRING,
    field3 MyEnumerated
    }


  2. TestCase uses a component type in statements where there should be a component reference.

  3. Initialization of a variable, whose type is based on one of the fields of a SEQUENCE/record.

    Example:

    MyRecord ::= SEQUENCE{
    field1 INTEGER,
    field2 BIT STRING,
    field3 ENUMERATED {f0,f1,f3}
    }


    If there's the type MyEnumerated based on the type of one of the fields of the above ASN.1 SEQUENCE like:


    type MyRecord.field3 MyEnumerated;


    ... and we then declare a variable of this type using:


    var MyEnumerated v_enumerated;


    ... and initialize this variable using the statement:

    v_enumerated := f1; // The internal error is reported on the initialize statement here.. .
The scenarios cited above are few examples but there could be other scenarios as well that could lead to the INTERNAL ERROR.

Many of these issues have been fixed in the latest version of Tau Tester (v 3.3)

[{"Product":{"code":"SSYQJP","label":"Rational Systems Tester"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Documentation","Platform":[{"code":"PF033","label":"Windows"}],"Version":"3.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21398915