jvm-cfg

0.0.22 • Public • Published

jvm-cfg

A control flow graph framework made for jvm.js

import { Jar } from 'jvm';
import { BlockBuilder, FlowGraph } from 'jvm-cfg';
import * as _ from 'lodash';
 
Jar.unpack(this.jarFile)
  .then((jar) => {
    for (let [name, classInfo] of jar) {
      _.each(classInfo.methods, (method) => {
        let blocks = BlockBuilder.blocksFor(method.instructions);
        let graph = FlowGraph.fromBlocks(blocks);
        // interact with graph
      });
    }
  }).catch((err) => console.log(err));

/jvm-cfg/

    Package Sidebar

    Install

    npm i jvm-cfg

    Weekly Downloads

    4

    Version

    0.0.22

    License

    GPL-2.0

    Last publish

    Collaborators

    • tsedlar