@@ -4,6 +4,7 @@ pub struct Input {
44 pub input_program : PathBuf ,
55 pub out_r1cs : PathBuf ,
66 pub out_json_constraints : PathBuf ,
7+ pub out_json_substitutions : PathBuf ,
78 pub out_wat_code : PathBuf ,
89 pub out_wasm_code : PathBuf ,
910 pub out_wasm_name : String ,
@@ -82,6 +83,11 @@ impl Input {
8283 & format ! ( "{}_constraints" , file_name) ,
8384 JSON ,
8485 ) ,
86+ out_json_substitutions : Input :: build_output (
87+ & output_path,
88+ & format ! ( "{}_substitutions" , file_name) ,
89+ JSON ,
90+ ) ,
8591 wat_flag : input_processing:: get_wat ( & matches) ,
8692 wasm_flag : input_processing:: get_wasm ( & matches) ,
8793 c_flag : c_flag,
@@ -158,6 +164,9 @@ impl Input {
158164 pub fn json_constraints_file ( & self ) -> & str {
159165 self . out_json_constraints . to_str ( ) . unwrap ( )
160166 }
167+ pub fn json_substitutions_file ( & self ) -> & str {
168+ self . out_json_substitutions . to_str ( ) . unwrap ( )
169+ }
161170 pub fn wasm_flag ( & self ) -> bool {
162171 self . wasm_flag
163172 }
@@ -410,10 +419,9 @@ mod input_processing {
410419 )
411420 . arg (
412421 Arg :: with_name ( "print_json_sub" )
413- . long ( "jsons " )
422+ . long ( "simplification_substitution " )
414423 . takes_value ( false )
415- . hidden ( true )
416- . display_order ( 100 )
424+ . display_order ( 980 )
417425 . help ( "Outputs the substitution in json format" ) ,
418426 )
419427 . arg (
0 commit comments