Commit 710fcdfa authored by Mark Lawford's avatar Mark Lawford
Browse files

Merge branch 'purge_and_sanitize' into 'master'

Purge and sanitize table storage format

This is a patch against the latest stable to prepare it for the SimCheck work.  Currently the table has a mixture of how text entries are stored, for no apparent reason.  Examples include this mixture, so it does appear to be a useless difference.  This version introduces a way to upgrade tables, and makes use of that to remove a redundant cell array for TE's generated with the tool.  There should be no functional difference.

Also, this includes a commit to remove changes that would occur to the table upon an open/close cycle, even though the table wouldn't actually change.  This just makes the table behave better in the context of a SCM.

I've updated the version numbers, and it would be good to get this out there now so that the SimCheck work can be used against tables sooner, without having to re-save as many tables.
parents e3a02fac 543c6389
Loading
Loading
Loading
Loading

@Cell/purge.m

0 → 100644
+19 −0
Original line number Diff line number Diff line
%% purge
%    Removes useless data from the block on saving, avoiding unnecessary
%    changes and data storage.
% inputs:
%   object - Cell object
% outputs:
%   none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function  purge( object )
object.grid_pb = [];
object.cond = [];
object.color = []; % This is always regenerated, so it is safe to kill.

for i=1:size(object.subgrid,2)
    object.subgrid(i).purge;
end
end

@Cell/upgrade.m

0 → 100644
+18 −0
Original line number Diff line number Diff line
%% upgrade
%    Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
%   object - Cell object
% outputs:
%   none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function  upgrade( object )
if iscell(object.cond_text)
    object.cond_text = object.cond_text{1};
end

for i=1:size(object.subgrid,2)
    object.subgrid(i).upgrade;
end
end

@Data/purge.m

0 → 100644
+16 −0
Original line number Diff line number Diff line
%% purge
%    Removes useless data from the block on saving, avoiding unnecessary
%    changes and data storage.
% inputs:
%   object - Data object
% outputs:
%   none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function purge( object )
object.Grid0.purge

object.Grid1.purge
object.Grid2.purge
end

@Data/upgrade.m

0 → 100644
+15 −0
Original line number Diff line number Diff line
%% upgrade
%    Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
%   object - Data object
% outputs:
%   none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
object.Grid0.upgrade

object.Grid1.upgrade
object.Grid2.upgrade
end
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ classdef GUI < handle
        multi_opt_out = [];
        prover_opt_pvs = [];
        prover_opt_cvc = [];
        version = '0.7.1';
        version = '0.7.2';
        undo_man = [];
        undo_opt = [];
        redo_opt = [];
Loading