coq-community / run-coq-bug-minimizer

Repository for triggering runs of the Coq bug minimizer using GitHub Actions [maintainer=@JasonGross]
MIT License
2 stars 0 forks source link

Test issue creation #2

Closed JasonGross closed 4 years ago

JasonGross commented 4 years ago

@coqbot: minimize it

opam install -y coq-ext-lib
eval $(opam env)

mkdir temp
cd temp
wget https://github.com/coq/coq/files/4698509/bug.v.zip
unzip bug.v.zip
coqc -q bug.v
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/doc/coq/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -w -a+1..3-4+5..8-9+10..26-27+28..40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 -safe-string -strict-sequence WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version The Coq Proof Assistant, version 8.16.0 compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ true ++ (/github/workspace/run-script.sh @ line 1) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < ++ (/github/workspace/run-script.sh @ line 2) $ opam install -y coq-fiat-crypto.dev [ERROR] Package coq-fiat-crypto has no version dev. ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize coq.dev

true | coqtop
opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/doc/coq/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -w -a+1..3-4+5..8-9+10..26-27+28..40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 -safe-string -strict-sequence WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version The Coq Proof Assistant, version 8.16.0 compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ true ++ (/github/workspace/run-script.sh @ line 1) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < ++ (/github/workspace/run-script.sh @ line 2) $ opam install -y coq-fiat-crypto.dev [ERROR] Package coq-fiat-crypto has no version dev. ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize coq.dev

true | coqtop
opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/doc/coq/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -w -a+1..3-4+5..8-9+10..26-27+28..40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 -safe-string -strict-sequence WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version The Coq Proof Assistant, version 8.16.0 compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ coqtop ++ (/github/workspace/run-script.sh @ line 1) $ true MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < ++ (/github/workspace/run-script.sh @ line 2) $ opam install -y coq-fiat-crypto.dev [ERROR] Package coq-fiat-crypto has no version dev. ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize coq.dev

true | coqtop
opam install -y coq-fiat-crypto.dev
JasonGross commented 2 years ago

@coqbot minimize coq.dev

true | coqtop
opam install -y coq-fiat-crypto.dev
JasonGross commented 2 years ago

@coqbot merge now

JasonGross commented 2 years ago

@coqbot minimize coq.dev

true | coqtop
opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/doc/coq/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -w -a+1..3-4+5..8-9+10..26-27+28..40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 -safe-string -strict-sequence WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version The Coq Proof Assistant, version 8.16.0 compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ true ++ (/github/workspace/run-script.sh @ line 1) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 8.16.0 Coq < ++ (/github/workspace/run-script.sh @ line 2) $ opam install -y coq-fiat-crypto.dev [ERROR] Package coq-fiat-crypto has no version dev. ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize coq.dev

true | coqtop
opam install -y coq-fiat-crypto.dev
JasonGross commented 2 years ago

@coqbot minimize coq.dev

opam install -y coq-fiat-crypto.dev
JasonGross commented 2 years ago

@coqbot minimize coq.dev

opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

JasonGross commented 2 years ago

@coqbot minimize coq.dev

opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/share/doc/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -bin-annot -strict-sequence -w -a+1..3-4+5..8-9+10..26-27+28..39-40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version The Coq Proof Assistant, version 8.17+alpha compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG: coqpath: COQPATH= MINIMIZER_DEBUG: pwd: PWD=/github/workspace MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 5fd048cce6a4:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (be037486c27f29dc0bcfbfd742c0303af295e23f) Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ opam install -y coq-fiat-crypto.dev The following actions will be performed: - install coq-coqprime dev [required by coq-fiat-crypto] - install coq-rewriter dev [required by coq-fiat-crypto] - install conf-findutils 1 [required by coq-fiat-crypto] - install coq-coqutil dev [required by coq-fiat-crypto] - install coq-fiat-crypto dev ===== 5 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed conf-findutils.1 -> retrieved coq-coqutil.dev (git+https://github.com/mit-plv/coqutil.git#tested) -> retrieved coq-coqprime.dev (git+https://github.com/thery/coqprime.git#master) -> retrieved coq-rewriter.dev (git+https://github.com/mit-plv/rewriter.git#master) -> retrieved coq-fiat-crypto.dev (git+https://github.com/mit-plv/fiat-crypto.git#master) -> installed coq-coqutil.dev -> installed coq-coqprime.dev -> installed coq-rewriter.dev [ERROR] The compilation of coq-fiat-crypto.dev failed at "make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml". #=== ERROR while compiling coq-fiat-crypto.dev ================================# # context 2.1.3 | linux/x86_64 | ocaml-option-flambda.1 ocaml-variants.4.13.1+options | https://coq.inria.fr/opam/extra-dev#2022-11-15 19:00 # path ~/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev # command /usr/bin/make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml # exit-code 2 # env-file ~/.opam/log/coq-fiat-crypto-836-00284a.env # output-file ~/.opam/log/coq-fiat-crypto-836-00284a.out ### output ### # [...] # MINIMIZER_DEBUG: pwd: PWD=/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev # MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -q -w +implicit-core-hint-db\,+implicits-in-term\,+non-reversible-notation\,+deprecated-intros-until-0\,+deprecated-focus\,+unused-intro-pattern\,+variable-collision\,+unexpected-implicit-declaration\,+omega-is-deprecated\,+deprecated-instantiate-syntax\,+non-recursive\,+undeclared-scope\,+deprecated-hint-rewrite-without-loca[...] # COQC src/Assembly/Symbolic.v # MINIMIZER_DEBUG: /home/coq/.opam/4.13.1+flambda/bin/coqc # MINIMIZER_DEBUG: coqpath: COQPATH= # MINIMIZER_DEBUG: pwd: PWD=/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev # MINIMIZER_DEBUG: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -q -w +implicit-core-hint-db\,+implicits-in-term\,+non-reversible-notation\,+deprecated-intros-until-0\,+deprecated-focus\,+unused-intro-pattern\,+variable-collision\,+unexpected-implicit-declaration\,+omega-is-deprecated\,+deprecated-instantiate-syntax\,+non-recursive\,+undeclared-scope\,+deprecated-hint-rewrite-without-loca[...] # File "./src/Assembly/Symbolic.v", line 1445, characters 2-45: # Error: Anomaly "Uncaught exception Not_found." # Please report at http://coq.inria.fr/bugs/. # # make: *** [Makefile.coq:793: src/Assembly/Symbolic.vo] Error 129 <><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> +- The following actions failed | - build coq-fiat-crypto dev +- +- The following changes have been performed | - install conf-findutils 1 | - install coq-coqprime dev | - install coq-coqutil dev | - install coq-rewriter dev +- The former state can be restored with: /usr/local/bin/opam.orig switch import "/home/coq/.opam/4.13.1+flambda/.opam-switch/backup/state-20221118220453.export" ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize coq.dev

opam install -y coq-fiat-crypto.dev
JasonGross commented 2 years ago

@coqbot minimize coq.dev

opam install -y coq-fiat-crypto.dev
JasonGross commented 2 years ago

@coqbot minimize coq.dev

opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.4bnZRN5ebu MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/share/doc/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -bin-annot -strict-sequence -w -a+1..3-4+5..8-9+10..26-27+28..39-40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.A6jYDJmJVD MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version The Coq Proof Assistant, version 8.17+alpha compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ coqtop + (/github/workspace/run-script.sh @ line 54) $ true MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.8JBzuIlmAo MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig Welcome to Coq 5fd048cce6a4:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (be037486c27f29dc0bcfbfd742c0303af295e23f) Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ opam install -y coq-fiat-crypto.dev The following actions will be performed: - install coq-coqprime dev [required by coq-fiat-crypto] - install coq-rewriter dev [required by coq-fiat-crypto] - install conf-findutils 1 [required by coq-fiat-crypto] - install coq-coqutil dev [required by coq-fiat-crypto] - install coq-fiat-crypto dev ===== 5 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed conf-findutils.1 -> retrieved coq-coqutil.dev (git+https://github.com/mit-plv/coqutil.git#tested) -> retrieved coq-coqprime.dev (git+https://github.com/thery/coqprime.git#master) -> retrieved coq-rewriter.dev (git+https://github.com/mit-plv/rewriter.git#master) -> retrieved coq-fiat-crypto.dev (git+https://github.com/mit-plv/fiat-crypto.git#master) -> installed coq-coqutil.dev -> installed coq-coqprime.dev -> installed coq-rewriter.dev [ERROR] The compilation of coq-fiat-crypto.dev failed at "make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml". #=== ERROR while compiling coq-fiat-crypto.dev ================================# context 2.1.3 | linux/x86_64 | ocaml-option-flambda.1 ocaml-variants.4.13.1+options | https://coq.inria.fr/opam/extra-dev#2022-11-15 19:00 path ~/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev command /usr/bin/make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml exit-code 2 env-file ~/.opam/log/coq-fiat-crypto-847-7c0835.env output-file ~/.opam/log/coq-fiat-crypto-847-7c0835.out ### output ### [...] MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -q -w +implicit-core-hint-db\,+implicits-in-term\,+non-reversible-notation\,+deprecated-intros-until-0\,+deprecated-focus\,+unused-intro-pattern\,+variable-collision\,+unexpected-implicit-declaration\,+omega-is-deprecated\,+deprecated-instantiate-syntax\,+non-recursive\,+undeclared-scope\,+deprecated-hint-rewrite-withou[...] COQC src/Assembly/Symbolic.v MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.zrj4hFm9PL MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -q -w +implicit-core-hint-db\,+implicits-in-term\,+non-reversible-notation\,+deprecated-intros-until-0\,+deprecated-focus\,+unused-intro-pattern\,+variable-collision\,+unexpected-implicit-declaration\,+omega-is-deprecated\,+deprecated-instantiate-syntax\,+non-recursive\,+undeclared-scope\,+deprecated-hint-rewrite-withou[...] File "./src/Assembly/Symbolic.v", line 1445, characters 2-45: Error: Anomaly "Uncaught exception Not_found." Please report at http://coq.inria.fr/bugs/. make: *** [Makefile.coq:793: src/Assembly/Symbolic.vo] Error 129 <><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> +- The following actions failed | - build coq-fiat-crypto dev +- +- The following changes have been performed | - install conf-findutils 1 | - install coq-coqprime dev | - install coq-coqutil dev | - install coq-rewriter dev +- The former state can be restored with: /usr/local/bin/opam.orig switch import "/home/coq/.opam/4.13.1+flambda/.opam-switch/backup/state-20221119020612.export" ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize coq.dev

opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Minimized File /home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src/Assembly/Symbolic.v (full log on GitHub Actions)

Minimized Coq File (consider adding this file to the test-suite) ```coq (* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "+implicit-core-hint-db,+implicits-in-term,+non-reversible-notation,+deprecated-intros-until-0,+deprecated-focus,+unused-intro-pattern,+variable-collision,+unexpected-implicit-declaration,+omega-is-deprecated,+deprecated-instantiate-syntax,+non-recursive,+undeclared-scope,+deprecated-hint-rewrite-without-locality,+deprecated-hint-without-locality,+deprecated-instance-without-locality,+deprecated-typeclasses-transparency-without-locality,unsupported-attributes" "-w" "-notation-overridden,-deprecated-hint-constr,-fragile-hint-constr,-native-compiler-disabled,-ambiguous-paths,-masking-absolute-name" "-w" "-deprecated-native-compiler-option" "-R" "/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src" "Crypto" "-Q" "/github/workspace/cwd" "Top" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Bignums" "Bignums" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Coqprime" "Coqprime" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Ltac2" "Ltac2" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Rewriter" "Rewriter" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/coqutil" "coqutil" "-top" "Crypto.Assembly.Symbolic" "-native-compiler" "ondemand") -*- *) (* File reduced by coq-bug-minimizer from original input, then from 4434 lines to 12 lines, then from 17 lines to 11 lines *) (* coqc version 8.17+alpha compiled with OCaml 4.13.1 coqtop version 5fd048cce6a4:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (be037486c27f29dc0bcfbfd742c0303af295e23f) Expected coqc runtime on this file: 0.162 sec *) Module Type DagDefinitions. End DagDefinitions. Module DagExtraDefinitions (Import dag : DagDefinitions). Module Type EagerDagDefinitions. End EagerDagDefinitions. End DagExtraDefinitions. Include DagExtraDefinitions. Declare Module eager : EagerDagDefinitions. ```
Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) ```coq ```
Build Log (contains the Coq error message) ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.lwYBH9Qiez COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/share/doc/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -bin-annot -strict-sequence -w -a+1..3-4+5..8-9+10..26-27+28..39-40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.Z2BWysmctH The Coq Proof Assistant, version 8.17+alpha compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ coqtop + (/github/workspace/run-script.sh @ line 54) $ true MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.i8HySK1jE2 Welcome to Coq 5fd048cce6a4:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (be037486c27f29dc0bcfbfd742c0303af295e23f) Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ opam install -y coq-fiat-crypto.dev The following actions will be performed: - install coq-coqprime dev [required by coq-fiat-crypto] - install coq-rewriter dev [required by coq-fiat-crypto] - install conf-findutils 1 [required by coq-fiat-crypto] - install coq-coqutil dev [required by coq-fiat-crypto] - install coq-fiat-crypto dev ===== 5 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed conf-findutils.1 -> retrieved coq-coqutil.dev (git+https://github.com/mit-plv/coqutil.git#tested) -> retrieved coq-coqprime.dev (git+https://github.com/thery/coqprime.git#master) -> retrieved coq-rewriter.dev (git+https://github.com/mit-plv/rewriter.git#master) -> retrieved coq-fiat-crypto.dev (git+https://github.com/mit-plv/fiat-crypto.git#master) -> installed coq-coqutil.dev -> installed coq-coqprime.dev -> installed coq-rewriter.dev [ERROR] The compilation of coq-fiat-crypto.dev failed at "make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml". #=== ERROR while compiling coq-fiat-crypto.dev ================================# context 2.1.3 | linux/x86_64 | ocaml-option-flambda.1 ocaml-variants.4.13.1+options | https://coq.inria.fr/opam/extra-dev#2022-11-15 19:00 path ~/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev command /usr/bin/make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml exit-code 2 env-file ~/.opam/log/coq-fiat-crypto-848-c502fd.env output-file ~/.opam/log/coq-fiat-crypto-848-c502fd.out ### output ### [...] MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.Wi40383Kkk COQC src/Assembly/Symbolic.v MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -q -w +implicit-core-hint-db\,+implicits-in-term\,+non-reversible-notation\,+deprecated-intros-until-0\,+deprecated-focus\,+unused-intro-pattern\,+variable-collision\,+unexpected-implicit-declaration\,+omega-is-deprecated\,+deprecated-instantiate-syntax\,+non-recursive\,+undeclared-scope\,+deprecated-hint-rewrite-withou[...] MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.etH5ew7BWu File "./src/Assembly/Symbolic.v", line 1445, characters 2-45: Error: Anomaly "Uncaught exception Not_found." Please report at http://coq.inria.fr/bugs/. make: *** [Makefile.coq:793: src/Assembly/Symbolic.vo] Error 129 <><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> +- The following actions failed | - build coq-fiat-crypto dev +- +- The following changes have been performed | - install conf-findutils 1 | - install coq-coqprime dev | - install coq-coqutil dev | - install coq-rewriter dev +- The former state can be restored with: /usr/local/bin/opam.orig switch import "/home/coq/.opam/4.13.1+flambda/.opam-switch/backup/state-20221119025217.export" ```
Minimization Log (truncated to last 8.0KiB; full 162KiB file on GitHub Actions Artifacts under bug.log) ``` q KEEP_ERROR=1 bug_01.glob getting bug_01.glob (/github/workspace/cwd/bug_01.glob) getting /github/workspace/cwd/bug_01.glob  Sanity check passed. Now, I will attempt to strip repeated newlines and trailing spaces from this file... No strippable newlines or spaces. Now, I will attempt to strip the comments from this file...  Succeeded in stripping comments. Now, I will attempt to factor out all of the [Require]s... getting bug_01.v (/github/workspace/cwd/bug_01.v) NOTE: The file bug_01.v is very new (1668833524, 0 seconds old), delaying until it's a bit older /home/coq/.opam/4.13.1+flambda/bin/coq_makefile COQC = /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -o Makefilefg49ymn_.coq -R /home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src Crypto -Q /github/workspace/cwd Top -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Bignums Bignums -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Coqprime Coqprime -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Ltac2 Ltac2 -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Rewriter Rewriter -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/coqutil coqutil -R /home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src Crypto -Q /github/workspace/cwd Top -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Bignums Bignums -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Coqprime Coqprime -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Ltac2 Ltac2 -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Rewriter Rewriter -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/coqutil coqutil -arg -q -arg -w -arg +implicit-core-hint-db,+implicits-in-term,+non-reversible-notation,+deprecated-intros-until-0,+deprecated-focus,+unused-intro-pattern,+variable-collision,+unexpected-implicit-declaration,+omega-is-deprecated,+deprecated-instantiate-syntax,+non-recursive,+undeclared-scope,+deprecated-hint-rewrite-without-locality,+deprecated-hint-without-locality,+deprecated-instance-without-locality,+deprecated-typeclasses-transparency-without-locality,unsupported-attributes -arg -w -arg -notation-overridden,-deprecated-hint-constr,-fragile-hint-constr,-native-compiler-disabled,-ambiguous-paths,-masking-absolute-name -arg -w -arg -deprecated-native-compiler-option -arg -native-compiler -arg ondemand bug_01.v getting Makefilefg49ymn_.coq (/github/workspace/cwd/Makefilefg49ymn_.coq) make -k -f Makefilefg49ymn_.coq KEEP_ERROR=1 bug_01.glob getting bug_01.glob (/github/workspace/cwd/bug_01.glob) getting bug_01.glob (/github/workspace/cwd/bug_01.glob)  Succeeded in normalizing Requires. Now, I will attempt to split up [Require] statements... getting /github/workspace/cwd/bug_01.v NOTE: The file /github/workspace/cwd/bug_01.v is very new (1668833528, 0 seconds old), delaying until it's a bit older getting /github/workspace/cwd/bug_01.glob getting /github/workspace/cwd/bug_01.glob No Requires to split. In order to efficiently manipulate the file, I have to break it into statements. I will attempt to do this by matching on periods.  Splitting successful. I will now attempt to remove any lines after the line which generates the error. No lines to trim. In order to efficiently manipulate the file, I have to break it into definitions. I will now attempt to do this. Sending statements to coqtop... Done. Splitting to definitions...  Splitting to definitions successful. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to replace Qed Obligation with Admit Obligations  Admitting Qed Obligations successful. Failed to do everything at once; trying one at a time. Admitting Qed Obligations unsuccessful. No successful changes. I will now attempt to replace Qeds with Admitteds  Admitting Qeds successful. Failed to do everything at once; trying one at a time. Admitting Qeds unsuccessful. No successful changes. I will now attempt to replace Qeds with admit. Defined.  Admitting Qeds successful. Failed to do everything at once; trying one at a time. Admitting Qeds unsuccessful. No successful changes. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to admit [abstract ...]s  Admitting [abstract ...] successful.  Admitting [abstract ...] successful. Admitting [abstract ...] unsuccessful. Admitting [abstract ...] unsuccessful. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to replace Obligation with Admit Obligations  Admitting Obligations successful. Failed to do everything at once; trying one at a time. Admitting Obligations unsuccessful. No successful changes. I will now attempt to admit lemmas with Admitted  Admitting lemmas successful. Failed to do everything at once; trying one at a time. Admitting lemmas unsuccessful. No successful changes. I will now attempt to admit definitions with Admitted  Admitting definitions successful. Failed to do everything at once; trying one at a time. Admitting definitions unsuccessful. No successful changes. I will now attempt to admit lemmas with admit. Defined  Admitting lemmas successful. Failed to do everything at once; trying one at a time. Admitting lemmas unsuccessful. No successful changes. I will now attempt to admit definitions with admit. Defined  Admitting definitions successful. Failed to do everything at once; trying one at a time. Admitting definitions unsuccessful. No successful changes. I will now attempt to export modules Module exportation unsuccessful. I will now attempt to split imports and exports Import/Export splitting unsuccessful. I will now attempt to split := definitions One-line definition splitting unsuccessful. I will now attempt to remove all lines, one at a time Line removal unsuccessful. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to remove empty sections No empty sections to remove. Now, I will attempt to strip repeated newlines and trailing spaces from this file... No strippable newlines or spaces. ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize

opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.z5KMPH6Jew COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/doc/coq/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -w -a+1..3-4+5..8-9+10..26-27+28..40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 -safe-string -strict-sequence WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.MeLtiHVTOJ The Coq Proof Assistant, version 8.16.0 compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.nleNkuFCLs Welcome to Coq 8.16.0 Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ opam install -y coq-fiat-crypto.dev [ERROR] Package coq-fiat-crypto has no version dev. ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 years ago

@coqbot minimize

opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

JasonGross commented 2 years ago

@coqbot minimize coq=dev

opam install -y coq-fiat-crypto.dev
coqbot commented 2 years ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 2 years ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.evF9VNNo3Y COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/doc/coq/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -w -a+1..3-4+5..8-9+10..26-27+28..40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 -safe-string -strict-sequence WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.fAtrBgF5jU The Coq Proof Assistant, version 8.16.0 compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.n3WcD6FvZg Welcome to Coq 8.16.0 Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ opam install -y coq-fiat-crypto.dev [ERROR] Package coq-fiat-crypto has no version dev. ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

coqbot commented 2 years ago

@JasonGross, Minimized File /home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src/Assembly/Symbolic.v (full log on GitHub Actions)

Minimized Coq File (consider adding this file to the test-suite) ```coq (* -*- mode: coq; coq-prog-args: ("-emacs" "-q" "-w" "+implicit-core-hint-db,+implicits-in-term,+non-reversible-notation,+deprecated-intros-until-0,+deprecated-focus,+unused-intro-pattern,+variable-collision,+unexpected-implicit-declaration,+omega-is-deprecated,+deprecated-instantiate-syntax,+non-recursive,+undeclared-scope,+deprecated-hint-rewrite-without-locality,+deprecated-hint-without-locality,+deprecated-instance-without-locality,+deprecated-typeclasses-transparency-without-locality,unsupported-attributes" "-w" "-notation-overridden,-deprecated-hint-constr,-fragile-hint-constr,-native-compiler-disabled,-ambiguous-paths,-masking-absolute-name" "-w" "-deprecated-native-compiler-option" "-R" "/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src" "Crypto" "-Q" "/github/workspace/cwd" "Top" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Bignums" "Bignums" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Coqprime" "Coqprime" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Ltac2" "Ltac2" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Rewriter" "Rewriter" "-Q" "/home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/coqutil" "coqutil" "-top" "Crypto.Assembly.Symbolic" "-native-compiler" "ondemand") -*- *) (* File reduced by coq-bug-minimizer from original input, then from 4434 lines to 12 lines, then from 17 lines to 11 lines *) (* coqc version 8.18+alpha compiled with OCaml 4.13.1 coqtop version f42895341a1c:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (790030f359136a2a31124236587bac53db5fdfcf) Expected coqc runtime on this file: 0.132 sec *) Module Type DagDefinitions. End DagDefinitions. Module DagExtraDefinitions (Import dag : DagDefinitions). Module Type EagerDagDefinitions. End EagerDagDefinitions. End DagExtraDefinitions. Include DagExtraDefinitions. Declare Module eager : EagerDagDefinitions. ```
Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted) ```coq ```
Build Log (contains the Coq error message) ``` + (/github/workspace/run-script.sh @ line 51) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 52) $ coqc --config MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.rRpJU0VHeh COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/share/doc/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -rectypes -bin-annot -strict-sequence -w -a+1..3-4+5..8-9+10..26-27+28..39-40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 53) $ coqc --version MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.eXS6a5ZywK The Coq Proof Assistant, version 8.18+alpha compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 54) $ true + (/github/workspace/run-script.sh @ line 54) $ coqtop MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.b62bDFYoiA Welcome to Coq f42895341a1c:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (790030f359136a2a31124236587bac53db5fdfcf) Coq < + (/github/workspace/run-script.sh @ line 56) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ opam install -y coq-fiat-crypto.dev The following actions will be performed: - install coq-coqprime dev [required by coq-fiat-crypto] - install coq-rewriter dev [required by coq-fiat-crypto] - install conf-findutils 1 [required by coq-fiat-crypto] - install coq-coqutil dev [required by coq-fiat-crypto] - install coq-fiat-crypto dev ===== 5 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed conf-findutils.1 -> retrieved coq-coqutil.dev (git+https://github.com/mit-plv/coqutil.git#tested) -> retrieved coq-coqprime.dev (git+https://github.com/thery/coqprime.git#master) -> retrieved coq-rewriter.dev (git+https://github.com/mit-plv/rewriter.git#master) -> retrieved coq-fiat-crypto.dev (git+https://github.com/mit-plv/fiat-crypto.git#master) -> installed coq-coqutil.dev -> installed coq-coqprime.dev -> installed coq-rewriter.dev [ERROR] The compilation of coq-fiat-crypto.dev failed at "make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml". #=== ERROR while compiling coq-fiat-crypto.dev ================================# context 2.1.3 | linux/x86_64 | ocaml-option-flambda.1 ocaml-variants.4.13.1+options | https://coq.inria.fr/opam/extra-dev#2022-11-21 11:10 path ~/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev command /usr/bin/make -j1 EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 coq-without-bedrock2 standalone-ocaml exit-code 2 env-file ~/.opam/log/coq-fiat-crypto-851-0bbf3a.env output-file ~/.opam/log/coq-fiat-crypto-851-0bbf3a.out ### output ### [...] MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.cAYpS7F4FB COQC src/Assembly/Symbolic.v MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -q -w +implicit-core-hint-db\,+implicits-in-term\,+non-reversible-notation\,+deprecated-intros-until-0\,+deprecated-focus\,+unused-intro-pattern\,+variable-collision\,+unexpected-implicit-declaration\,+omega-is-deprecated\,+deprecated-instantiate-syntax\,+non-recursive\,+undeclared-scope\,+deprecated-hint-rewrite-withou[...] MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.lN0PuuQMXB File "./src/Assembly/Symbolic.v", line 1445, characters 2-45: Error: Anomaly "Uncaught exception Not_found." Please report at http://coq.inria.fr/bugs/. make: *** [Makefile.coq:793: src/Assembly/Symbolic.vo] Error 129 <><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> +- The following actions failed | - build coq-fiat-crypto dev +- +- The following changes have been performed | - install conf-findutils 1 | - install coq-coqprime dev | - install coq-coqutil dev | - install coq-rewriter dev +- The former state can be restored with: /usr/local/bin/opam.orig switch import "/home/coq/.opam/4.13.1+flambda/.opam-switch/backup/state-20221121185724.export" ```
Minimization Log (truncated to last 8.0KiB; full 162KiB file on GitHub Actions Artifacts under bug.log) ``` q KEEP_ERROR=1 bug_01.glob getting bug_01.glob (/github/workspace/cwd/bug_01.glob) getting /github/workspace/cwd/bug_01.glob  Sanity check passed. Now, I will attempt to strip repeated newlines and trailing spaces from this file... No strippable newlines or spaces. Now, I will attempt to strip the comments from this file...  Succeeded in stripping comments. Now, I will attempt to factor out all of the [Require]s... getting bug_01.v (/github/workspace/cwd/bug_01.v) NOTE: The file bug_01.v is very new (1669061785, 0 seconds old), delaying until it's a bit older /home/coq/.opam/4.13.1+flambda/bin/coq_makefile COQC = /home/coq/.opam/4.13.1+flambda/bin/coqc.orig -o Makefilel023dx4y.coq -R /home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src Crypto -Q /github/workspace/cwd Top -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Bignums Bignums -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Coqprime Coqprime -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Ltac2 Ltac2 -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Rewriter Rewriter -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/coqutil coqutil -R /home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-fiat-crypto.dev/src Crypto -Q /github/workspace/cwd Top -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Bignums Bignums -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Coqprime Coqprime -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Ltac2 Ltac2 -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/Rewriter Rewriter -Q /home/coq/.opam/4.13.1+flambda/lib/coq/user-contrib/coqutil coqutil -arg -q -arg -w -arg +implicit-core-hint-db,+implicits-in-term,+non-reversible-notation,+deprecated-intros-until-0,+deprecated-focus,+unused-intro-pattern,+variable-collision,+unexpected-implicit-declaration,+omega-is-deprecated,+deprecated-instantiate-syntax,+non-recursive,+undeclared-scope,+deprecated-hint-rewrite-without-locality,+deprecated-hint-without-locality,+deprecated-instance-without-locality,+deprecated-typeclasses-transparency-without-locality,unsupported-attributes -arg -w -arg -notation-overridden,-deprecated-hint-constr,-fragile-hint-constr,-native-compiler-disabled,-ambiguous-paths,-masking-absolute-name -arg -w -arg -deprecated-native-compiler-option -arg -native-compiler -arg ondemand bug_01.v getting Makefilel023dx4y.coq (/github/workspace/cwd/Makefilel023dx4y.coq) make -k -f Makefilel023dx4y.coq KEEP_ERROR=1 bug_01.glob getting bug_01.glob (/github/workspace/cwd/bug_01.glob) getting bug_01.glob (/github/workspace/cwd/bug_01.glob)  Succeeded in normalizing Requires. Now, I will attempt to split up [Require] statements... getting /github/workspace/cwd/bug_01.v NOTE: The file /github/workspace/cwd/bug_01.v is very new (1669061788, 0 seconds old), delaying until it's a bit older getting /github/workspace/cwd/bug_01.glob getting /github/workspace/cwd/bug_01.glob No Requires to split. In order to efficiently manipulate the file, I have to break it into statements. I will attempt to do this by matching on periods.  Splitting successful. I will now attempt to remove any lines after the line which generates the error. No lines to trim. In order to efficiently manipulate the file, I have to break it into definitions. I will now attempt to do this. Sending statements to coqtop... Done. Splitting to definitions...  Splitting to definitions successful. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to replace Qed Obligation with Admit Obligations  Admitting Qed Obligations successful. Failed to do everything at once; trying one at a time. Admitting Qed Obligations unsuccessful. No successful changes. I will now attempt to replace Qeds with Admitteds  Admitting Qeds successful. Failed to do everything at once; trying one at a time. Admitting Qeds unsuccessful. No successful changes. I will now attempt to replace Qeds with admit. Defined.  Admitting Qeds successful. Failed to do everything at once; trying one at a time. Admitting Qeds unsuccessful. No successful changes. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to admit [abstract ...]s  Admitting [abstract ...] successful.  Admitting [abstract ...] successful. Admitting [abstract ...] unsuccessful. Admitting [abstract ...] unsuccessful. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to replace Obligation with Admit Obligations  Admitting Obligations successful. Failed to do everything at once; trying one at a time. Admitting Obligations unsuccessful. No successful changes. I will now attempt to admit lemmas with Admitted  Admitting lemmas successful. Failed to do everything at once; trying one at a time. Admitting lemmas unsuccessful. No successful changes. I will now attempt to admit definitions with Admitted  Admitting definitions successful. Failed to do everything at once; trying one at a time. Admitting definitions unsuccessful. No successful changes. I will now attempt to admit lemmas with admit. Defined  Admitting lemmas successful. Failed to do everything at once; trying one at a time. Admitting lemmas unsuccessful. No successful changes. I will now attempt to admit definitions with admit. Defined  Admitting definitions successful. Failed to do everything at once; trying one at a time. Admitting definitions unsuccessful. No successful changes. I will now attempt to export modules Module exportation unsuccessful. I will now attempt to split imports and exports Import/Export splitting unsuccessful. I will now attempt to split := definitions One-line definition splitting unsuccessful. I will now attempt to remove all lines, one at a time Line removal unsuccessful. I will now attempt to remove goals ending in [Abort.]  Aborted removal successful. I will now attempt to remove unused Ltacs  Ltac removal successful. I will now attempt to remove unused definitions  Definition removal successful. I will now attempt to remove unused non-instance, non-canonical structure definitions  Non-instance definition removal successful. I will now attempt to remove unused variables  Variable removal successful. I will now attempt to remove unused contexts  Context removal successful. I will now attempt to remove empty sections No empty sections to remove. Now, I will attempt to strip repeated newlines and trailing spaces from this file... No strippable newlines or spaces. ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 9 months ago

Oops, I guess I'm using the wrong Coq version here @coqbot minimize coq.dev

git clone git@github.com:meta-introspector/metacoq.git --branch=feature/ltac_debug
cd metacoq
git checkout 1bc110910d49e2bcf3f3eb111527d4be0d4ad0c7
opam install --deps-only coq-metacoq
make
coqbot commented 9 months ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 9 months ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 47) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 48) $ coqc --config MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.4TKO26kS59 MINIMIZER_DEBUG: files: COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/share/doc/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -bin-annot -strict-sequence -w -a+1..3-4+5..8-9+10..26-27+28..39-40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/ltac2_ltac1 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 49) $ coqc --version MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.WO8YsAayk2 MINIMIZER_DEBUG: files: The Coq Proof Assistant, version 8.20+alpha compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 50) $ true + (/github/workspace/run-script.sh @ line 50) $ coqtop MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.jC4isO8Lmw MINIMIZER_DEBUG: files: Welcome to Coq buildkitsandbox:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (3b9e094e270353afeb4635117fb4f4980b2069b3) Coq < + (/github/workspace/run-script.sh @ line 52) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ git clone git@github.com:meta-introspector/metacoq.git --branch=feature/ltac_debug Cloning into 'metacoq'... Host key verification failed.
JasonGross commented 9 months ago

@coqbot minimize coq.dev

set -ex
opam install -y --deps-only coq-metacoq
printf -- git clone https://github.com/meta-introspector/metacoq.git --branch=feature/ltac_debug
git clone https://github.com/meta-introspector/metacoq.git --branch=feature/ltac_debug
cd metacoq
git checkout 6c23b8f5649d7dc8f51bce9310a0b70a28607853
make
coqbot commented 9 months ago

Hey @JasonGross, the coq bug minimizer is running your script, I'll come back to you with the results once it's done.

coqbot commented 9 months ago

@JasonGross, Error: Could not minimize file (full log on GitHub Actions, cc @JasonGross)

build log ``` + (/github/workspace/run-script.sh @ line 47) $ ocamlc -config version: 4.13.1 standard_library_default: /home/coq/.opam/4.13.1+flambda/lib/ocaml standard_library: /home/coq/.opam/4.13.1+flambda/lib/ocaml ccomp_type: cc c_compiler: gcc ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlc_cppflags: -D_FILE_OFFSET_BITS=64 ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64 bytecomp_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 native_c_compiler: gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 bytecomp_c_libraries: -lm -ldl -lpthread native_c_libraries: -lm -ldl native_pack_linker: ld -r -o ranlib: ranlib architecture: amd64 model: default int_size: 63 word_size: 64 system: linux asm: as asm_cfi_supported: true with_frame_pointers: false ext_exe: ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true host: x86_64-pc-linux-gnu target: x86_64-pc-linux-gnu flambda: true safe_string: true default_safe_string: true flat_float_array: true function_sections: true afl_instrument: false windows_unicode: false supports_shared_libraries: true exec_magic_number: Caml1999X030 cmi_magic_number: Caml1999I030 cmo_magic_number: Caml1999O030 cma_magic_number: Caml1999A030 cmx_magic_number: Caml1999y030 cmxa_magic_number: Caml1999z030 ast_impl_magic_number: Caml1999M030 ast_intf_magic_number: Caml1999N030 cmxs_magic_number: Caml1999D030 cmt_magic_number: Caml1999T030 linear_magic_number: Caml1999L030 + (/github/workspace/run-script.sh @ line 48) $ coqc --config MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --config MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.1rqqvHB0S0 MINIMIZER_DEBUG: files: COQLIB=/home/coq/.opam/4.13.1+flambda/lib/coq/ COQCORELIB=/home/coq/.opam/4.13.1+flambda/lib/coq/../coq-core/ DOCDIR=/home/coq/.opam/4.13.1+flambda/share/doc/ OCAMLFIND=/home/coq/.opam/4.13.1+flambda/bin/ocamlfind CAMLFLAGS=-thread -bin-annot -strict-sequence -w -a+1..3-4+5..8-9+10..26-27+28..39-40-41-42+43-44-45+46..47-48+49..57-58+59..66-67-68+69-70 WARN=-warn-error +a-3 HASNATDYNLINK=true COQ_SRC_SUBDIRS=boot config lib clib kernel library engine pretyping interp gramlib parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/ltac2 plugins/ltac2_ltac1 plugins/micromega plugins/nsatz plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/syntax COQ_NATIVE_COMPILER_DEFAULT=no + (/github/workspace/run-script.sh @ line 49) $ coqc --version MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqc MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqc.orig --version MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.bIcdf1kkWW MINIMIZER_DEBUG: files: The Coq Proof Assistant, version 8.20+alpha compiled with OCaml 4.13.1 + (/github/workspace/run-script.sh @ line 50) $ true + (/github/workspace/run-script.sh @ line 50) $ coqtop MINIMIZER_DEBUG_EXTRA: coqc: /home/coq/.opam/4.13.1+flambda/bin/coqtop MINIMIZER_DEBUG_EXTRA: coqpath: MINIMIZER_DEBUG_EXTRA: pwd: PWD=/github/workspace MINIMIZER_DEBUG_EXTRA: exec: /home/coq/.opam/4.13.1+flambda/bin/coqtop.orig MINIMIZER_DEBUG: info: /tmp/tmp-coqbot-minimizer.vbtC7yOiYd MINIMIZER_DEBUG: files: Welcome to Coq buildkitsandbox:/home/coq/.opam/4.13.1+flambda/.opam-switch/build/coq-core.dev/_build/default,master (3b9e094e270353afeb4635117fb4f4980b2069b3) Coq < + (/github/workspace/run-script.sh @ line 52) $ source /github/workspace/coqbot.sh ++ (/github/workspace/run-script.sh @ line 1) $ set -ex ++ (/github/workspace/run-script.sh @ line 2) $ opam install -y --deps-only coq-metacoq The following actions will be performed: - install stdlib-shims 0.3.0 - install coq-equations dev - install coq-metacoq-utils dev - install coq-metacoq-common dev - install coq-metacoq-template dev - install coq-metacoq-pcuic dev - install coq-metacoq-translations dev - install coq-metacoq-template-pcuic dev - install coq-metacoq-safechecker dev - install coq-metacoq-quotation dev - install coq-metacoq-safechecker-plugin dev - install coq-metacoq-erasure dev - install coq-metacoq-erasure-plugin dev ===== 13 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved coq-equations.dev (git+https://github.com/mattam82/Coq-Equations#main) -> retrieved coq-metacoq-common.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-erasure.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-quotation.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-pcuic.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-safechecker.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-safechecker-plugin.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-template.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-template-pcuic.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-translations.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-utils.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved coq-metacoq-erasure-plugin.dev (git+https:///github.com/metacoq/metacoq.git#main) -> retrieved stdlib-shims.0.3.0 (https://opam.ocaml.org/cache) -> installed stdlib-shims.0.3.0 -> installed coq-equations.dev -> installed coq-metacoq-utils.dev -> installed coq-metacoq-common.dev -> installed coq-metacoq-template.dev -> installed coq-metacoq-translations.dev -> installed coq-metacoq-pcuic.dev -> installed coq-metacoq-template-pcuic.dev -> installed coq-metacoq-safechecker.dev -> installed coq-metacoq-safechecker-plugin.dev -> installed coq-metacoq-quotation.dev -> installed coq-metacoq-erasure.dev -> installed coq-metacoq-erasure-plugin.dev Done. ::group::opam wrap files wrapping /usr/local/bin/opam attempting to wrap coqc wrapping /home/coq/.opam/4.13.1+flambda/bin/coqc attempting to wrap coqtop wrapping /home/coq/.opam/4.13.1+flambda/bin/coqtop ::endgroup:: ++ (/github/workspace/run-script.sh @ line 3) $ printf -- git clone https://github.com/meta-introspector/metacoq.git --branch=feature/ltac_debug git++ (/github/workspace/run-script.sh @ line 4) $ git clone https://github.com/meta-introspector/metacoq.git --branch=feature/ltac_debug Cloning into 'metacoq'... ++ (/github/workspace/run-script.sh @ line 5) $ cd metacoq ++ (/github/workspace/run-script.sh @ line 6) $ git checkout 6c23b8f5649d7dc8f51bce9310a0b70a28607853 Note: switching to '6c23b8f5649d7dc8f51bce9310a0b70a28607853'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 6c23b8f5 error ++ (/github/workspace/run-script.sh @ line 7) $ make Run ./configure.sh first make: *** [Makefile:25: printconf] Error 1 ```
minimizer log ``` ```

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross). If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

JasonGross commented 2 months ago

Originally posted by @JasonGross in https://github.com/JasonGross/coq-tools/issues/216#issuecomment-2341583892

Let's see if I can reproduce @coqbot minimize coq.dev

#!/usr/bin/env bash

opam pin remove coq -y
opam pin add coq 'https://github.com/SkySkimmer/coq.git#test-minimizer-general-tycon' -y

cat <<EOF > bug.v
Require Coq.ZArith.ZArith.

Import Coq.micromega.Lia.
Import Coq.Arith.PeanoNat.
Import Coq.Lists.List.
Import ListNotations.

Module Import Nat.
  Definition div_up a b := Nat.div (a + (b-1)) b.
  Lemma div_up_range a b (H : b <> 0) : a <= div_up a b * b < a + b.
Admitted.

  Lemma div_up_add_mod a b n:
    (a mod n = 0)%nat ->
    Nat.div_up (a + b) n =
    (Nat.div_up a n + Nat.div_up b n)%nat.
Admitted.

  Lemma div_up_exact_mod a b:
    (b <> 0)%nat ->
    (a mod b = 0)%nat ->
    ((Nat.div_up a b) * b = a)%nat.
Admitted.

Section Chunk.
  Context [A : Type] (k : nat).
  Implicit Types (bs ck xs ys : list A).
Fixpoint chunk' bs ck {struct bs} : list (list A).
Admitted.
  Definition chunk bs := chunk' bs [].

  Context (Hk : k <> 0).

  Lemma nth_error_chunk bs i (Hi : i < div_up (length bs) k)
    : nth_error (chunk bs) i = Some (firstn k (skipn (i*k) bs)).
Admitted.

  Lemma length_chunk bs : length (chunk bs) = div_up (length bs) k.
Admitted.

  Lemma length_chunk_app (l l' : list A) :
    (length l mod k)%nat = 0%nat ->
    length (chunk (l ++ l')) = length (chunk l ++ chunk l').
Admitted.

  Lemma chunk_app : forall (l l': list A),
      (length l mod k = 0)%nat ->
      chunk (l ++ l') = chunk l ++ chunk l'.
  Proof.
    intros * Hmod.
    eapply nth_ext with (d := []) (d' := []); [ | intros idx ].
    - apply length_chunk_app; assumption.
    - intros Hidx; eassert (Some _ = Some _) as HS; [ | injection HS; intros Hs; apply Hs ].
      rewrite <- !nth_error_nth' by assumption.
      rewrite <- !nth_error_nth' by (rewrite length_chunk_app in Hidx; eassumption).
      assert (idx < length (chunk l) \/ length (chunk l) <= idx)%nat as [Hlt | Hge] by lia;
        [ rewrite nth_error_app1 | rewrite nth_error_app2 ]; try eassumption.
      all: rewrite !nth_error_chunk.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hlt by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hidx by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hge by assumption.
      all: rewrite ?length_chunk, ?app_length, ?div_up_add_mod by assumption.
      all: try lia.
      all: pose proof Nat.div_up_range (length l) k ltac:(lia).
      + pose proof div_up_exact_mod (length l) k ltac:(lia) ltac:(lia).
        rewrite !firstn_skipn_comm, !firstn_app.
        replace (idx * k + k - length l)%nat with 0%nat by nia.
        simpl; rewrite app_nil_r; reflexivity.
      + rewrite Nat.mul_sub_distr_r.
        erewrite div_up_exact_mod by lia.
        rewrite skipn_app, skipn_all2; [ reflexivity | nia ].
  Qed.
EOF

coqc -q bug.v
JasonGross commented 2 months ago

@coqbot minimize coq.dev

set -ex
opam install -y --deps-only coq-metacoq
printf -- git clone https://github.com/meta-introspector/metacoq.git --branch=feature/ltac_debug
git clone https://github.com/meta-introspector/metacoq.git --branch=feature/ltac_debug
cd metacoq
git checkout 6c23b8f5649d7dc8f51bce9310a0b70a28607853
make
JasonGross commented 2 months ago

Let's see if I can reproduce @coqbot minimize coq.dev

#!/usr/bin/env bash

true | coqtop
coqc --version
opam pin remove coq -y
opam pin add coq 'https://github.com/SkySkimmer/coq.git#test-minimizer-general-tycon' -y
true | coqtop
coqc --version

cat <<EOF > bug.v
Require Coq.ZArith.ZArith.

Import Coq.micromega.Lia.
Import Coq.Arith.PeanoNat.
Import Coq.Lists.List.
Import ListNotations.

Module Import Nat.
  Definition div_up a b := Nat.div (a + (b-1)) b.
  Lemma div_up_range a b (H : b <> 0) : a <= div_up a b * b < a + b.
Admitted.

  Lemma div_up_add_mod a b n:
    (a mod n = 0)%nat ->
    Nat.div_up (a + b) n =
    (Nat.div_up a n + Nat.div_up b n)%nat.
Admitted.

  Lemma div_up_exact_mod a b:
    (b <> 0)%nat ->
    (a mod b = 0)%nat ->
    ((Nat.div_up a b) * b = a)%nat.
Admitted.

Section Chunk.
  Context [A : Type] (k : nat).
  Implicit Types (bs ck xs ys : list A).
Fixpoint chunk' bs ck {struct bs} : list (list A).
Admitted.
  Definition chunk bs := chunk' bs [].

  Context (Hk : k <> 0).

  Lemma nth_error_chunk bs i (Hi : i < div_up (length bs) k)
    : nth_error (chunk bs) i = Some (firstn k (skipn (i*k) bs)).
Admitted.

  Lemma length_chunk bs : length (chunk bs) = div_up (length bs) k.
Admitted.

  Lemma length_chunk_app (l l' : list A) :
    (length l mod k)%nat = 0%nat ->
    length (chunk (l ++ l')) = length (chunk l ++ chunk l').
Admitted.

  Lemma chunk_app : forall (l l': list A),
      (length l mod k = 0)%nat ->
      chunk (l ++ l') = chunk l ++ chunk l'.
  Proof.
    intros * Hmod.
    eapply nth_ext with (d := []) (d' := []); [ | intros idx ].
    - apply length_chunk_app; assumption.
    - intros Hidx; eassert (Some _ = Some _) as HS; [ | injection HS; intros Hs; apply Hs ].
      rewrite <- !nth_error_nth' by assumption.
      rewrite <- !nth_error_nth' by (rewrite length_chunk_app in Hidx; eassumption).
      assert (idx < length (chunk l) \/ length (chunk l) <= idx)%nat as [Hlt | Hge] by lia;
        [ rewrite nth_error_app1 | rewrite nth_error_app2 ]; try eassumption.
      all: rewrite !nth_error_chunk.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hlt by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hidx by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hge by assumption.
      all: rewrite ?length_chunk, ?app_length, ?div_up_add_mod by assumption.
      all: try lia.
      all: pose proof Nat.div_up_range (length l) k ltac:(lia).
      + pose proof div_up_exact_mod (length l) k ltac:(lia) ltac:(lia).
        rewrite !firstn_skipn_comm, !firstn_app.
        replace (idx * k + k - length l)%nat with 0%nat by nia.
        simpl; rewrite app_nil_r; reflexivity.
      + rewrite Nat.mul_sub_distr_r.
        erewrite div_up_exact_mod by lia.
        rewrite skipn_app, skipn_all2; [ reflexivity | nia ].
  Qed.
EOF

coqc -q bug.v
JasonGross commented 2 months ago

Let's see if I can reproduce @coqbot minimize coq.dev

#!/usr/bin/env bash

true | coqtop
coqc --version
opam pin remove coq -y
opam pin add coq 'https://github.com/SkySkimmer/coq.git#test-minimizer-general-tycon' -y
true | coqtop
coqc --version

cat <<EOF > bug.v
Require Coq.ZArith.ZArith.

Import Coq.micromega.Lia.
Import Coq.Arith.PeanoNat.
Import Coq.Lists.List.
Import ListNotations.

Module Import Nat.
  Definition div_up a b := Nat.div (a + (b-1)) b.
  Lemma div_up_range a b (H : b <> 0) : a <= div_up a b * b < a + b.
Admitted.

  Lemma div_up_add_mod a b n:
    (a mod n = 0)%nat ->
    Nat.div_up (a + b) n =
    (Nat.div_up a n + Nat.div_up b n)%nat.
Admitted.

  Lemma div_up_exact_mod a b:
    (b <> 0)%nat ->
    (a mod b = 0)%nat ->
    ((Nat.div_up a b) * b = a)%nat.
Admitted.

Section Chunk.
  Context [A : Type] (k : nat).
  Implicit Types (bs ck xs ys : list A).
Fixpoint chunk' bs ck {struct bs} : list (list A).
Admitted.
  Definition chunk bs := chunk' bs [].

  Context (Hk : k <> 0).

  Lemma nth_error_chunk bs i (Hi : i < div_up (length bs) k)
    : nth_error (chunk bs) i = Some (firstn k (skipn (i*k) bs)).
Admitted.

  Lemma length_chunk bs : length (chunk bs) = div_up (length bs) k.
Admitted.

  Lemma length_chunk_app (l l' : list A) :
    (length l mod k)%nat = 0%nat ->
    length (chunk (l ++ l')) = length (chunk l ++ chunk l').
Admitted.

  Lemma chunk_app : forall (l l': list A),
      (length l mod k = 0)%nat ->
      chunk (l ++ l') = chunk l ++ chunk l'.
  Proof.
    intros * Hmod.
    eapply nth_ext with (d := []) (d' := []); [ | intros idx ].
    - apply length_chunk_app; assumption.
    - intros Hidx; eassert (Some _ = Some _) as HS; [ | injection HS; intros Hs; apply Hs ].
      rewrite <- !nth_error_nth' by assumption.
      rewrite <- !nth_error_nth' by (rewrite length_chunk_app in Hidx; eassumption).
      assert (idx < length (chunk l) \/ length (chunk l) <= idx)%nat as [Hlt | Hge] by lia;
        [ rewrite nth_error_app1 | rewrite nth_error_app2 ]; try eassumption.
      all: rewrite !nth_error_chunk.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hlt by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hidx by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hge by assumption.
      all: rewrite ?length_chunk, ?app_length, ?div_up_add_mod by assumption.
      all: try lia.
      all: pose proof Nat.div_up_range (length l) k ltac:(lia).
      + pose proof div_up_exact_mod (length l) k ltac:(lia) ltac:(lia).
        rewrite !firstn_skipn_comm, !firstn_app.
        replace (idx * k + k - length l)%nat with 0%nat by nia.
        simpl; rewrite app_nil_r; reflexivity.
      + rewrite Nat.mul_sub_distr_r.
        erewrite div_up_exact_mod by lia.
        rewrite skipn_app, skipn_all2; [ reflexivity | nia ].
  Qed.
EOF

coqc -q bug.v
JasonGross commented 2 months ago

Let's see if I can reproduce @coqbot minimize coq.dev

#!/usr/bin/env bash

true | coqtop
coqc --version
opam pin remove coq -y
opam pin add coq 'https://github.com/SkySkimmer/coq.git#test-minimizer-general-tycon' -y
true | coqtop
coqc --version

cat <<EOF > bug.v
Require Coq.ZArith.ZArith.

Import Coq.micromega.Lia.
Import Coq.Arith.PeanoNat.
Import Coq.Lists.List.
Import ListNotations.

Module Import Nat.
  Definition div_up a b := Nat.div (a + (b-1)) b.
  Lemma div_up_range a b (H : b <> 0) : a <= div_up a b * b < a + b.
Admitted.

  Lemma div_up_add_mod a b n:
    (a mod n = 0)%nat ->
    Nat.div_up (a + b) n =
    (Nat.div_up a n + Nat.div_up b n)%nat.
Admitted.

  Lemma div_up_exact_mod a b:
    (b <> 0)%nat ->
    (a mod b = 0)%nat ->
    ((Nat.div_up a b) * b = a)%nat.
Admitted.

Section Chunk.
  Context [A : Type] (k : nat).
  Implicit Types (bs ck xs ys : list A).
Fixpoint chunk' bs ck {struct bs} : list (list A).
Admitted.
  Definition chunk bs := chunk' bs [].

  Context (Hk : k <> 0).

  Lemma nth_error_chunk bs i (Hi : i < div_up (length bs) k)
    : nth_error (chunk bs) i = Some (firstn k (skipn (i*k) bs)).
Admitted.

  Lemma length_chunk bs : length (chunk bs) = div_up (length bs) k.
Admitted.

  Lemma length_chunk_app (l l' : list A) :
    (length l mod k)%nat = 0%nat ->
    length (chunk (l ++ l')) = length (chunk l ++ chunk l').
Admitted.

  Lemma chunk_app : forall (l l': list A),
      (length l mod k = 0)%nat ->
      chunk (l ++ l') = chunk l ++ chunk l'.
  Proof.
    intros * Hmod.
    eapply nth_ext with (d := []) (d' := []); [ | intros idx ].
    - apply length_chunk_app; assumption.
    - intros Hidx; eassert (Some _ = Some _) as HS; [ | injection HS; intros Hs; apply Hs ].
      rewrite <- !nth_error_nth' by assumption.
      rewrite <- !nth_error_nth' by (rewrite length_chunk_app in Hidx; eassumption).
      assert (idx < length (chunk l) \/ length (chunk l) <= idx)%nat as [Hlt | Hge] by lia;
        [ rewrite nth_error_app1 | rewrite nth_error_app2 ]; try eassumption.
      all: rewrite !nth_error_chunk.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hlt by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hidx by assumption.
      all: repeat rewrite ?length_chunk, ?app_length, ?div_up_add_mod in Hge by assumption.
      all: rewrite ?length_chunk, ?app_length, ?div_up_add_mod by assumption.
      all: try lia.
      all: pose proof Nat.div_up_range (length l) k ltac:(lia).
      + pose proof div_up_exact_mod (length l) k ltac:(lia) ltac:(lia).
        rewrite !firstn_skipn_comm, !firstn_app.
        replace (idx * k + k - length l)%nat with 0%nat by nia.
        simpl; rewrite app_nil_r; reflexivity.
      + rewrite Nat.mul_sub_distr_r.
        erewrite div_up_exact_mod by lia.
        rewrite skipn_app, skipn_all2; [ reflexivity | nia ].
  Qed.
EOF

coqc -q bug.v
JasonGross commented 1 month ago

Testing https://github.com/MetaCoq/metacoq/issues/1072#issuecomment-2408706733 @coqbot minimize coq.8.17

opam install -y coq-wasm
cat > test_bug.v <<EOF
From Coq Require Import List.
From Coq.Strings Require Import Byte.
From CertiCoq.Plugin Require Import CertiCoq.
From Wasm Require Import binary_format_parser datatypes instantiation_func.

Definition test_bytes : list Byte.byte := x00 :: x61 :: x73 :: x6d :: x01 :: x00 :: x00 :: x00 :: nil.

Definition test_module : option module := run_parse_module test_bytes.

CertiCoq Compile test_module.
EOF
coqc -q test_bug.v