Skip to content

Type Mismatch between DL-CCCH-Message and DL-DCCH-Message not detected in Tool v11.0.0/v11.1.0

Summary

The tool does not detect a type mismatch when assigning a DL-CCCH-Message to a variable of type DL-DCCH-Message. This issue is reproducible in Tool versions v11.0.0 and v11.1.0.

Steps and/or TTCN-3 code to reproduce

1.- In the ATS, test case f_TC_7_1_1_10_4_NR5GC, the variable is declared of type DL-DCCH-Message:

var template (value) DL_DCCH_Message v_DL_DCCH_Message;

2.- Assign a DL-CCCH-Message to it.

Step 29: Incorrectly assigns a DL-CCCH-Message (via f_NR_38508_RRCSetup) to the DL-DCCH-Message variable — Observe that no type mismatch error is raised, even though the types are incompatible.

v_DL_DCCH_Message := f_NR_38508_RRCSetup(nr_Cell1); // f_NR_38508_RRCSetup returns a DL-CCCH-Message SRB.send(cas_NR_SRB0_RrcPdu_REQ(nr_Cell1, -, v_DL_DCCH_Message));

Step 47: Correctly assigns a DL-DCCH-Message (via cs_38508_UECapabilityEnquiry) and works as expected, no error.

v_DL_DCCH_Message := cs_38508_UECapabilityEnquiry(tsc_NR_RRC_TI_Def, nr, v_EncodeCapRequest); SRB.send(cas_NR_SRB1_RrcPdu_REQ(nr_Cell1, cs_TimingInfo_NR(v_Timing), v_DL_DCCH_Message));

3.- Similarly, if you define the variable as a DL-CCCH-Message and assign a DL-DCCH-Message, the issue also goes undetected.

ASN.1 Definitions for reference:

DL-CCCH-Message ::= SEQUENCE {
    message DL-CCCH-MessageType
}

DL-CCCH-MessageType ::= CHOICE {
    c1 CHOICE {
        rrcReject RRCReject,
        rrcSetup RRCSetup,
        spare2 NULL,
        spare1 NULL
    },
    messageClassExtension SEQUENCE {}
}

DL-DCCH-Message ::= SEQUENCE {
    message DL-DCCH-MessageType
}

DL-DCCH-MessageType ::= CHOICE {
    c1 CHOICE {
        rrcReconfiguration RRCReconfiguration,
        ...
        loggedMeasurementConfiguration-r16 LoggedMeasurementConfiguration-r16,
        spare3 NULL, spare2 NULL, spare1 NULL
    },
    messageClassExtension SEQUENCE {}
}

What is the current bug behavior?

The tool does not report any type mismatch error when assigning a DL-CCCH-Message to a variable of type DL-DCCH-Message, and vice versa.

What is the expected correct behavior?

A type mismatch error should be raised during analysis, as the ASN.1 structures DL-CCCH-Message and DL-DCCH-Message are distinct and incompatible.

Relevant logs and/or screenshots

No specific error or warning is logged. Compilation and execution proceed without any indication of a mismatch.

Possible fixes

Improve type checking during TTCN-3 analysis for function return values and template assignments, especially when dealing with template variables and SEQUENCE/CHOICE-based types defined via ASN.1.

Titan version

v11.0.0 and v11.1.0

Platform details (OS type and version)

v11.1.0: Windows 11 + Cygwin

v11.0.0: as above + Ubuntu 22.04 under WSL (no v11.1.0 available yet AFAIK)

Best regards,

Carlos Arroyo - MCC TF160

NR5GC_IWD_25wk28.zip

/cc @aknappqwt @mmagyari