Commit c190495e authored by Colin Eles's avatar Colin Eles
Browse files

latest update

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@5948 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent 73253b69
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ classdef GUI < handle
        mode = [];
        EMLGen = [];
        TableBlk = [];
        
        saved = [];
    end
    
    methods
@@ -239,7 +239,7 @@ classdef GUI < handle
            object.set_command_pos;
            object.reset_wh();
            object.draw_allgrids(1);
            
            object.saved = 1;
            object.setPBenable;
            
            
+10 −4
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ classdef PVS_checker < handle
    properties
      
        default_type = 'real';
        pvs_version = 4.2;
        pvs_version = [];
 
        data = [];
        mode = []; % 0 - graphical, 1 - command
@@ -275,6 +275,12 @@ classdef PVS_checker < handle
            
        end
        
        
        function version = get_pvs_version
                [status, result] = system('pvs --version');
                version = result;
        end

    end
    
    
@@ -355,7 +361,7 @@ classdef PVS_checker < handle
            % file name will be expression_name.m
            object.generate_pvs_file(object.data.function_name);
            
            
            object.pvs_version = PVS_checker.get_pvs_version;
            
            
            % THIS SECTION NEEDS SOME WORK
@@ -457,10 +463,10 @@ classdef PVS_checker < handle
                        % These parsing depend on the version of PVS used,
                        % which may be a bad idea, although pvs is not
                        
                        if object.pvs_version == 4.0
                        if strncmp(object.pvs_version,'PVS Version 4.0',15)
                        % find the TCC that was unprovable
                            search_str = sprintf('(?<=Proving formula %s[\\n]*)%s.*?(?=[ \\n]*Rerunning step)',char(found(i)),char(found(i)));
                        elseif object.pvs_version == 4.2
                        elseif strncmp(object.pvs_version,'PVS Version 4.2',15)
                            search_str =  sprintf('(?<=Installing rewrite rule singleton_rew\\s\\s)%s.*?(?=[ \\n]*Rerunning step)',char(found(i)));
                        end
                        found2 = regexp(result,char(search_str),'match','once');
+12 −0
Original line number Diff line number Diff line
@@ -78,6 +78,18 @@ function testcode_gen
        code = E.generate_eml_code;
    assertEqual(code,sprintf('function output = test(x)\n%%%%#eml\noutput=(1);\nif(x+1<2)\n  output = (1);\nelseif(x-1>6)\n  output = (2);\nend\n'));

    
    d.Grid2.new_Cell
    d.Grid2.cells(1).cond_text = 'x+1<2';
    d.Grid2.cells(2).cond_text = 'x-1>6';
    d.Grid1.cells(1).cond_text = 'y<1';
    d.Grid1.cells(2).cond_text = 'y>=1';
    d.Grid0.Cells(3).result_text = '3';
    d.Grid0.Cells(4).result_text = '4';
    code = E.generate_eml_code;
    assertEqual(code,sprintf('function output = test(x)\n%%%%#eml\noutput=(1);\nif(x+1<2)\n  if(y<1)\n    output = (1);\n  elseif(y>=1)\n    output = (2);\n  end\nelseif(x-1>6)\n  if(y<1)\n    output = (3);\n  elseif(y>=1)\n    output = (4);\n  end\nend\n'));


%     d.function_name = 'test2';
%     pre = E.generate_preamble;
%     assertEqual(pre,sprintf('function output = test2(x)\n%%%%#eml\noutput=(1);\n'));
+1 −1

File changed.

Contains only whitespace changes.