Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
### TMP files
.tmp
.TMP
_tmp
_TMP
experiment_table_*
light_review_*

Expand Down
421 changes: 421 additions & 0 deletions BENCHMARKING.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ endif()

# ===================================== SIMPLIFY ==================================== #

add_executable(simplify app/simplify.cpp)
target_link_libraries(simplify argparse)
add_executable(simplifier app/simplifier.cpp)
target_link_libraries(simplifier argparse)

# *********************************************************************************** #
34 changes: 0 additions & 34 deletions Makefile

This file was deleted.

460 changes: 39 additions & 421 deletions README.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions app/simplify.cpp → app/simplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ std::optional<std::ofstream> openFileStat(argparse::ArgumentParser const& progra
{
std::ofstream statistics_stream(*output_file);
statistics_stream << std::setprecision(3) << std::fixed;
statistics_stream << "File path,Gates before,Gates after,Simplify time";
statistics_stream << "File path,Gates before,Gates after,Simplificaton time";

// The following statistics is currently supported only for AIG basis.
if (basis == AIG_BASIS)
Expand Down Expand Up @@ -219,7 +219,7 @@ void dumpStatistics(
* @param logger Logger instance.
* @param statistics_stream stream for statistics dumping (if provided).
*/
void simplify(
void simplifier(
std::string const& instance_path,
argparse::ArgumentParser const& program,
csat::Logger& logger,
Expand Down Expand Up @@ -308,10 +308,10 @@ void loadDatabases(argparse::ArgumentParser const& program, csat::Logger const&
*/
int main(int argn, char** argv)
{
csat::Logger logger("Simplify");
csat::Logger logger("Simplifier");

// Set up argument parser.
argparse::ArgumentParser program("simplify", "0.1");
argparse::ArgumentParser program("simplifier", "0.1");
program.add_argument("-i", "--input-path").help("directory with input .BENCH files");
program.add_argument("-o", "--output").help("path to resulting directory");
program.add_argument("-s", "--statistics").metavar("FILE").help("path to file for statistics writing");
Expand All @@ -321,7 +321,7 @@ int main(int argn, char** argv)
.help("Path to a directory with databases.");

program.add_description(
"The Simplify tool provides simplification of boolean circuits provided in\n"
"The Simplifier tool provides simplification of boolean circuits provided in\n"
"one of two bases: `AIG` or `BENCH`. To run simplification one should provide\n"
"an `--input-path` and `--output` parameters: first is a path to the directory\n"
"with boolean circuits, and second is a path where simplified circuits are to\n"
Expand All @@ -345,7 +345,7 @@ int main(int argn, char** argv)
"\n"
"Example usage command:\n"
"\n"
" ./build/simplify -i input_circuit/ -o result_circuits/ -s statistics.csv\n"
" ./build/simplifier -i input_circuit/ -o result_circuits/ -s statistics.csv\n"
"");

// Parse provided program arguments.
Expand Down Expand Up @@ -379,7 +379,7 @@ int main(int argn, char** argv)

std::string path = instance_path.path().string();
logger.info("Processing benchmark ", path, ".");
simplify(path, program, logger, statistics_stream);
simplifier(path, program, logger, statistics_stream);
}

return 0;
Expand Down
6 changes: 3 additions & 3 deletions tools/table_2_finalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def table_2_finalizer(
):
"""
Finalizes statistics collected during "Table 2. Comparison of several runs of resyn2
against several runs of resyn2 followed by a run of simplify." described in the
against several runs of resyn2 followed by a run of Simplifier." described in the
README.

Note that some paths are hardcoded by intention because this script purpose is
Expand Down Expand Up @@ -62,7 +62,7 @@ def table_2_finalizer(

r6_s_result = pd.read_csv(experiment_dir_path / "r6_s_result.csv", delimiter=',')
r6_s_result = r6_s_result.rename(
columns={'File path': 'circuit_name', 'Simplify time': 'time_r6_s'}
columns={'File path': 'circuit_name', 'Simplifier time': 'time_r6_s'}
)
r6_s_result = r6_s_result[['circuit_name', 'time_r6_s']]
r6_s_result['circuit_name'] = r6_s_result['circuit_name'].apply(
Expand All @@ -71,7 +71,7 @@ def table_2_finalizer(

r2_s_result = pd.read_csv(experiment_dir_path / "r2_s_result.csv", delimiter=',')
r2_s_result = r2_s_result.rename(
columns={'File path': 'circuit_name', 'Simplify time': 'time_r2_s'}
columns={'File path': 'circuit_name', 'Simplifier time': 'time_r2_s'}
)
r2_s_result = r2_s_result[['circuit_name', 'time_r2_s']]
r2_s_result['circuit_name'] = r2_s_result['circuit_name'].apply(
Expand Down
4 changes: 2 additions & 2 deletions tools/table_3_finalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def table_3_finalizer(
):
"""
Finalizes statistics collected during "Table 3. Comparison of circuit sizes and
running times between resyn2 and resyn2+simplify" described in the README.
running times between resyn2 and resyn2+Simplifier" described in the README.

Note that some paths are hardcoded by intention because this script purpose is
solely to finalize a specific experiment (as result, it expects specific files to be
Expand Down Expand Up @@ -56,7 +56,7 @@ def table_3_finalizer(

rs_result = pd.read_csv(experiment_dir_path / "rs_result.csv", delimiter=',')
rs_result['circuit_name'] = rs_result['File path'].map(lambda x: x.rsplit('/')[-1])
rs_result = rs_result.rename(columns={"Simplify time": "time_s"})
rs_result = rs_result.rename(columns={"Simplifier time": "time_s"})

rs_result = rs_result[['circuit_name', 'time_s', 'Reduced subcircuits by iter']]
rs_result['circuit_name'] = rs_result[['circuit_name']].map(
Expand Down