| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| modec [2014/02/16 07:05] – yann | modec [2025/01/15 21:40] (current) – external edit 127.0.0.1 |
|---|
| - ''MoDeC Solver'' (and ''MoDeC Solver Tests'') defines constaints and problems to identify occurrences of behavioural and creational design motifs in the MoDeC models of execution traces. | - ''MoDeC Solver'' (and ''MoDeC Solver Tests'') defines constaints and problems to identify occurrences of behavioural and creational design motifs in the MoDeC models of execution traces. |
| |
| ===== MoDeC Basic Uses ===== | ===== MoDeC Usage ===== |
| |
| Steps to gather execution traces of some target program. | Here are the three main steps to gather execution traces of some target Java program and identify occurrences of behavioural and creational design motifs in their MoDeC models. |
| |
| (1) Instrument the bytecode of the target program, using | * Instrument the bytecode of the target Java program, using ''modec.util.Instrumentor.instrumentClasses(String)'', see examples in ''modec.util.Instrumentor.main(String[])''. The input of the ''instrumentClasses(String)'' method is a file describing: |
| "modec.util.Instrumentor.instrumentClasses(String)", see examples in | * The path to the bytecodes of the classes of the target Java program; |
| "modec.util.Instrumentor.main(String[])". The input of the | * The path to the folder where to store the instrumented bytecodes; |
| "instrumentClasses" method is a file describing: | * The path to the libraries required by the target program (if any); |
| - The path to the byecode classes of the target program. | * The name of the file of the execution traces; |
| - The path to the folder where to store the instrumented bytecodes. | * The fully qualified name of the "main" class of the target program; |
| - The path to the libraries required by the target program (if any). | * A list of paths to the Java class files to instrument, relative to the first path above. |
| - The name of the file of the execution traces. | |
| - The fully qualified name of the "main" class of the target program. | |
| - A list of paths to the Java class files to instrument, relative to the first path above. | |
| See for a complete example "MoDeC Bytecode Instrumentation | |
| Tests/Input Files/Evaluation of ArgoUML v0.19.8.txt". | |
| |
| The list of paths to the Java class files to instrument can be | * See for a complete example the file ''MoDeC Bytecode Instrumentation Tests/Input Files/Evaluation of ArgoUML v0.19.8.txt''. The list of paths to the Java class files to instrument can be generated using ''modec.tool.helper.ClassFileListGenerator.main(String[])''. |
| generated using | |
| "modec.tool.helper.ClassFileListGenerator.main(String[])". | |
| |
| (2) Execute the instrumented target program, using | * Execute the instrumented target program, using ''modec.tool.Invoker.invokeMainClass(String)'', see examples in ''modec.tool.Invoker.main(String[])''. Running the invoker will launch the instrumented target program and open a new window. The new window shows only one button and a text field, used to insert marks (also called tags) at any user-chosen appropriate moment in the collected execution traces, for example before and after executing some particular feature. |
| "modec.tool.Invoker.invokeMainClass(String)", see examples in | |
| "modec.tool.Invoker.main(String[])". Running the "Invoker" will | |
| launch the instrumented target program and open a new window. The | |
| new window shows only one button and a text field, used to insert | |
| marks (also called tags) at any user-chosen appropriate moment in | |
| the collected execution traces, for example before and after | |
| executing some particular feature. | |
| |