semantic-equivalence-verifier — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited semantic-equivalence-verifier (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill enables rigorous analysis of semantic equivalence between two code artifacts (functions, classes, or modules). It systematically compares control flow, data flow, and observable behavior to determine if implementations are functionally identical, and provides actionable guidance for achieving equivalence when differences exist.
Clearly identify the two code artifacts to compare:
Artifact A: [function/class/module name and location]
Artifact B: [function/class/module name and location]Specify the equivalence scope:
Perform systematic static analysis on both artifacts:
Control Flow Analysis:
Data Flow Analysis:
x*2 vs x+x)Signature Analysis:
Analyze runtime behavior and observable effects:
Input-Output Mapping:
Side Effects:
Performance Characteristics:
For rigorous verification, apply formal methods:
Symbolic Execution:
Formal Proof:
Equivalence Checking:
Generate a comprehensive equivalence report using the template in assets/equivalence_report_template.md:
If Equivalent:
If Not Equivalent:
Different languages require adapted analysis approaches:
Statically Typed (Java, C++, Rust):
Dynamically Typed (Python, JavaScript):
Functional (Haskell, OCaml):
Refactoring Patterns:
temp=x; return temp ≡ return xOptimization Patterns:
x*0 ≡ 0Algorithm Substitution:
pow(x,2) ≡ x*xExample 1: Simple Function Comparison
# Artifact A
def sum_squares(n):
total = 0
for i in range(1, n+1):
total += i * i
return total
# Artifact B
def sum_squares(n):
return n * (n + 1) * (2*n + 1) // 6Analysis: Mathematically equivalent for all non-negative integers. Different algorithms, same result.
Example 2: Class Refactoring
// Artifact A
class Calculator {
int add(int a, int b) { return a + b; }
int multiply(int a, int b) { return a * b; }
}
// Artifact B
class Calculator {
int add(int a, int b) { return a + b; }
int multiply(int a, int b) {
int result = 0;
for(int i = 0; i < b; i++) result += a;
return result;
}
}Analysis: Not strictly equivalent - Artifact B fails for negative b. Partial equivalence for b >= 0.
For detailed guidance on specific analysis techniques:
references/formal_verification.mdreferences/symbolic_execution.mdreferences/language_patterns.md~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.