Skip to content

aki-ks/tactical

Repository files navigation

Tactical

This project aims to simplify working with JVM bytecode.

Building a referenced based intermediation for java bytecode is the main objective.

Stack

  • The stack intermediation represents bytecode close to JVM bytecode.
  • Instructions that serve the sole purpose of saving diskspace have been removed. E.g. bipush, sipush, ldc, ldc2, iconst_0, iconst_1 and many more are all represented by the PushInsn.
  • long and double values require only one slot on the stack. The DUP2 instruction for instance does always duplicate two values. In JVM bytecode it may duplicate either one or two values depending on their type.
  • Dead code will be dropped during the conversion

Ref

  • The ref intermediation drops the concept of operating on a stack and uses references instead.
  • Instructions have been replaced against the concept of statements and expressions.
  • The instruction set was thereby further reduced.
  • It is a statically typed language - locals have types.
  • Dead code will be dropped. Local variable debug information get lost during conversion from stack to ref.

Objectives

  • implement basic classfile structure shared between all intermediations
  • build stack intermediation
  • build reference based intermediation
  • build dalvik intermediation
  • conversion: jvm bytecode (asm) <-> stack
  • conversion: stack <-> reference
  • conversion: dex bytecode (smali) <-> dalvik
  • conversion: dalvik <-> reference
  • implement the whole jvm / dex classfile format
    • for the stack intermediation (jvm 11)
    • for the reference based intermediation
    • for the dex intermediation
  • Turn this project into a disassambler generating human editable textfiles
    • Textifier for core
    • Textifier for stack
    • Textifier for ref
    • Textifier for dex
    • Parser for core
    • Parser for stack
    • Parser for ref
    • Parser for dex

Releases

No releases published

Packages

No packages published