Newer
Older
Colin Eles
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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