Skip to content
generate_file.m 792 B
Newer Older
function [ filename, queries ] = generate_file( object )
%GENERATE_FILE Summary of this function goes here
%   Detailed explanation goes here

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


code = [];
% output the input variables
inputs = EMLGenerator.parse_inputs(object.data.function_inputs);
for i = 1:size(inputs,2)
    code = [code char(inputs{i}(1)) ':INT;' char(10)];
end


% call the recursive function to generate the queries

%generate grid 1
[new_code,queries] = CVC_checker.generate_cvc_grid(object.data.Grid2,0);
code = [code new_code];


% generate grid 2



char(code)

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


filename = [function_name '.cvc'];


end