From fb19759a5c2303b87071232c3ad36baea398f81f Mon Sep 17 00:00:00 2001 From: alekseevk1 <73096235+alekseevk1@users.noreply.github.com> Date: Sat, 9 Mar 2024 07:33:09 +0300 Subject: [PATCH] add bold relevant env_comments (#56) --- scripts/mea/et/internal_witness.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/mea/et/internal_witness.py b/scripts/mea/et/internal_witness.py index 2eec0af..28468c0 100644 --- a/scripts/mea/et/internal_witness.py +++ b/scripts/mea/et/internal_witness.py @@ -272,8 +272,15 @@ def process_verifier_notes(self): edge['note'] = self.process_comment(note) elif file_id in self._env_models_json and start_line in self._env_models_json[file_id]: env = self._env_models_json[file_id][start_line] - self._logger.debug(f"Add EMG comment '{env}' for operation from '{file}:{start_line}'") - edge['env'] = self.process_comment(env) + comment = env["comment"] + + relevant = env.get("relevant", False) + + #TODO add remaining + self._logger.debug(f"Add EMG comment '{comment}' for operation from '{file}:{start_line}'") + self._logger.debug(f"Comment argument: relevant={relevant}") + edge['env'] = self.process_comment(comment) + edge['env_relevant'] = relevant del self._env_models_json[file_id][start_line] elif file_id in self._asserts and start_line in self._asserts[file_id]: warn = self._asserts[file_id][start_line] @@ -327,8 +334,7 @@ def _parse_model_comments(self): if "comment" in data: if file_id not in self._env_models_json: self._env_models_json[file_id] = {} - self._env_models_json[file_id][line + 1] = data["comment"] - # TODO: parse other arguments as well + self._env_models_json[file_id][line + 1] = data # Match rest comments match = re.search(