Initial implementation of agent generation.

This is hardcoded to expect some files in the lib directory in the working directory of the program, obviously a temporary solution for while i was working on it. @pdaian, can you please have the installer put these files together in a predictable location? (BaseAspect.aj  MANIFEST.MF  aspectjrt.jar  aspectjtools.jar  aspectjweaver.jar  rt.jar) from @owolabileg's [build-agent archive](http://fsl.cs.illinois.edu/images/6/6d/Build-agent.tar.gz).

This adds the --agent option, where the result of
`javamop --agent directory1 directory2 file1.mop file2.mop -n mopAgent`
reads all the files in directory1 and directory2 and uses file1.mop and file2.mop and produces a file `mopAgent.jar` that can be used as a java agent with existing java code.

This still needs some work (deleting intermediate generated files, and refactoring the code), but I'm putting this up now in case @owolabileg, @grosu, or @pdaian have comments.
I think the default should be as simple and as automatic as possible.  Yes, I agree with you, Cody, that we do not want to require our users to know AspectJ.  An option for the more rare cases for experts sounds like the right thing.

Thanks,
Grigore


________________________________
From: A. Cody Schuffelen [notifications@github.com]
Sent: Thursday, July 03, 2014 11:04 AM
To: runtimeverification/javamop
Cc: Rosu, Grigore
Subject: Re: [javamop] Initial implementation of agent generation. (#32)


In src/javamop/GenerateAgent.java:

> +        writer.println("    !within(sun..*) &&");
> +        writer.println("    !within(java..*) &&");
> +        writer.println("    !within(javax..*) &&");
> +        writer.println("    !within(com.sun..*) &&");
> +        writer.println("    !within(org.dacapo.harness..*) &&");
> +        writer.println("    !within(org.apache.commons..*) &&");
> +        writer.println("    !within(org.apache.geronimo..*) &&");
> +        writer.println("    !within(net.sf.cglib..*) &&");
> +        writer.println("    !within(mop..*) &&");
> +        writer.println("    !within(javamoprt..*) &&");
> +        writer.println("    !within(rvmonitorrt..*) &&");
> +        writer.println("    !within(com.runtimeverification..*);");
> +        writer.println("}");
> +        writer.flush();
> +        writer.close();
> +    }


You're right. However, I'm not sure everyone building a JavaMOP agent already knows AspectJ; how about another command line argument to specify one, while leaving this one in as a default?

—
Reply to this email directly or view it on GitHub<https://github.com/runtimeverification/javamop/pull/32/files#r14522261>.