Skip to content
Merged
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
11 changes: 5 additions & 6 deletions traincheck/invariant/DistinctArgumentRelation.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,9 @@ 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
Expand Down Expand Up @@ -333,7 +332,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:
Expand Down Expand Up @@ -429,7 +428,7 @@ def static_check_all(
return CheckerResult(
trace=[event1, event2],
invariant=inv,
check_passed=True,
check_passed=False,
triggered=True,
)

Expand Down