Skip to content
Commits on Source (13)
  • Matthew Dawson's avatar
    Update version number. · e3a02fac
    Matthew Dawson authored
    
    git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@10907 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
    e3a02fac
  • Matthew Dawson's avatar
    Avoid unnecessary changes to the Simulink block on saving. · 2e39f03e
    Matthew Dawson authored
    When the table is closed, there is lots of unnecessary data being stored in
    the block, all of which changes on the next load.  Remove that data before
    closing, to try and avoid changing the underlying storage, making the TET
    friendlier to SCMs.
    2e39f03e
  • Matthew Dawson's avatar
    Create a mechanism to upgrade the TET's data structures, and do some cleanup. · 423efd72
    Matthew Dawson authored
    The TET now has a mechanism to upgrade TE blocks to the latest data structures,
    though backwards compatibility is not currently dealt with.
    Also clear unneeded cell arrays that held text.  I'm not sure why that existed,
     and at least the quadratic example has both cell and non-cell arrays for
    holding the text, speaking to the uselessness of the array.  Thus remove the
    array as an upgrade mechanism.  This shrinks down the size of the TE blocks
    some too!
    423efd72
  • Matthew Dawson's avatar
    Update the examples against the new upgrade/purge code. · 866f5873
    Matthew Dawson authored
    Since the storage format has changed, update the examples to match.
    Also downgrade all samples to work against MATLAB 2010a, since they
    seem to have been originally created for it.
    866f5873
  • Matthew Dawson's avatar
    Update version numbers for release. · 543c6389
    Matthew Dawson authored
    Update all version numbers to 0.7.2 for release.  Also update my copyright
    to the current year.
    543c6389
  • Mark Lawford's avatar
    Merge branch 'purge_and_sanitize' into 'master' · 710fcdfa
    Mark Lawford authored
    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.
    710fcdfa
  • Matthew Dawson's avatar
    Fix critical bug that would mis-align port numbers. · e8118f0f
    Matthew Dawson authored
    When adding new inputs to a TET block, it was possible that the port numbers
    would no longer line up between the code block and the outer input ports on
    the TET block.  This would cause Simulink models to appear to be hooked up
    correctly, but misbehave when actually run.
    
    Fix by ensuring ports are always correct on save.  Both existing ports and
    new ports are always numbered to match the internal port numbers on the code
    block.  Existing connections are maintained as expected.
    
    Due to this change, it is possible that on saving a TET block connections will
    be re-arranged.  Note that these connections will have been incorrect and need
    adjustment anyways.
    e8118f0f
  • Matthew Dawson's avatar
    Update version to 0.7.3 · e16aee40
    Matthew Dawson authored
    Update version numbers for critical update to 0.7.3.
    e16aee40
  • Matthew Dawson's avatar
    Stop trying to clip text boxes. · 87fe6290
    Matthew Dawson authored
    Clipping is used to avoid having text spill on axes, clipping text boxes
    does nothing as text boxes always clip their contents.  This fixes
    MATLAB R2015a (and possibly R2014b).
    87fe6290
  • Matthew Dawson's avatar
    Update version numbers to 0.7.4 · df68c56b
    Matthew Dawson authored
    Release 0.7.4, fixing MATLAB R2014b/R2015a
    df68c56b
  • Abdulrahman elgendy's avatar
  • Abdulrahman elgendy's avatar
  • Matthew Dawson's avatar
    Merge branch 'fix_port_assignments' into 'master' · dc0f1445
    Matthew Dawson authored
    Fix some minor issues (output port misalignment + GUI errors)
    
    Closes #9 and #10
    
    See merge request !7
    dc0f1445
