Commit cfe3b5a4 authored by Lukáš Marek's avatar Lukáš Marek
Browse files

Merged yudi's and mine changes

parent d9f0e985
......@@ -8,10 +8,10 @@ import java.util.Map;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.analysis.Analyzer;
import ch.usi.dag.disl.marker.MarkedRegion;
import ch.usi.dag.disl.analyzer.Analyzer;
import ch.usi.dag.disl.snippet.Snippet;
import ch.usi.dag.disl.viewer.Viewer;
import ch.usi.dag.disl.snippet.marker.MarkedRegion;
import ch.usi.dag.disl.weaver.Viewer;
import ch.usi.dag.jborat.agent.Instrumentation;
public class DiSLDriver implements Instrumentation {
......
package ch.usi.dag.disl;
import org.objectweb.asm.tree.ClassNode;
//FIXME When integrating with jborat, add the implement field
// and the override annotation.
public class DiSLInstrumentation {
public void instrument(ClassNode clazz) {
// Four steps to instrument classes:
// Parser.parse();
// Marker.mark(method);
// Analyzer.analyse(clazz);
// Weaver.weave(clazz);
}
}
package ch.usi.dag.disl.analysis;
public interface Analyzer {
// TODO
void analyze();
}
package ch.usi.dag.disl.analyzer;
import org.objectweb.asm.tree.ClassNode;
// Provide static analysis of the java class.
public class Analyzer {
public static void analyse(ClassNode clazz){
}
}
package ch.usi.dag.disl.analyzer;
public interface Analyzer {
// TODO
void analyse();
}
package ch.usi.dag.disl.snippet;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.scope.Scope;
import ch.usi.dag.disl.snippet.marker.Marker;
import ch.usi.dag.disl.snippet.scope.Scope;
public interface Snippet {
......
package ch.usi.dag.disl.snippet;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.scope.Scope;
import ch.usi.dag.disl.snippet.marker.Marker;
import ch.usi.dag.disl.snippet.scope.Scope;
public class SnippetImpl {
......
package ch.usi.dag.disl.marker;
package ch.usi.dag.disl.snippet.marker;
import java.util.LinkedList;
import java.util.List;
......
package ch.usi.dag.disl.marker;
package ch.usi.dag.disl.snippet.marker;
import java.util.LinkedList;
import java.util.List;
......
package ch.usi.dag.disl.marker;
package ch.usi.dag.disl.snippet.marker;
import org.objectweb.asm.tree.AbstractInsnNode;
......
package ch.usi.dag.disl.marker;
package ch.usi.dag.disl.snippet.marker;
import java.util.List;
......
package ch.usi.dag.disl.scope;
package ch.usi.dag.disl.snippet.scope;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl.viewer;
import java.util.List;
import java.util.Map;
import org.objectweb.asm.tree.ClassNode;
import ch.usi.dag.disl.marker.MarkedRegion;
import ch.usi.dag.disl.snippet.Snippet;
public interface Viewer {
// TODO include analysis
void instrument(ClassNode classNode,
Map<Snippet, List<MarkedRegion>> snippetMarkings);
}
package ch.usi.dag.disl.weaver;
import java.util.List;
import java.util.Map;
import org.objectweb.asm.tree.ClassNode;
import ch.usi.dag.disl.snippet.Snippet;
import ch.usi.dag.disl.snippet.marker.MarkedRegion;
// The weaver instruments byte-codes into java class.
public class Weaver {
public static void weave(ClassNode clazz) {
public interface Weaver {
}
// TODO include analysis
void instrument(ClassNode classNode,
Map<Snippet, List<MarkedRegion>> snippetMarkings);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment