Welcome to the Bartels Group of Companies
ULC - User Language Compiler - Deutsche Version ULC - User Language Compiler - English Version
Bartels

Bartels System GmbH
Bartels
Bartels AutoEngineer
BAE Product Info
BAE Price List
BAE Downloads
BAE Documentation
BAE Installation Guide
BAE User Manual
Preface
1 Introduction
2 Circuit Design
3 Packager
4 PCB Design
5 IC/ASIC Design
6 Rule System
7 Utilities
7.1 BAEHELP
7.2 BAESETUP, BSETUP
7.3 BICSET (IC Design)
7.4 BLDRING (IC Design)
7.5 CONCONV
7.6 COPYDDB
7.7 FONTCONV
7.8 FONTEXTR
7.9 INSTALL
7.10 LISTDDB
7.11 LOGLIB
7.12 NETCONV
7.13 REDASC
7.14 RULECOMP
7.15 ULC - User Language Compiler
7.16 User Language Interpreter
7.17 USERLIST
7.18 VALCONV
BAE Libraries
User Language Programmer's Guide
BAE Update History
BAE Next Version Release Notes Preliminary
BAE V8.0 Release Notes
BAE V7.8 Release Notes
BAE V7.6 Release Notes
BAE V7.4 Release Notes
BAE V7.2 Release Notes
BAE V7.0 Release Notes
BAE V6.8 Release Notes
BAE V6.6 Release Notes
BAE V6.4 Release Notes
BAE V6.2 Release Notes
BAE V6.0 Release Notes
BAE V5.4 Release Notes
BAE V5.0 Release Notes
BAE V4.6 Release Notes
BAE V4.4 Release Notes
BAE V4.2 Release Notes
BAE V4.0 Release Notes
BAE V3.4 Release Notes
BAE Support
BAE Contributions
BAE Development and Service Companies
Electronics Development
Bartels Sport Service
Company Profile
Corporate Info
Bartels :: Bartels AutoEngineer :: BAE Documentation :: BAE User Manual :: Utilities :: ULC - User Language Compiler
Bartels AutoEngineer® - User Manual

7.15 ULC - User Language Compiler

Bartels AutoEngineer® Dokumentation

Name

ulc - Bartels User Language Compiler

Synopsis

ulc [-wcon|-wcoff] [[-S[ource]] srcfile...]
    [-lib libname...] [-dll libname...]
    [{-cp|-cl} [dstname...]]
    [-I[nclude] includepath...] [-D[efine] macroid...]
    [-O[0|1]] [-e[0|1]] [-w[0|1|2|3|4]] [-t[0|1]]
    [-l[0|1|2|3|4|5]] [-ld listingdirectory name]
    [-dp prgname...] [-dl libname...]
    [-ulp prgfilename] [-ull libfilename]
    [-log logfilename]

Description

The Bartels User Language Compiler ulc translates User Language source code into User Language machine programs and/or User Language libraries. User Language machine programs can be executed by the User Language Interpreter. User Language libraries usually are generated from frequently used source code. User Language library machine code can be linked to other User Language machine code (programs or libraries). Library linking can be done either statically (at compile time by the User Language Compiler) or dynamically (at runtime by the User Language Interpreter). As an advantage of the User Language library concept, frequently used source code needs to be compiled just once and can subsequently be referenced through linking, which is much faster than compiling.

Options

Command line options of the User Language Compiler consist of the dash (-) or slash (/) start character followed by the option specification. Single-character option specifications optionally followed by a mode or toggle number are often known as switches or flags. Such special options can be grouped as in /l2Ow3 or -O1w3l2, which both select listing mode 2, activate the optimizer and set the warning severity level to 3.

Wildcard Option [-wcon|-wcoff]

