From 6fa34f2a545f7703d012ba3a16ddc243254e9312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20M=C3=BCller?= Date: Thu, 15 Aug 2024 16:57:53 +0200 Subject: [PATCH] Bugfixes and new test cases --- Makefile | 30 +- ut/UnitTests.cpp => benchmarks/benchmarks.cpp | 2 +- benchmarks/util/Util.cpp | 134 ++++++++ docs/_adversaries_8hpp_source.html | 9 +- docs/_analyze_8hpp_source.html | 2 +- docs/_cpu_core_selector_8hpp.html | 2 +- docs/_cpu_core_selector_8hpp_source.html | 2 +- docs/_enabler_8hpp_source.html | 2 +- docs/_fault_8cpp.html | 2 +- docs/_fault_8hpp.html | 2 +- docs/_fault_8hpp_source.html | 2 +- docs/_fault_manager_8cpp.html | 2 +- docs/_fault_manager_8hpp.html | 2 +- docs/_fault_manager_8hpp_source.html | 2 +- docs/_fault_set_8cpp.html | 2 +- docs/_fault_set_8hpp.html | 2 +- docs/_fault_set_8hpp_source.html | 2 +- docs/_file_parsing_8hpp.html | 10 +- docs/_file_parsing_8hpp_source.html | 10 +- docs/_hardware_2_definitions_8hpp_source.html | 2 +- docs/_hardware_2_execute_8hpp_source.html | 2 +- docs/_hardware_2_prepare_8hpp_source.html | 2 +- docs/_hardware_2_read_8hpp_source.html | 2 +- docs/_hardware_2_simulate_8hpp_source.html | 2 +- docs/_lib_helper_8hpp_source.html | 2 +- docs/_library_8hpp_source.html | 2 +- docs/_operation_8hpp_source.html | 2 +- docs/_operators_8hpp_source.html | 2 +- docs/_print_8hpp_source.html | 2 +- docs/_printer_8hpp_source.html | 2 +- docs/_probes_8hpp_source.html | 2 +- docs/_probing_8hpp_source.html | 7 +- docs/_probing_sets_8hpp_source.html | 69 ++-- docs/_program_options_8hpp.html | 2 +- docs/_program_options_8hpp_source.html | 2 +- docs/_propagation_8hpp_source.html | 2 +- docs/_settings_8hpp_source.html | 2 +- docs/_shared_data_8hpp.html | 2 +- docs/_shared_data_8hpp_source.html | 2 +- docs/_sharing_8hpp.html | 2 +- docs/_sharing_8hpp_source.html | 2 +- docs/_software_2_definitions_8hpp_source.html | 2 +- docs/_software_2_execute_8hpp_source.html | 2 +- docs/_software_2_prepare_8hpp_source.html | 2 +- docs/_software_2_read_8hpp_source.html | 4 +- docs/_software_2_simulate_8hpp_source.html | 2 +- docs/_stuck_at_one_fault_8hpp_source.html | 6 +- docs/_stuck_at_zero_fault_8hpp_source.html | 6 +- docs/_test_8hpp_source.html | 7 +- docs/_toggle_fault_8hpp_source.html | 2 +- docs/_truth_table_8hpp_source.html | 2 +- docs/_util_8hpp.html | 2 +- docs/_util_8hpp_source.html | 2 +- docs/annotated.html | 7 +- docs/architectures_8h_source.html | 2 +- docs/arm__functions_8h_source.html | 2 +- docs/callback__hook_8h_source.html | 2 +- docs/class_contingency_table-members.html | 2 +- docs/class_contingency_table.html | 2 +- docs/class_cpu_core_selector-members.html | 2 +- docs/class_cpu_core_selector.html | 2 +- docs/class_cterm-members.html | 2 +- docs/class_cterm.html | 2 +- docs/class_fault-members.html | 2 +- docs/class_fault.html | 4 +- docs/class_fault_manager-members.html | 2 +- docs/class_fault_manager.html | 2 +- docs/class_fault_set-members.html | 2 +- docs/class_fault_set.html | 2 +- ...lass_hardware_1_1_adversaries-members.html | 2 +- docs/class_hardware_1_1_adversaries.html | 2 +- ..._1_boolean_expression_grammar-members.html | 2 +- ...rdware_1_1_boolean_expression_grammar.html | 2 +- docs/class_hardware_1_1_cell-members.html | 2 +- docs/class_hardware_1_1_cell.html | 2 +- ...hardware_1_1_custom_operation-members.html | 2 +- docs/class_hardware_1_1_custom_operation.html | 2 +- docs/class_hardware_1_1_enabler-members.html | 2 +- docs/class_hardware_1_1_enabler.html | 2 +- ...hardware_1_1_iterate_enablers-members.html | 2 +- docs/class_hardware_1_1_iterate_enablers.html | 2 +- docs/class_hardware_1_1_library-members.html | 2 +- docs/class_hardware_1_1_library.html | 2 +- .../class_hardware_1_1_operation-members.html | 2 +- docs/class_hardware_1_1_operation.html | 2 +- docs/class_hardware_1_1_printer-members.html | 2 +- docs/class_hardware_1_1_printer.html | 2 +- docs/class_hardware_1_1_probe-members.html | 2 +- docs/class_hardware_1_1_probe.html | 2 +- ...lass_hardware_1_1_probing_set-members.html | 57 ++-- docs/class_hardware_1_1_probing_set.html | 5 +- ...lass_hardware_1_1_propagation-members.html | 4 +- docs/class_hardware_1_1_propagation.html | 8 +- ...ss_hardware_1_1_relaxed_probe-members.html | 2 +- docs/class_hardware_1_1_relaxed_probe.html | 2 +- ...lass_hardware_1_1_truth_table-members.html | 2 +- docs/class_hardware_1_1_truth_table.html | 2 +- docs/class_input_assignment-members.html | 2 +- docs/class_input_assignment.html | 2 +- ...lass_input_assignment_grammar-members.html | 2 +- docs/class_input_assignment_grammar.html | 2 +- docs/class_integer_range_grammar-members.html | 2 +- docs/class_integer_range_grammar.html | 2 +- ...rreducible_polynomial_grammar-members.html | 2 +- .../class_irreducible_polynomial_grammar.html | 2 +- docs/class_program_options-members.html | 2 +- docs/class_program_options.html | 2 +- docs/class_settings-members.html | 2 +- docs/class_settings.html | 2 +- docs/class_shared_data-members.html | 2 +- docs/class_shared_data.html | 2 +- docs/class_sharing-members.html | 2 +- docs/class_sharing.html | 2 +- docs/class_signal_name_grammar-members.html | 2 +- docs/class_signal_name_grammar.html | 2 +- docs/class_simulation-members.html | 2 +- docs/class_simulation.html | 2 +- docs/class_stuck_at_one_fault-members.html | 4 +- docs/class_stuck_at_one_fault.html | 14 +- docs/class_stuck_at_zero_fault-members.html | 4 +- docs/class_stuck_at_zero_fault.html | 14 +- docs/class_table_entry-members.html | 2 +- docs/class_table_entry.html | 2 +- docs/class_test-members.html | 6 +- docs/class_test.html | 32 +- docs/class_toggle_fault-members.html | 2 +- docs/class_toggle_fault.html | 2 +- ...ass_verilog_bitstring_grammar-members.html | 2 +- docs/class_verilog_bitstring_grammar.html | 2 +- docs/classdflipfloplw1in-members.html | 2 +- docs/classdflipfloplw1in.html | 2 +- docs/classes.html | 4 +- docs/classf1_b_o_o_m-members.html | 2 +- docs/classf1_b_o_o_m.html | 2 +- docs/classf2_b_o_o_m-members.html | 2 +- docs/classf2_b_o_o_m.html | 2 +- docs/classf3_b_o_o_m-members.html | 2 +- docs/classf3_b_o_o_m.html | 2 +- docs/classg1_b_o_o_m-members.html | 2 +- docs/classg1_b_o_o_m.html | 2 +- docs/classg2_b_o_o_m-members.html | 2 +- docs/classg2_b_o_o_m.html | 2 +- docs/classg3_b_o_o_m-members.html | 2 +- docs/classg3_b_o_o_m.html | 2 +- ...classmulator_1_1_disassembler-members.html | 2 +- docs/classmulator_1_1_disassembler.html | 2 +- docs/classmulator_1_1_emulator-members.html | 2 +- docs/classmulator_1_1_emulator.html | 2 +- ...lator_1_1_instruction_decoder-members.html | 2 +- .../classmulator_1_1_instruction_decoder.html | 2 +- docs/classshared_sbox-members.html | 2 +- docs/classshared_sbox.html | 2 +- docs/conditions_8h_source.html | 2 +- .../dir_02978a5c670a6de39aefa5c2ad315172.html | 85 +++++ .../dir_067c1e31425c569cc96ae709ed7cbad9.html | 2 +- .../dir_07ee6b359e161d082e53c1bddd9f6f3c.html | 2 +- .../dir_17ccb6e65a8faa18fb4b839e23684007.html | 2 +- .../dir_1eb6eba761fd107a7d2934b9522404f7.html | 85 +++++ .../dir_284a45cf1374c91178e60f4c86b18377.html | 85 +++++ .../dir_28b139ac6cd2270d9ac1ca107c1304cc.html | 2 +- .../dir_2b05c6c8abbc24fe80426db14f50b478.html | 85 +++++ .../dir_2f4ac48ec9be5fd02a710fb2fae885f3.html | 2 +- .../dir_37d4c7412cc6ea2d409d20ef7da6bd40.html | 2 +- .../dir_38b94b18b610d6ea718ee18d966d639d.html | 2 +- .../dir_3c1207ff778c218e30f9ce41246d36d2.html | 2 +- .../dir_42ee9a1054766c2cd10bc9802a7ac2e6.html | 85 +++++ .../dir_441bfa85196dc37044a0b7f6b7c26ead.html | 91 ++++++ .../dir_51c4c53e0a0575a6656b8a0d28b5135d.html | 85 +++++ .../dir_5774a68f23643f0635dd8e08db12bc86.html | 2 +- .../dir_6387a294215bf97f5ee5e4fab0f3b5bf.html | 85 +++++ .../dir_6a31e9c9432aa96f34fee117ccc0350c.html | 85 +++++ .../dir_6d7c311aad3a1e272bb007860a5c3acf.html | 85 +++++ .../dir_763b528a9ad606fc896f1f20a38435d2.html | 2 +- .../dir_79e89cda2f30d18e9f5bf668fb2991a5.html | 2 +- .../dir_7a694b29d9b2d3e5d2bae7478d777aa2.html | 113 +++++++ .../dir_82ce2a565ad031b841db1defb47189eb.html | 85 +++++ .../dir_83e07d7420c17933248ce08ecae4e821.html | 85 +++++ .../dir_8a11c06d2d88c5154311f227726adfc9.html | 91 ++++++ .../dir_94ed607466e0e550fe304d4ffd9e1991.html | 2 +- .../dir_9587307135a472f89adf7b5537d3037c.html | 85 +++++ .../dir_ab64df98accdf6a7856b4d9582ecbfa3.html | 85 +++++ .../dir_b0c288bb514f93e977430715c3cac813.html | 2 +- .../dir_b3ea97ccc210a30ea65990fec128d705.html | 85 +++++ .../dir_b53dde6b08e0d96f6ee9790545c672ad.html | 2 +- .../dir_c15a826b7926ee0851709f5287fed3c2.html | 2 +- .../dir_c25069843cf86c673d657dab40b083f2.html | 2 +- .../dir_c9b68666a9b924aea0812fef9b6ddf33.html | 2 +- .../dir_ee333017a7dfb067d45b2e223bebac94.html | 2 +- .../dir_f4b6cb72a16f12c9abd6b144ff30471b.html | 6 +- .../dir_f7ffc21a7214bedf19ba5dfb51268d90.html | 2 +- docs/disassembler_8h_source.html | 2 +- docs/emulator_8h_source.html | 2 +- docs/files.html | 2 +- docs/functions.html | 2 +- docs/functions_b.html | 2 +- docs/functions_c.html | 4 +- docs/functions_d.html | 2 +- docs/functions_e.html | 2 +- docs/functions_f.html | 2 +- docs/functions_func.html | 4 +- docs/functions_g.html | 2 +- docs/functions_h.html | 2 +- docs/functions_i.html | 2 +- docs/functions_k.html | 2 +- docs/functions_l.html | 2 +- docs/functions_m.html | 2 +- docs/functions_n.html | 2 +- docs/functions_o.html | 2 +- docs/functions_p.html | 2 +- docs/functions_r.html | 2 +- docs/functions_s.html | 2 +- docs/functions_t.html | 2 +- docs/functions_u.html | 2 +- docs/functions_v.html | 2 +- docs/functions_vars.html | 2 +- docs/globals.html | 2 +- docs/globals_func.html | 2 +- docs/globals_type.html | 2 +- docs/hierarchy.html | 9 +- docs/index.html | 2 +- docs/instruction_8h_source.html | 2 +- docs/instruction__decoder_8h_source.html | 2 +- docs/md__p_r_o_l_e_a_d__r_e_a_d_m_e.html | 2 +- docs/memory__region_8h_source.html | 2 +- docs/mnemonics_8h_source.html | 2 +- docs/pages.html | 2 +- docs/registers_8h_source.html | 2 +- docs/return__codes_8h_source.html | 2 +- docs/search/all_11.js | 19 +- docs/search/all_2.js | 2 +- docs/search/classes_f.js | 9 +- docs/search/functions_1.js | 2 +- docs/shift__types_8h_source.html | 2 +- ...ruct_fault_injection_settings-members.html | 2 +- docs/struct_fault_injection_settings.html | 2 +- .../struct_finite_field_settings-members.html | 2 +- docs/struct_finite_field_settings.html | 2 +- ...ruct_hardware_1_1_cell_struct-members.html | 2 +- docs/struct_hardware_1_1_cell_struct.html | 2 +- ...hardware_1_1_cell_type_struct-members.html | 2 +- .../struct_hardware_1_1_cell_type_struct.html | 2 +- ...t_hardware_1_1_circuit_struct-members.html | 2 +- docs/struct_hardware_1_1_circuit_struct.html | 2 +- ..._hardware_1_1_expression_tree-members.html | 2 +- docs/struct_hardware_1_1_expression_tree.html | 2 +- ...rdware_1_1_file_buffer_struct-members.html | 2 +- ...truct_hardware_1_1_file_buffer_struct.html | 2 +- ...hardware_1_1_operation_struct-members.html | 2 +- .../struct_hardware_1_1_operation_struct.html | 2 +- ...ct_hardware_1_1_signal_struct-members.html | 2 +- docs/struct_hardware_1_1_signal_struct.html | 2 +- docs/struct_hardware_settings-members.html | 2 +- docs/struct_hardware_settings.html | 2 +- docs/struct_include_settings-members.html | 2 +- docs/struct_include_settings.html | 2 +- docs/struct_performance_settings-members.html | 2 +- docs/struct_performance_settings.html | 2 +- ...ide_channel_analysis_settings-members.html | 2 +- ...struct_side_channel_analysis_settings.html | 2 +- docs/struct_simulation_settings-members.html | 2 +- docs/struct_simulation_settings.html | 2 +- ...ware_1_1_config_probes_struct-members.html | 2 +- ...uct_software_1_1_config_probes_struct.html | 2 +- ...re_1_1_extended_probes_struct-members.html | 2 +- ...t_software_1_1_extended_probes_struct.html | 2 +- ...ct_software_1_1_helper_struct-members.html | 2 +- docs/struct_software_1_1_helper_struct.html | 2 +- ...are_1_1_probe_tracking_struct-members.html | 2 +- ...ct_software_1_1_probe_tracking_struct.html | 2 +- ...ct_software_1_1_probes_struct-members.html | 2 +- docs/struct_software_1_1_probes_struct.html | 2 +- ...ftware_1_1_probing_set_struct-members.html | 2 +- ...truct_software_1_1_probing_set_struct.html | 2 +- ..._software_1_1_settings_struct-members.html | 2 +- docs/struct_software_1_1_settings_struct.html | 2 +- ...tings_struct_1_1_code_section-members.html | 2 +- ..._1_1_settings_struct_1_1_code_section.html | 2 +- ...tings_struct_1_1_memory_range-members.html | 2 +- ..._1_1_settings_struct_1_1_memory_range.html | 2 +- ...ftware_1_1_shared_data_struct-members.html | 2 +- ...truct_software_1_1_shared_data_struct.html | 2 +- ...oftware_1_1_simulation_struct-members.html | 2 +- ...struct_software_1_1_simulation_struct.html | 2 +- ...ruct_software_1_1_test_struct-members.html | 2 +- docs/struct_software_1_1_test_struct.html | 2 +- ..._1_1_thread_simulation_struct-members.html | 2 +- ...software_1_1_thread_simulation_struct.html | 2 +- docs/struct_software_settings-members.html | 2 +- docs/struct_software_settings.html | 2 +- ...ructmulator_1_1_c_p_u___state-members.html | 2 +- docs/structmulator_1_1_c_p_u___state.html | 2 +- ...structmulator_1_1_instruction-members.html | 2 +- docs/structmulator_1_1_instruction.html | 2 +- ...ructmulator_1_1_memory_region-members.html | 2 +- docs/structmulator_1_1_memory_region.html | 2 +- docs/types_8h_source.html | 2 +- inc/Hardware/Adversaries.hpp | 2 +- inc/Hardware/ProbingSets.hpp | 1 + src/Hardware/Adversaries.cpp | 98 ++++-- src/Hardware/Definitions.cpp | 17 +- src/Hardware/ProbingSets.cpp | 10 +- src/Hardware/Simulate.cpp | 1 - src/Util/Settings.cpp | 128 ++++---- .../aes_rp_d1_binary/aes_rp_d1_binary.cpp | 20 +- .../aes_rp_d1_binary/aes_rp_d1_binary.elf | Bin .../aes_rp_d1_binary/aes_rp_d1_binary.json | 0 .../full/aes_rp_d1_binary/aes_rp_d1_binary.ld | 0 .../aes_rp_d1_binary/aes_rp_d1_binary.map | 0 .../aes_rp_d1_binary/aes_rp_d1_binary.txt | 2 +- .../full/aes_rp_d1_ccode/aes_rp_d1_ccode.cpp | 20 +- .../full/aes_rp_d1_ccode/aes_rp_d1_ccode.json | 0 .../full/aes_rp_d1_ccode/aes_rp_d1_ccode.ld | 0 .../full/aes_rp_d1_ccode/aes_rp_d1_ccode_c.c | 0 .../full/dom_indep_d1/dom_indep_d1.cpp | 6 +- .../full/dom_indep_d1/dom_indep_d1.json | 0 .../full/dom_indep_d1/dom_indep_d1.v | 0 .../dom_indep_d1_analysis.cpp | 6 +- .../dom_indep_d1_analysis.json | 0 .../dom_indep_d1_analysis.v | 0 .../dom_indep_d1_extension.cpp | 6 +- .../dom_indep_d1_extension.json | 0 .../dom_indep_d1_extension.v | 0 .../dom_indep_d1_fault_as_probe.cpp | 6 +- .../dom_indep_d1_fault_as_probe.json | 0 .../dom_indep_d1_fault_as_probe.v | 0 .../dom_indep_d1_faulty_rand.cpp | 6 +- .../dom_indep_d1_faulty_rand.json | 2 +- .../dom_indep_d1_faulty_rand.v | 0 .../dom_indep_d1_non_flatten.cpp | 6 +- .../dom_indep_d1_non_flatten.json | 0 .../dom_indep_d1_non_flatten.v | 0 .../dom_indep_d1_placement.cpp | 6 +- .../dom_indep_d1_placement.json | 0 .../dom_indep_d1_placement.v | 0 tests/full/dom_indep_d2/dom_indep_d2.cpp | 305 ++++++++++++++++++ tests/full/dom_indep_d2/dom_indep_d2.json | 66 ++++ tests/full/dom_indep_d2/dom_indep_d2.v | 44 +++ .../full/lmdpl_and_d1/lmdpl_and_d1.cpp | 6 +- .../full/lmdpl_and_d1/lmdpl_and_d1.json | 0 .../full/lmdpl_and_d1/lmdpl_and_d1.v | 0 .../lmdpl_and_d1_3_ANDs_induce_glitch.cpp | 127 ++++++++ .../lmdpl_and_d1_3_ANDs_induce_glitch.json | 127 ++++++++ .../lmdpl_and_d1_3_ANDs_induce_glitch.v | 92 ++++++ tests/tests.cpp | 2 + {ut => tests}/util/CpuCoreSelector.cpp | 1 - {ut => tests}/util/FileParsing.cpp | 0 {ut => tests}/util/ProgramOptions.cpp | 0 {ut => tests}/util/Sharing.cpp | 0 tests/util/Util.cpp | 158 +++++++++ ut/util/Util.cpp | 244 -------------- 350 files changed, 3220 insertions(+), 784 deletions(-) rename ut/UnitTests.cpp => benchmarks/benchmarks.cpp (70%) create mode 100644 benchmarks/util/Util.cpp create mode 100644 docs/dir_02978a5c670a6de39aefa5c2ad315172.html create mode 100644 docs/dir_1eb6eba761fd107a7d2934b9522404f7.html create mode 100644 docs/dir_284a45cf1374c91178e60f4c86b18377.html create mode 100644 docs/dir_2b05c6c8abbc24fe80426db14f50b478.html create mode 100644 docs/dir_42ee9a1054766c2cd10bc9802a7ac2e6.html create mode 100644 docs/dir_441bfa85196dc37044a0b7f6b7c26ead.html create mode 100644 docs/dir_51c4c53e0a0575a6656b8a0d28b5135d.html create mode 100644 docs/dir_6387a294215bf97f5ee5e4fab0f3b5bf.html create mode 100644 docs/dir_6a31e9c9432aa96f34fee117ccc0350c.html create mode 100644 docs/dir_6d7c311aad3a1e272bb007860a5c3acf.html create mode 100644 docs/dir_7a694b29d9b2d3e5d2bae7478d777aa2.html create mode 100644 docs/dir_82ce2a565ad031b841db1defb47189eb.html create mode 100644 docs/dir_83e07d7420c17933248ce08ecae4e821.html create mode 100644 docs/dir_8a11c06d2d88c5154311f227726adfc9.html create mode 100644 docs/dir_9587307135a472f89adf7b5537d3037c.html create mode 100644 docs/dir_ab64df98accdf6a7856b4d9582ecbfa3.html create mode 100644 docs/dir_b3ea97ccc210a30ea65990fec128d705.html rename {ut => tests}/full/aes_rp_d1_binary/aes_rp_d1_binary.cpp (92%) rename {ut => tests}/full/aes_rp_d1_binary/aes_rp_d1_binary.elf (100%) rename {ut => tests}/full/aes_rp_d1_binary/aes_rp_d1_binary.json (100%) rename {ut => tests}/full/aes_rp_d1_binary/aes_rp_d1_binary.ld (100%) rename {ut => tests}/full/aes_rp_d1_binary/aes_rp_d1_binary.map (100%) rename {ut => tests}/full/aes_rp_d1_binary/aes_rp_d1_binary.txt (99%) rename {ut => tests}/full/aes_rp_d1_ccode/aes_rp_d1_ccode.cpp (92%) rename {ut => tests}/full/aes_rp_d1_ccode/aes_rp_d1_ccode.json (100%) rename {ut => tests}/full/aes_rp_d1_ccode/aes_rp_d1_ccode.ld (100%) rename {ut => tests}/full/aes_rp_d1_ccode/aes_rp_d1_ccode_c.c (100%) rename {ut => tests}/full/dom_indep_d1/dom_indep_d1.cpp (97%) rename {ut => tests}/full/dom_indep_d1/dom_indep_d1.json (100%) rename {ut => tests}/full/dom_indep_d1/dom_indep_d1.v (100%) rename {ut => tests}/full/dom_indep_d1_analysis/dom_indep_d1_analysis.cpp (97%) rename {ut => tests}/full/dom_indep_d1_analysis/dom_indep_d1_analysis.json (100%) rename {ut => tests}/full/dom_indep_d1_analysis/dom_indep_d1_analysis.v (100%) rename {ut => tests}/full/dom_indep_d1_extension/dom_indep_d1_extension.cpp (96%) rename {ut => tests}/full/dom_indep_d1_extension/dom_indep_d1_extension.json (100%) rename {ut => tests}/full/dom_indep_d1_extension/dom_indep_d1_extension.v (100%) rename {ut => tests}/full/dom_indep_d1_fault_as_probe/dom_indep_d1_fault_as_probe.cpp (96%) rename {ut => tests}/full/dom_indep_d1_fault_as_probe/dom_indep_d1_fault_as_probe.json (100%) rename {ut => tests}/full/dom_indep_d1_fault_as_probe/dom_indep_d1_fault_as_probe.v (100%) rename {ut => tests}/full/dom_indep_d1_faulty_rand/dom_indep_d1_faulty_rand.cpp (96%) rename {ut => tests}/full/dom_indep_d1_faulty_rand/dom_indep_d1_faulty_rand.json (98%) rename {ut => tests}/full/dom_indep_d1_faulty_rand/dom_indep_d1_faulty_rand.v (100%) rename {ut => tests}/full/dom_indep_d1_non_flatten/dom_indep_d1_non_flatten.cpp (96%) rename {ut => tests}/full/dom_indep_d1_non_flatten/dom_indep_d1_non_flatten.json (100%) rename {ut => tests}/full/dom_indep_d1_non_flatten/dom_indep_d1_non_flatten.v (100%) rename {ut => tests}/full/dom_indep_d1_placement/dom_indep_d1_placement.cpp (97%) rename {ut => tests}/full/dom_indep_d1_placement/dom_indep_d1_placement.json (100%) rename {ut => tests}/full/dom_indep_d1_placement/dom_indep_d1_placement.v (100%) create mode 100644 tests/full/dom_indep_d2/dom_indep_d2.cpp create mode 100644 tests/full/dom_indep_d2/dom_indep_d2.json create mode 100644 tests/full/dom_indep_d2/dom_indep_d2.v rename {ut => tests}/full/lmdpl_and_d1/lmdpl_and_d1.cpp (96%) rename {ut => tests}/full/lmdpl_and_d1/lmdpl_and_d1.json (100%) rename {ut => tests}/full/lmdpl_and_d1/lmdpl_and_d1.v (100%) create mode 100644 tests/full/lmdpl_and_d1_3_ANDs_induce_glitch/lmdpl_and_d1_3_ANDs_induce_glitch.cpp create mode 100644 tests/full/lmdpl_and_d1_3_ANDs_induce_glitch/lmdpl_and_d1_3_ANDs_induce_glitch.json create mode 100644 tests/full/lmdpl_and_d1_3_ANDs_induce_glitch/lmdpl_and_d1_3_ANDs_induce_glitch.v create mode 100644 tests/tests.cpp rename {ut => tests}/util/CpuCoreSelector.cpp (96%) rename {ut => tests}/util/FileParsing.cpp (100%) rename {ut => tests}/util/ProgramOptions.cpp (100%) rename {ut => tests}/util/Sharing.cpp (100%) create mode 100644 tests/util/Util.cpp delete mode 100644 ut/util/Util.cpp diff --git a/Makefile b/Makefile index 2f476785..aae91bc5 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ ## release build in release mode ## ## debug build in debug mode ## ## test performs unit tests ## +## benchmark performs benchmarks ## ## clean remove output directories ## ## ## ################################################## @@ -20,7 +21,8 @@ INC_DIRS = inc # Source directories with the .c and .cpp files. Separate multiple directories with a space. -TEST_SRC = "ut src/Software src/Hardware src/Util" +BENCHMARK_SRC = "benchmarks src/Software src/Hardware src/Util" +TEST_SRC = "tests src/Software src/Hardware src/Util" DEBUG_SRC = src RELEASE_SRC = src @@ -28,18 +30,21 @@ LIB_DIR = lib # Output directories for release and debug configurations. # If both point to the same directory, the final binaries will be suffixed with "_release" and "_debug". +BENCHMARK_DIR = benchmark RELEASE_DIR = release DEBUG_DIR = debug TEST_DIR = test -EXCLUDED_FILES := test/obj_test/ut/full/aes_rp_d1_ccode/aes_rp_d1_ccode_c.c +EXCLUDED_FILES := test/obj_test/tests/full/aes_rp_d1_ccode/aes_rp_d1_ccode_c.c # Compiler options INCLUDE_PYTHON3=`pkg-config --cflags python3-embed` +C_BENCHMARK_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -O3 -g -fno-omit-frame-pointer -std=c11 $(INCLUDE_PYTHON3) C_RELEASE_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -O3 -g -fno-omit-frame-pointer -std=c11 $(INCLUDE_PYTHON3) C_DEBUG_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -g -O2 -fsanitize=address -std=c11 $(INCLUDE_PYTHON3) C_TEST_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -O3 -g -fno-omit-frame-pointer -std=c11 $(INCLUDE_PYTHON3) +CXX_BENCHMARK_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -O3 -g -fno-omit-frame-pointer -std=c++17 $(INCLUDE_PYTHON3) CXX_RELEASE_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -O3 -g -fno-omit-frame-pointer -std=c++17 $(INCLUDE_PYTHON3) CXX_DEBUG_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -g -O2 -fsanitize=address -std=c++17 $(INCLUDE_PYTHON3) CXX_TEST_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -O3 -g -fno-omit-frame-pointer -std=c++17 $(INCLUDE_PYTHON3) @@ -48,6 +53,7 @@ CXX_TEST_FLAGS = -Wall -Wextra -Wshadow -pedantic -fopenmp -O3 -g -fno-omit-fr LINK_PYTHON3=`pkg-config --libs python3-embed` LINK_FLINT = -lflint -lmpfr -lgmp -lm LINK_BOOST = -lboost_filesystem -lboost_program_options -lboost_python310 +BENCHMARK_LINK_FLAGS = -L$(LIB_DIR) -fopenmp -ldl $(LINK_PYTHON3) $(LINK_FLINT) $(LINK_BOOST) RELEASE_LINK_FLAGS = -L$(LIB_DIR) -fopenmp -ldl $(LINK_PYTHON3) $(LINK_FLINT) $(LINK_BOOST) DEBUG_LINK_FLAGS = -L$(LIB_DIR) -fsanitize=address -fopenmp -ldl $(LINK_PYTHON3) $(LINK_FLINT) $(LINK_BOOST) TEST_LINK_FLAGS = -L$(LIB_DIR) -fopenmp -ldl $(LINK_PYTHON3) $(LINK_FLINT) $(LINK_BOOST) @@ -68,8 +74,12 @@ OUTPUT = PROLEAD HELP_MESSAGE = Simply use any combination of 'make {debug, release, test, help, clean}'. Just calling 'make' will build release and debug. By adding 'V=1' prints more verbose output. # switch between debug and release config - -ifeq ($(D),2) +ifeq ($(D),3) + C_FLAGS = $(C_BENCHMARK_FLAGS) + CXX_FLAGS = $(CXX_BENCHMARK_FLAGS) + LINK_FLAGS = $(BENCHMARK_LINK_FLAGS) + OBJ_DIR = obj_test +else ifeq ($(D),2) C_FLAGS = $(C_TEST_FLAGS) CXX_FLAGS = $(CXX_TEST_FLAGS) LINK_FLAGS = $(TEST_LINK_FLAGS) @@ -130,6 +140,9 @@ MAKEFLAGS += --no-print-directory all: debug release +benchmark: + @+make compile D=3 OUTPUT_DIRECTORY=$(BENCHMARK_DIR) SRC_DIRS=$(BENCHMARK_SRC) -j8 + test: @+make compile D=2 OUTPUT_DIRECTORY=$(TEST_DIR) SRC_DIRS=$(TEST_SRC) -j8 @@ -141,6 +154,7 @@ release: clean: @echo Removing build artifacts... + $(SUPPRESS_CMD)rm -rf $(BENCHMARK_DIR) $(SUPPRESS_CMD)rm -rf $(DEBUG_DIR) $(SUPPRESS_CMD)rm -rf $(RELEASE_DIR) $(SUPPRESS_CMD)rm -rf $(TEST_DIR) @@ -164,7 +178,9 @@ endif # create obj directory and compile compile: check directories $(OUTPUT_DIRECTORY)/$(OUTPUT) -ifeq ($(D), 2) +ifeq ($(D), 3) + @diff=$$(($(shell date +%s%3N) - $(START_TIME))); echo 'Benchmark build completed in '$$(($$diff / 1000))'.'$$(($$diff % 1000))'s' +else ifeq ($(D), 2) @diff=$$(($(shell date +%s%3N) - $(START_TIME))); echo 'Test build completed in '$$(($$diff / 1000))'.'$$(($$diff % 1000))'s' else ifeq ($(D), 1) @diff=$$(($(shell date +%s%3N) - $(START_TIME))); echo 'Debug build completed in '$$(($$diff / 1000))'.'$$(($$diff % 1000))'s' @@ -176,7 +192,9 @@ endif # create the obj directory directories: check -ifeq ($(D), 2) +ifeq ($(D), 3) + @echo '_____Building Benchmark_____' +else ifeq ($(D), 2) @echo '_______Building Tests_______' else ifeq ($(D), 1) @echo '_______Building Debug_______' diff --git a/ut/UnitTests.cpp b/benchmarks/benchmarks.cpp similarity index 70% rename from ut/UnitTests.cpp rename to benchmarks/benchmarks.cpp index 72e52c54..16fefad4 100644 --- a/ut/UnitTests.cpp +++ b/benchmarks/benchmarks.cpp @@ -1,3 +1,3 @@ #define CATCH_CONFIG_ENABLE_BENCHMARKING #define CATCH_CONFIG_MAIN -#include \ No newline at end of file +#include diff --git a/benchmarks/util/Util.cpp b/benchmarks/util/Util.cpp new file mode 100644 index 00000000..c85a506f --- /dev/null +++ b/benchmarks/util/Util.cpp @@ -0,0 +1,134 @@ +#define CATCH_CONFIG_ENABLE_BENCHMARKING +#include "Util/Util.hpp" + +#include + +TEST_CASE("Benchmark sorting and merging of duplicates", + "[BenchmarkSortAndMergeDuplicates]") { + uint64_t i, j; + uint64_t number_of_groups = 2; + uint64_t size_of_key_in_bytes = + GENERATE(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024); + uint64_t number_of_entries = GENERATE(64, 1024, 2048, 4096, 8192, 16384, + 32768, 65536, 131072, 262144, 524288); + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_int_distribution dis(0, 255); + TableBucketVector observations(number_of_entries); + + for (i = 0; i < number_of_entries; ++i) { + observations[i].key_ = std::make_unique(size_of_key_in_bytes); + observations[i].data_ = std::make_unique(number_of_groups); + + for (j = 0; j < size_of_key_in_bytes; ++j) { + observations[i].key_[j] = dis(gen); + } + + ++observations[i].data_[dis(gen) % number_of_groups]; + } + + BENCHMARK_ADVANCED( + "size of key (bytes) = " + std::to_string(size_of_key_in_bytes) + "\n" + + "number of entries = " + std::to_string(number_of_entries)) + (Catch::Benchmark::Chronometer meter) { + meter.measure([&observations, size_of_key_in_bytes, number_of_groups] { + SortAndMergeDuplicates(observations, size_of_key_in_bytes, + number_of_groups); + }); + }; +} + +TEST_CASE( + "Benchmark the update of bucket entries with entries from another bucket", + "[BenchmarkUpdateBucketWithBucket]") { + uint64_t i, j; + TableBucketVector bucket, observations; + uint64_t number_of_groups, size_of_key_in_bytes, number_of_entries; + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_int_distribution dis(0, 255); + + number_of_groups = GENERATE(2, 3); + size_of_key_in_bytes = GENERATE(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024); + number_of_entries = GENERATE(1, 10, 100, 1000, 10000, 100000, 1000000); + bucket.resize(number_of_entries); + observations.resize(number_of_entries); + + for (i = 0; i < number_of_entries; ++i) { + bucket[i].key_ = std::make_unique(size_of_key_in_bytes); + bucket[i].data_ = std::make_unique(number_of_groups); + observations[i].key_ = std::make_unique(size_of_key_in_bytes); + observations[i].data_ = std::make_unique(number_of_groups); + + for (j = 0; j < size_of_key_in_bytes; ++j) { + bucket[i].key_[j] = dis(gen); + observations[i].key_[j] = dis(gen); + } + + for (j = 0; j < number_of_groups; ++j) { + bucket[i].data_[j] = dis(gen); + observations[i].data_[j] = dis(gen); + } + } + + SortAndMergeDuplicates(bucket, size_of_key_in_bytes, number_of_groups); + SortAndMergeDuplicates(observations, size_of_key_in_bytes, number_of_groups); + + BENCHMARK_ADVANCED( + "number of groups = " + std::to_string(number_of_groups) + "\n" + + "size of key (bytes) = " + std::to_string(size_of_key_in_bytes) + "\n" + + "number of entries = " + std::to_string(number_of_entries)) + (Catch::Benchmark::Chronometer meter) { + meter.measure( + [&bucket, &observations, size_of_key_in_bytes, number_of_groups] { + UpdateBucketWithBucket(bucket, observations, size_of_key_in_bytes, + number_of_groups); + }); + }; +} + +TEST_CASE("Benchmark computation of required sample size", + "[BenchmarkComputeRequiredSampleSize]") { + uint64_t number_of_groups = GENERATE(2, 3); + uint64_t number_of_entries = + GENERATE(10, 100, 1000, 10000, 100000, 1000000, 10000000); + double_t effect_size = GENERATE(0.1, 0.3, 0.5); + double_t beta_threshold = GENERATE(0.00001, 0.0001, 0.001, 0.01, 0.1, 0.2); + + BENCHMARK_ADVANCED( + "number of groups = " + std::to_string(number_of_groups) + "\n" + + "number of entries = " + std::to_string(number_of_entries) + "\n" + + "effect size = " + std::to_string(effect_size) + "\n" + + "beta threshold = " + std::to_string(beta_threshold)) + (Catch::Benchmark::Chronometer meter) { + meter.measure( + [number_of_groups, number_of_entries, beta_threshold, effect_size] { + ComputeRequiredSampleSize(number_of_groups, number_of_entries, + beta_threshold, effect_size); + }); + }; +} + +TEST_CASE("Test the construction of simulated table entries", + "[ConstructTableEntries]") { + uint64_t number_of_groups = GENERATE(2, 3); + uint64_t size_of_key_in_bytes = GENERATE(1, 64, 1024); + uint64_t number_of_entries = GENERATE(64, 16384, 524288); + TableBucketVector datasets; + + BENCHMARK_ADVANCED( + "number of groups = " + std::to_string(number_of_groups) + "\n" + + "number of entries = " + std::to_string(number_of_entries) + "\n" + + "size of key (bytes) = " + std::to_string(size_of_key_in_bytes)) + (Catch::Benchmark::Chronometer meter) { + meter.measure([&datasets, number_of_groups, number_of_entries, + size_of_key_in_bytes] { + datasets.resize(number_of_entries); + + for (uint64_t i = 0; i < number_of_entries; ++i) { + datasets[i].key_ = std::make_unique(size_of_key_in_bytes); + datasets[i].data_ = std::make_unique(number_of_groups); + } + }); + }; +} diff --git a/docs/_adversaries_8hpp_source.html b/docs/_adversaries_8hpp_source.html index b2c0ea38..37314658 100644 --- a/docs/_adversaries_8hpp_source.html +++ b/docs/_adversaries_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -215,7 +215,7 @@
333
341 double EvaluateMultivariateRobustProbingSecurity(std::vector<SharedData>& shared_data, timespec& start_time);
342
-
354 void EvaluateProbingSetsUnderFaults(
+
354 double EvaluateProbingSetsUnderFaults(
355 std::vector<SharedData>& shared_data,
356 timespec& start_time, uint64_t& probe_step_index);
357
@@ -228,7 +228,7 @@
388
397 void NormalTest(std::vector<double>& group_simulation_ratio);
398
-
409 void Test(std::vector<double>& number_of_simulations_per_group,
+
409 void Test(std::vector<double>& number_of_simulations_per_group,
410 bool is_in_compact_mode);
411
417 double GetMaximumLeakage();
@@ -263,7 +263,7 @@
size_t GetNumberOfExtendedProbes()
Returns the number of extended probes.
Definition: Adversaries.cpp:59
Adversaries(Library &library, CircuitStruct &circuit, Settings &settings, Simulation &simulation)
Constructs the adversaries.
void AddProbingSet(std::vector< Probe * > &probe_addresses, uint64_t &index)
Adds a new probing set to the list of probing sets.
Definition: Adversaries.cpp:659
-
double EvaluateRobustProbingSecurity(std::vector< SharedData > &shared_data)
Evaluates all adversaries under the robust d-probing model.
Definition: Adversaries.cpp:1292
+
double EvaluateRobustProbingSecurity(std::vector< SharedData > &shared_data)
Evaluates all adversaries under the robust d-probing model.
Definition: Adversaries.cpp:1340
Definition: Enabler.hpp:10
Definition: Library.hpp:230
Definition: Printer.hpp:14
@@ -271,6 +271,7 @@
Definition: Propagation.hpp:47
Definition: Settings.hpp:99
Definition: Definitions.hpp:223
+
Definition: dom_indep_d1.cpp:6
Defines a hardware circuit.
Definition: Definitions.hpp:138
diff --git a/docs/_analyze_8hpp_source.html b/docs/_analyze_8hpp_source.html index bd0e1aac..3e610e42 100644 --- a/docs/_analyze_8hpp_source.html +++ b/docs/_analyze_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_cpu_core_selector_8hpp.html b/docs/_cpu_core_selector_8hpp.html index cb384b4e..37293a94 100644 --- a/docs/_cpu_core_selector_8hpp.html +++ b/docs/_cpu_core_selector_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_cpu_core_selector_8hpp_source.html b/docs/_cpu_core_selector_8hpp_source.html index 170163a3..66d196fd 100644 --- a/docs/_cpu_core_selector_8hpp_source.html +++ b/docs/_cpu_core_selector_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_enabler_8hpp_source.html b/docs/_enabler_8hpp_source.html index c5e73184..3424ba26 100644 --- a/docs/_enabler_8hpp_source.html +++ b/docs/_enabler_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_8cpp.html b/docs/_fault_8cpp.html index 4a60645e..ed9e4d61 100644 --- a/docs/_fault_8cpp.html +++ b/docs/_fault_8cpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_8hpp.html b/docs/_fault_8hpp.html index c170334f..fa4e67f9 100644 --- a/docs/_fault_8hpp.html +++ b/docs/_fault_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_8hpp_source.html b/docs/_fault_8hpp_source.html index e2f04379..ac1120b0 100644 --- a/docs/_fault_8hpp_source.html +++ b/docs/_fault_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_manager_8cpp.html b/docs/_fault_manager_8cpp.html index 627ddfc1..f123dd0a 100644 --- a/docs/_fault_manager_8cpp.html +++ b/docs/_fault_manager_8cpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_manager_8hpp.html b/docs/_fault_manager_8hpp.html index 808e47bd..f8012aa0 100644 --- a/docs/_fault_manager_8hpp.html +++ b/docs/_fault_manager_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_manager_8hpp_source.html b/docs/_fault_manager_8hpp_source.html index 48508b4a..5fddcfe8 100644 --- a/docs/_fault_manager_8hpp_source.html +++ b/docs/_fault_manager_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_set_8cpp.html b/docs/_fault_set_8cpp.html index 3c6ccc69..28e3f8b5 100644 --- a/docs/_fault_set_8cpp.html +++ b/docs/_fault_set_8cpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_set_8hpp.html b/docs/_fault_set_8hpp.html index f8b8ac2e..f494d344 100644 --- a/docs/_fault_set_8hpp.html +++ b/docs/_fault_set_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_fault_set_8hpp_source.html b/docs/_fault_set_8hpp_source.html index 2cbbc28d..41a9f738 100644 --- a/docs/_fault_set_8hpp_source.html +++ b/docs/_fault_set_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_file_parsing_8hpp.html b/docs/_file_parsing_8hpp.html index f4ec824e..47e11fa7 100644 --- a/docs/_file_parsing_8hpp.html +++ b/docs/_file_parsing_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -85,10 +85,10 @@ #include <boost/fusion/include/adapt_struct.hpp>
#include <boost/fusion/include/io.hpp>
#include <boost/json.hpp>
-#include <boost/spirit/include/phoenix.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/spirit/include/phoenix_object.hpp>
-#include <boost/spirit/include/phoenix_operator.hpp>
+#include <boost/phoenix.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/object.hpp>
+#include <boost/phoenix/operator.hpp>
#include <boost/spirit/include/qi.hpp>
#include <cstdint>
#include <filesystem>
diff --git a/docs/_file_parsing_8hpp_source.html b/docs/_file_parsing_8hpp_source.html index 3670a702..1a593967 100644 --- a/docs/_file_parsing_8hpp_source.html +++ b/docs/_file_parsing_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -84,10 +84,10 @@
10#include <boost/fusion/include/adapt_struct.hpp>
11#include <boost/fusion/include/io.hpp>
12#include <boost/json.hpp>
-
13#include <boost/spirit/include/phoenix.hpp>
-
14#include <boost/spirit/include/phoenix_core.hpp>
-
15#include <boost/spirit/include/phoenix_object.hpp>
-
16#include <boost/spirit/include/phoenix_operator.hpp>
+
13#include <boost/phoenix.hpp>
+
14#include <boost/phoenix/core.hpp>
+
15#include <boost/phoenix/object.hpp>
+
16#include <boost/phoenix/operator.hpp>
17#include <boost/spirit/include/qi.hpp>
18#include <cstdint>
19#include <filesystem>
diff --git a/docs/_hardware_2_definitions_8hpp_source.html b/docs/_hardware_2_definitions_8hpp_source.html index 490ab4e0..1746b258 100644 --- a/docs/_hardware_2_definitions_8hpp_source.html +++ b/docs/_hardware_2_definitions_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_hardware_2_execute_8hpp_source.html b/docs/_hardware_2_execute_8hpp_source.html index ec3aa543..f44586ab 100644 --- a/docs/_hardware_2_execute_8hpp_source.html +++ b/docs/_hardware_2_execute_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_hardware_2_prepare_8hpp_source.html b/docs/_hardware_2_prepare_8hpp_source.html index c8c72a2e..a6b58464 100644 --- a/docs/_hardware_2_prepare_8hpp_source.html +++ b/docs/_hardware_2_prepare_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_hardware_2_read_8hpp_source.html b/docs/_hardware_2_read_8hpp_source.html index 266f8beb..8d56172b 100644 --- a/docs/_hardware_2_read_8hpp_source.html +++ b/docs/_hardware_2_read_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_hardware_2_simulate_8hpp_source.html b/docs/_hardware_2_simulate_8hpp_source.html index fb1e3c3b..bb6f627e 100644 --- a/docs/_hardware_2_simulate_8hpp_source.html +++ b/docs/_hardware_2_simulate_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_lib_helper_8hpp_source.html b/docs/_lib_helper_8hpp_source.html index 9ca116cc..a5b8214d 100644 --- a/docs/_lib_helper_8hpp_source.html +++ b/docs/_lib_helper_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_library_8hpp_source.html b/docs/_library_8hpp_source.html index bbb5d25a..8da4e008 100644 --- a/docs/_library_8hpp_source.html +++ b/docs/_library_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_operation_8hpp_source.html b/docs/_operation_8hpp_source.html index 6aa3d53e..8e34e23b 100644 --- a/docs/_operation_8hpp_source.html +++ b/docs/_operation_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_operators_8hpp_source.html b/docs/_operators_8hpp_source.html index 5f1bb1d1..2046ddc9 100644 --- a/docs/_operators_8hpp_source.html +++ b/docs/_operators_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_print_8hpp_source.html b/docs/_print_8hpp_source.html index d60f8955..90f314aa 100644 --- a/docs/_print_8hpp_source.html +++ b/docs/_print_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_printer_8hpp_source.html b/docs/_printer_8hpp_source.html index 5ca19d55..ed4fbdfa 100644 --- a/docs/_printer_8hpp_source.html +++ b/docs/_printer_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_probes_8hpp_source.html b/docs/_probes_8hpp_source.html index 805d6178..e70efc68 100644 --- a/docs/_probes_8hpp_source.html +++ b/docs/_probes_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_probing_8hpp_source.html b/docs/_probing_8hpp_source.html index affcacbe..cfa02e2d 100644 --- a/docs/_probing_8hpp_source.html +++ b/docs/_probing_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -103,9 +103,9 @@
25{
26 namespace Probing
27 {
-
38 void GetProbingSets(Software::ThreadSimulationStruct& ThreadSimulation, SettingsStruct& Settings, Software::TestStruct& Test, std::vector<std::tuple<uint32_t, uint32_t>>& OrderOverTwoCombination, std::vector<std::vector<uint32_t>>& ProbeInfoToStandardProbe, uint64_t SimulationIndex);
+
38 void GetProbingSets(Software::ThreadSimulationStruct& ThreadSimulation, SettingsStruct& Settings, Software::TestStruct& Test, std::vector<std::tuple<uint32_t, uint32_t>>& OrderOverTwoCombination, std::vector<std::vector<uint32_t>>& ProbeInfoToStandardProbe, uint64_t SimulationIndex);
39
-
51 void GetMultivariateProbingSets(std::vector<std::vector<Software::ProbesStruct>>& OneSimulationStandardProbes, SettingsStruct& Settings, Software::TestStruct& Test, std::vector<std::tuple<uint32_t, uint32_t>>& OrderOverTwoCombination, std::vector<std::vector<uint32_t>>& ProbeInfoToStandardProbe, uint32_t ThreadIndex, uint32_t SimulationIndex);
+
51 void GetMultivariateProbingSets(std::vector<std::vector<Software::ProbesStruct>>& OneSimulationStandardProbes, SettingsStruct& Settings, Software::TestStruct& Test, std::vector<std::tuple<uint32_t, uint32_t>>& OrderOverTwoCombination, std::vector<std::vector<uint32_t>>& ProbeInfoToStandardProbe, uint32_t ThreadIndex, uint32_t SimulationIndex);
52
61 bool InDistance(Software::SettingsStruct& Settings, std::vector<Software::ProbesStruct>& ProbingSet);
62 uint32_t MemoryConsumption();
@@ -175,6 +175,7 @@
380
381#endif
Definition: Settings.hpp:99
+
Definition: dom_indep_d1.cpp:6
Defines a struct that track meta information for probes.
Definition: Definitions.hpp:218
Defines how every probe during simulation looks like.
Definition: Definitions.hpp:136
Defines a probing set.
Definition: Definitions.hpp:268
diff --git a/docs/_probing_sets_8hpp_source.html b/docs/_probing_sets_8hpp_source.html index 60f0d52d..d244fd02 100644 --- a/docs/_probing_sets_8hpp_source.html +++ b/docs/_probing_sets_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -144,45 +144,46 @@
179
185 std::string PrintProbes(CircuitStruct& circuit);
186
-
187 void Deconstruct();
-
188
-
189 uint64_t GetHighestClockCycle(std::vector<Propagation<ExtensionContainer>>& propagations, std::vector<Probe>& probe_extensions);
-
190
-
191 private:
-
197 std::vector<Probe*> probe_addresses_;
-
198
-
205 std::vector<uint64_t> probe_extension_indices_;
-
206
-
211 ContingencyTable<TableBucketVector> contingency_table_;
-
212
-
213 bool should_be_removed_;
-
214};
-
215
-
216template <typename ExtensionContainer>
-
217size_t GetIndexOfMostLeakingProbingSet(std::vector<ProbingSet<ExtensionContainer>>& probing_sets, std::vector<bool>& bitmask);
-
218
-
219template <typename ExtensionContainer>
-
220uint64_t GetNumberOfRequiredTraces(std::vector<ProbingSet<ExtensionContainer>>& probing_sets, const Settings& settings);
-
221
-
222} // namespace Hardware
+
187 void DeconstructTable();
+
188 void Deconstruct();
+
189
+
190 uint64_t GetHighestClockCycle(std::vector<Propagation<ExtensionContainer>>& propagations, std::vector<Probe>& probe_extensions);
+
191
+
192 private:
+
198 std::vector<Probe*> probe_addresses_;
+
199
+
206 std::vector<uint64_t> probe_extension_indices_;
+
207
+
212 ContingencyTable<TableBucketVector> contingency_table_;
+
213
+
214 bool should_be_removed_;
+
215};
+
216
+
217template <typename ExtensionContainer>
+
218size_t GetIndexOfMostLeakingProbingSet(std::vector<ProbingSet<ExtensionContainer>>& probing_sets, std::vector<bool>& bitmask);
+
219
+
220template <typename ExtensionContainer>
+
221uint64_t GetNumberOfRequiredTraces(std::vector<ProbingSet<ExtensionContainer>>& probing_sets, const Settings& settings);
+
222
+
223} // namespace Hardware
Definition: Util.hpp:164
Definition: ProbingSets.hpp:18
-
std::vector< Probe * > GetProbeAddresses()
Returns the addresses of all probes in the probing set.
Definition: ProbingSets.cpp:59
+
std::vector< Probe * > GetProbeAddresses()
Returns the addresses of all probes in the probing set.
Definition: ProbingSets.cpp:67
void SetProbes(std::vector< Probe * > &probe_addresses, std::vector< uint64_t > &probe_extension_indices)
Contructs a probing set.
Definition: ProbingSets.cpp:30
void ComputeNumberOfRequiredTraces(size_t number_of_groups, double beta_threshold, double effect_size)
Computes the number of required traces.
-
bool IsRemovable()
Checks whether a probing set is already marked as removable.
Definition: ProbingSets.cpp:176
-
ExtensionContainer GetLastProbeExtension()
Returns the last probe-extension in the list.
Definition: ProbingSets.cpp:107
-
std::string PrintProbes(CircuitStruct &circuit)
Print all probes for the report.
Definition: ProbingSets.cpp:158
-
std::vector< uint64_t > GetProbeExtensions()
Returns a list with all different probe extensions.
Definition: ProbingSets.cpp:118
-
bool Includes(ProbingSet &other, std::vector< Propagation< ExtensionContainer > > &propagations)
Checks whether a probing set fully-includes another probing set.
Definition: ProbingSets.cpp:190
-
double GetGValue()
Checks if a particular extended probe is in the extension set..
Definition: ProbingSets.cpp:134
+
bool IsRemovable()
Checks whether a probing set is already marked as removable.
Definition: ProbingSets.cpp:184
+
ExtensionContainer GetLastProbeExtension()
Returns the last probe-extension in the list.
Definition: ProbingSets.cpp:115
+
std::string PrintProbes(CircuitStruct &circuit)
Print all probes for the report.
Definition: ProbingSets.cpp:166
+
std::vector< uint64_t > GetProbeExtensions()
Returns a list with all different probe extensions.
Definition: ProbingSets.cpp:126
+
bool Includes(ProbingSet &other, std::vector< Propagation< ExtensionContainer > > &propagations)
Checks whether a probing set fully-includes another probing set.
Definition: ProbingSets.cpp:198
+
double GetGValue()
Checks if a particular extended probe is in the extension set..
Definition: ProbingSets.cpp:142
void NormalTableUpdate(const Settings &settings, Simulation &simulation, std::vector< Propagation< ExtensionContainer > > &propagations)
Updates the contingency table with new simulations in normal mode.
size_t GetNumberOfProbeExtensions(std::vector< Propagation< ExtensionContainer > > &propagations)
Returns the number of probe-extensions.
-
void Initialize(bool is_in_compact_mode, std::vector< Propagation< ExtensionContainer > > &propagations)
Initializes the contingency table.
Definition: ProbingSets.cpp:126
-
uint64_t GetExtendedProbeIndex(size_t extended_probe_index)
Returns a certain extended probe.
Definition: ProbingSets.cpp:84
-
void MarkAsRemovable()
Marks the probing set as removable, i.e. strictly less informative compared to another set.
Definition: ProbingSets.cpp:183
-
ExtensionContainer GetFirstProbeExtension()
Returns the first probe-extension in the list.
Definition: ProbingSets.cpp:96
-
void ComputeGTest(uint64_t number_of_groups, uint64_t number_of_simulations, std::vector< double_t > &group_simulation_ratio)
Performs the full g-test procedure.
Definition: ProbingSets.cpp:142
+
void Initialize(bool is_in_compact_mode, std::vector< Propagation< ExtensionContainer > > &propagations)
Initializes the contingency table.
Definition: ProbingSets.cpp:134
+
uint64_t GetExtendedProbeIndex(size_t extended_probe_index)
Returns a certain extended probe.
Definition: ProbingSets.cpp:92
+
void MarkAsRemovable()
Marks the probing set as removable, i.e. strictly less informative compared to another set.
Definition: ProbingSets.cpp:191
+
ExtensionContainer GetFirstProbeExtension()
Returns the first probe-extension in the list.
Definition: ProbingSets.cpp:104
+
void ComputeGTest(uint64_t number_of_groups, uint64_t number_of_simulations, std::vector< double_t > &group_simulation_ratio)
Performs the full g-test procedure.
Definition: ProbingSets.cpp:150
bool operator<(const ProbingSet &other) const
Definition: ProbingSets.cpp:6
Definition: Propagation.hpp:47
Definition: Settings.hpp:99
diff --git a/docs/_program_options_8hpp.html b/docs/_program_options_8hpp.html index 2802eea2..363635c2 100644 --- a/docs/_program_options_8hpp.html +++ b/docs/_program_options_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_program_options_8hpp_source.html b/docs/_program_options_8hpp_source.html index 30c15e9c..59f57a0f 100644 --- a/docs/_program_options_8hpp_source.html +++ b/docs/_program_options_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_propagation_8hpp_source.html b/docs/_propagation_8hpp_source.html index 3a0f157c..9912f149 100644 --- a/docs/_propagation_8hpp_source.html +++ b/docs/_propagation_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_settings_8hpp_source.html b/docs/_settings_8hpp_source.html index 2f0f3b9c..cd5b7cbc 100644 --- a/docs/_settings_8hpp_source.html +++ b/docs/_settings_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_shared_data_8hpp.html b/docs/_shared_data_8hpp.html index 70fea621..1970aee9 100644 --- a/docs/_shared_data_8hpp.html +++ b/docs/_shared_data_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_shared_data_8hpp_source.html b/docs/_shared_data_8hpp_source.html index 05ea4cb3..73b68f1a 100644 --- a/docs/_shared_data_8hpp_source.html +++ b/docs/_shared_data_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_sharing_8hpp.html b/docs/_sharing_8hpp.html index 0e599ef1..2ab9cf3e 100644 --- a/docs/_sharing_8hpp.html +++ b/docs/_sharing_8hpp.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_sharing_8hpp_source.html b/docs/_sharing_8hpp_source.html index 9029a651..8582d29b 100644 --- a/docs/_sharing_8hpp_source.html +++ b/docs/_sharing_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_software_2_definitions_8hpp_source.html b/docs/_software_2_definitions_8hpp_source.html index fc00d8e7..e3a663cf 100644 --- a/docs/_software_2_definitions_8hpp_source.html +++ b/docs/_software_2_definitions_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_software_2_execute_8hpp_source.html b/docs/_software_2_execute_8hpp_source.html index 5a4f8aa3..3c6eeb8a 100644 --- a/docs/_software_2_execute_8hpp_source.html +++ b/docs/_software_2_execute_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_software_2_prepare_8hpp_source.html b/docs/_software_2_prepare_8hpp_source.html index 5da8089a..18930679 100644 --- a/docs/_software_2_prepare_8hpp_source.html +++ b/docs/_software_2_prepare_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_software_2_read_8hpp_source.html b/docs/_software_2_read_8hpp_source.html index 1c18a9d7..19d79322 100644 --- a/docs/_software_2_read_8hpp_source.html +++ b/docs/_software_2_read_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -99,7 +99,7 @@
21namespace Software{
22 namespace Read{
23 void sort(char**, int);
-
24 void SettingsFile(const std::string&, Software::SettingsStruct&, Settings&, Software::ConfigProbesStruct&, bool);
+
25 void BinaryFile(const po::variables_map& vm, Software::SettingsStruct&);
26 int ProbeCompare(const void* , const void* );
27 std::vector<uint8_t> read_file(const std::string&);
diff --git a/docs/_software_2_simulate_8hpp_source.html b/docs/_software_2_simulate_8hpp_source.html index 2347a79a..008e9a80 100644 --- a/docs/_software_2_simulate_8hpp_source.html +++ b/docs/_software_2_simulate_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
diff --git a/docs/_stuck_at_one_fault_8hpp_source.html b/docs/_stuck_at_one_fault_8hpp_source.html index 11c1e7a3..c282ad2a 100644 --- a/docs/_stuck_at_one_fault_8hpp_source.html +++ b/docs/_stuck_at_one_fault_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -86,14 +86,14 @@
15 double fault_probability)
16 : Fault(signal_index, clock_cycle, fault_probability, FaultType::stuck_at_1) {}
17
-
24 virtual uint64_t ComputeFaultEffect(uint64_t fault_free_computation) const override {
+
24 virtual uint64_t ComputeFaultEffect(uint64_t /*fault_free_computation*/) const override {
25 return 0xffffffffffffffff;
26 }
27};
Declaration of the Fault class.
Faults are parameteriesed by a location (signal/position and time) and a fault type.
Definition: Fault.hpp:23
Definition: StuckAtOneFault.hpp:5
-
virtual uint64_t ComputeFaultEffect(uint64_t fault_free_computation) const override
Computes the effect of this fault on a given fault-free computation of a signal.
Definition: StuckAtOneFault.hpp:24
+
virtual uint64_t ComputeFaultEffect(uint64_t) const override
Computes the effect of this fault on a given fault-free computation of a signal.
Definition: StuckAtOneFault.hpp:24
StuckAtOneFault(unsigned int signal_index, unsigned int clock_cycle, double fault_probability)
Constructor of StuckAtOneFault.
Definition: StuckAtOneFault.hpp:14
diff --git a/docs/_stuck_at_zero_fault_8hpp_source.html b/docs/_stuck_at_zero_fault_8hpp_source.html index 1dde5e0b..32f230e0 100644 --- a/docs/_stuck_at_zero_fault_8hpp_source.html +++ b/docs/_stuck_at_zero_fault_8hpp_source.html @@ -21,7 +21,7 @@ -
PROLEAD 3.0.0 +
PROLEAD 3.0.1-alpha
@@ -87,7 +87,7 @@
16 double fault_probability)
17 : Fault(signal_index, clock_cycle, fault_probability, FaultType::stuck_at_0) {}
18
-
25 virtual uint64_t ComputeFaultEffect(uint64_t fault_free_computation) const override {
+
25 virtual uint64_t ComputeFaultEffect(uint64_t /*fault_free_computation*/) const override {
26 return 0;
27 }
28};
@@ -95,7 +95,7 @@
Faults are parameteriesed by a location (signal/position and time) and a fault type.
Definition: Fault.hpp:23
Definition: StuckAtZeroFault.hpp:6
StuckAtZeroFault(unsigned int signal_index, unsigned int clock_cycle, double fault_probability)
Constructor of StuckAtZeroFault.
Definition: StuckAtZeroFault.hpp:15
-
virtual uint64_t ComputeFaultEffect(uint64_t fault_free_computation) const override
Computes the effect of this fault on a given fault-free computation of a signal.
Definition: StuckAtZeroFault.hpp:25
+
virtual uint64_t ComputeFaultEffect(uint64_t) const override
Computes the effect of this fault on a given fault-free computation of a signal.
Definition: StuckAtZeroFault.hpp:25