Hauptinhalt

Bug Finder-Analyse auf der Benutzeroberfläche der Polyspace-Plattform

Prüfen von C/C++ Code auf Defekte auf der Benutzeroberfläche der Polyspace®-Plattform

Die Polyspace-Plattform ist eine integrierte Umgebung, die die statische Analyse und dynamische Prüfung von C/C++ Code mit Polyspace-Produkten unterstützt. In der Benutzeroberfläche der Polyspace-Plattform können Sie ein Projekt erstellen, Quelldateien hinzufügen, Checker konfigurieren und eine Bug Finder-Analyse durchführen.

Polyspace-Optionen

alle erweitern

Grundlegende Informationen

NameSee name of Polyspace Platform project (Seit R2024a)
AutorSpecify author name for Polyspace Platform project (Seit R2024a)
ErstelltSee date and time when Polyspace Platform project was created (Seit R2024a)
Zuletzt geändertSee date and time when Polyspace Platform project was last modified (Seit R2024a)
Quellcode-Codierung (-sources-encoding)Specify the encoding of source files

Quelldateien und Include-Ordner

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

Datei-Einschlüsse und -Ausschlüsse

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

Umgebungsvariablen

ProjektvariablenDefine environment variables for use as shorthands in Polyspace Platform project (Seit R2024a)

Ziel & Compiler

Quellcode-Sprache (-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
ProzessorSelect the processor for the current build configuration
Kompilierungs-Toolchain (Static Analysis)Specify the compiler that you use to build your source code for static analysis
Ergebnisse negativer Ganzzahl-Division abrunden (-div-round-down)Specify that your compiler rounds down a negative quotient from dividing two integers (Seit R2023b)
Wert für Speicherausrichtung (-pack-alignment-value)Specify default structure packing alignment for code developed in Visual C++
Rechtsverschieben bei vorzeichbehafteter Ganzzahl (-logical-signed-right-shift)Specify that your compiler implements right shifts on signed integers as arithmetic shifts (Seit R2023b)
Präprozessor-Definitionen (-D)Replace macros in preprocessed code
Deaktivierte Präprozessor-Definitionen (-U)Undefine macros in preprocessed code
Erzwungene Einschlüsse (-include)Specify files to be #include-d by every source file. (Seit R2023b)
Zusätzliche Einschlusspfadel (-I)Specify build-specific include paths in addition to project-wide include paths (Seit R2024a)

Umgebungseinstellungen

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

Eingaben & Stubbing

Beschränkungen einstellen (-data-range-specifications)Constrain global variables, function inputs and return values of stubbed functions
Standard-Initialisierung globaler Variablen ignorieren (-no-def-init-glob)Consider global variables as uninitialized unless explicitly initialized in code
Funktionen für Stubbing (-functions-to-stub)Specify functions to stub during analysis
Benutzte Bibliotheken (-library)Specify libraries that you use in your program (Seit R2021a)

Multitasking

Multitasking-Konfiguration mithilfe von DateiSpecify if you want to setup multitasking configuration by using an external file. (Seit R2023b)
Externe Datei für MultitaskingSpecify which supported external file format you want to use to set up your multitasking configuration. (Seit R2023b)
Multitasking manuell konfigurierenConsider that code is intended for multitasking
Tasks (-entry-points)Specify functions that serve as tasks to your multitasking application
Zyklische Tasks (-cyclic-tasks)Specify functions that represent cyclic tasks
Interrupts (-interrupts)Specify functions that represent nonpreemptable interrupts
Alle Interrupts deaktivieren (-routine-disable-interrupts -routine-enable-interrupts)Specify routines that disable and reenable interrupts.
Details in kritischen Abschnitten (-critical-section-begin -critical-section-end)Specify functions that begin and end critical sections
Zeitlich exklusive Tasks (-temporal-exclusions-file)Specify entry point functions that cannot execute concurrently

Defekte und Codierungsstandards

Use custom checkers fileSpecify that checkers must be specified using a checkers activation XML file. (Seit R2023b)
Checkers activation file (-checkers-activation-file)Activate a custom combination of defects and coding rules for a Polyspace Bug Finder analysis (Seit 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 (Seit 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

Verhalten der Checker

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

Berichte

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

Berechnungseinstellungen

Zeitlimit für Verifikation (-timeout)Specify a time limit on your analysis

Erweitert

Befehl/Skript nach Abschluss der Code-Verifikation (-post-analysis-command)Specify command or script to be executed after analysis
OtherSpecify additional command-line flags for static analysis

Systembefehle

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

Themen

Erste Schritte

Erstellen und Aktualisieren von Projekten

Konfigurieren von Projekten

Prüfen auf Verstöße gegen Codierungsstandards

Benutzeroberfläche der Polyspace-Plattform

Dateispeicherung