%% 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)
fileid = fopen([filename '.el'],'w');
code = ['(prove-tccs-pvs-file "' filename '" "(try (try (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')];

fprintf(fileid,code);
fclose(fileid);
end

