Initializing help system before first use

# compile_model

Purpose
Compile a Mosel source file to a binary model (BIM) file.
Synopsis
`procedure compile_model(src_file, dst_file=None, options=None, user_comment=None, password_file=None, private_key=None, public_keys_file=None)`
Arguments

src_file | Path to the Mosel source file ( .mos). May contain environment variable references using ${varname} notation.
dst_file | Path for the output BIM file. If None, uses the source file path with .bim extension.
options | Compiler options string (options separated by spaces or - symbols):
g | Include debugging information (error locations, all symbols visible to Model.find_identifier)
G | Include tracing information (step-by-step debugging, all symbols visible to Model.find_identifier)
p | Parse only (syntax analysis, no output file)
ni | Disable implicit declarations
na | Disable assertions in debug mode
wi | Warn on implicit declarations
wu | Report unused public symbols
we | Treat warnings as errors
D | Generate and record documentation annotations
S | Sign the BIM file
E | Encrypt the BIM file
F | Interpret password_file as file name (not password itself)
V | Only load signed packages with verified signatures
T | Only load signed packages with valid signatures
user_comment | Commentary text saved at the beginning of the BIM file
password_file | Password or password file for encryption
private_key | Private key file for BIM file signing
public_keys_file | File of public keys (each line is a key file name) for encryption with multiple recipients

Example
Compile with documentation annotations:

    mp.compile_model("model.mos", "model.bim", "D")

Further information
1. Raises an exception if compilation fails with one of the following causes: syntax error or file access error, semantic error, error writing output file, or license error.
2. When using public_keys_file for encryption, the BIM file is encrypted for each listed public key, allowing decryption by any corresponding private key.
Related topics
load_model, execute_model
Module
moselpy
Parent Topic Package Functions

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.