aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/ec/formula.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/ec/formula.py')
-rw-r--r--pyecsca/ec/formula.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pyecsca/ec/formula.py b/pyecsca/ec/formula.py
index fd58a31..9b9c213 100644
--- a/pyecsca/ec/formula.py
+++ b/pyecsca/ec/formula.py
@@ -3,6 +3,8 @@ from pkg_resources import resource_stream
from public import public
from typing import List, Any
+from .op import Op, CodeOp
+
class Formula(object):
name: str
@@ -10,7 +12,7 @@ class Formula(object):
source: str
parameters: List[str]
assumptions: List[Expression]
- code: List[Module]
+ code: List[Op]
_inputs: int
_outputs: int
@@ -42,7 +44,8 @@ class Formula(object):
def __read_op3_file(self, path):
with resource_stream(__name__, path) as f:
for line in f.readlines():
- self.code.append(parse(line.decode("ascii").replace("^", "**"), path, mode="exec"))
+ code_module = parse(line.decode("ascii").replace("^", "**"), path, mode="exec")
+ self.code.append(CodeOp(code_module))
@property
def num_inputs(self):