Skip to content
Snippets Groups Projects
Commit f4848c3d authored by Colin Eles's avatar Colin Eles
Browse files

latest update copies over files from pvs_theories

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@7026 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent 5518b07d
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ object.PVS.type_mode = 1; ...@@ -20,7 +20,7 @@ object.PVS.type_mode = 1;
% copy pvs theory to pwd % copy pvs theory to pwd
copyfile(fullfile(fileparts(which('TTdiag')),'PVS_theories','matlab_types.pvs'),pwd); copyfile(fullfile(fileparts(which('TTdiag')),'PVS_theories','*'),pwd);
% inputs = regexp(object.Data.function_inputs,',','split'); % inputs = regexp(object.Data.function_inputs,',','split');
% for i=1:size(inputs,2) % for i=1:size(inputs,2)
......
...@@ -87,7 +87,17 @@ fileid = fopen([filename '.pvs'],'w'); ...@@ -87,7 +87,17 @@ fileid = fopen([filename '.pvs'],'w');
code = []; code = [];
code = sprintf('%s:THEORY\nBEGIN\n',function_name); code = sprintf('%s:THEORY\nBEGIN\n',function_name);
%code = [code sprintf('IMPORTING Funcs\n')]; %code = [code sprintf('IMPORTING Funcs\n')];
code = [code object.pvs_check_for_imports]; imports = object.pvs_check_for_imports;
if ~isempty(imports)
if ~isempty(regexp(imports,'double|single', 'once'))
% flag to copy files
error = 2;
end
end
code = [code imports];
code = [code object.user_imports]; code = [code object.user_imports];
if object.type_mode if object.type_mode
......
...@@ -16,11 +16,21 @@ output = []; ...@@ -16,11 +16,21 @@ output = [];
function_names = EMLGenerator.parse_inputs(object.data.function_name); function_names = EMLGenerator.parse_inputs(object.data.function_name);
function_name = char(function_names{1}(1)); function_name = char(function_names{1}(1));
error = object.generate_pvs_file(function_name); error = object.generate_pvs_file(function_name);
if error == 1 if error == 1
return; return;
elseif error == 2
% copy pvs files over.
copyfile(fullfile(fileparts(which('TTdiag')),'PVS_theories','*.*'),pwd);
end end
object.pvs_version = PVS_checker.get_pvs_version; object.pvs_version = PVS_checker.get_pvs_version;
......
...@@ -24,7 +24,7 @@ function string = pvs_check_for_imports(object) ...@@ -24,7 +24,7 @@ function string = pvs_check_for_imports(object)
hashtable = {{'sqrt', 'reals@sqrt'} {'sin', 'trig@trig_basic'} {'cos', 'trig@trig_basic'} {'tan', 'trig@trig_basic'}}; hashtable = {{'sqrt', 'reals@sqrt'} {'sin', 'trig@trig_basic'} {'cos', 'trig@trig_basic'} {'tan', 'trig@trig_basic'} {'double', 'double'} {'double_finite', 'double'} {'single' 'single'} {'single_finite' 'single'}} ;
% check for imports in the results grid. % check for imports in the results grid.
for i=1:size(object.data.Grid0.Cells,2) for i=1:size(object.data.Grid0.Cells,2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment