Contenu principal

Analyse Bug Finder dans l’interface utilisateur de la plateforme Polyspace

Vérifier le code C/C++ pour détecter les éventuels défauts dans l’interface utilisateur de la plateforme Polyspace®

La plateforme Polyspace est un environnement intégré qui supporte l'analyse statique et les tests dynamiques du code C/C++ avec les produits Polyspace. Dans l’interface utilisateur de la plateforme Polyspace, vous pouvez créer un projet, ajouter des fichiers source, configurer des contrôleurs et exécuter une analyse Bug Finder.

Options Polyspace

développer tout

Informations de base

NameSee name of Polyspace Platform project (depuis R2024a)
AuthorSpecify author name for Polyspace Platform project (depuis R2024a)
CreatedSee date and time when Polyspace Platform project was created (depuis R2024a)
Last modifiedSee date and time when Polyspace Platform project was last modified (depuis R2024a)
Source code encoding (-sources-encoding)Specify the encoding of source files

Fichiers source et dossiers d’inclusion

Application source foldersAdd source folders to Polyspace Platform project (depuis R2024a)
Application source filesAdd source files to Polyspace Platform project (depuis R2024a)
Include pathsSpecify paths to folders containing include files (depuis R2023b)

Inclusions et exclusions de fichiers

Include file name patternsSpecify patterns for file names to be included in Polyspace Platform project (depuis R2024a)
Exclude pathsSpecify folders or files to be excluded from static analysis or testing (depuis R2024a)

Variables d’environnement

Project variablesDefine environment variables for use as shorthands in Polyspace Platform project (depuis R2024a)

Cible et compilateur

Source code language (-lang)Specify language of source files
C standard version (-c-version)Specify C language standard followed in source code
C++ standard version (-cpp-version)Specify C++ language standard followed in source code
ProcessorSelect the processor for the current build configuration
Compilation toolchain (Static Analysis)Specify the compiler that you use to build your source code for static analysis
Round down results of negative integer division (-div-round-down)Specify that your compiler rounds down a negative quotient from dividing two integers (depuis R2023b)
Pack alignment value (-pack-alignment-value)Specify default structure packing alignment for code developed in Visual C++
Shift right on signed integers as arithmetic shift (-logical-signed-right-shift)Specify that your compiler implements right shifts on signed integers as arithmetic shifts (depuis R2023b)
Preprocessor definitions (-D)Replace macros in preprocessed code
Disabled preprocessor definitions (-U)Undefine macros in preprocessed code
Forced includes (-include)Specify files to be #include-d by every source file. (depuis R2023b)
Additional include paths (-I)Specify build-specific include paths in addition to project-wide include paths (depuis R2024a)

Paramètres de l’environnement

Stop analysis if a file does not compile (-stop-if-compile-error)Specify that a compilation error must stop the analysis
Command/script to apply to preprocessed files (-post-preprocessing-command)Specify command or script to run on source files after preprocessing phase of analysis
Code from DOS or Windows file system (-dos)Consider that file paths are in MS-DOS style

Entrées et stubbing

Constraint setup (-data-range-specifications)Constrain global variables, function inputs and return values of stubbed functions
Ignore default initialization of global variables (-no-def-init-glob)Consider global variables as uninitialized unless explicitly initialized in code
Functions to stub (-functions-to-stub)Specify functions to stub during analysis
Libraries used (-library)Specify libraries that you use in your program (depuis R2021a)

Multitâche

Specify multitasking configuration using fileSpecify if you want to setup multitasking configuration by using an external file. (depuis R2023b)
External file for multitaskingSpecify which supported external file format you want to use to set up your multitasking configuration. (depuis R2023b)
Configure multitasking manuallyConsider that code is intended for multitasking
Tasks (-entry-points)Specify functions that serve as tasks to your multitasking application
Cyclic tasks (-cyclic-tasks)Specify functions that represent cyclic tasks
Interrupts (-interrupts)Specify functions that represent nonpreemptable interrupts
Disabling all interrupts (-routine-disable-interrupts -routine-enable-interrupts)Specify routines that disable and reenable interrupts.
Critical section details (-critical-section-begin -critical-section-end)Specify functions that begin and end critical sections
Temporally exclusive tasks (-temporal-exclusions-file)Specify entry point functions that cannot execute concurrently

Défauts et normes de codage

Use custom checkers fileSpecify that checkers must be specified using a checkers activation XML file. (depuis R2023b)
Checkers activation file (-checkers-activation-file)Activate a custom combination of defects and coding rules for a Polyspace Bug Finder analysis (depuis R2021a)
Use generated code requirements (-misra3-agc-mode)Check for violations of MISRA C:2012 rules and directives that apply to generated code
Use generated code requirements (-misra-c-2023-agc-mode)Check for violations of MISRA C:2023 rules and directives that apply to generated code (depuis R2024a)
Calculate code metrics (-code-metrics)Compute and display code complexity metrics
Generate results for sources and (-generate-results-for)Specify files on which you want analysis results
Do not generate results for (-do-not-generate-results-for)Specify files on which you do not want analysis results

Comportement des contrôleurs

Effective boolean types (-boolean-types)Specify data types that coding rule checker must treat as effectively Boolean
Allowed pragmas (-allowed-pragmas)Specify pragma directives that are documented
Run stricter checks considering all values of system inputs (-checks-using-system-input-values)Enable stricter checks and provide examples of values that lead to detected defect

Reporting

Generate reportSpecify whether to generate a report after the analysis
Report template (Code Prover or Bug Finder)Specify template for generating analysis report
Output format (-report-output-format)Specify output format of generated report

Paramètres de calcul

Verification time limit (-timeout)Specify a time limit on your analysis

Avancé

Command/script to apply after the end of the code verification (-post-analysis-command)Specify command or script to be executed after analysis
OtherSpecify additional command-line flags for static analysis

Commandes système

polyspace-project -diff, polyspace-project -merge(System Command) Compare and merge Polyspace Platform projects before submission to source control
polyspace-project -convert-psprj-to-workspace(System Command) Convert Polyspace project file to Polyspace Platform workspace file and project files
polyspace-project -generate-launching-script-for(System Command) Generate files needed to run static analysis on a Polyspace Platform project

Rubriques

Pour commencer

Créer et mettre à jour un projet

Configurer un projet

Contrôler les infractions aux normes de codage

Interface utilisateur de la plateforme Polyspace

Stockage de fichiers