BoiseState-AdaptLab / IEGenLib

Inspector/Executor Generation Library for manipulating sets and relations with uninterpreted function symbols.
BSD 2-Clause "Simplified" License
2 stars 4 forks source link

Handling array declarations #153

Open Aaron3154518 opened 3 years ago

Aaron3154518 commented 3 years ago

In updateSources(), we have double nu[3] = {current_values[3], current_values[4], current_values[5]};. This is a difficult statement to break up. First, it does not follow the format of type name; because double[3] nu; is not valid. We need something like store type = double[3] and then in codegenMemoryManagementString, detect the [] and split it into double and [3]. Second, we cannot initialize the array as written without the type. If we separate nu and double[3] then we have to unroll this initialization into nu[0] = current_values[3]; nu[1] = current_values[4]; nu[2] = current_values[5];