Commit 05654341 authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Move CVC3 to use the table name for its generated file.

Instead of special parsing the function name, use the table name as the CVC3
file's name.  Eventually it will be parsed the same anyways.  Also avoid
setting the filename after using it, avoiding unnecessary duplication.
parent e616118d
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -13,9 +13,6 @@

function [ filename, queries ] = generate_file( object )

function_names = EMLGenerator.parse_inputs(object.data.function_name);
function_name = char(function_names{1}(1));

table = TableBlock.convert_table_to_java_table(object.data);

% output the input variables
@@ -26,14 +23,10 @@ code = char(object.generator.GenerateVariablesDeclaration(inputs));
[new_code,queries] = object.generate_cvc_tccs(table);
code = [code new_code];


fileid = fopen([function_name '.cvc'],'w');
filename = [char(table.getName()) '.cvc'];
fileid = fopen(filename,'w');
fprintf(fileid,'%s',char(code));
fclose(fileid);


filename = [function_name '.cvc'];


end
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ classdef BaseConversionTest < matlab.unittest.TestCase

    methods (Test)
        function testTableName(testcase)
            testcase.assertEqual(char(testcase.ConvertedTable.getTableName()), testcase.TableName);
            testcase.assertEqual(char(testcase.ConvertedTable.getName()), testcase.TableName);
        end
    end
end