Using ldcupdate#

Command-Line#

ldcupdate <project-file> -module:[Module-Id] [Module Options] [-deltaTags] [-deltaviolations:<dviol-file>] [-generateDetailedReport] [-atomdb:true|false] [-merge] [-dobackups] [input files] -report:[FileFormat] -reportFile:<report-file>

ldcupdate allows the user to create a new project from source code, or update an existing project with new source code. It can produce a change report that shows which elements are new or which are no longer present. The report also contains a list of violations that are new and those that have been fixed. You can generate the delta violations report in a separate file - the file is not generated if no new violations were added or old violations removed. The presence or absence of the violations file can be used to determine if additional action is required after the update.

Caveat: Please note that input specification using wild cards should not be used to update projects, if the project being updated was created by explicitly listing the input files.

Examples#

Creating a New Project#

To create a new project using LDCUpdate, a user must specify:

  1. The file name for the new project

  2. The Lattix module to use

  3. The source files

Below are some examples of commands to create a project.

ldcupdate <NewProjectFile.ldz> -module:java file1.jar file2.jar

Create a project based the specified source files.

ldcupdate <NewProjectFile.ldz> -module:dotnet @flist.txt

Create a project based on a list of source files supplied in the text file flist.txt

ldcupdate <NewProjectFile.ldz> -module:dotnet dll:DirName/[*.dll]

Create a project by loading in all dlls in the specified directory.

ldcupdate <NewProjectFile.ldz> -module:java sample.ear[*.jar]

ldcupdate <NewProjectFile.ldz> -module:java sample.ear[file1.jar] sample.ear[file2.jar]

ldcupdate <NewProjectFile.ldz> -module:java sample.ear!web.war!file1.jar earfile!warfile!file2.jar

ldcupdate <NewProjectFile.ldz> -module:java sample.ear!web.war!WEB-INF/lib[*.jar]

ldcupdate <NewProjectFile.ldz> -module:java sample.ear!WEB-INF/lib[*.jar]

ldcupdate <NewProjectFile.ldz> -module:java sample.ear!file.war[*.class]

Create a project from Java files including source from within EAR files. File names can be full path names. EAR and WAR files are treated like directories except that the delimiter character at the end is ‘!’ instead of ‘/’.

Note that the options -memberProcessing:all -expandMembersInDSM can be added to any of these commands to create a project with member level turned on.

Updating an Existing Project#

LDCUpdate can update an existing project with new source code.

The files originally used to create a Lattix project are stored in its project properties - see Project–> Project Properties–> <Module Name>–> Datasources in Lattix Architect.

image0

If you run LDCUpdate without specifying any source files, the project will be updated using the current version of those files on your file system:

ldcupdate <ExistingProjectFile.ldz>

Alternatively you can specify new files to use as the source of the project:

ldcupdate <ExistingProjectFile.ldz> <newSourceFile> <anotherNewSourceFile>

For more information on ways to specify source files, see the examples in Creating a New Project. Caveat: Please note that input specification using wild cards should not be used to update projects, if the project being updated was created by explicitly listing the input files.

Here are some further LDCUpdate project update command examples:

ldcupdate <ExistingProjectFile.ldz> -report:txt -reportFile<report-file>

Update the given project and generate a report on the update. This report will show changes in content (source the has changed, is missing, or has been added) and changes in violations (missing or new). Available file formats to supply to the -report argument are txt, xml, html and excel.

ldcupdate <ExistingProjectFile.ldz> -deltaviolations:<DeltaviolationsFilename>

Update the given project and generate a report on the changes in violations. The violations report file is not generated if there were no changes.

ldcupdate <ExistingProjectFile.ldz> -memberProcessing:all -expandMembersInDSM

Update the project and turn member level processing on.

ldcupdate <ProjectFile.ldz> -atomdb:true

Update a project and turn on the atom database. Setting atomdb:false will turn off the atom database. If this option is not specified, the updated project will have the same atom database setting as the input project.

Further Help#

For more information and help on the options that can be provided to LDCUpdate, please run one of these commands:

  • ldcupdate -help

    Shows the arguments available for ldcupdate.

  • ldcupdate -help:ModuleOptions

    Shows all available modules and their options.

  • ldcupdate -help:<moduleName, e.g. java or clang>

    Shows all the options for the specified module.

Modules#

Here is a list of modules currently available with Lattix. For an up-to-date list, run:

