diff --git a/traincheck/invariant/DistinctArgumentRelation.py b/traincheck/invariant/DistinctArgumentRelation.py index 0bb9b81e..42b56f0c 100644 --- a/traincheck/invariant/DistinctArgumentRelation.py +++ b/traincheck/invariant/DistinctArgumentRelation.py @@ -185,12 +185,10 @@ def is_arguments_list_same(args1: list, args2: list): class DistinctArgumentRelation(Relation): - """FunctionCoverRelation is a relation that checks if one function covers another function. - - say function A and function B are two functions in the trace, we say function A covers function B when - every time function B is called, a function A invocation exists before it. """ - + DistinctArgumentRelation defines a relation where a function is expected to + take different argument values across threads or processes within the same training step. + """ @staticmethod def generate_hypothesis(trace) -> list[Hypothesis]: """Generate hypothesis for the DistinctArgumentRelation on trace.""" @@ -333,7 +331,7 @@ def collect_examples(trace, hypothesis): @staticmethod def infer(trace: Trace) -> Tuple[List[Invariant], List[FailedHypothesis]]: - """Infer Invariants for the FunctionCoverRelation.""" + """Infer Invariants for the DistinctArgumentRelation.""" all_hypotheses = DistinctArgumentRelation.generate_hypothesis(trace) # for hypothesis in all_hypotheses: @@ -429,7 +427,7 @@ def static_check_all( return CheckerResult( trace=[event1, event2], invariant=inv, - check_passed=True, + check_passed=False, triggered=True, ) diff --git a/traincheck/invariant/contain_relation.py b/traincheck/invariant/contain_relation.py index 31e90a95..ad17732b 100644 --- a/traincheck/invariant/contain_relation.py +++ b/traincheck/invariant/contain_relation.py @@ -1038,7 +1038,7 @@ def static_check_all( var_unchanged_check_passed = True found_expected_child_event = False - if check_relation_first: + if not check_relation_first: # precondition check if not preconditions.verify( [parent_pre_record], PARENT_GROUP_NAME, trace