Skip to content

Commit

Permalink
Apply resolution of symbolic outputs before continuing processing
Browse files Browse the repository at this point in the history
  • Loading branch information
hanno-becker committed Mar 15, 2024
1 parent 1b70006 commit dc2d8ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion slothy/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,9 +1585,14 @@ def _dump_renaming(name,lst,inst):

def _extract_kernel_input_output(self):
dfg_log = self.logger.getChild("kernel_input_output")

conf = self.config.copy()
conf.outputs = list(map(lambda o: self._result.output_renamings.get(o, o),
conf.outputs))

self._result.kernel_input_output = list(\
DFG(self._result.code_raw, dfg_log,
DFGConfig(self.config,inputs_are_outputs=True)).inputs)
DFGConfig(conf,inputs_are_outputs=True)).inputs)

def _extract_code(self):

Expand Down
2 changes: 2 additions & 0 deletions slothy/core/heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ def periodic(body, logger, conf):
c.inputs_are_outputs = True
result = Heuristics.optimize_binsearch(body,logger.getChild("slothy"),c)

conf.outputs = list(map(lambda o: result.output_renamings.get(o,o), conf.outputs))

num_exceptional_iterations = result.num_exceptional_iterations
kernel = result.code
assert SourceLine.is_source(kernel)
Expand Down

0 comments on commit dc2d8ba

Please sign in to comment.