Hasty Briefsbeta

Datalog-Based Binary Equivalence

15 days ago
  • #Java
  • #Equivalence Testing
  • #Bytecode Analysis
  • DALEQ is a tool for comparing Java bytecode equivalence, developed for Java 17.
  • It can be built with Maven and executed via CLI with options to compare JAR files, source code, and generate reports.
  • The tool uses ASM for bytecode analysis and Soufflé for relational database processing to determine equivalence.
  • DALEQ produces exit codes (0, 1, 2) indicating different levels of equivalence, useful for CI integration.
  • The process involves converting bytecode to an extensional database (EDB), then applying rules to create an intensional database (IDB) for comparison.
  • Projection is used to normalize IDBs for comparison, removing non-essential data like provenance IDs.
  • Reports include detailed analysis results (PASS, FAIL, N/A, ERROR) with hyperlinks to provenance data.
  • Additional analyzers can be added by implementing the Analyser interface and configuring via META-INF/services.
  • Development setup involves creating a virtual environment and installing pre-commit hooks for code quality checks.