Skip to content

Multi-output AIG #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sventhijssen opened this issue Sep 26, 2022 · 2 comments
Closed

Multi-output AIG #126

sventhijssen opened this issue Sep 26, 2022 · 2 comments

Comments

@sventhijssen
Copy link

Dear,

I had a question regarding the reading of AIGs. Say I have a multi-output AIG, how do I convert this into multiple Boolean expressions (BoolExpr)?

In the examples, I only saw code for single-output AIGs:

expr10 = aiger.BoolExpr(circ)

I have tried to debug the code and change the following in the code (expr.py):

__call__ on line 23:

exprs = dict()
for output in self.output:
    exprs[output] = self.aig(inputs, lift=lift)[0][output]
return exprs

and output(self) on line 47:

def output(self):
    return self.aig.outputs

However, this does not seem to work and I have difficulty with the debugging. Could you help me further please?

Thank you in advance.
Best regards,
Sven

@mvcisback
Copy link
Owner

Hi @sventhijssen,

The BoolExpr API is designed for single output so that it has Boolean semantics.

If you are trying to doing something like word level semantics you might want to consider the wrapper library: aiger-bv: https://github.com/mvcisback/py-aiger-bv

There you can use the concat method of UnsignedBVExpr to achieve this.

@sventhijssen
Copy link
Author

Hi @mvcisback, thank you for your response and explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants