anoma / vamp-ir

Vamp-IR is a proof-system-agnostic language for writing arithmetic circuits
https://anoma.github.io/VampIR-Book/
Apache License 2.0
156 stars 44 forks source link

Add utility to generate JSON inputs file template and corresponding CLI option #62

Closed lopeetall closed 1 year ago

lopeetall commented 1 year ago

Vamp-ir now gives the option to solicit initial witnesses from the command line or from a JSON file. The JSON inputs file has this structure:

{
    "var_name_1": "value_1",
    "var_name_2": "value_2",
    ...
}

The initial input names var_name_1, var_name_2 etc are found in the constraints in the .pir document and are parsed and collected early in the compilation process. We should add a utility to generate a list of the inputs in JSON format with the expected variable names filled in, and give the user the option to have it generated for them if they choose.