The wildcard option is used to activate or deactivate wildcard processing at the specification of file and/or element names. On default wildcard processing is activated, i.e., omitting the wildcard option leaves wildcard processing activated. Option -wcon can be used for explicitly activating wildcard processing. With wildcard recognition activated, the character ? can be used for matching any arbitrary character, and the character * can be used for matching an arbitrary number of arbitrary characters. Option -wcoff can be used to turn off wildcard processing. Wildcard recognition must be deactivated for explicitly processing names containing wildcard characters such as scm_? or ged_*.

Source File Option [[-S[ource]] srcfile...]

This option is used for specifying the file name(s) containing the source code to be compiled. File name specifications can contain a directory path, i.e., the source file names need not reside in the current directory. Wildcards are supported with the source file name specification if wildcard recognition is activated (see option -wcon above). Source file names can be specified with or without file name extension. On source file name specifications without extension the Compiler automatically assumes and/or appends file name extension .ulc. I.e., source file names with non-default extension must be specified with their extension, respectively. It is possible to, e.g., generate User Language libraries from include files usually named with extension .ulh. The type of User Language machine code to be generated is designated with either option -cp (User Language programs; see below) or option -cl (User Language libraries; see below). The name of the machine code element to be generated is derived from the source file name by stripping the directory path and the file name extension from the source file name. Non-default destination program and/or library element names can be specified with options -cp and -cl (see below). The -Source and/or -S option keywords are not required with source file specifications where file names cannot be intermixed with other name specifications, e.g., if source file names are the first names specified on the ULC command line. However, the -Source (and/or -S) option can be used for explicit source file specification to avoid ambiguities in case where source file names are not the first name specifications on the ULC command line. At least one source file specification is required if neither option -dp nor option -dl (see below) is specified.

Static Link Option [-lib libname...]

The static link option -lib requires one or more library name specifications and at least one valid source file specification (see option -Source above). The machine code of the libraries specified with the -lib option must be available in the ulcprog.vdb file of the BAE programs directory, i.e., the required libraries must be compiled before they can be linked. The built-in linker of the User Language Compiler binds the machine code of these libraries to the machine code currently to be translated.

Dynamic Link Option [-dll libname...]

The dynamic link option -dll requires one or more library name specifications and at least one valid source file specification (see option -Source above). The machine code of the libraries specified with the -dll option must be available in the ulcprog.vdb file of the BAE programs directory, i.e., the required libraries must be compiled before they can be linked. The built-in linker of the User Language Compiler stores dynamic link request information with the machine code for the User Language Interpreter to perform dynamic linking of the requested libraries at runtime.

Create Program/Library Option [{-cp|-cl} [dstname...]]

The create option can be used to designate the type of machine code to be generated. The User Language Compiler can create either User Language programs or User Language libraries. On default program generation request is assumed, i.e., omitting both the -cp and the -cl option defaults to User Language program creation. Option -cp explicitly selects program generation whilst option -cl selects library generation; both options must not be used together. On default, the destination element name is derived from the corresponding source file name; both the directory path and the source file name extension are stripped from the source file name to generate destination element name. The -cp and -cl options allow for the specification of non-default destination program and/or library names. Only one source file specification (see option -Source) is allowed when explicitly specifying destination element name(s) with options -cp and -cl. The machine code generated by the Compiler is stored with the specified destination element name to ulcprog.vdb file of the BAE programs directory. Wildcards are not supported with destination element name specifications. Multiple destination element name specifications are supported in order to store the machine code of a single source under different names, e.g., to generate programs scm_st, ged_st, etc. from a single source file named bae_st.ulh.

Include Path Option [-I[nclude] includepath...]

The -Include (and/or -I) option is used for specifying multiple alternate include paths for include file name search. At least one include path argument is required. When encountering an #include preprocessor statement the Compiler first checks the current directory for include file access and then searches the include paths in the sequence as specified with the -Include option until the requested include file is found.

Define Option [-D[efine] macroid...]

