%% generate_pvs_script
%  generate the pvs script used to prove and look for counter
%  examples for a theory. script will have name filename.el
% inputs:
%   object:PVS_checker - PVS_checker object
%   filename:string - filename to save the script as, exclude
%       extension.
% outputs:
%    none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = generate_pvs_script(object,filename,sim_types)
fileid = fopen([filename '.el'],'w');
%if sim_types == 0 
code = ['(prove-tccs-pvs-file "' filename '" "(try (try (subtype-tcc) (try (assert) (skip) (fail) ) (fail))(skip) (random-test :count ' sprintf('%ld',object.data.settings.count) ' :size ' sprintf('%d',object.data.settings.range) '))"  )' sprintf('\n')];
%else
%    code = ['(prove-tccs-pvs-file "' filename '" "(try (try (subtype-tcc) (try (assert) (skip) (fail) ) (fail))(skip) (random-test :count ' sprintf('%ld',object.data.settings.count) ' :size ' sprintf('%d',object.data.settings.range) '))"  )' sprintf('\n')];
%end
fprintf(fileid,code);
fclose(fileid);
end