ldcupdate -help:ModuleOptions

module:
  axivion, clang, dotnet, excel, jama, java, klc, ldx, oracle, parasoft, python, rhapsody, ruby, sparxea, sql, understand-cpp, understand-python, understand-fortran, understand-ada, magicdraw, xmi

Module Options#

Here is a list of modules and options currently available with Lattix. For an up-to-date list, run

ldcupdate -help:ModuleOptions

ModuleId: axivion
   Module input types
     rfg:<file or directory>
     ldi.xml:<file or directory>
     ldi:<file or directory>

   Module loading options:
     -axivion_home:<value>
       Axivion Home Directory
     -AXIVION_PYTHON_EXE:<value>
       Python EXE
     -skip_atoms:<value>[,<value>...]
       Skip atom matching these patterns
     -logfile:<value>
       Logfile Name
     -useParentDs
       Use Parent Datasource
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
   Module partitioning options:
     -mergeDupAtoms
       Merge Duplicate Atoms
     -createFileSubsystem
       Create Subsystems For Assemblies
     -createFileSubsystemDir
       Create Subsystems Corresponding to Directory Structure

ModuleId: clang
   Module input types
     <Build Specification File>
     lo:<file or directory>
     vs-sln-file:sln_name=<value>,sln_cfg=<value>
        sln_name:Visual Studio File
        sln_cfg:Build Configuration

     projconfig:<file or directory>

   Module loading options:
     -filter_header_on_source
       Filter dependencies from header to source files
     -include_standard_headers
       Include standard Clang headers
     -include_vs_headers
       Include Visual Studio headers
     -auto_includes
       Automatically detect include directories in source tree
     -compute_vis_decl
       Compute declaration information
     -canonical
       Convert symbolic links to physical file names.
     -compile_include_files
       Compile Include Files
     -only_process_files_in_root_dirs
       Only Process Files in Root Dirs
     -honor_excluded_source_files_for_vs
       Honor excluded source files in Visual Studio
     -dont_generate_compiler_flag_properties
       Don't generate compiler flag properties for atoms
     -dont_generate_preproc_properties
       Don't generate preprocessor properties for atoms
     -dont_generate_clang_properties
       Don't generate clang properties for atoms
     -dont_generate_dependency_line_numbers
       Don't generate dependency line numbers
     -skip_dup_includes
       Skip duplicate include files
     -mem_diag
       Enable memory diagnostics
     -only_files:<value>[,<value>...]
       Include files matching these names
     -only_datasources:<value>[,<value>...]
       Include files only from these datasources
     -filter_symbols:<value>[,<value>...]
       Skip atoms matching these patterns
     -dirs:<value>[,<value>...]
       Include directories
     -cmd_line_options:<value>[,<value>...]
       Compiler options. If an option contains a comma, it should be escaped with a backslash
     -remove_prefix:<value>[,<value>...]
       Remove these prefixes from atom names
     -exts:<value>[,<value>...]
       Header file extensions
     -source_exts:<value>[,<value>...]
       Source file extensions
     -solo_declarations
       Create dependencies to declarations if there's only one
     -createDeclAtoms
       Create atoms for declarations
     -keep-obj-files
       Save object files
     -temp_directory:<value>
       Directory to use for temporary files
     -max-thread-count:<value>
       Maximum number of compiler threads that can be run simultaneously. Zero means unlimited
     -root_dir:<value>
       Directory to use to resolve relative files in buildspec.
     -skip-pounds
       Prevent Architect from include preprocessor source code in the model.
     -logfile:<value>
       Name of log file - warning - log files can be large and significantly impact update performance.
     -dependency_properties
       Generates diagnostic information about dependencies.  Typically disabled as this can consume a lot of memory.
     -buildspec_output_file:<value>
       Buildspec Output File
     -stalled_process_check_timeout:<value>
       Number of milliseconds to wait before considering the process to be stalled and possibly killed
     -dry_run_file:<value>
       Setting this will save compile commands to the file instead of running them.
     -useParentDs
       Use Parent Datasource
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
   Module partitioning options:
     -mergeDupAtoms
       Merge duplicate atoms
     -createFileSubsystem
       Create Subsystem for Datasources
     -createFileSubsystemDir
       Include Directory in Datasource Subsystem Name

