From 41976321ad23ca8629bd289f0049b6dd02c6ce86 Mon Sep 17 00:00:00 2001 From: davis-matthew Date: Mon, 6 Nov 2023 20:21:19 -0500 Subject: [PATCH] Typographical/Grammar Fixes --- LICENSE.txt | 2 +- scripts/blame_opt.py | 4 ++-- scripts/collect_other_stats.py | 2 +- scripts/common.py | 4 ++-- scripts/gen_test_makefile.py | 2 +- scripts/run_gen.py | 18 +++++++++--------- scripts/test_sets.txt | 2 +- src/enums.h | 2 +- src/expr.h | 2 +- src/gen_policy.h | 2 +- src/type.h | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 499160bd..8544bf46 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. =========================================================================== -Copyrights and Licenses for Third Party Software Distrubted with +Copyrights and Licenses for Third Party Software Distributed with Yet Another Random Program Generator =========================================================================== diff --git a/scripts/blame_opt.py b/scripts/blame_opt.py index b65c6156..308b8aa6 100755 --- a/scripts/blame_opt.py +++ b/scripts/blame_opt.py @@ -190,7 +190,7 @@ def blame(fail_dir, valid_res, fail_target, out_dir, lock, num, inplace): blame_str += i blame_phase_num = execute_blame_phase(valid_res, fail_target, blame_str, num, phase_num) if fail_target.specs.name == "dpcpp": - # Special case becasue triagging mechanism is different and there's only one level of triagging. + # Special case because triaging mechanism is different and there's only one level of triaging. blame_str += str(blame_phase_num-1) else: blame_str += str(blame_phase_num) @@ -224,7 +224,7 @@ def blame(fail_dir, valid_res, fail_target, out_dir, lock, num, inplace): opt_name = opt_name.replace(" ", "_") else: if blame_phase_num == 1: - # It's special case for DPC++. 1 means that triagging failed, no specific phase can be blamed. + # It's special case for DPC++. 1 means that triaging failed, no specific phase can be blamed. real_opt_name = opt_name = "FailedToBlame" else: opt_name_pattern = re.compile(compilers_opt_name_cutter[fail_target.specs.name][0] + ".*" + diff --git a/scripts/collect_other_stats.py b/scripts/collect_other_stats.py index 9076ac22..b2d5b3b7 100755 --- a/scripts/collect_other_stats.py +++ b/scripts/collect_other_stats.py @@ -97,7 +97,7 @@ def prepare_and_start(work_dir, config_file, timeout, num_jobs, csmith_bin_path, # Check for binary of generator csmith_home = os.environ.get("CSMITH_HOME") if csmith_home is None: - common.print_and_exit("Please set CSMITH_HOME envirnoment variable") + common.print_and_exit("Please set CSMITH_HOME environment variable") csmith_bin = os.path.abspath(csmith_home + os.sep + csmith_bin_path + os.sep + "csmith") common.check_and_copy(csmith_bin, work_dir) os.chdir(work_dir) diff --git a/scripts/common.py b/scripts/common.py index afdc0f47..564adfc3 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -263,7 +263,7 @@ def run_cmd(cmd, time_out=None, num=-1, memory_limit=None): except ValueError: output = b'' err_output = b'' - log_msg(logging.DEBUG, "Procces " + str(process.pid) + " has finally died") + log_msg(logging.DEBUG, "Process " + str(process.pid) + " has finally died") is_time_expired = True ret_code = None except: @@ -271,7 +271,7 @@ def run_cmd(cmd, time_out=None, num=-1, memory_limit=None): # Something really bad is going on, so better to send sigkill os.killpg(os.getpgid(process.pid), signal.SIGKILL) process.wait() - log_msg(logging.DEBUG, "Procces " + str(process.pid) + " has finally died") + log_msg(logging.DEBUG, "Process " + str(process.pid) + " has finally died") raise end_time = os.times() elapsed_time = end_time.children_user - start_time.children_user + \ diff --git a/scripts/gen_test_makefile.py b/scripts/gen_test_makefile.py index 3317074a..64b275be 100755 --- a/scripts/gen_test_makefile.py +++ b/scripts/gen_test_makefile.py @@ -51,7 +51,7 @@ def __init__(self, name, value): self.name = name self.value = value -# I can't use build-in dictionary, because variables should be ordered +# I can't use built-in dictionary, because variables should be ordered Makefile_variable_list = [] cxx_flags = MakefileVariable("CXXFLAGS", "") diff --git a/scripts/run_gen.py b/scripts/run_gen.py index 32e8f6cb..03ad5d16 100755 --- a/scripts/run_gen.py +++ b/scripts/run_gen.py @@ -202,7 +202,7 @@ class Test(object): # Generate new test # stat is statistics object # seed is optional, if we want to generate some particular seed. - # proc_num is optinal debug info to track in what process we are running this activity. + # proc_num is optional debug info to track in what process we are running this activity. def __init__(self, stat, seed="", proc_num=-1, blame=False, creduce_makefile=None): # Run generator yarpgen_run_list = [".." + os.sep + "yarpgen", @@ -292,7 +292,7 @@ def add_success_run(self, test_run): def add_fail_run(self, test_run): self.fail_test_runs.append(test_run) - # Save failed runs and verify successul runs + # Save failed runs and verify successful runs def handle_results(self, lock): # Handle compfails and runfails. self.save_failed(lock) @@ -387,7 +387,7 @@ def verify_results(self, lock): for run in results.values(): bad_runs += run - # Run blame triagging for one of failing optsets + # Run blame triaging for one of failing optsets if self.blame and good_runs: do_blame(self, self.files, good_runs[0].checksum, bad_runs[0].target) @@ -756,7 +756,7 @@ def do_creduce_runfail(self, runfail_run): test_sh +="[ $RETCODE -eq " + str(runfail_run.run_ret_code) + " ] && \\\n" # it's "temporary" (until LLVM bug 33133 is fixed). # This is needed when reduceing gcc_ubsan problem. Without this check we have good chances to reduce to the code - # snipent, which contains left shift of negative value (caught by gcc ubsan, but not clang ubsan). + # snippet, which contains left shift of negative value (caught by gcc ubsan, but not clang ubsan). test_sh +="! grep \"left shift of negative value\" err.log && \\\n" test_sh +="make -f $TEST_PWD" + os.sep + creduce_makefile_name + " " + ubsan_run.optset + " && \\\n" @@ -1041,7 +1041,7 @@ def do_blame(test_obj, test_files, good_result, target_to_blame): lock = None, num = test_obj.proc_num, inplace = True) - # Copy resuls back + # Copy results back os.chdir(current_dir) if os.path.exists("blame/Blame_Makefile"): common.check_and_copy("blame/Blame_Makefile", ".") @@ -1052,7 +1052,7 @@ def do_blame(test_obj, test_files, good_result, target_to_blame): # interpret results if type(blame_phase) is str: test_obj.blame_phase = blame_phase - test_obj.blame_result = "was successul" + test_obj.blame_result = "was successful" else: test_obj.blame_result = "has failed" except Exception as e: @@ -1721,7 +1721,7 @@ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescri "clang, ubsan_clang, polly and gcc (ubsan_clang is a clang with sanitizer options)." "They can be separated by a space or comma.") parser.add_argument("-j", dest="num_jobs", default=multiprocessing.cpu_count(), type=int, - help='Maximum number of instances to run in parallel. By defaulti, it is set to' + help='Maximum number of instances to run in parallel. By default, it is set to' ' number of processor in your system') parser.add_argument("--config-file", dest="config_file", default=os.path.join(common.yarpgen_scripts, gen_test_makefile.default_test_sets_file_name), @@ -1735,10 +1735,10 @@ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescri parser.add_argument("--seeds", dest="seeds_option_value", default="", type=str, help="List of generator seeds to run or a file name with the list of seeds. "\ "Seeds may be separated by whitespaces and commas."\ - "The seed may start with S_ or end with /, i.e. S_12345/ is interpretted as 12345." + "The seed may start with S_ or end with /, i.e. S_12345/ is interpreted as 12345." "File comments may start with #") parser.add_argument("--blame", dest="blame", default=False, action="store_true", - help="Enable optimization triagging for failing tests for supported compilers") + help="Enable optimization triaging for failing tests for supported compilers") parser.add_argument("--creduce", dest="creduce", nargs='?', const=4, type=int, default=False, help="Enable test reduction using CReduce tool. When given a number, " "it's used as a number of creduce processes run for a single reduction (default is 4)") diff --git a/scripts/test_sets.txt b/scripts/test_sets.txt index 441fad05..b007da57 100644 --- a/scripts/test_sets.txt +++ b/scripts/test_sets.txt @@ -38,7 +38,7 @@ polly | clang++ | clang | -fPIC -mcmodel=large -w # Otherwise it may fail with "undefined reference to `__mulodi4'" error message. # See https://bugs.llvm.org//show_bug.cgi?id=16404 for more information # Note that -fpermissive option for gcc is required to allow reduction of ubsan_gcc fails. -# Otherwise result of reducion is empty program. +# Otherwise result of reduction is empty program. ubsan_clang | clang++ | clang | -fPIC -mcmodel=large -fsanitize=undefined -fno-sanitize-recover=undefined -Werror=uninitialized -Werror=implicitly-unsigned-literal | -march= ubsan_gcc | g++ | gcc | -fPIC -mcmodel=large -fsanitize=undefined -fno-sanitize-recover=undefined -Werror=uninitialized -fpermissive | -march= icc | icpc | icc | -fPIC -mcmodel=large -w | -x diff --git a/src/enums.h b/src/enums.h index be1800cc..1e5e1c71 100644 --- a/src/enums.h +++ b/src/enums.h @@ -224,7 +224,7 @@ enum class ArrayDimsReuseKind { SAME, OFFSET, SCALE, COMBINE }; // REPEAT means that we repeat the iterator that we've used before. It also // conflicts with the dimensions in-order setting // SWAP means that we swap new iterator with one that we've used before. -// The goal here is to alternate the order so we can generate somthing like +// The goal here is to alternate the order so we can generate something like // matrix multiplication enum class SubscriptKind { CONST, ITER, OFFSET, REPEAT }; // We need to make sure that we create special cases of array access patterns diff --git a/src/expr.h b/src/expr.h index 27c4463b..42e23c8a 100644 --- a/src/expr.h +++ b/src/expr.h @@ -402,7 +402,7 @@ class ReductionExpr : public AssignmentExpr { BinaryOp bin_op; LibCallKind lib_call_kind; std::shared_ptr result_expr; - // This member indicates if we want to use a simpel AssignmentExpr as a + // This member indicates if we want to use a simple AssignmentExpr as a // fallback option for reduction bool is_degenerate; }; diff --git a/src/gen_policy.h b/src/gen_policy.h index ceef2f5d..ecd0e11e 100644 --- a/src/gen_policy.h +++ b/src/gen_policy.h @@ -53,7 +53,7 @@ class GenPolicy { // Hard threshold for loop depth size_t loop_depth_limit; - // Hard threshold for if-else dpeth + // Hard threshold for if-else depth size_t if_else_depth_limit; // Number of statements in a scope diff --git a/src/type.h b/src/type.h index b626830d..34384d15 100644 --- a/src/type.h +++ b/src/type.h @@ -173,7 +173,7 @@ class TypeBool : public IntegralTypeHelper { : IntegralTypeHelper(getIntTypeId(), _is_static, _cv_qual) {} // TODO: decouple language representation of the type from back-end type. - // I.e. for different languages the name ofter type and the suffix might be + // I.e. for different languages the name of the type and the suffix might be // different. IntTypeID getIntTypeId() final { return IntTypeID::BOOL; } std::string getName(std::shared_ptr ctx) final {