mistupv / JavaSlicer

A program slicer for Java, based on the system dependence graph (SDG).
https://mist.dsic.upv.es/JavaSlicer/demo/
GNU Affero General Public License v3.0
52 stars 18 forks source link

Add CLI #27

Closed jacosro closed 3 years ago

jacosro commented 4 years ago

Add support for command line interaction.

Todo list:

Two entrypoints needed:

Slicer

Entrypoint: Slicer class (cli module) Commands:

Graph (Optional)

Entrypoint: Graph class (cli module) Options:

@cargaji

cargaji commented 4 years ago

Suggestions:

  1. Allow setting -i to be repeated, and even rename it to -c for "classpath" instead of -i for "include" or "input". Make it work similarly to the Java classpath: load all those folders into the Javaparser type resolver.
  2. Allow a shorthand for the slicing criterion, such as file#line:var.
  3. Introduce an additional (optional) parameter for the instance (in case a variable appears multiple times in the same line). The difference in handling is probably non-existent in the SDG.
cargaji commented 4 years ago

Underlying elements to get a working CLI:

See #32.