Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review of the command line interface of NESTML. #355

Closed
DimitriPlotnikov opened this issue May 16, 2017 · 0 comments
Closed

Review of the command line interface of NESTML. #355

DimitriPlotnikov opened this issue May 16, 2017 · 0 comments

Comments

@DimitriPlotnikov
Copy link
Contributor

As part of #354 the command line interface was extended to support different options. E.g.:
NESTML hast following options. I invite to test and review it: @jougs and @steffengraber.

usage: The NESTML command line tool can be used as 'java -jar nestml.jar
           <options> path_to_models'. Valid options are listed below:
 -d,--dry-run             Use this option to execute the model analysis
                          only.
 -e,--enable_tracing      Enables tracing of templates which were used to
                          generate C++ code. It can be used for debugging
                          purporses.
 -h,--help                Prints this message.
 -j,--json_log <arg>      Defines the name of the file where the model log
                          will be stored in JSON format.
 -m,--module_name <arg>   Defines the name of nest module which is
                          generated with neuron models. Under thisname the
                          module can be installed in SLI/PyNEST.
 -t,--target <arg>        Defines the path where generated artifacts are
                          stored. The only argument determines the folder
                          where the generated code is stored. E.g.
                          --target ~/my_path

Regarding the json output. If the file doesn't have a .log extension, it is appended automatically by the NESTML-tool. You are welcomed to ask for any additional information I should add to the JSON file (input, output folders, version of the NESTML tool, ...). I just wanted to add only necessary information.

Several example outputs in the case of an error or warning:

  1. There is a parse error (in this case the neuron name entry is empty since the model structurally invalid. the tool doesn't create an AST)
[ {
  "filename" : "cli_example.nestml",
  "neuronName" : "",
  "severity" : "ERROR",
  "code" : "NESTML_PARSER",
  "row" : 3,
  "col" : 7,
  "message" : "missing ':' at '\\n'"
} ]
  1. Context condition violations (errors and warnings):
    [ {
    "filename" : "sub_example.nestml",
    "neuronName" : "iaf_cond_alpha_implicit",
    "severity" : "WARNING",
    "code" : "SPL_LINE_OPERATOR_VISITOR",
    "row" : 15,
    "col" : 10,
    "message" : "Addition/substraction of real and 1 / ms. Assuming: 1 / ms.(<15,10>)"
    }, {
    "filename" : "sub_example.nestml",
    "neuronName" : "iaf_cond_alpha_implicit",
    "severity" : "WARNING",
    "code" : "SPL_LINE_OPERATOR_VISITOR",
    "row" : 17,
    "col" : 10,
    "message" : "Addition/substraction of real and 1 / ms. Assuming: 1 / ms.(<17,10>)"
    }, {
    "filename" : "sub_example.nestml",
    "neuronName" : "iaf_cond_alpha_implicit",
    "severity" : "WARNING",
    "code" : "SPL_LINE_OPERATOR_VISITOR",
    "row" : 18,
    "col" : 35,
    "message" : "Addition/substraction of real and mV. Assuming: mV.(<18,35>)"
    }]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant