Compiler-generated artifacts
The SPL compiler generates artifacts that are needed to run your stream application.
The SPL compiler generates the following artifacts into the output directory by default.
- bin: The PE binary files and the stand-alone executable files are generated into this directory.
- build: The makefile and other build artifacts (such as object files) are
generated into this directory. The makefile that is generated by the
sc
command for compiling the generated code can be manually launched, by issuingmake -f build/Makefile
inside the output directory. - etc: This directory contains configuration files used by primitive operators.
- *.sab: This file is the application bundle file that
is generated by the compiler, which is used to submit the application
to the Streams instance. For a main composite with name
a.b::Foo
, the application bundle file is named as a.b.Foo.sab. - src: The C++ source code for operators, PEs, functions, types, and the stand-alone application are generated into this directory.
The src directory is further organized as follows:
- type: This directory contains the generated C++ classes for types. The class and file names are mangled and this directory is not of interest to the developers.
- function: This directory contains the generated
C++ functions for SPL functions. It is organized hierarchically, based
on fully qualified SPL function names. For a function with fully qualified
name such as
a.b::foo
, the source code is at a/b/foo.h|cpp under the src/function directory. The code can be inspected by the developers to judge its efficiency (rarely needed in practice). - operator: This directory contains the generated
C++ classes for operator instances. It is organized hierarchically,
based on operator instance names. For an operator instance named
A.B.Out
, the source code for the class is at A/B/Out.h|cpp under the src/operator directory. Importantly, the SPL compiler also produces an .xml file for each operator instance that has a class that is generated for it. This document contains the XML representation of the operator instance model. Toolkit developers often look into the generated operator code to find compilation problems that resulted from incorrect or incomplete code generator templates. - standalone: This directory contains the generated C++ class for the stand-alone application. This directory is not of interest to developers.
The SPL compiler provides the -z, --code-beautification
option for formatting
the generated C++ code for better readability. This option requires the
uncrustify tool (not provided by Teracloud®
Streams) must be installed in the build environment.