www.gusucode.com > polyspace_bf 案例源码 matlab代码程序 > polyspace_bf/CopyBugFinderSettingsToCodeProverObjectExample.m

    %% Copy Bug Finder Settings to Code Prover Options Object
% This example shows how to set the properties of a Code Prover options
% object by using a Bug Finder object.

%%
% Create a Bug Finder object and set properties.
optsBF = polyspace.BugFinderOptions();
optsBF.Prog = 'DataRaceProject';
optsBF.Sources = {'datarace.c'};
optsBF.TargetCompiler.Compiler = 'diab' 

%% 
% Create a Code Prover object and use copyTo to copy over options from
% optsBF.
optsCP = polyspace.CodeProverOptions();
copyTo(optsBF, optsCP)