Skip to content

Commit

Permalink
Bugfixes and renewed parser
Browse files Browse the repository at this point in the history
  • Loading branch information
robertobruttomesso committed Jan 24, 2020
1 parent efa604c commit 4d75f4e
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 1,132 deletions.
7 changes: 4 additions & 3 deletions examples/atg_1/atg_generation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import intrepyd as ip
import intrepyd.atg
import intrepyd.atg.mcdc
import intrepyd.circuit
import collections
import pandas as pd
Expand All @@ -26,8 +27,8 @@ def _mk_naked_circuit_impl(self, inputs):
if __name__ == "__main__":
ctx = ip.Context()
decisions = { 'O' : ['A', 'B'] }
tables, _ = ip.atg.compute_mcdc(ctx, CircAnd, decisions, maxDepth=10)
decision2dataframe = ip.atg.get_tables_as_dataframe(tables)
tables, _, _ = ip.atg.mcdc.compute_mcdc(ctx, CircAnd, decisions, max_depth=10)
decision2dataframe = ip.atg.mcdc.get_tables_as_dataframe(tables)
if len(decision2dataframe) != 0:
print '\nGenerated tests:'
print decision2dataframe['O']
print decision2dataframe['O']
5 changes: 3 additions & 2 deletions examples/atg_2/atg_generation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import intrepyd as ip
import intrepyd.atg
import intrepyd.atg.mcdc
import intrepyd.circuit

# The translated circuit
Expand All @@ -8,7 +9,7 @@
if __name__ == "__main__":
ctx = ip.Context()
decisions = { 'circuit/Out' : ['In1', 'In2', 'In3', 'In4', 'In5', 'In6'] }
tables, _ = ip.atg.compute_mcdc(ctx, circuit.SimulinkCircuit, decisions, maxDepth=10)
decision2dataframe = ip.atg.get_tables_as_dataframe(tables)
tables, _, _ = ip.atg.mcdc.compute_mcdc(ctx, circuit.SimulinkCircuit, decisions, max_depth=10)
decision2dataframe = ip.atg.mcdc.get_tables_as_dataframe(tables)
print '\nGenerated tests:'
print decision2dataframe['circuit/Out']
5 changes: 3 additions & 2 deletions examples/atg_3/atg_generation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import intrepyd as ip
import intrepyd.atg
import intrepyd.atg.mcdc
import intrepyd.circuit

# The translated circuit
Expand All @@ -8,7 +9,7 @@
if __name__ == "__main__":
ctx = ip.Context()
decisions = { 'circuit/Out' : ['In1', 'In2', 'In3', 'In4', 'In5'] }
tables, _ = ip.atg.compute_mcdc(ctx, circuit.SimulinkCircuit, decisions, maxDepth=10)
decision2dataframe = ip.atg.get_tables_as_dataframe(tables)
tables, _, _ = ip.atg.mcdc.compute_mcdc(ctx, circuit.SimulinkCircuit, decisions, max_depth=10)
decision2dataframe = ip.atg.mcdc.get_tables_as_dataframe(tables)
print '\nGenerated tests:'
print decision2dataframe['circuit/Out']

0 comments on commit 4d75f4e

Please sign in to comment.