......@@ -87,6 +87,8 @@ for i=1:size(inports,1)
for j=1:size(in_handles,1)
if strcmp(get_param(inports(i),'Name'),get_param(in_handles(j),'Name'))
% Make sure the port numbers agree.
set_param(inports(i), 'Port', get_param(in_handles(j), 'Port'));
found = 1;
end
end
......@@ -121,6 +123,8 @@ for j = 1:size(in_handles,1)
add_block('simulink/Sources/In1',new_port);
new_port_num = sprintf('%s/1',get_param(in_handles(j),'Name'));
dest_port = sprintf('%s/%d','code',j);
% Set the port number so the ports line up properly.
set_param(new_port, 'Port', get_param(in_handles(j), 'Port'));
% sometimes line will be created automatically
try
add_line(getfullname(block_handle),new_port_num,dest_port);
......@@ -139,6 +143,10 @@ for i=1:size(outports,1)
for j=1:size(out_handles,1)
if strcmp(get_param(outports(i),'Name'),get_param(out_handles(j),'Name'))
% Set the port number so the ports line up properly.
set_param(outports(i), 'Port', get_param(out_handles(j), 'Port'));
found = 1;
end
end
......@@ -170,6 +178,10 @@ for j = 1:size(out_handles,1)
add_block('simulink/Sinks/Out1',new_port);
new_port_num = sprintf('%s/1',get_param(out_handles(j),'Name'));
dest_port = sprintf('%s/%d','code',j);
% Set the port number so the ports line up properly.
set_param(new_port, 'Port', get_param(out_handles(j), 'Port'));
try
add_line(getfullname(block_handle),dest_port,new_port_num);
end
......
%% 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
%% 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
%% 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
%% 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
......@@ -64,7 +64,7 @@ classdef GUI < handle
multi_opt_out = [];
prover_opt_pvs = [];
prover_opt_cvc = [];
version = '0.7';
version = '0.7.4';
undo_man = [];
undo_opt = [];
redo_opt = [];
......
......@@ -20,6 +20,8 @@ object.Data.fig = [];
delete(object.fig);
% remove reference to the old figure.
object.fig = [];
% Purge unnecessary information from Data
object.Data.purge;
% in simulink mode
if(object.mode == 1)
parent = get_param(object.block_handle,'Parent');
......
......@@ -19,7 +19,6 @@ control = uicontrol('style','edit',...
'min',0,'max',1,... % This is the key to multiline edits.
'string',{''},...
'Max',2.0,...
'Clipping','on',...
'fontweight','bold',...
'BackgroundColor',[1 1 1],...
'horizontalalign','center',...
......
%% purge
% Removes useless data from the block on saving, avoiding unnecessary
% changes and data storage.
% inputs:
% object - Grid object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function purge( object )
% delete(object.new_cell_pb)
% delete(object.delete_cell_pb)
object.new_cell_pb = [];
object.delete_cell_pb = [];
for i=1:size(object.cells, 2)
object.cells(i).purge
end
end
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - Grid object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
for i=1:size(object.cells, 2)
object.cells(i).upgrade
end
end
%% purge
% Removes useless data from the block on saving, avoiding unnecessary
% changes and data storage.
% inputs:
% object - RCell object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function purge( object )
object.result = [];
end
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - RCell object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
if iscell(object.result_text)
object.result_text = object.result_text{1};
end
end
......@@ -17,7 +17,7 @@ for i=1:size(object.Cells,2)
end
end
if(~isempty(deleted))
delete(object.Cells(deleted).result);
delete([object.Cells(deleted).result]);
object.Cells(deleted) = [];
end
end
......
......@@ -20,7 +20,7 @@ for i=1:size(object.Cells,2)
end
end
if(~isempty(deleted))
delete(object.Cells(deleted).result);
delete([object.Cells(deleted).result]);
object.Cells(deleted) = [];
end
end
......
%% purge
% Removes useless data from the block on saving, avoiding unnecessary
% changes and data storage.
% inputs:
% object - RGrid object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function purge( object )
for i = 1:size(object.Cells, 2)
object.Cells(i).purge;
end
end
%% upgrade
% Preforms any necessary upgrades to the TET to comply with the latest version.
% inputs:
% object - RGrid object
% outputs:
% none
% Author: Matthew Dawson <matthew@mjdsystems.ca>
% Organization: McMaster Centre for Software Certification
function upgrade( object )
for i = 1:size(object.Cells, 2)
object.Cells(i).upgrade;
end
end
......@@ -41,7 +41,6 @@ else
'units','pix',...
'min',0,'max',1,... % This is the key to multiline edits.
'Max',2.0,...
'Clipping','on',...
'fontweight','bold',...
'BackgroundColor',[1 1 1],...
'horizontalalign','center',...
......@@ -52,7 +51,6 @@ else
'units','pix',...
'min',0,'max',1,... % This is the key to multiline edits.
'Max',2.0,...
'Clipping','on',...
'fontweight','bold',...
'BackgroundColor',[1 1 1],...
'horizontalalign','left',...
......@@ -64,7 +62,6 @@ else
'units','pix',...
'min',0,'max',1,... % This is the key to multiline edits.
'Max',2.0,...
'Clipping','on',...
'fontweight','bold',...
'BackgroundColor',[1 1 1],...
'horizontalalign','left',...
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.