Commit 198509e0 authored by Colin Eles's avatar Colin Eles
Browse files

fixed a bug with getting the results out of pvs and evaulating them in matlab

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@5791 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent aac3fe8c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1472,7 +1472,10 @@ classdef GUI < handle
           % convienence
           for i=1:size(inputs,2)
                % set to zero
                check_string = [check_string sprintf('%s=0;\n',char(inputs(i)))];
                
                %need to parse the types out of the inputs
                inputi = regexp(char(inputs(i)),'\w*','match','once')
                check_string = [check_string sprintf('%s=0;\n',char(inputi))];
           end
           
           check_string = [check_string counter sprintf('\n')];
+3 −0
Original line number Diff line number Diff line
@@ -102,6 +102,9 @@ classdef PVS_checker < handle
        end
        
              %% matlab_to_pvs_syntax_translation
              % translate matlab syntax to pvs syntax,
              % will be added to in the future
              % will only work for functions in the prelude
        function pvs_string = matlab_to_pvs_syntax_translation(obj,matlab_string)
            pvs_string = regexprep(matlab_string,'&&',' AND ')
            pvs_string = regexprep(pvs_string,'~(?!=)',' NOT ')
+6 −1
Original line number Diff line number Diff line
@@ -205,7 +205,12 @@ classdef ValidationReport < handle
           
            else
                for i = 1:2:size(obj.PVS_results(obj.page).ce,2)
                    eval(['value = ' char(obj.PVS_results(obj.page).ce(i+1))])
                    
                    
                    % need to do some translation back to matlab syntax
                    new_value = regexprep(char(obj.PVS_results(obj.page).ce(i+1)),'FALSE',' 0 ')
                    new_value = regexprep(new_value,'TRUE',' 1 ')
                    eval(['value = ' char(new_value)])

                    counter = [counter char(obj.PVS_results(obj.page).ce(i)) ' = ' num2str(value) ';' sprintf('\n')]
                end