Skip to content

Instantly share code, notes, and snippets.

@y-taka-23
Last active November 15, 2019 20:44
Show Gist options
  • Save y-taka-23/4700318 to your computer and use it in GitHub Desktop.
Save y-taka-23/4700318 to your computer and use it in GitHub Desktop.
Quine (Self-Reproducing Program) on Coq
Require Import Ascii String.
Open Scope string_scope.
Definition Q : string := "
Eval compute in ""
Require Import Ascii String.
Open Scope string_scope.
Definition Q : string := "" ++ """" ++ Q ++ """" ++ ""."" ++ Q.".
Eval compute in "
Require Import Ascii String.
Open Scope string_scope.
Definition Q : string := " ++ """" ++ Q ++ """" ++ "." ++ Q.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment