def test_blue_decrease_4_2_sub_cex_mode(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'blue_decrease.sk'), path.join(STATEFUL_ALU_DIR, 'sub.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '4', '2', '0,1,2,3', '10']), )
def test_rcp_3_2_if_else_raw_cex_mode(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'rcp.sk'), path.join(STATEFUL_ALU_DIR, 'if_else_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '3', '2', '0,1,2,3', '10']), )
def test_times_two_hole_elimination(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'times_two.sk'), path.join(STATEFUL_ALU_DIR, 'if_else_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '3', '3', '0,1,2,3', '10', '--hole-elimination']), )
def test_marple_new_flow_2_2_pred_raw_cex_mode(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'marple_new_flow.sk'), path.join(STATEFUL_ALU_DIR, 'pred_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '2', '2', '0,1,2,3', '10']), )
def test_sampling_revised_2_2_raw_cex_mode(self): self.assertEqual( 1, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'sampling_revised.sk'), path.join(STATEFUL_ALU_DIR, 'raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '2', '2', '0,1,2,3', '10']), )
def test_snap_heavy_hitter_1_1_raw_cex_mode(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'snap_heavy_hitter.sk'), path.join(STATEFUL_ALU_DIR, 'pair.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '1', '1', '0,1,2,3', '10']), )
def test_learn_filter_modified_for_test_2_2_raw_cex_mode(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'learn_filter_modified_for_test.sk'), path.join(STATEFUL_ALU_DIR, 'raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '2', '2', '0,1,2,3', '10']), )
def test_blue_decrease_2_2_sub_cex_mode_s1(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'blue_decrease.sk'), path.join(STATEFUL_ALU_DIR, 'sub.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '2', '2', '0,1,2,3', '10', '--state-groups=1', '--input-packet', '0', '1' ]), )
def test_sampling_2_1_if_else_raw_cex_mode_synthesized_alloc(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'sampling.sk'), path.join(STATEFUL_ALU_DIR, 'if_else_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '2', '1', '0,1,2,3', '10', '--synthesized-allocation']), )
def test_marple_tcp_nmo_3_2_pred_raw_cex_mode_synthesized_alloc(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'marple_tcp_nmo.sk'), path.join(STATEFUL_ALU_DIR, 'pred_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '3', '2', '0,1,2,3', '10', '--synthesized-allocation']), )
def test_blue_increase_4_2_pred_raw_cex_mode_with_dependency(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'blue_increase.sk'), path.join(STATEFUL_ALU_DIR, 'pred_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '4', '2', '0,1,2,3', '10', '--state-dependency', '1', '0' ]), )
def test_blue_increase_4_2_pred_raw_cex_mode_synthesized_alloc(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'blue_increase.sk'), path.join(STATEFUL_ALU_DIR, 'pred_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '4', '2', '0,1,2,3', '10', '--synthesized-allocation']), )
def test_snap_heavy_hitter_2_2_tofino_alu_cex_mode(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'snap_heavy_hitter.sk'), path.join(STATEFUL_ALU_DIR, 'tofino.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu_for_tofino.alu'), '--target-tofino', '1', '1', '0,1,2,3', '10' ]), )
def test_learn_filter_modified_for_test_3_1_tofino_alu_cex_mode(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'learn_filter_modified_for_test.sk'), path.join(STATEFUL_ALU_DIR, 'tofino.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu_for_tofino.alu'), '--target-tofino', '3', '1', '0,1,2,3', '10' ]), )
def test_learn_filter_modified_for_test_2_2_raw_cex_mode_synthesized_alloc(self): # noqa: E501 self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'learn_filter_modified_for_test.sk'), path.join(STATEFUL_ALU_DIR, 'raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '2', '2', '0,1,2,3', '10', '--synthesized-allocation']), )
def test_blue_increase_1_1_pred_raw_cex_mode_pkt0(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'blue_increase.sk'), path.join(STATEFUL_ALU_DIR, 'pred_raw.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '1', '1', '0,1,2,3', '10', '--pkt-fields=0', '--input-packet', '0' ]), )
def test_conga_3_4_pair_cex_mode_s0(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'conga.sk'), path.join(STATEFUL_ALU_DIR, 'pair.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu.alu'), '3', '4', '0,1,2,3', '10', '--state-groups', '0', '--input-packet', '3', '4']), )
def test_blue_increase_2_2_tofino_alu_cex_mode_s0(self): self.assertEqual( 0, iterative_solver.main([ 'iterative_solver', path.join(SPEC_DIR, 'blue_increase.sk'), path.join(STATEFUL_ALU_DIR, 'tofino.alu'), path.join(STATELESS_ALU_DIR, 'stateless_alu_for_tofino.alu'), '2', '2', '0,1,2,3', '10', '--state-groups', '1', '--target-tofino' ]), ) with open('blue_increase_tofino_stateless_alu_for_tofino_2_2.p4') as f: content = f.read() self.assertEqual(True, 'original_lo' not in content) self.assertEqual(True, 'original_hi' not in content)