refactor: make GenericFunction accept several inputs

- remove baked constants
- manage table generation for the updated node

closes #600
closes #822
This commit is contained in:
Arthur Meyre
2021-11-03 16:14:10 +01:00
parent 7f32cf7965
commit f530a0b739
13 changed files with 206 additions and 130 deletions

View File

@@ -45,7 +45,9 @@ def test_lookup_table_encrypted_lookup(test_helpers):
x = EncryptedScalar(Integer(2, is_signed=False))
op_graph = tracing.trace_numpy_function(f, {"x": x})
assert op_graph.output_nodes[0].get_table() == [3, 6, 0, 2]
table_node = op_graph.output_nodes[0]
assert table_node.get_table(op_graph.get_ordered_preds(table_node)) == [3, 6, 0, 2]
ref_graph = nx.MultiDiGraph()
# Here is the ASCII drawing of the expected graph: