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));

Readme

Keywords

none

Package Sidebar

Install

npm i jvm-cfg

Weekly Downloads

3

Version

0.0.22

License

GPL-2.0

Last publish

Collaborators

  • tsedlar