diff --git a/Makefile b/Makefile index 2f47678..aae91bc 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 72e52c5..16fefad 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 0000000..c85a506 --- /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 b2c0ea3..3731465 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 bd0e1aa..3e610e4 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 cb384b4..37293a9 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 170163a..66d196f 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 c5e7318..3424ba2 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 4a60645..ed9e4d6 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 c170334..fa4e67f 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 e2f0437..ac1120b 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 627ddfc..f123dd0 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 808e47b..f8012aa 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 48508b4..5fddcfe 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 3c6ccc6..28e3f8b 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 f8b8ac2..f494d34 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 2cbbc28..41a9f73 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 f4ec824..47e11fa 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 3670a70..1a59396 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 490ab4e..1746b25 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 ec3aa54..f44586a 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 c8c72a2..a6b5846 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 266f8be..8d56172 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 fb1e3c3..bb6f627 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 9ca116c..a5b8214 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 bbb5d25..8da4e00 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 6aa3d53..8e34e23 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 5f1bb1d..2046ddc 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 d60f895..90f314a 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 5ca19d5..ed4fbdf 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 805d617..e70efc6 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 affcacb..cfa02e2 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 60f0d52..d244fd0 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 2802eea..363635c 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 30c15e9..59f57a0 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 3a0f157..9912f14 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 2f0f3b9..cd5b7cb 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 70fea62..1970aee 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 05ea4cb..73b68f1 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 0e599ef..2ab9cf3 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 9029a65..8582d29 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 fc00d8e..e3a663c 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 5a4f8aa..3c6eeb8 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 5da8089..1893067 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 1c18a9d..19d7932 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 2347a79..008e9a8 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 11c1e7a..c282ad2 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 1dde5e0..32f230e 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