Skip to content

Commit

Permalink
fix issue related to Conditions in SF TruthTable containing back to line
Browse files Browse the repository at this point in the history
  • Loading branch information
hbourbouh committed Sep 17, 2020
1 parent 28991b9 commit 35e9bf3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@
cond = {};
for j = 1 : numel(table.Decisions{i}.Conditions)
c = table.Decisions{i}.Conditions{j};
% TODO: fix Java parser to support conditions with
% '\n'. Conditions such as "~(\n..." is not supported.
% Current fix: removing '\n' from conditions.
c_Conditions = regexprep(c.Condition, '\n', '');
if strcmp(c.ConditionValue, 'T')
cond{end+1} = sprintf('(%s)', c.Condition);
cond{end+1} = sprintf('(%s)', c_Conditions);
elseif strcmp(c.ConditionValue, 'F')
cond{end+1} = sprintf('~(%s)', c.Condition);
cond{end+1} = sprintf('~(%s)', c_Conditions);
end
end
cond_str = coco_nasa_utils.MatlabUtils.strjoin(cond, ' && ');
Expand Down

0 comments on commit 35e9bf3

Please sign in to comment.