From b9a39c557625279eed37f96e66979460264da431 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 7 Oct 2021 11:23:51 +0200 Subject: [PATCH] aiger: fix forcing of input properties * spot/twaalgos/aiger.cc: Here. * tests/python/synthesis.ipynb: Adjust. --- spot/twaalgos/aiger.cc | 6 +- tests/python/synthesis.ipynb | 116 +++++++++++++++++------------------ 2 files changed, 58 insertions(+), 64 deletions(-) diff --git a/spot/twaalgos/aiger.cc b/spot/twaalgos/aiger.cc index ad10db6e9..a7c2edafc 100644 --- a/spot/twaalgos/aiger.cc +++ b/spot/twaalgos/aiger.cc @@ -1473,7 +1473,7 @@ namespace std::vector input_names_all = input_names; input_names_all.insert(input_names_all.end(), unused_ins.cbegin(), - unused_ins.cend()); + unused_ins.cend()); std::vector output_names_all = output_names; output_names_all.insert(output_names_all.end(), unused_outs.cbegin(), @@ -1872,7 +1872,7 @@ namespace spot unused_outs.push_back(ao); for (const auto& ai : ins) if (!used_aps.count(ai)) - unused_outs.push_back(ai); + unused_ins.push_back(ai); } // todo Some additional checks? return auts_to_aiger({{aut, get_synthesis_outputs(aut)}}, mode, @@ -1934,7 +1934,7 @@ namespace spot unused_outs.push_back(ao); for (const auto& ai : ins) if (!used_aps.count(ai)) - unused_outs.push_back(ai); + unused_ins.push_back(ai); return auts_to_aiger(new_vec, mode, unused_ins, unused_outs); } diff --git a/tests/python/synthesis.ipynb b/tests/python/synthesis.ipynb index 09a8febff..24efe9d8e 100644 --- a/tests/python/synthesis.ipynb +++ b/tests/python/synthesis.ipynb @@ -696,7 +696,7 @@ "\n" ], "text/plain": [ - " *' at 0x7fa0f4223360> >" + " *' at 0x7f8d9c0983f0> >" ] }, "metadata": {}, @@ -2509,7 +2509,7 @@ "\n" ], "text/plain": [ - " *' at 0x7fa0f4b39690> >" + " *' at 0x7f8d9c4f8b10> >" ] }, "execution_count": 5, @@ -2749,7 +2749,7 @@ "\n" ], "text/plain": [ - " *' at 0x7fa0f4b395a0> >" + " *' at 0x7f8d9c098510> >" ] }, "execution_count": 6, @@ -2838,7 +2838,7 @@ "\n" ], "text/plain": [ - " >" + " >" ] }, "metadata": {}, @@ -3056,7 +3056,7 @@ "\n" ], "text/plain": [ - " *' at 0x7fa0f4223090> >" + " *' at 0x7f8d9c098ed0> >" ] }, "metadata": {}, @@ -3133,7 +3133,7 @@ "\n" ], "text/plain": [ - " >" + " >" ] }, "metadata": {}, @@ -3173,27 +3173,27 @@ "\n", "\n", - "\n", + "\n", "\n", - "\n", - "\n", + "\n", + "\n", "\n", - "4\n", + "6\n", "\n", "L0_out\n", "\n", - "\n", - "\n", - "6\n", - "\n", - "6\n", + "\n", + "\n", + "8\n", + "\n", + "8\n", "\n", - "\n", + "\n", "\n", - "4->6\n", - "\n", - "\n", + "6->8\n", + "\n", + "\n", "\n", "\n", "\n", @@ -3201,71 +3201,65 @@ "\n", "i0\n", "\n", - "\n", + "\n", "\n", - "2->6\n", - "\n", - "\n", + "2->8\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "4\n", + "\n", + "i1\n", "\n", "\n", - "\n", + "\n", "L0\n", - "\n", - "L0\n", + "\n", + "L0\n", "\n", - "\n", + "\n", "\n", - "6->L0\n", - "\n", - "\n", + "8->L0\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "o0o0\n", - "\n", - "o0\n", + "\n", + "o0\n", "\n", - "\n", + "\n", "\n", - "6->o0o0:s\n", - "\n", - "\n", + "8->o0o0:s\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "o1o1\n", - "\n", - "o1\n", + "\n", + "o1\n", "\n", "\n", - "\n", + "\n", "0\n", - "\n", - "Const\n", + "\n", + "Const\n", "\n", "\n", "\n", "0->o1o1:s\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "o2i1\n", - "\n", - "i1\n", - "\n", - "\n", - "\n", - "0->o2i1:s\n", - "\n", - "\n", + "\n", + "\n", "\n", "\n", "\n" ], "text/plain": [ - " >" + " >" ] }, "metadata": {}, @@ -3424,7 +3418,7 @@ "\n" ], "text/plain": [ - " >" + " >" ] }, "metadata": {}, @@ -3536,7 +3530,7 @@ "\n" ], "text/plain": [ - " *' at 0x7fa0f4223c60> >" + " *' at 0x7f8d9c0720c0> >" ] }, "execution_count": 14,