ModuleId: dotnet
   Module input types
     dll:<file or directory>
     exe:<file or directory>
     vs-sln-file:sln_name=<value>,sln_cfg=<value>
        sln_name:Visual Studio File
        sln_cfg:Build Configuration


   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -dotnet_include_prefix:<Class Namespace Prefix>[,<Class Namespace Prefix>...]
       Include only classes with these package prefixes
     -dotnet_exclude:<value>[,<value>...]
       Exclude classes containing these strings
     -dotnet_exclude_module:<value>[,<value>...]
       Exclude <Module> fields that include these strings
     -mixeddlls
       Mixed assembly support
     -usepdb
       Read source file information from associated PDB
     -processNative
       Process Native DLLs
     -skipPrivates
       Skip private classes
     -skipGlobals
       Skip <Module> & DLL Atoms
     -usePDBLocationForPath
       Use PDB Location For Path
     -alwaysCreateMatchingExports
       Always Create Matching Exports
     -stripPrefixFromPath:<value>[,<value>...]
       Strip prefixes from assembly path
     -logfile:<File Name>
       Logfile Name
     -globalpartition:<value>
       Global partition name
   Module partitioning options:
     -mergeDupAtoms
       Merge Duplicate Atoms
     -createFileSubsystem
       Create subsystems for assemblies
     -createFileSubsystemDir
       Create Subsystems Corresponding to Directory Structure

ModuleId: excel
   Module input types
     xlsx:<file or directory>
     xls:<file or directory>

   Module loading options:
     -worksheet_name:<value>
       Name of Worksheet
     -delimiter_char:<value>
       Hierarchy Delimiter Character
     -format:[column|matrix]
       Excel Format
     -always_create_target_subsystem
       Always Create Target Subsystem
     -mit_format
       MIT Format
     -read_dependencies:[across|down]
       Read Dependencies
     -element_names_column:<value>
       Element Names Column
     -first_data_column:<value>
       First Data Column
     -first_data_row:<value>
       First Data Row

ModuleId: jama
   Module input types
     ldi.xml:<file or directory>
     xml:<file or directory>
     ldi:<file or directory>
     jamadb:url=<value>,user=<value>,password=<value>,project=<value>
        url:URL
        user:User
        password:Password
        project:Project


   Module partitioning options:
     -mergeDupAtoms
       Merge Duplicate Atoms
     -createFileSubsystem
       Create Subsystems for files
     -createFileSubsystemDir
       Create Subsystems for directory hierarchy

ModuleId: java
   Module input types
     jar:<file or directory>
     class:<file or directory>
     zip:<file or directory>

   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -dependency_line_numbers
       Enable Line Number Processing
     -java_include_pattern:<Include class pattern>[,<Include class pattern>...]
       Include only classes matching these patterns
     -java_exclude_pattern:<Exclude class pattern>[,<Exclude class pattern>...]
       Exclude classes containing these patterns
     -revision_field:<value>
       The name of the static class member field that gives revision information
     -hide_synthetic_variables
       Hide Synthetic Variables
   Module partitioning options:
     -createFileSubsystem
       Create Subsystems for Jar files/class path
     -createFileSubsystemDir
       Create Subsystems Corresponding to Directory Structure
     -ignoreDupAtoms
       Ignore Duplicate Classes/Interfaces

ModuleId: klc
   Module input types
     klc:<file or directory>
     klocworkdatabase:host=<value>,port=<value>,user=<value>,password=<value>,project=<value>,build=<value>
        host:Host
        port:Port
        user:Username
        password:Password
        project:Project
        build:Build


   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -dependency_line_numbers
       Enable Line Number Processing
     -skipHeaderRefs
       Filter references from header files to source files
     -atomsForDeclarations
       Create atoms for declarations
     -importMetrics
       Import Metrics from Klocwork
     -logQueries
       Log Sql Queries
     -filterSymbols:<value>[,<value>...]
       Skip symbols containing these substrings
     -includeSymbols:<value>[,<value>...]
       Only include symbols containing these substrings
     -removePrefix:<value>[,<value>...]
       Remove prefix from atom names
     -headerFileExts:<value>[,<value>...]
       Extensions for header files
     -logFile:<value>
       Log File Name

ModuleId: ldx
   Module input types
     ldi.xml:<file or directory>
     ldi:<file or directory>

   Module loading options:
     -logfile:<value>
       Logfile Name
     -allow_dup_atoms
       Duplicate atoms will have atom kind appended to name
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
   Module partitioning options:
     -createFileSubsystem
       Create Subsystems for Assemblies
     -createFileSubsystemDir
       Create Subsystems for Assemblies Directory

ModuleId: oracle
   Module input types
     sql:<file or directory>
     fnc:<file or directory>
     pkb:<file or directory>
     pks:<file or directory>
     trg:<file or directory>
     prc:<file or directory>
     oracledatabase:name=<value>,host=<value>,port=<value>,user=<value>,passwd=<value>,useoci=<value>
        name:SID
        host:Host
        port:Port
        user:User
        passwd:Password
        useoci:Use OCI Driver


   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -dependency_line_numbers
       Enable Line Number Processing
     -createAtomsForSynonyms
       Create Atoms For Synonyms
     -movePublicSynonyms
       This will move public synonym atoms into the schema it references.
     -processTags
       Process Tags Inside Comments
     -resolveUnknowns
       Show External References
     -filterKnownExterns
       Filter known externals
     -useDiskCache
       Use disk caching to minimize memory use
     -runSqlParser
       Parse Oracle Source Code in Database
     -runStoreSqlSource
       Store SQL Source Code in Project (to Enable View Source)

ModuleId: parasoft
   Module input types
     deps:<file or directory>

   Module loading options:
     -forceLowerCase
       Force lowercase names
     -normalize_paths
       Normalize paths
     -remove_prefix:<value>[,<value>...]
       Remove prefix
     -useParentDs
       Use Parent Datasource
   Module partitioning options:
     -ignoreDupAtoms
       Ignore duplicate atoms

ModuleId: python
   Module input types
     py:<file or directory>
     json:<file or directory>
     ldi:<file or directory>
     ldi.xml:<file or directory>

   Module loading options:
     -PYDEPS_CMD:<value>
       pydeps command
   Module partitioning options:
     -mergeDupAtoms
       Merge Duplicate Atoms
     -createFileSubsystem
       Create Subsystems for files
     -createFileSubsystemDir
       Create Subsystems for directory hierarchy

ModuleId: rhapsody
   Module input types
     rpyx:<file or directory>
     rpy:<file or directory>

   Module loading options:
     -crPartForActors
       Create "Actors&UseCases" Partition
     -crPartForCollabDiags
       Create "CollaborationDiagrams" Partition
     -crPartForClasses
       Create "Classes&Interfaces" Partition
     -crPartForComps
       Create "Components" Partition
     -crPartForDeployDiags
       Create "DeploymentDiagrams" Partition
     -crPartForEvents
       Create "Events" Partition
     -crPartForObjects
       Create "Objects" Partition
     -crPartForObjectModelDiags
       Create "ObjectModelDiagrams" Partition
     -crPartForPackages
       Create "Packages" Partition
     -crPartForSequenceDiags
       Create "SequenceDiagrams" Partition
     -crPartForStereotypes
       Create "Stereotypes" Partition
     -crPartForStructureDiags
       Create "StructureDiagrams" Partition
     -crPartForTypes
       Create "Types" Partition
     -crPartForUseCaseDiags
       Create "UseCaseDiagrams" Partition
     -skipComment
       Skip Comment and Requirement
     -skipComps
       Skip Component
     -skipEvents
       Skip Event
     -skipGlobals
       Skip Global Function and Variable
     -skipObjs
       Skip Object
     -skipObjDiags
       Skip Object Diagram
     -skipIntDiags
       Skip Sequence & Collaboration Diagram
     -skipStates
       Skip State
     -skipStereoTypes
       Skip Stereotype
     -skipStrDiags
       Skip Structure Diagram
     -skipTypes
       Skip Type
     -skipUseCases
       Skip Actor, UseCase and UseCase Diagram

ModuleId: ruby
   Module input types
     rb:<file or directory>
     json:<file or directory>

   Module loading options:
     -ruby_exe:<value>
       Ruby Executable
     -RUBROWSER_CMD:<value>
       Rubrowser command location
   Module partitioning options:
     -mergeDupAtoms
       Merge Duplicate Atoms
     -createFileSubsystem
       Create Subsystems for files
     -createFileSubsystemDir
       Create Subsystems for directory hierarchy