The -Define (and/or -D) option is used for defining macros at the User Language Compiler call. At least one macro identifier is required. This option corresponds with the #define preprocessor statement, i.e., macros defined with the -Define option can be checked with the #ifdef or #ifndef preprocessor statements, thus giving more control on conditional compilation to the Compiler.

Optimizer Option [-O[0|1]]

The -O option is used to activate or deactivate the optimizer of the User Language Compiler. On default the optimizer is deactivated, i.e., omitting this option leaves the optimizer deactivated. Option -O or -O1 activates the optimizer. Option -O0 explicitly deactivates the optimizer. The optimizer frees the machine code from redundancies, and modifies it to make it more efficient. Optimizing machine code significantly reduces disk space and main memory requirements, and the resulting machine code can be loaded and executed much faster. It is strongly recommended to activate the optimizer.

Error Severity Option [-e[0|1]]

The -e option is used for setting the error severity level. On default the error severity level is set to 1, i.e., omitting this option selects error severity level 1. Option -e0 sets error severity level 0. Option -e or -e1 explicitly sets error severity level 1. Error severity level 1 compiles all specified sources; error severity level 0 causes the Compiler to stop the compilation process on any errors occurred during a single source compilation.

Warning Severity Option [-w[0|1|2|3|4]]

The -w option is used for setting the warning severity level in the range 0 to 4. On default, the warning severity level is set to 0, i.e., omitting this option selects warning severity level 0. Omitting explicit level specification with this option as with -w defaults to warning severity level 3. Each type of warning defined with the Compiler is assigned to a certain warning severity level. The Compiler only prints warnings with a warning severity level less than or equal the level selected with the -w option since higher warning severity levels denote less importance. With this option, it is possible to suppress less important warning messages.

Top Level Warnings Only Option [-t[0|1]]

The -t option controls whether warning messages related to the compilation of include files are omitted or not. On default (i.e., if this option is not specified or if its value is set to 0), warning messages related to the compilation of both top level source code files and include files are issued. Setting this option value to 1 prevents the User Language Compiler from issuing warning messages related to the compilation of include files, thus simplifying the analysis of warning messages when working with standard include files containing functions and variables which are not used by every program.

Listing Option [-l[0|1|2|3|4|5]]

The -l option is used to control the listing file output. Listing modes 0 to 5 can be specified. Mode 0 won't produce any listing output and mode 5 produces the most detailed listing. On default, listing mode 0 is selected, i.e., no listing is generated if this option is omitted. Omitting explicit listing mode specification with this option as with -l defaults to listing mode 5. The listing output file name is derived from the corresponding source code file name, where the original file name extension is replaced with extension .lst. The listing file is for user information purposes only, i.e., it is not required by system.

Listing Directory [-ld listingdirectoryname]

The -ld option allows for the specification of an alternative output directory for the listing files created with the -l option. This option is useful when applying make utilities for automatically compiling modified User Language programs as it allows to keep the source directories clean. With the BAE software, a makefile is provided in the baeulc directory. This makefile defines the dependencies between User Language programs and include files and works with listing files in a subdirectory (lst).

Delete Program Option [-dp prgname...]

The -dp option is used for deleting previously compiled programs from the ulcprog.vdb file in the BAE programs directory. At least one program element name is required. Wildcards are supported with the program element name specification if wildcard recognition is activated (see option -wcon above). Warnings are issued when trying to delete non-existent programs. Program deletion is always processed before any source code compilation in order to avoid compilation process conflicts such as deleting a program immediately after it has been compiled with the same ULC call.

Delete Library Option [-dl libname...]

The -dl option is used for deleting previously compiled libraries from the ulcprog.vdb file in the BAE programs directory. At least one library element name is required. Wildcards are supported with the library element name specification if wildcard recognition is activated (see option -wcon above). Warnings are issued when trying to delete non-existent libraries. Library deletion is always processed before any source code compilation in order to avoid compilation process conflicts such as deleting a library immediately after it has been compiled with the same ULC call.

Program Database File Name Option [-ulp prgfilename]

