diff options
-rw-r--r-- | lib/model.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/model.py b/lib/model.py index a75033c..7298fc4 100644 --- a/lib/model.py +++ b/lib/model.py @@ -1313,6 +1313,7 @@ class KConfigModel: self.data = list() for i in indices: self.data.append(kconfig_benchmark.data[i]) + self.kconfig_hash = kconfig_benchmark.kconfig_hash self.symbols = kconfig_benchmark.symbol_names self.choices = kconfig_benchmark.choice_names self.symbol = kconfig_benchmark.symbol @@ -1335,7 +1336,9 @@ class KConfigModel: @classmethod def from_json(cls, json_input: dict): self = cls() + assert json_input["model_type"] == "kconfig-dtree" self.attribute = json_input["attribute"] + self.kconfig_hash = json_input["kconfig_hash"] self.symbols = json_input["symbols"] self.choices = json_input["choices"] self.model = self._node_from_json(json_input["model"]) @@ -1380,6 +1383,8 @@ class KConfigModel: def to_json(self): output = { "model": self.model.to_json(), + "model_type": "kconfig-dtree", + "kconfig_hash": self.kconfig_hash, "symbols": self.symbols, "choices": self.choices, "attribute": self.attribute, |