ModuleId: sparxea
   Module input types
     qea:<file or directory>
     eap:<file or directory>
     eapx:<file or directory>
     ldi:<file or directory>
     xml:<file or directory>
     db:connect=<value>
        connect:Connection String


   Module loading options:
     -sparxea_home:<value>
       SparxEA HOME
     -use_java_home
       Setting Java HOME to a 32 bit Java will allow support for 32 bit SparxEA
     -java_home:<value>
       Java HOME
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -skipDiagrams
       Skip all Diagrams
     -skipNotes
       Skip all Notes
     -codeElementsOnly
       Load Code Elements Only (Class, Operation, Attribute)
     -umlElementsOnly
       Load UML Elements Only
     -matchType2Class
       Match Type string to Class/Interface name
     -matchTypeWithDir2Class
       Match Type string with embedded colons (e.g. A::B::C) to Class/Interface name
     -genMessageMethods
       Generate Methods for Sequence Diagram Messages

ModuleId: sql
   Module input types
     sql:<file or directory>
     ddl:<file or directory>
     sqlserverconnection:host=<value>,port=<value>,user=<value>,password=<value>,type=<value>
        host:Server\Instance
        port:Port (optional)
        user:Username (optional)
        password:Password (optional)
        type:Database Type


   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -allMetaData
       Scan system meta-data
     -saveSource
       Store source in model
     -parseSource
       Parse SQL Source Code
     -caseSensitive
       Preserve case of identifiers
     -dbs:<value>[,<value>...]
       Process Only These Databases
     -logfile:<value>
       Debugging log file

ModuleId: understand-python
   Module input types
     und:<file or directory>
     udb:<file or directory>

   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:

ModuleId: understand-cpp
   Module input types
     und:<file or directory>
     udb:<file or directory>

   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -dependency_line_numbers
       Enable Line Number Processing
     -filterHeaderFileDependencies
       Exclude non-include header file dependencies
     -foldUnnamedIntoTypeDef
       Fold Unnamed Types into Typedefs
     -filterDuplicateGlobals
       Filter duplicate global elements
     -skipHeaderFileRefs
       Skip dependencies of header files on source files
     -cppVisibility
       Visibility filter
     -useTotalLineCount
       Use Total Line Count (including comments)
     -cppUniqueHeaders
       Ignore include references to non-unique header files.
     -scanDupNames
       Scan namespace for duplicates
     -createGlobalVarUsageProperties
       Create Global Variable Usage Properties
     -removePrefix:<value>[,<value>...]
       Remove prefix from atom names
     -filterSymbolsV6:<value>[;<value>...]
       Skip symbols matching these patterns (regexp)
     -filterFilesEnable
       Enable File Filtering
     -createDeclAtoms
       Create Atoms for Declarations
     -filterFilesList:<value>[,<value>...]
       Skip these files
     -logfile:<value>
       Log file name

ModuleId: understand-ada
   Module input types
     und:<file or directory>
     udb:<file or directory>

   Module loading options:
     -logfile:<value>
       Log file name
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -filterSymbolsV6:<value>[;<value>...]
       Skip symbols matching these patterns (regexp)
     -dependency_line_numbers
       Enable Line Number Processing

ModuleId: understand-fortran
   Module input types
     und:<file or directory>
     udb:<file or directory>

   Module loading options:
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:
     -dependency_line_numbers
       Enable Line Number Processing
     -atomsForCommonBlocks
       Create Atoms for Common Blocks

ModuleId: magicdraw
   Module input types
     mdzip:<file or directory>
     xmi:<file or directory>
     xml:<file or directory>
     uml:<file or directory>

   Module loading options:
     -removeEmptyBlocks
       Remove Empty Blocks
     -reverseSatisfyRelationship
       Reverse Satisfy Relationship
     -useMergePropName
       Use merge property name
     -mergePropName:<value>
       Merge property name
     -memberProcessing:[none|some|all]
       Member Level Processing
     -memberLevel:<value>[,<value>...]
       Load Members for Specified Elements:

ModuleId: xmi
   Module input types
     xmi:<file or directory>
     xml:<file or directory>
     uml:<file or directory>

   Module loading options:
     -skipInteractions
       Skip Interaction
     -skipUseCases
       Skip UseCase
     -skipTypes
       Skip Type
     -skipStates
       Skip State
     -skipSignals
       Skip Signal
     -skipProfiles
       Skip Profile

File Format#

FileFormat:
  txt,xml,html,excel

Success or Failure#

LDCUpdate returns a failure code when it has been unable to complete its processing.