On default, the User Language Compiler stores User Language programs to a file named ulcprog.vdb in the Bartels AutoEngineer programs directory. The -ulp option can be used to select a different User Language program database file.

Library Database File Name Option [-ull libfilename]

On default, the User Language Compiler stores User Language libraries to a file named ulcprog.vdb in the Bartels AutoEngineer programs directory. The -ull option can be used to select a different User Language library database file.

Log File Option [-log logfilename]

The User Language Compiler prints all messages to standard output and to a log file. Log file output is generated to save long message lists which could be generated at the compilation of different sources. On default the log file name is set to ulc.log (in the current directory). The -log option can be used to specify a non-default log file name.

Examples

Compilation of the User Language program contained in ulcprog.ulc with optimization and warning message output; the produced machine program is stored with the name ulcprog to the ulcprog.vdb file of the BAE programs directory:

>  ulc ulprog -Ow Return/Enter Key (CR)

Compilation of the User Language program contained in ulcprog.ulc with listing file output (to ulcprog.lst); the produced machine program is stored with the name newprog to the ulcprog.vdb file of the BAE programs directory:

>  ulc ulprog -l -cp newprog Return/Enter Key (CR)

Deleting the User Language programs named ulcprog and newprog and all User Language libraries with names starting with test and ending on lib from the ulcprog.vdb file of the BAE programs directory:

>  ulc -dp ulprog newprog -dl test*lib Return/Enter Key (CR)

Generate User Language library libsll from source file libbae.ulh (optimizer is activated; listing output is directed to file libbae.lst):

>  ulc libbae.ulh -cl libsll -l2O Return/Enter Key (CR)

Compile all current directory files with extension .ulc and statically link the generated program machine codes with library libsll (macro USELIB is defined for controlling conditional compilation; optimizer is activated):

>  ulc *.ulc -Define USELIB -lib libsll -O Return/Enter Key (CR)

Generate libraries libstd and stdlib from source file std.ulh (optimizer is activated, warning severity level is set to 2):

>  ulc -w2 -O -cl libstd stdlib -Source std.ulh Return/Enter Key (CR)

Generate library liblay from source file \baeulc\lay.ulh with library libstd dynamically linked (optimizer is activated, warning severity level is set to 3, Compiler messages are directed to log file genlib.rep instead of ulc.log):

>  ulc /wO -cl liblay -S \baeulc\lay.ulh -dll libstd -log genlib.rep Return/Enter Key (CR)

Generate programs laypcr and tracerep from source files laypcr.old and tracerep.ulc with library liblay dynamically linked (optimizer is activated):

>  ulc laypcr.old /dll liblay /cp -O /S tracerep Return/Enter Key (CR)

Files

ulcprog.vdb -- BAE User Language database (in BAE programs directory)

See also

userlist, User Language Interpreter, Bartels User Language Programmer's Guide

Diagnose

The error messages issued by ulc are intended to be self-explanatory.

Warnings

ulc is a powerful software tool for implementing programs for the manipulation of DDB file contents and for generating CAM data. Even the BAE user interface can be considerably changed and/or extended with User Language programs. It is advisable to test each new User Language program in a non-critical environment (test software installation, test jobs, backup of real jobs, etc.) until confidence in the program is established for unrestricted use on real jobs. It is also strongly recommended to ensure security, e.g., to prevent foreign persons from implanting destructive User Language programs to ulcprog.vdb.

Bartels :: Bartels AutoEngineer :: BAE Documentation :: BAE User Manual :: Utilities :: ULC - User Language Compiler

ULC - User Language Compiler
© 1985-2017 Oliver Bartels F+E • Updated: 11 October 2010, 10:34 [UTC]

© 1985-2017 Oliver Bartels F+E Bartels Homepage Contact and Corporate Info

Web Development by Baumeister Mediasoft Engineering

ULC - User Language Compiler - Deutsche Version ULC - User Language Compiler - English Version