compiler(1)
๐ compiler(1) ๐
manual section 1 ยท TTCN-3 Tools ยท bestie edition ๐
okay so. hi. welcome to compiler(1), the TTCN-3 Tools glow-up of a manual page, and honestly? she's iconic. this is the quick-reference for the TTCN-3 and ASN.1 to C++ translator (and yes she also does JSON schema now, we love a multi-hyphenate ๐).
โจ NAME โจ
compiler โ TTCN-3 and ASN.1 to C++ translator. she takes your TTCN-3 and your ASN.1 and turns them into C++, no cap. ๐
๐ธ SYNOPSIS ๐ธ
like, here's how you actually call her:
compiler [ -abcdDeEfFghiIjklLMnNpqrRsStuwxXyY0 ] [ -V verb_level ] [ -J
file ] [ -K file ] [ -z file ] [ -o dir ] [ -P top_level_pdu ] ...
[ -Q n ] [ -U none|type|'number' ] [ -T ] module.ttcn ... [ -A ]
module.asn ... [ - module.ttcn ... module.asn ... ]
or
compiler -v
or
compiler --ttcn2json [ -jf ] [ -T ] module.ttcn ... [ -A ] module.asn
... [ - schema.json ]
๐ฆ DESCRIPTION ๐ฆ
so this manual page is a quick reference for the TTCN-3 and ASN.1 to C++ (or JSON schema) compiler of the TTCN-3 Test Executor. she's giving โจutilityโจ, she's giving ๐ซถ handyโจ.
ngl, real talk: this page only summarizes the meaning of all command line options. that's it, that's the assignment. it is not the whole lore.
if you want the full deep dive โ the lore, the backstory, the whole main-character arc โ please consult the Programmer's Technical Reference for TITAN TTCN-3 Test Executor. she's the director's cut. ๐ฌ
to be continued, bestie โ there's more of this page coming ๐๐
โจ OPTIONS โจ
okay bestie, here's the full menu, in alphabetical order like the original nerds intended ๐ every single one, no skips, we're eating the whole plate ๐ฝ๏ธโจ
-A fileโ forces the compiler to read file as an ASN.1 module ๐ฆ super handy when the automatic module type detection ghosts you because of some strange language constructs. Takes exactly ONE file name as its argument, so if you've got multiple files you gotta repeat the option for each one. See also: option-T.-aโ force XER in ASN.1 files โจ-bโ turns OFF generating BER encoder/decoder routines for all ASN.1 types ๐ซ-Bโ lets the selected field in a union value be unbound when you're setting module parameters (the legacy behavior, bestie, we're being retro). A warning pops up whenever a union value receives an unbound selected field, and also when a union with an unbound selected field gets copied ๐-cโ write out checksums when there's an error ๐งฎ-dโ treat ASN.1SEQUENCE/SETfields that haveDEFAULTvalues asomitin TTCN-3 ๐ซถ-Dโ disable generating those user and time information comments in the output C++ code ๐ซ๐-eโ enforce legacy handling of encode and variant attributes ๐ฐ๏ธ-Eโ tells the variant attribute parser to show warnings instead of errors for unrecognized/erroneous attributes ๐ซฃ-fโ forces the compiler to overwrite the output files even if they already exist or are totally unchanged ๐ฅ no more "hmm should I?" energy-Fโ forces the compiler to generate the FULL C++ classes for records of/sets of basic types (that'sboolean,integer,float,bitstring,hexstring,octetstring,charstringandunversal charstring) ๐ without this, only type aliases to pre-generated classes get generated for those types. This also disables the type compatibility between records of/sets of basic types in the Load Test Runtime. big deal, no cap.-gโ compiler error/warning messages will contain only the starting line number and column, in a format compatible with the GNU compiler (gcc) ๐ง and heads up:-gtakes precedence over-iif you specify both, so-gis the main character here ๐-hโ allows unsafe universal charstring to charstring conversion ๐ญ literally playing with fire but okay-iโ compiler error/warning messages will contain only the line numbers, column numbers stay hidden ๐ this one exists for backward compatibility with the error message format of earlier versions-Iโ enables real-time testing features โฑ๏ธโจ-jโ disables JSON encoder/decoder functions ๐ซ๐ช-J fileโ read a list of input files from the file you provided ๐-kโ enables object-oriented features ๐งฌโจ-K fileโ enables selective code coverage ๐-lโ tells the compiler to generate source file and line information (aka#linedirectives) into the output C++ code so that C++ compiler error messages point back to the lines of the original TTCN-3 input module ๐
๐จ bestie listen: this option is obsolete and will be removed in future versions, since the compiler doesn't generate erroneous C++ code anyway because of the full semantic analysis. rip bozo ๐
-Lโ tells the compiler to add source file and line number information into the generated code so it can be included in the log during execution ๐ but that's ONLY a prerequisite for logging the source code information. OptionsSourceInfoFormatandLogEntityNamealso have to be set appropriately in section[LOGGING]of the runtime configuration file, so don't forget those or it's giving nothing ๐ Using this option enlarges the size of the generated code a bit and slightly reduces execution speed. And it is not recommended when the TTCN-3 test suite is used for load generation ๐ช๏ธ-Mโ allows the use of the valueomitin template lists and complemented template lists (legacy behavior, we love a throwback). If it's set, an omitted field will match a template list if the valueomitappears in the list, and it will match a complemented template list ifomitis NOT in the list (theifpresentattribute can still be used for matching omitted fields ๐ซถ). This also affects theispresentoperation and thepresenttemplate restriction accordingly.-nโ activates the debugger and generates extra code for storing debug information ๐๐-Nโ ignoreUNTAGGEDencoding instruction on top level unions (legacy behaviour) ๐ฐ๏ธ-o dirโ the output files (including Test Port skeletons ๐ yes skeletons) will be placed into the directory specified by dir. Otherwise the current working directory is the default.-pโ tells the compiler to ONLY parse the given TTCN-3 and ASN.1 modules ๐ this detects only syntax errors because semantic checkings are not performed. The presence of all imported modules is not necessary, so it's allowed (and recommended!) to parse the modules one-by-one ๐ All options that influence code generation are silently ignored when used together with-p.
๐ Note: this option includes complete syntax checks for TTCN-3 modules, but in ASN.1 there are some special constructs (e.g. the user-defined syntaxes) that can't even be parsed without semantic analysis. So there's no guarantee that an ASN.1 module is free of syntax errors if it was analyzed with compiler using the -p flag. sorry bestie, that's just how it is ๐ญ
-P top_level_pdu...โ defines a top-level pdu ๐ top_level_pdu must have the following format:modulename.identifier. If this switch is used, then only the defined top-level PDU(s) and the referenced assignments are checked and included in code generation, and the other ASN.1 assignments are skipped ๐จ-qโ quiet mode ๐คซ equivalent with-V 0.-Qnโ quits after n errors โ-rโ disables generating RAW encoder/decoder routines for all TTCN-3 types ๐ซ-Rโ use function test runtime (TITAN_RUNTIME_2) โ๏ธ the compiler will generate source code for use with function test runtime.-sโ tells the compiler to parse the given TTCN-3 and ASN.1 modules and do semantic analysis on them, but NOT generate C++ output ๐ง ๐ซ The list of given modules shall be complete, so it is not allowed to import from a module that isn't in the list. All options that influence code generation are silently ignored when used together with-s.-Sโ suppresses context information ๐-tโ generates Test Port and External Class skeleton header and source files for all port types and external class types that can be found in the input TTCN-3 modules ๐โจ Existing Test Port and External Class files will NOT be overwritten unless the-foption is used, so respect the existing files bestie.-T fileโ forces the compiler to read file as a TTCN-3 module ๐ฆ See also: option-A.-uโ forces the compiler to do duplicate underscore characters in all output file names ๐ต๐ซ this option turns on the compatibility mode with versions 1.1 or earlier.-U none|type|'number'โ selects the code splitting mode for the generated C++ code ๐ช 'number' should be a positive number between1and999999. If 'number' is present, the files will be sliced into 'number' files ๐ฐ-vโ prints version and license key information and exits ๐ชโจ-V verb_levelโ sets the verbosity bit-mask directly to verb_level (where verb_level is a decimal value between0and65535) ๐๏ธ
Meaning of the bits, bestie, listen close:
1:"NOT SUPPORTED"messages ๐ฌ2:WARNINGmessages โ ๏ธ4:NOTIFYmessages ๐32|16|8:DEBUGmessages ๐- The debug-bits act like a 3-bits-length number, so the debug level has a value between
0and7. It's useful in case of abnormal program termination ๐
- The debug-bits act like a 3-bits-length number, so the debug level has a value between
-wโ suppresses ALL warning messages ๐ค equivalent with-V 4.-xโ disables generating TEXT encoder/decoder routines for all TTCN-3 types ๐ซ๐-Xโ disable XER encoder/decoder functions ๐ซ-yโ disable subtype checking ๐ซ๐-Yโ enforces legacy behaviour of the"out"function parameters (see refguide) ๐ฐ๏ธ-z fileโ enables profiling and code coverage in the selected TTCN-3 files ๐ the file argument contains a list of TTCN-3 files separated by new lines. Each TTCN-3 file must be among the compiler's TTCN-3 file arguments ๐ซถ-0โ disables attribute checks forencvalueanddecvalue๐ซโ must be used together with option-s. no solo runs, it's a duo.-โ the single dash character as command line argument controls the selective code generation option ๐ after the list of all TTCN-3 and ASN.1 modules, a subset of these files can be given separated by a dash. This option tells the compiler to parse all modules, perform the semantic analysis on the entire module hierarchy, but generate code only for those modules that are listed after the dash again ๐
๐ซ it is NOT allowed to specify a file name after the dash that wasn't present in the list before the dash. And if the single dash isn't present in the command line at all, the compiler will generate code for all modules. generous queen.
--ttcn2jsonโ generates a JSON schema from the types defined in the specified TTCN-3 and ASN.1 modules ๐ช๐ must always be the first compiler option ๐ from the previously listed options only-Tand-Acan be used, instead the JSON schema generator has options of its own:-jโ only types that have JSON coding enabled are included in the schema โจ-fโ the schema only validates types that have a JSON encoding or decoding method declared ๐ซถ- fileโ the single dash character as command line argument specifies the name of the generated JSON schema file ๐ท๏ธ if it's not present, then the schema file name is generated from the name of the first input file (by replacing its suffix with.jsonor appending.jsonto the end of the file) ๐
๐ช EXIT STATUS ๐ช
The compiler exits with a status of zero when no errors were encountered during its operation ๐ zero, slay, we love to see it.
A status of one will be returned if syntax or semantic errors were detected in the input modules ๐ญ we do NOT love to see it but it happens.
๐ธ ENVIRONMENT VARIABLES ๐ธ
ok so bestie, these are the lil environment thingies the compiler peeks at ๐ set them or don't, but if you need them, here's the tea:
TTCN3_DIRโ this one is the installation directory, like, the place where the uncompressed binary package of the TTCN-3 Test Executor is chillin'. That's where it lives. Go find it there. ๐TTCN3_LICENSE_FILEโ okay this is the important one, pay attention: it has to point to the file, not the directory it's in, that contains the personalized license key for whoever's using it rn โ either the current user or the host. NB means nota bene which is fancy latin for "bestie pls read this part". The file itself. Not the folder. The FILE. ๐
๐ BUGS ๐
ngl, this is the part nobody wants to write but somebody has to, so here we go:
The compiler does not support all constructs of TTCN-3 Core Language and ASN.1. Like, not even close to all of them. And when it bumps into a language element it doesn't know how to handle? It just reports an error. That's it. That's the whole vibe. ๐ญ
If you wanna see the full receipts โ the detailed list of deficiencies and language extensions โ it's all in the referenced documentation. So go read that, bestie. It's giving "required reading" energy fr fr.
For trouble reporting, use the tool MHWEB. And for the TR writers guide? Please visit the web page: http://ttcn.ericsson.se โจ
๐ SEE ALSO ๐
the required reading list, aka the lore you need to know ๐:
- Ericsson document 2/198 17-CRL 113 200 Uen: โ Programmer's Technical Reference for TITAN TTCN-3 Test Executor
- ETSI Standard ES 201-873-1: โ Testing and Test Control Notation: TTCN-3 Core Language
- ITU-T Recommendations X.680-683: โ Abstract Syntax Notation One (ASN.1)
all iconic, all worth your time, no cap ๐ซถ
๐ AUTHOR ๐
This manpage is written by Janos Zoltan Szabo, Ericsson Telecom AB. Give them their flowers, they earned them ๐
Copyright (c) 2000-2021 Ericsson Telecom AB
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html โญ
and that's a wrap on compiler(1) bestie!! ๐
this beauty comes to you from Ericsson Telecom AB, dated January 2021, and the page you just read is literally titled compiler(1) โ go forth and compile, you absolute main character ๐๐โจ
๐ฆ where this page comes from
- debian bookworm: eclipse-titan 8.2.0-1 ยท EPL-2.0
- ubuntu jammy: eclipse-titan 8.1.1-1 ยท EPL-1.0
- ubuntu noble: eclipse-titan 8.2.0-1build2 ยท EPL-2.0
- ubuntu stonking: eclipse-titan 8.2.0-1.1 ยท EPL-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms