implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / compiler2 / compiler.1
CommitLineData
970ed795
EL
1.TH compiler 1 "October 2014" "Ericsson Telecom AB" "TTCN-3 Tools"
2.SH NAME
3compiler \- TTCN-3 and ASN.1 to C++ translator
4.SH SYNOPSIS
5.B compiler
f08ff9ca 6.RB "[\| " \-abcdEfgijlLMnpqrRsStuwxXyY " \|]"
970ed795
EL
7.RB "[\| " \-V
8.IR " verb_level" " \|]"
9.RB "[\| " \-K
10.IR " file" " \|]"
a38c6d4c 11.RB "[\| " \-z
12.IR " file" " \|]"
970ed795
EL
13.RB "[\| " \-o
14.IR " dir" " \|]"
15.RB "[\| " \-P
16.IR " top_level_pdu" " \|] ..."
17.RB "[\| " \-Q
18.IR "n" " \|] "
19.RB "[\| " \-U
14e21cff 20.IR "none|type|'number'" " \|] "
970ed795
EL
21.RB "[\| " \-T " \|]"
22module.ttcn ...
23.RB "[\| " \-A " \|]"
24module.asn ...
25[\| \- module.ttcn ... module.asn ... \|]
26.br
27or
28.br
29.B compiler
30.B \-v
af710487 31.br
32or
33.br
34.B compiler \-\-ttcn2json
35.RB "[\| " \-jf " \|]"
36.RB "[\| " \-T " \|]"
37module.ttcn ...
38.RB "[\| " \-A " \|]"
39module.asn ...
40.RB "[\| " \-
41schema.json
42.RB " \|]"
970ed795 43.SH DESCRIPTION
af710487 44This manual page is a quick reference for the TTCN-3 and ASN.1 to C++ (or JSON schema)
970ed795
EL
45compiler of the TTCN-3 Test Executor. It only summarizes the meaning of
46all command line options. For more details please consult the
47.B Programmer's Technical Reference for TITAN TTCN-3 Test Executor.
48.SH OPTIONS
49The following options are supported (in alphabetical order):
50.TP 10
51.BI \-A " file"
52Forces the interpretation of
53.I file
54as an
55.I ASN.1 module.
56It is useful when automatic module type detection fails
57due to some strange language constructs. The option takes exactly one file
58name as argument. The option must be repeated when used with multiple files.
59See also: option
60.B \-T.
61.TP
62.B \-a
63Force
64.I XER
65in ASN.1 files
66.TP
67.B \-b
68Disables the generation of
69.I BER
70encoder/decoder routines for all ASN.1 types.
71.TP
66d5fa86
BB
72.B \-B
73Allows the selected field in a union value to be unbound, when setting module
74parameters (legacy behavior). A warning is displayed whenever a union value
75receives an unbound selected field and when a union with an unbound selected field
76is copied.
77.TP
970ed795
EL
78.B \-c
79Write out
80.I checksums
81in case of error
82.TP
83.B \-d
84Treat ASN.1
85.I SEQUENCE/SET
86fields with DEFAULT values as
87.I omit
88in TTCN-3.
89.TP
feade998 90.B \-E
91Instructs the variant attribute parser to display warnings instead of errors
92for unrecognized/erroneous attributes.
93.TP
970ed795
EL
94.B \-f
95Forces the compiler to
96.I overwrite
97the output files even if they exist or are unchanged.
98.TP
99.B \-g
100The compiler error/warning messages will contain only the starting
101line number and column, in a format compatible with th GNU compiler (gcc).
102.B \-g
103takes precedence over
104.B \-i
105if both are specified.
106.TP
107.B \-i
108The compiler error/warning messages
109will contain only the
110.I line numbers,
111the column numbers will remain hidden. This option provides backward
112compatibility with the error message format of earlier versions.
113.TP
114.B \-j
115Disables JSON encoder/decoder functions.
116.TP
117.BI \-K " file"
118Enables selective code coverage.
119.TP
120.B \-l
121Instructs the compiler to generate source file and line information (i.e.
122.I #line
123directives) into the output C++ code so that the C++ compiler error
124messages refer back to the lines of original TTCN-3 input module.
125.br
126This option is
127.I obsolete
128and will be removed in future versions as the
129compiler does not generate erroneous C++ code because of the full
130semantic analysis.
131.TP
132.B \-L
133Instructs the compiler to add source file and line
134.I source file
135and
136.I line number
137information into the generated code to be included in the
138.I log
139during execution.
140.br
141This option is only a prerequisite for logging the source code information.
142Options
143.I SourceInfoFormat
144and
145.I LogEntityName
146have also to be set appropriately in section
147.I [LOGGING]
148of the run-time configuration file.
149.br
150Usage of this option a bit enlarges the size of the generated code and slightly
151reduces execution speed. This flag is not recommended when the TTCN-3 test
152suite is used for load generation.
153.TP
3abe9331 154.B \-M
155Allows the use of the value
156.B omit
157in template lists and complemented template lists (legacy behavior).
158If set, an omitted field will match a template list, if the value
159.B omit
160appears in the list, and it will match a complemented template list, if
161.B omit
162is not in the list (the
163.B ifpresent
164attribute can still be used for matching omitted fields). This also affects the
165.B ispresent
166operation and the
167.B present
168template restriction accordingly.
169.TP
f08ff9ca
BB
170.B \-n
171Activates the debugger and generates extra code for storing debug information.
172.TP
970ed795
EL
173.BI \-o " dir"
174The output files (including Test Port skeletons) will be placed into
175the directory specified by
176.I dir.
177The current working directory is the default otherwise.
178.TP
179.B \-p
180Instructs the compiler only to
181.I parse
182the given TTCN-3 and ASN.1 modules. This will detect only the syntax errors
183because semantic checkings are
184.I not
185performed. The presence of all imported modules is not necessary thus it is
186allowed (and recommended) to parse the modules one-by-one.
187.br
188All options that influence the code generation are silently ignored when used
189together with
190.B \-p.
191.br
192.B Note:
193This option includes complete syntax checks for TTCN-3 modules, but in ASN.1
194there are some special constructs (e.g. the user-defined syntaxes) that cannot
195be even parsed without semantic analysis. So there is no guarantee that an ASN.1
196module is free of syntax errors if it was analyzed with compiler using the
197.B -p
198flag.
199.TP
200.BI \-P " top_level_pdu" ...
201Defines a top-level pdu.
202.I top_level_pdu
203must have the following format:
204.I modulename.identifier.
205If this switch is used, then only the defined top-level PDU(s) and the
206referenced assignments are checked and included in code generation, the
207other ASN.1 assignments are skipped.
208.TP
209.B \-q
210.I Quiet
211mode. Equivalent with
212.B \-V 0.
213.TP
214.B \-Qn
215.I Quits
216after
217.B n
218errors.
219.TP
220.B \-r
221Disables the generation of
222.I RAW
223encoder/decoder routines for all TTCN-3 types.
224.TP
225.B \-R
226Use function test runtime (TITAN_RUNTIME_2). The compiler will generate source
227code for use with function test runtime.
228.TP
229.B \-s
230Instructs the compiler to parse the given TTCN-3 and ASN.1 modules and perform
231.I semantic analysis
232on them, but
233.I not
234to generate C++ output. The list of given modules shall be complete so it is
235not allowed to import from a module that is not in the list. All options that
236influence the code generation are silently ignored when used together with
237.B \-s.
238.TP
239.B \-S
240.I Suppresses
241context information.
242.TP
243.B \-t
244Generates
245.I Test Port
246skeleton header and source files for all port types that can be found in
247TTCN-3 modules. Existing Test Port files will not be overwritten unless the
248.B \-f
249option is used.
250.TP
251.BI \-T " file"
252Forces the interpretation of
253.I file
254as a
255.I TTCN-3 module.
256See also: option
257.B \-A.
258.TP
259.B \-u
260Forces the compiler to do
261.I duplicate underscore
262characters in all output file names. This option turns on the
263compatibility mode with versions 1.1 or earlier.
264.TP
14e21cff 265.BI \-U " none|type|'number'"
970ed795 266Selects code splitting mode for the generated C++ code.
14e21cff 267The 'number' should be a positive number between 1 and 999999.
268If the 'number' is present the files will be sliced into 'number' files.
970ed795
EL
269.TP
270.B \-v
271Prints
272.I version
273and license key information and exits.
274.TP
275.BI \-V " verb_level"
276Sets the verbosity bit-mask directly to
277.I verb_level
278(where
279.I verb_level
280is a decimal value between 0 and 65535).
281.br
282.sp 1
283Meaning of bits:
284.P
285.RS 10
286.PD 0
287.TP 10
288.B 1:
289"NOT SUPPORTED" messages.
290.TP
291.B 2:
292WARNING messages.
293.TP
294.B 4:
295NOTIFY messages.
296.TP
297.B 32|16|8:
298DEBUG messages.
299.br
300The debug-bits act like a 3-bits-length number, so the debug level has
301a value between 0 and 7. It is useful in case of abnormal program termination.
302.PD
303.RE
304.P
305.TP 10
306.B \-w
307Suppresses all
308.I warning
309messages. Equivalent with
310.B \-V 4.
311.TP
312.B \-x
313Disables the generation of
314.I TEXT
315encoder/decoder routines for all TTCN-3 types.
316.TP
317.B \-X
318Disable
319.I XER
320encoder/decoder functions
321.TP
322.B \-y
323Disable
324.I subtype
325checking
326.TP
327.B \-Y
328Enforces legacy behaviour of the "out" function parameters (see refguide).
329.TP
a38c6d4c 330.BI \-z " file"
331Enables profiling and code coverage in the selected TTCN-3 files. The
332.I file
333argument 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.
334.TP
970ed795
EL
335.B \-
336The single dash character as command line argument controls the
337.I selective code generation
338option.
339After the list of all TTCN-3 and ASN.1 modules a subset of these files can
340be given separated by a dash. This option instructs the compiler to parse all
341modules, perform the semantic analysis on the entire module hierarchy, but
342generate code
343.I only
344for those modules that are listed after the dash again.
345.br
346It is not allowed to specify a file name after the dash that was not present
347in the list before the dash. If the single dash is not present in the command
348line the compiler will generate code for
349.I all
350modules.
af710487 351.TP
352.B \-\-ttcn2json
353Generates a JSON schema from the types defined in the specified TTCN-3 and ASN.1 modules.
354Must always be the first compiler option. From the previously listed options only
355.B \-T
356and
357.B \-A
358can be used, instead the JSON schema generator has options of its own:
359.TP
360.B \-j
361Only types that have JSON coding enabled are included in the schema.
362.TP
363.B \-f
364The schema only validates types that have a JSON encoding or decoding method declared.
365.TP
366.BI \- " file"
367The single dash character as command line argument specifies the name of the generated
368JSON schema file. If it is not present, then the schema file name is generated from
369the name of the first input file (by replacing its suffix with
370.I \.json
371or appending
372.I \.json
373to the end of the file).
970ed795
EL
374.SH EXIT STATUS
375The compiler exits with a status of zero when no errors were encountered
376during its operation. A status of one will be returned if syntax or
377semantic errors were detected in the input modules.
378.SH ENVIRONMENT VARIABLES
379.TP
380.SM
381TTCN3_DIR
382The installation directory where the uncompressed binary package of
383TTCN-3 Test Executor can be found.
384.TP
385.SM
386TTCN3_LICENSE_FILE
387It shall point to the
388.I file
389.RB ( NB:
390.I not
391to its directory) that contains the personalized license key for the
392current user or host.
393.SH BUGS
394The compiler does not support all constructs of TTCN-3 Core Language and ASN.1.
395It reports an error when encountering an unsupported language element.
396The detailed list of deficiencies and language extensions can be found in the
397referenced documentation.
398.LP
399For trouble reporting use the tool
400.BR "MHWEB" "."
401For TR writers guide please visit the web page:
402.I http://ttcn.ericsson.se.
403.SH SEE ALSO
404.TP
405.SM
406Ericsson document 2/198 17-CRL 113 200 Uen:
407.B Programmer's Technical Reference for TITAN TTCN-3 Test Executor
408.TP
409.SM
410ETSI Standard ES 201-873-1:
411.B Testing and Test Control Notation: TTCN-3 Core Language
412.TP
413.SM
414ITU-T Recommendations X.680-683:
415.B Abstract Syntax Notation One (ASN.1)
416.SH AUTHOR
417This manpage is written by Janos Zoltan Szabo, Ericsson Telecom AB
418.br
d44e3c4f 419Copyright (c) 2000-2016 Ericsson Telecom AB
970ed795
EL
420.br
421All rights reserved. This program and the accompanying materials
422are made available under the terms of the Eclipse Public License v1.0
423which accompanies this distribution, and is available at
424.br
425http://www.eclipse.org/legal/epl-v10.html
This page took 0.045148 seconds and 5 git commands to generate.