def test_fuse_parameter(): tiling = Tiling( obstructions=( GriddedPerm((0, ), ((0, 0), )), GriddedPerm((0, ), ((0, 2), )), GriddedPerm((0, ), ((1, 0), )), GriddedPerm((0, ), ((1, 1), )), GriddedPerm((0, ), ((2, 0), )), GriddedPerm((0, ), ((2, 1), )), GriddedPerm((0, ), ((3, 0), )), GriddedPerm((0, ), ((3, 2), )), GriddedPerm((1, 0), ((3, 1), (3, 1))), GriddedPerm((0, 1, 2), ((0, 1), (0, 1), (1, 2))), GriddedPerm((0, 1, 2), ((0, 1), (0, 1), (2, 2))), GriddedPerm((0, 2, 1), ((0, 1), (0, 1), (0, 1))), GriddedPerm((0, 2, 1), ((0, 1), (0, 1), (3, 1))), GriddedPerm((0, 2, 1), ((1, 2), (1, 2), (1, 2))), GriddedPerm((0, 2, 1), ((1, 2), (1, 2), (2, 2))), GriddedPerm((0, 2, 1), ((1, 2), (2, 2), (2, 2))), GriddedPerm((0, 2, 1), ((2, 2), (2, 2), (2, 2))), GriddedPerm((1, 0, 2), ((1, 2), (1, 2), (1, 2))), GriddedPerm((1, 0, 2), ((1, 2), (1, 2), (2, 2))), GriddedPerm((1, 0, 2), ((1, 2), (2, 2), (2, 2))), GriddedPerm((1, 0, 2), ((2, 2), (2, 2), (2, 2))), ), requirements=((GriddedPerm( (0, ), ((2, 2), )), GriddedPerm((0, ), ((3, 2), ))), ), assumptions=(), ) strategy = FusionStrategy(col_idx=1, tracked=True) assert strategy._fuse_parameter(tiling) == "k_0" rule = strategy(tiling) assert isinstance(rule.constructor, FusionConstructor)
def test_indexed_backward_map(): r = FusionStrategy(col_idx=0, tracked=True)(Tiling( obstructions=( GriddedPerm((0, 1), ((0, 0), (0, 0))), GriddedPerm((0, 1), ((0, 0), (1, 0))), GriddedPerm((0, 1), ((1, 0), (1, 0))), GriddedPerm((0, 1, 2), ((0, 0), (2, 0), (2, 0))), GriddedPerm((0, 1, 2), ((1, 0), (2, 0), (2, 0))), GriddedPerm((0, 1, 2), ((2, 0), (2, 0), (2, 0))), ), requirements=(), assumptions=(TrackingAssumption((GriddedPerm((0, ), ((0, 0), )), )), ), )) order = [ GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((1, 0), (1, 0), (1, 0), (1, 0), (1, 0), (1, 0), (2, 0)), ), GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (1, 0), (1, 0), (1, 0), (1, 0), (1, 0), (2, 0)), ), GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (1, 0), (1, 0), (1, 0), (1, 0), (2, 0)), ), GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (0, 0), (1, 0), (1, 0), (1, 0), (2, 0)), ), GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (0, 0), (0, 0), (1, 0), (1, 0), (2, 0)), ), GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (1, 0), (2, 0)), ), GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (2, 0)), ), ] gp = GriddedPerm((6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (1, 0))) assert all( r.indexed_backward_map((gp, ), i) == target for i, target in enumerate(order)) assert all( r.indexed_backward_map((gp, ), i, True) == target for i, target in enumerate(reversed(order)))
def test_test_positive_reverse_fusion(): t = Tiling( obstructions=[ GriddedPerm((0, 1), [(0, 0), (0, 0)]), GriddedPerm((0, 1), [(0, 0), (1, 0)]), GriddedPerm((0, 1), [(1, 0), (1, 0)]), ], requirements=[[GriddedPerm((0, ), [(0, 0)])]], assumptions=[TrackingAssumption([GriddedPerm((0, ), [(0, 0)])])], ) rule = FusionStrategy(col_idx=0, tracked=True)(t) assert rule.is_reversible() reverse_rule = rule.to_reverse_rule(0) with pytest.raises(NotImplementedError): reverse_rule.sanity_check(4)
def fusion() -> dict: """Apply fusion strategy to given tiling.""" tiling, verification_tactics, idx, row = _fusion_input() arguments = (idx, None, True) if row else (None, idx, True) try: rule = FusionStrategy(*arguments)(tiling) except StrategyDoesNotApply as exc: raise BadRequest() from exc return rule_as_json(rule, verification_tactics)
def test_positive_fusion(): tiling = Tiling([ GriddedPerm(Perm((0, 1, 2)), [(0, 0), (0, 0), (0, 0)]), GriddedPerm(Perm((0, 1, 2)), [(0, 0), (0, 0), (1, 0)]), GriddedPerm(Perm((0, 1, 2)), [(0, 0), (1, 0), (1, 0)]), GriddedPerm(Perm((0, 1, 2)), [(1, 0), (1, 0), (1, 0)]), ]) positive_left = tiling.insert_cell((0, 0)) positive_right = tiling.insert_cell((1, 0)) positive_both = tiling.insert_cell((0, 0)).insert_cell((1, 0)) strategy = FusionStrategy(col_idx=0, tracked=True) rule = strategy(tiling) assert rule.children == (Tiling( obstructions=(GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 0))), ), requirements=(), assumptions=(TrackingAssumption((GriddedPerm(Perm((0, )), ((0, 0), )), )), ), ), ) rule = strategy(positive_left) assert rule.children == (Tiling( obstructions=(GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 0))), ), requirements=((GriddedPerm(Perm((0, )), ((0, 0), )), ), ), assumptions=(TrackingAssumption((GriddedPerm(Perm((0, )), ((0, 0), )), )), ), ), ) rule = strategy(positive_right) assert rule.children == (Tiling( obstructions=(GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 0))), ), requirements=((GriddedPerm(Perm((0, )), ((0, 0), )), ), ), assumptions=(TrackingAssumption((GriddedPerm(Perm((0, )), ((0, 0), )), )), ), ), ) rule = strategy(positive_both) assert rule.children == (Tiling( obstructions=(GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 0))), ), requirements=(( GriddedPerm(Perm((0, 1)), ((0, 0), (0, 0))), GriddedPerm(Perm((1, 0)), ((0, 0), (0, 0))), ), ), assumptions=(TrackingAssumption((GriddedPerm(Perm((0, )), ((0, 0), )), )), ), ), )
def test_indexed_forward_map(): assert FusionStrategy(col_idx=0, tracked=True)(Tiling( obstructions=( GriddedPerm((0, 1), ((0, 0), (0, 0))), GriddedPerm((0, 1), ((0, 0), (1, 0))), GriddedPerm((0, 1), ((1, 0), (1, 0))), GriddedPerm((0, 1, 2), ((0, 0), (2, 0), (2, 0))), GriddedPerm((0, 1, 2), ((1, 0), (2, 0), (2, 0))), GriddedPerm((0, 1, 2), ((2, 0), (2, 0), (2, 0))), ), requirements=(), assumptions=(TrackingAssumption((GriddedPerm((0, ), ((0, 0), )), )), ), )).indexed_forward_map( GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (0, 0), (1, 0), (1, 0), (1, 0), (2, 0)), )) == ( (GriddedPerm( (6, 5, 4, 3, 1, 0, 2), ((0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (1, 0)), ), ), 3, )
basis=[Perm((0, 1, 2)), Perm((2, 1, 0, 3))], ignore_parent=True), OneByOneVerificationStrategy( basis=[Perm((2, 1, 0, 3))], ignore_parent=False, symmetry=True), OneByOneVerificationStrategy( basis=[], ignore_parent=False, symmetry=False), OneByOneVerificationStrategy( basis=None, ignore_parent=False, symmetry=False), ] + pointonly_partial_ignoreparent_dirs(PatternPlacementFactory) + ignoreparent(RequirementCorroborationFactory) + gps_ignoreparent(RequirementInsertionStrategy) + gps_indices_direction_owncol_ownrow_ignoreparent_includeempty( RequirementPlacementStrategy) + maxreqlen_extrabasis_ignoreparent_maxnumreq(RootInsertionFactory) + row_col_partial_ignoreparent_direction(RowAndColumnPlacementFactory) + [RowColumnSeparationStrategy(), SubobstructionInferralFactory()] + [FusionStrategy(row_idx=1)] + [FusionStrategy(col_idx=3)] + [ComponentFusionStrategy(row_idx=1)] + [ComponentFusionStrategy(col_idx=3)] + [ComponentFusionStrategy(col_idx=3)] + [FusionFactory()] + [ComponentFusionFactory()] + [ ObstructionInferralStrategy( [GriddedPerm(Perm((0, 1, 2)), ((0, 0), (1, 1), (1, 2)))]) ] + [ SplittingStrategy(), SplittingStrategy("none"), SplittingStrategy("monotone"), SplittingStrategy("all"), ]) # TODO add tests for: ComponentFusionStrategy, FusionStrategy
FusionStrategy(col_idx=1, tracked=True)( Tiling( obstructions=( GriddedPerm((0,), ((0, 0),)), GriddedPerm((0,), ((1, 0),)), GriddedPerm((0,), ((1, 1),)), GriddedPerm((0,), ((2, 0),)), GriddedPerm((0,), ((2, 1),)), GriddedPerm((0,), ((3, 1),)), GriddedPerm((0,), ((3, 2),)), GriddedPerm((0, 1), ((1, 2), (1, 2))), GriddedPerm((0, 1), ((1, 2), (2, 2))), GriddedPerm((0, 1), ((2, 2), (2, 2))), GriddedPerm((0, 1), ((3, 0), (3, 0))), GriddedPerm((0, 1, 2), ((0, 1), (0, 1), (0, 2))), GriddedPerm((0, 1, 2), ((0, 1), (0, 2), (0, 2))), GriddedPerm((0, 1, 2), ((0, 1), (0, 2), (1, 2))), GriddedPerm((0, 1, 2), ((0, 1), (0, 2), (2, 2))), GriddedPerm((0, 2, 1), ((0, 1), (0, 1), (0, 1))), GriddedPerm((0, 2, 1), ((0, 1), (1, 2), (1, 2))), GriddedPerm((0, 2, 1), ((0, 1), (1, 2), (2, 2))), GriddedPerm((0, 2, 1), ((0, 1), (2, 2), (2, 2))), GriddedPerm((1, 0, 2), ((0, 2), (0, 1), (1, 2))), GriddedPerm((1, 0, 2), ((0, 2), (0, 1), (2, 2))), GriddedPerm((2, 0, 1), ((0, 1), (0, 1), (0, 1))), GriddedPerm((0, 1, 3, 2), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm((0, 1, 3, 2), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm((0, 1, 3, 2), ((0, 2), (0, 2), (0, 2), (2, 2))), GriddedPerm((0, 1, 3, 2), ((0, 2), (0, 2), (1, 2), (1, 2))), GriddedPerm((0, 1, 3, 2), ((0, 2), (0, 2), (1, 2), (2, 2))), GriddedPerm((0, 1, 3, 2), ((0, 2), (0, 2), (2, 2), (2, 2))), GriddedPerm((0, 2, 1, 3), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm((0, 2, 1, 3), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm((0, 2, 1, 3), ((0, 2), (0, 2), (0, 2), (2, 2))), GriddedPerm((0, 2, 3, 1), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm((0, 2, 3, 1), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm((0, 2, 3, 1), ((0, 2), (0, 2), (0, 2), (2, 2))), GriddedPerm((0, 2, 3, 1), ((0, 2), (0, 2), (1, 2), (1, 2))), GriddedPerm((0, 2, 3, 1), ((0, 2), (0, 2), (1, 2), (2, 2))), GriddedPerm((0, 2, 3, 1), ((0, 2), (0, 2), (2, 2), (2, 2))), GriddedPerm((2, 0, 1, 3), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm((2, 0, 1, 3), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm((2, 0, 1, 3), ((0, 2), (0, 2), (0, 2), (2, 2))), ), requirements=( (GriddedPerm((0,), ((1, 2),)),), (GriddedPerm((0,), ((2, 2),)),), (GriddedPerm((0,), ((3, 0),)),), ), assumptions=( TrackingAssumption( ( GriddedPerm((0,), ((2, 2),)), GriddedPerm((0,), ((3, 0),)), ) ), ), ) ),
def col_fusion(small_tiling): return FusionStrategy(col_idx=0)(small_tiling)
def row_fusion(small_tiling): return FusionStrategy(row_idx=0)(small_tiling)
def col_fusion(small_tiling): return FusionStrategy(col_idx=0, tracked=True)(small_tiling)
def row_fusion(small_tiling): return FusionStrategy(row_idx=0, tracked=True)(small_tiling)
def reverse_fusion_rules(): t = Tiling( obstructions=( GriddedPerm((0, 1, 2), ((1, 0), (1, 0), (1, 0))), GriddedPerm((0, 1, 2), ((1, 0), (1, 0), (2, 0))), GriddedPerm((0, 1, 2), ((1, 0), (1, 0), (3, 0))), GriddedPerm((0, 1, 2), ((1, 0), (1, 0), (4, 0))), GriddedPerm((0, 1, 2), ((1, 0), (2, 0), (2, 0))), GriddedPerm((0, 1, 2), ((1, 0), (2, 0), (3, 0))), GriddedPerm((0, 1, 2), ((1, 0), (2, 0), (4, 0))), GriddedPerm((0, 1, 2), ((1, 0), (3, 0), (3, 0))), GriddedPerm((0, 1, 2), ((1, 0), (3, 0), (4, 0))), GriddedPerm((0, 1, 2), ((1, 0), (4, 0), (4, 0))), GriddedPerm((0, 1, 2), ((2, 0), (2, 0), (2, 0))), GriddedPerm((0, 1, 2), ((2, 0), (2, 0), (3, 0))), GriddedPerm((0, 1, 2), ((2, 0), (2, 0), (4, 0))), GriddedPerm((0, 1, 2), ((2, 0), (3, 0), (3, 0))), GriddedPerm((0, 1, 2), ((2, 0), (3, 0), (4, 0))), GriddedPerm((0, 1, 2), ((2, 0), (4, 0), (4, 0))), GriddedPerm((0, 1, 2), ((3, 0), (3, 0), (3, 0))), GriddedPerm((0, 1, 2), ((3, 0), (3, 0), (4, 0))), GriddedPerm((0, 1, 2), ((3, 0), (4, 0), (4, 0))), GriddedPerm((0, 1, 2), ((4, 0), (4, 0), (4, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (0, 0), (0, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (0, 0), (1, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (0, 0), (2, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (0, 0), (3, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (0, 0), (4, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (1, 0), (1, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (1, 0), (2, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (1, 0), (3, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (1, 0), (4, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (2, 0), (2, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (2, 0), (3, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (2, 0), (4, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (3, 0), (3, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (3, 0), (4, 0))), GriddedPerm((0, 1, 2, 3), ((0, 0), (0, 0), (4, 0), (4, 0))), ), requirements=(), assumptions=(), ) left_overlap = TrackingAssumption.from_cells([(0, 0), (1, 0)]) left = TrackingAssumption.from_cells([(1, 0)]) right = TrackingAssumption.from_cells([(2, 0)]) right_overlap = TrackingAssumption.from_cells([(2, 0), (3, 0)]) # Only track left of the fuse region t1 = t.add_assumptions([left_overlap, right_overlap, left]) yield FusionStrategy(col_idx=1, tracked=True)(t1).to_reverse_rule(0) # Only track right of the fuse region t2 = t.add_assumptions([left_overlap, right_overlap, right]) yield FusionStrategy(col_idx=1, tracked=True)(t2).to_reverse_rule(0) # Only track the bottom of the fuse region yield FusionStrategy(row_idx=1, tracked=True)(t1.rotate270()).to_reverse_rule(0) # Only track the top of the fuse region yield FusionStrategy(row_idx=1, tracked=True)(t2.rotate270()).to_reverse_rule(0) # Track both side of the fuse region t3 = t.add_assumptions([left_overlap, right_overlap, left, right]) yield FusionStrategy(col_idx=1, tracked=True)(t3).to_reverse_rule(0) yield FusionStrategy(row_idx=1, tracked=True)(t3.rotate270()).to_reverse_rule(0)
def rules_to_check(): return [ RequirementInsertionStrategy( gps=frozenset({GriddedPerm(Perm((0, )), ((0, 0), ))}), ignore_parent=True)(Tiling( obstructions=( GriddedPerm(Perm((0, 1)), ((0, 0), (0, 0))), GriddedPerm(Perm((0, 1)), ((0, 0), (1, 0))), GriddedPerm(Perm((0, 1)), ((1, 0), (1, 0))), GriddedPerm(Perm((1, 0)), ((0, 0), (1, 0))), GriddedPerm(Perm((1, 0)), ((1, 0), (1, 0))), ), requirements=((GriddedPerm(Perm((0, )), ((1, 0), )), ), ), assumptions=(TrackingAssumption( (GriddedPerm(Perm((0, )), ((0, 0), )), )), ), )), RequirementInsertionStrategy( gps=frozenset({GriddedPerm(Perm((0, )), ((2, 0), ))}), ignore_parent=True)(Tiling( obstructions=( GriddedPerm(Perm((0, 1)), ((1, 0), (1, 0))), GriddedPerm(Perm((0, 1)), ((2, 0), (2, 0))), GriddedPerm(Perm((0, 1)), ((2, 0), (3, 0))), GriddedPerm(Perm((0, 1)), ((3, 0), (3, 0))), GriddedPerm(Perm((1, 0)), ((0, 0), (2, 0))), GriddedPerm(Perm((1, 0)), ((0, 0), (3, 0))), GriddedPerm(Perm((1, 0)), ((2, 0), (2, 0))), GriddedPerm(Perm((1, 0)), ((2, 0), (3, 0))), GriddedPerm(Perm((1, 0)), ((3, 0), (3, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (1, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (2, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (3, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (1, 0), (2, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (1, 0), (3, 0))), GriddedPerm(Perm((0, 2, 1)), ((0, 0), (0, 0), (1, 0))), GriddedPerm(Perm((1, 0, 2)), ((0, 0), (0, 0), (0, 0))), ), requirements=( (GriddedPerm(Perm((0, )), ((0, 0), )), ), (GriddedPerm(Perm((0, )), ((3, 0), )), ), ), assumptions=(TrackingAssumption( (GriddedPerm(Perm((0, )), ((3, 0), )), )), ), )).to_equivalence_rule().to_reverse_rule(), FusionStrategy(col_idx=1, tracked=True)(Tiling( obstructions=( GriddedPerm(Perm((0, )), ((0, 0), )), GriddedPerm(Perm((0, )), ((1, 0), )), GriddedPerm(Perm((0, )), ((1, 1), )), GriddedPerm(Perm((0, )), ((2, 0), )), GriddedPerm(Perm((0, )), ((2, 1), )), GriddedPerm(Perm((0, )), ((3, 1), )), GriddedPerm(Perm((0, )), ((3, 2), )), GriddedPerm(Perm((0, 1)), ((1, 2), (1, 2))), GriddedPerm(Perm((0, 1)), ((1, 2), (2, 2))), GriddedPerm(Perm((0, 1)), ((2, 2), (2, 2))), GriddedPerm(Perm((0, 1)), ((3, 0), (3, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 1), (0, 1), (0, 2))), GriddedPerm(Perm((0, 1, 2)), ((0, 1), (0, 2), (0, 2))), GriddedPerm(Perm((0, 1, 2)), ((0, 1), (0, 2), (1, 2))), GriddedPerm(Perm((0, 1, 2)), ((0, 1), (0, 2), (2, 2))), GriddedPerm(Perm((0, 2, 1)), ((0, 1), (0, 1), (0, 1))), GriddedPerm(Perm((0, 2, 1)), ((0, 1), (1, 2), (1, 2))), GriddedPerm(Perm((0, 2, 1)), ((0, 1), (1, 2), (2, 2))), GriddedPerm(Perm((0, 2, 1)), ((0, 1), (2, 2), (2, 2))), GriddedPerm(Perm((1, 0, 2)), ((0, 2), (0, 1), (1, 2))), GriddedPerm(Perm((1, 0, 2)), ((0, 2), (0, 1), (2, 2))), GriddedPerm(Perm((2, 0, 1)), ((0, 1), (0, 1), (0, 1))), GriddedPerm(Perm((0, 1, 3, 2)), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm(Perm((0, 1, 3, 2)), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm(Perm((0, 1, 3, 2)), ((0, 2), (0, 2), (0, 2), (2, 2))), GriddedPerm(Perm((0, 1, 3, 2)), ((0, 2), (0, 2), (1, 2), (1, 2))), GriddedPerm(Perm((0, 1, 3, 2)), ((0, 2), (0, 2), (1, 2), (2, 2))), GriddedPerm(Perm((0, 1, 3, 2)), ((0, 2), (0, 2), (2, 2), (2, 2))), GriddedPerm(Perm((0, 2, 1, 3)), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm(Perm((0, 2, 1, 3)), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm(Perm((0, 2, 1, 3)), ((0, 2), (0, 2), (0, 2), (2, 2))), GriddedPerm(Perm((0, 2, 3, 1)), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm(Perm((0, 2, 3, 1)), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm(Perm((0, 2, 3, 1)), ((0, 2), (0, 2), (0, 2), (2, 2))), GriddedPerm(Perm((0, 2, 3, 1)), ((0, 2), (0, 2), (1, 2), (1, 2))), GriddedPerm(Perm((0, 2, 3, 1)), ((0, 2), (0, 2), (1, 2), (2, 2))), GriddedPerm(Perm((0, 2, 3, 1)), ((0, 2), (0, 2), (2, 2), (2, 2))), GriddedPerm(Perm((2, 0, 1, 3)), ((0, 2), (0, 2), (0, 2), (0, 2))), GriddedPerm(Perm((2, 0, 1, 3)), ((0, 2), (0, 2), (0, 2), (1, 2))), GriddedPerm(Perm((2, 0, 1, 3)), ((0, 2), (0, 2), (0, 2), (2, 2))), ), requirements=( (GriddedPerm(Perm((0, )), ((1, 2), )), ), (GriddedPerm(Perm((0, )), ((2, 2), )), ), (GriddedPerm(Perm((0, )), ((3, 0), )), ), ), assumptions=(TrackingAssumption(( GriddedPerm(Perm((0, )), ((2, 2), )), GriddedPerm(Perm((0, )), ((3, 0), )), )), ), )), RequirementInsertionStrategy( gps=frozenset({GriddedPerm(Perm((0, )), ((0, 2), ))}), ignore_parent=True)(Tiling( obstructions=( GriddedPerm(Perm((0, 1)), ((0, 1), (0, 1))), GriddedPerm(Perm((0, 1)), ((0, 1), (0, 2))), GriddedPerm(Perm((0, 1)), ((0, 2), (0, 2))), GriddedPerm(Perm((1, 0)), ((0, 1), (0, 0))), GriddedPerm(Perm((1, 0)), ((0, 1), (0, 1))), GriddedPerm(Perm((1, 0)), ((0, 2), (0, 0))), GriddedPerm(Perm((1, 0)), ((0, 2), (0, 1))), GriddedPerm(Perm((1, 0)), ((0, 2), (0, 2))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 0))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 1))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (0, 2))), GriddedPerm(Perm((0, 2, 1)), ((0, 0), (0, 0), (0, 0))), GriddedPerm(Perm((1, 2, 0)), ((0, 0), (0, 0), (0, 0))), ), requirements=((GriddedPerm(Perm((0, )), ((0, 1), )), ), ), assumptions=(TrackingAssumption( (GriddedPerm(Perm((0, )), ((0, 2), )), )), ), )).to_equivalence_rule().to_reverse_rule(), ]