├── .appends └── .github │ └── labels.yml ├── .github ├── CODEOWNERS ├── dependabot.yml ├── labels.yml └── workflows │ ├── ci.yml │ ├── configlet.yml │ ├── no-important-files-changed.yml │ ├── pause-community-contributions.yml │ └── sync-labels.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── bin └── fetch-configlet ├── config.json ├── config └── exercise_readme.go.tmpl ├── docs ├── ABOUT.md ├── INSTALLATION.md ├── LEARNING.md ├── RESOURCES.md ├── SNIPPET.txt ├── TESTS.md └── config.json ├── exercises └── practice │ ├── hello-world │ ├── .docs │ │ └── instructions.md │ ├── .meta │ │ ├── config.json │ │ ├── example.v │ │ └── tests.toml │ ├── helloworld.v │ └── test.v │ ├── rna-transcription │ ├── .docs │ │ ├── instructions.md │ │ └── introduction.md │ ├── .meta │ │ ├── config.json │ │ ├── example.v │ │ └── tests.toml │ ├── DNA.v │ └── rna-transcription.v │ └── tautology │ ├── .meta │ ├── config.json │ ├── description.md │ ├── example.v │ └── metadata.yml │ └── tautology.v └── img └── .keep /.appends/.github/labels.yml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------------------- # 2 | # These are the repository-specific labels that augment the Exercise-wide labels defined in # 3 | # https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml. # 4 | # ----------------------------------------------------------------------------------------- # 5 | 6 | - name: "bug" 7 | description: "" 8 | color: "ee0701" 9 | 10 | - name: "duplicate" 11 | description: "" 12 | color: "cccccc" 13 | 14 | - name: "enhancement" 15 | description: "" 16 | color: "84b6eb" 17 | 18 | - name: "help wanted" 19 | description: "" 20 | color: "128A0C" 21 | 22 | - name: "invalid" 23 | description: "" 24 | color: "e6e6e6" 25 | 26 | - name: "question" 27 | description: "" 28 | color: "cc317c" 29 | 30 | - name: "wontfix" 31 | description: "" 32 | color: "ffffff" 33 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Code owners 2 | .github/CODEOWNERS @exercism/maintainers-admin 3 | 4 | # Changes to `fetch-configlet` should be made in the `exercism/configlet` repo 5 | bin/fetch-configlet @exercism/maintainers-admin 6 | 7 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | updates: 4 | 5 | # Keep dependencies for GitHub Actions up-to-date 6 | - package-ecosystem: 'github-actions' 7 | directory: '/' 8 | schedule: 9 | interval: 'monthly' 10 | -------------------------------------------------------------------------------- /.github/labels.yml: -------------------------------------------------------------------------------- 1 | # --------------------------------------------------------------- # 2 | # This is an auto-generated file - Do not manually edit this file # 3 | # --------------------------------------------------------------- # 4 | 5 | # This file is automatically generated by concatenating two files: 6 | # 7 | # 1. The Exercism-wide labels: defined in https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml 8 | # 2. The repository-specific labels: defined in the `.appends/.github/labels.yml` file within this repository. 9 | # 10 | # If any of these two files change, a pull request is automatically created containing a re-generated version of this file. 11 | # Consequently, to change repository-specific labels you should update the `.appends/.github/labels.yml` file and _not_ this file. 12 | # 13 | # When the pull request has been merged, the GitHub labels will be automatically updated by the "Sync labels" workflow. 14 | # This typically takes 5-10 minutes. 15 | 16 | # --------------------------------------------------------------------- # 17 | # These are the Exercism-wide labels which are shared across all repos. # 18 | # --------------------------------------------------------------------- # 19 | 20 | # The following Exercism-wide labels are used to show "tasks" on the website, which will point users to things they can contribute to. 21 | 22 | # The `x:action/` labels describe what sort of work the contributor will be engaged in when working on the issue 23 | - name: "x:action/create" 24 | description: "Work on something from scratch" 25 | color: "ffffff" 26 | 27 | - name: "x:action/fix" 28 | description: "Fix an issue" 29 | color: "ffffff" 30 | 31 | - name: "x:action/improve" 32 | description: "Improve existing functionality/content" 33 | color: "ffffff" 34 | 35 | - name: "x:action/proofread" 36 | description: "Proofread text" 37 | color: "ffffff" 38 | 39 | - name: "x:action/sync" 40 | description: "Sync content with its latest version" 41 | color: "ffffff" 42 | 43 | # The `x:knowledge/` labels describe how much Exercism knowledge is required by the contributor 44 | - name: "x:knowledge/none" 45 | description: "No existing Exercism knowledge required" 46 | color: "ffffff" 47 | 48 | - name: "x:knowledge/elementary" 49 | description: "Little Exercism knowledge required" 50 | color: "ffffff" 51 | 52 | - name: "x:knowledge/intermediate" 53 | description: "Quite a bit of Exercism knowledge required" 54 | color: "ffffff" 55 | 56 | - name: "x:knowledge/advanced" 57 | description: "Comprehensive Exercism knowledge required" 58 | color: "ffffff" 59 | 60 | # The `x:module/` labels indicate what part of Exercism the contributor will be working on 61 | - name: "x:module/analyzer" 62 | description: "Work on Analyzers" 63 | color: "ffffff" 64 | 65 | - name: "x:module/concept" 66 | description: "Work on Concepts" 67 | color: "ffffff" 68 | 69 | - name: "x:module/concept-exercise" 70 | description: "Work on Concept Exercises" 71 | color: "ffffff" 72 | 73 | - name: "x:module/generator" 74 | description: "Work on Exercise generators" 75 | color: "ffffff" 76 | 77 | - name: "x:module/practice-exercise" 78 | description: "Work on Practice Exercises" 79 | color: "ffffff" 80 | 81 | - name: "x:module/representer" 82 | description: "Work on Representers" 83 | color: "ffffff" 84 | 85 | - name: "x:module/test-runner" 86 | description: "Work on Test Runners" 87 | color: "ffffff" 88 | 89 | # The `x:rep/` labels describe the amount of reputation to award 90 | # 91 | # For more information on reputation and how these labels should be used, 92 | # check out https://exercism.org/docs/using/product/reputation 93 | - name: "x:rep/tiny" 94 | description: "Tiny amount of reputation" 95 | color: "ffffff" 96 | 97 | - name: "x:rep/small" 98 | description: "Small amount of reputation" 99 | color: "ffffff" 100 | 101 | - name: "x:rep/medium" 102 | description: "Medium amount of reputation" 103 | color: "ffffff" 104 | 105 | - name: "x:rep/large" 106 | description: "Large amount of reputation" 107 | color: "ffffff" 108 | 109 | - name: "x:rep/massive" 110 | description: "Massive amount of reputation" 111 | color: "ffffff" 112 | 113 | # The `x:size/` labels describe the expected amount of work for a contributor 114 | - name: "x:size/tiny" 115 | description: "Tiny amount of work" 116 | color: "ffffff" 117 | 118 | - name: "x:size/small" 119 | description: "Small amount of work" 120 | color: "ffffff" 121 | 122 | - name: "x:size/medium" 123 | description: "Medium amount of work" 124 | color: "ffffff" 125 | 126 | - name: "x:size/large" 127 | description: "Large amount of work" 128 | color: "ffffff" 129 | 130 | - name: "x:size/massive" 131 | description: "Massive amount of work" 132 | color: "ffffff" 133 | 134 | # The `x:status/` label indicates if there is already someone working on the issue 135 | - name: "x:status/claimed" 136 | description: "Someone is working on this issue" 137 | color: "ffffff" 138 | 139 | # The `x:type/` labels describe what type of work the contributor will be engaged in 140 | - name: "x:type/ci" 141 | description: "Work on Continuous Integration (e.g. GitHub Actions workflows)" 142 | color: "ffffff" 143 | 144 | - name: "x:type/coding" 145 | description: "Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)" 146 | color: "ffffff" 147 | 148 | - name: "x:type/content" 149 | description: "Work on content (e.g. exercises, concepts)" 150 | color: "ffffff" 151 | 152 | - name: "x:type/docker" 153 | description: "Work on Dockerfiles" 154 | color: "ffffff" 155 | 156 | - name: "x:type/docs" 157 | description: "Work on Documentation" 158 | color: "ffffff" 159 | 160 | # This Exercism-wide label is added to all automatically created pull requests that help migrate/prepare a track for Exercism v3 161 | - name: "v3-migration 🤖" 162 | description: "Preparing for Exercism v3" 163 | color: "e99695" 164 | 165 | # This Exercism-wide label can be used to bulk-close issues in preparation for pausing community contributions 166 | - name: "paused" 167 | description: "Work paused until further notice" 168 | color: "e4e669" 169 | 170 | # ----------------------------------------------------------------------------------------- # 171 | # These are the repository-specific labels that augment the Exercise-wide labels defined in # 172 | # https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml. # 173 | # ----------------------------------------------------------------------------------------- # 174 | 175 | - name: "bug" 176 | description: "" 177 | color: "ee0701" 178 | 179 | - name: "duplicate" 180 | description: "" 181 | color: "cccccc" 182 | 183 | - name: "enhancement" 184 | description: "" 185 | color: "84b6eb" 186 | 187 | - name: "help wanted" 188 | description: "" 189 | color: "128A0C" 190 | 191 | - name: "invalid" 192 | description: "" 193 | color: "e6e6e6" 194 | 195 | - name: "question" 196 | description: "" 197 | color: "cc317c" 198 | 199 | - name: "wontfix" 200 | description: "" 201 | color: "ffffff" 202 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: coq / main 2 | 3 | on: 4 | push: 5 | branches: [master, main] 6 | pull_request: 7 | workflow_dispatch: 8 | 9 | jobs: 10 | ci: 11 | runs-on: ubuntu-22.04 12 | 13 | steps: 14 | - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 15 | 16 | - name: Pull coq docker image 17 | run: docker pull coqorg/coq:8.9 18 | 19 | - name: Run exercism/coq ci (runs tests) for all exercises 20 | run: | 21 | export NJOBS=2 22 | # Disable for now, as this step was already disabled in Travis config 23 | # docker run --rm coqorg/coq:8.9 coq_makefile -f _CoqProject -o Makefile && make && make install 24 | -------------------------------------------------------------------------------- /.github/workflows/configlet.yml: -------------------------------------------------------------------------------- 1 | name: Configlet 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - main 8 | workflow_dispatch: 9 | 10 | permissions: 11 | contents: read 12 | 13 | jobs: 14 | configlet: 15 | uses: exercism/github-actions/.github/workflows/configlet.yml@main 16 | -------------------------------------------------------------------------------- /.github/workflows/no-important-files-changed.yml: -------------------------------------------------------------------------------- 1 | name: No important files changed 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened] 6 | branches: [main] 7 | paths: 8 | - "exercises/concept/**" 9 | - "exercises/practice/**" 10 | - "!exercises/*/*/.approaches/**" 11 | - "!exercises/*/*/.articles/**" 12 | - "!exercises/*/*/.docs/**" 13 | - "!exercises/*/*/.meta/**" 14 | 15 | permissions: 16 | pull-requests: write 17 | 18 | jobs: 19 | check: 20 | uses: exercism/github-actions/.github/workflows/check-no-important-files-changed.yml@main 21 | with: 22 | repository: ${{ github.event.pull_request.head.repo.owner.login }}/${{ github.event.pull_request.head.repo.name }} 23 | ref: ${{ github.head_ref }} 24 | -------------------------------------------------------------------------------- /.github/workflows/pause-community-contributions.yml: -------------------------------------------------------------------------------- 1 | name: Pause Community Contributions 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | pull_request_target: 8 | types: 9 | - opened 10 | paths-ignore: 11 | - 'exercises/*/*/.approaches/**' 12 | - 'exercises/*/*/.articles/**' 13 | 14 | permissions: 15 | issues: write 16 | pull-requests: write 17 | 18 | jobs: 19 | pause: 20 | if: github.repository_owner == 'exercism' # Stops this job from running on forks 21 | uses: exercism/github-actions/.github/workflows/community-contributions.yml@main 22 | with: 23 | forum_category: coq 24 | secrets: 25 | github_membership_token: ${{ secrets.COMMUNITY_CONTRIBUTIONS_WORKFLOW_TOKEN }} 26 | -------------------------------------------------------------------------------- /.github/workflows/sync-labels.yml: -------------------------------------------------------------------------------- 1 | name: Tools 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - .github/labels.yml 9 | - .github/workflows/sync-labels.yml 10 | workflow_dispatch: 11 | schedule: 12 | - cron: 0 0 1 * * # First day of each month 13 | 14 | permissions: 15 | issues: write 16 | 17 | jobs: 18 | sync-labels: 19 | uses: exercism/github-actions/.github/workflows/labels.yml@main 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .DS_Store 3 | bin/configlet 4 | bin/configlet.exe 5 | *.glob 6 | *.vo 7 | *.aux 8 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## Introduction 4 | 5 | Exercism is a platform centered around empathetic conversation. 6 | We have a low tolerance for communication that makes anyone feel unwelcome, unsupported, insulted or discriminated against. 7 | 8 | ## Seen or experienced something uncomfortable? 9 | 10 | If you see or experience abuse, harassment, discrimination, or feel unsafe or upset, please email [abuse@exercism.org](mailto:abuse@exercism.org?subject=%5BCoC%5D) and include \[CoC\] in the subject line. 11 | We will follow up with you as a priority. 12 | 13 | ## Enforcement 14 | 15 | We actively monitor for Code of Conduct (CoC) violations and take any reports of violations extremely seriously. 16 | We have banned contributors, mentors and users due to violations. 17 | 18 | After we receive a report of a CoC violation, we view that person's conversation history on Exercism and related communication channels and attempt to understand whether someone has deliberately broken the CoC, or accidentally crossed a line. 19 | We generally reach out to the person who has been reported to discuss any concerns we have and warn them that repeated violations will result in a ban. 20 | Sometimes we decide that no violation has occurred and that no action is required and sometimes we will also ban people on a first offense. 21 | We strive to be fair, but will err on the side of protecting the culture of our community. 22 | 23 | Exercism's leadership reserve the right to take whatever action they feel appropriate with regards to CoC violations. 24 | 25 | ## The simple version 26 | 27 | - Be empathetic 28 | - Be welcoming 29 | - Be kind 30 | - Be honest 31 | - Be supportive 32 | - Be polite 33 | 34 | ## The details 35 | 36 | Exercism should be a safe place for everybody regardless of 37 | 38 | - Gender, gender identity or gender expression 39 | - Sexual orientation 40 | - Disability 41 | - Physical appearance (including but not limited to body size) 42 | - Race 43 | - Age 44 | - Religion 45 | - Anything else you can think of 46 | 47 | As someone who is part of this community, you agree that: 48 | 49 | - We are collectively and individually committed to safety and inclusivity 50 | - We have zero tolerance for abuse, harassment, or discrimination 51 | - We respect people’s boundaries and identities 52 | - We refrain from using language that can be considered offensive or oppressive (systemically or otherwise), eg. sexist, racist, homophobic, transphobic, ableist, classist, etc. 53 | - this includes (but is not limited to) various slurs. 54 | - We avoid using offensive topics as a form of humor 55 | 56 | We actively work towards: 57 | 58 | - Being a safe community 59 | - Cultivating a network of support & encouragement for each other 60 | - Encouraging responsible and varied forms of expression 61 | 62 | We condemn: 63 | 64 | - Stalking, doxxing, or publishing private information 65 | - Violence, threats of violence or violent language 66 | - Anything that compromises people’s safety 67 | - Conduct or speech which might be considered sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory or offensive in nature 68 | - The use of unwelcome, suggestive, derogatory or inappropriate nicknames or terms 69 | - Disrespect towards others (jokes, innuendo, dismissive attitudes) and towards differences of opinion 70 | - Intimidation or harassment (online or in-person). 71 | Please read the [Citizen Code of Conduct](https://github.com/stumpsyn/policies/blob/master/citizen_code_of_conduct.md) for how we interpret harassment 72 | - Inappropriate attention or contact 73 | - Not understanding the differences between constructive criticism and disparagement 74 | 75 | These things are NOT OK. 76 | 77 | Be aware of how your actions affect others. 78 | If it makes someone uncomfortable, stop. 79 | 80 | If you say something that is found offensive, and you are called out on it, try to: 81 | 82 | - Listen without interruption 83 | - Believe what the person is saying & do not attempt to disqualify what they have to say 84 | - Ask for tips / help with avoiding making the offense in the future 85 | - Apologize and ask forgiveness 86 | 87 | ## History 88 | 89 | This policy was initially adopted from the Front-end London Slack community and has been modified since. 90 | A version history can be seen on [GitHub](https://github.com/exercism/website-copy/edit/main/pages/code_of_conduct.md). 91 | 92 | _This policy is a "living" document, and subject to refinement and expansion in the future. 93 | This policy applies to the Exercism website, the Exercism GitHub organization, any other Exercism-related communication channels (e.g. Discord, Forum, Twitter, email) and any other Exercism entity or event._ 94 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Exercism 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Exercism Coq Track 2 | 3 | ## Status 4 | 5 | A bit of work has been done to configure this track, and it has 3 exercises. 6 | 7 | If you wish to work on this track, please post in the [Exercism Community Forum](https://forum.exercism.org/c/exercism/building-exercism/125) to discuss it with the team. 8 | -------------------------------------------------------------------------------- /bin/fetch-configlet: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This file is a copy of the 4 | # https://github.com/exercism/configlet/blob/main/scripts/fetch-configlet file. 5 | # Please submit bugfixes/improvements to the above file to ensure that all tracks benefit from the changes. 6 | 7 | set -eo pipefail 8 | 9 | curlopts=( 10 | --silent 11 | --show-error 12 | --fail 13 | --location 14 | --retry 3 15 | ) 16 | 17 | if [[ -n "${GITHUB_TOKEN}" ]]; then 18 | curlopts+=(--header "authorization: Bearer ${GITHUB_TOKEN}") 19 | fi 20 | 21 | get_download_url() { 22 | local os="$1" 23 | local ext="$2" 24 | local latest='https://api.github.com/repos/exercism/configlet/releases/latest' 25 | local arch 26 | case "$(uname -m)" in 27 | aarch64|arm64) arch='arm64' ;; 28 | x86_64) arch='x86-64' ;; 29 | *686*) arch='i386' ;; 30 | *386*) arch='i386' ;; 31 | *) arch='x86-64' ;; 32 | esac 33 | local suffix="${os}_${arch}.${ext}" 34 | curl "${curlopts[@]}" --header 'Accept: application/vnd.github.v3+json' "${latest}" | 35 | grep "\"browser_download_url\": \".*/download/.*/configlet.*${suffix}\"$" | 36 | cut -d'"' -f4 37 | } 38 | 39 | main() { 40 | local output_dir 41 | if [[ -d ./bin ]]; then 42 | output_dir="./bin" 43 | elif [[ $PWD == */bin ]]; then 44 | output_dir="$PWD" 45 | else 46 | echo "Error: no ./bin directory found. This script should be ran from a repo root." >&2 47 | return 1 48 | fi 49 | 50 | local os 51 | case "$(uname -s)" in 52 | Darwin*) os='macos' ;; 53 | Linux*) os='linux' ;; 54 | Windows*) os='windows' ;; 55 | MINGW*) os='windows' ;; 56 | MSYS_NT-*) os='windows' ;; 57 | *) os='linux' ;; 58 | esac 59 | 60 | local ext 61 | case "${os}" in 62 | windows) ext='zip' ;; 63 | *) ext='tar.gz' ;; 64 | esac 65 | 66 | echo "Fetching configlet..." >&2 67 | local download_url 68 | download_url="$(get_download_url "${os}" "${ext}")" 69 | local output_path="${output_dir}/latest-configlet.${ext}" 70 | curl "${curlopts[@]}" --output "${output_path}" "${download_url}" 71 | 72 | case "${ext}" in 73 | zip) unzip "${output_path}" -d "${output_dir}" ;; 74 | *) tar xzf "${output_path}" -C "${output_dir}" ;; 75 | esac 76 | 77 | rm -f "${output_path}" 78 | 79 | local executable_ext 80 | case "${os}" in 81 | windows) executable_ext='.exe' ;; 82 | *) executable_ext='' ;; 83 | esac 84 | 85 | local configlet_path="${output_dir}/configlet${executable_ext}" 86 | local configlet_version 87 | configlet_version="$(${configlet_path} --version)" 88 | echo "Downloaded configlet ${configlet_version} to ${configlet_path}" 89 | } 90 | 91 | main 92 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Coq", 3 | "slug": "coq", 4 | "active": false, 5 | "status": { 6 | "concept_exercises": false, 7 | "test_runner": false, 8 | "representer": false, 9 | "analyzer": false 10 | }, 11 | "blurb": "Coq is a proof assistant. Using Coq, you can write formal descriptions of mathematical definitions, algorithms and theorems. Coq also provides tactics to interactively develop machine-checked proofs.", 12 | "version": 3, 13 | "online_editor": { 14 | "indent_style": "space", 15 | "indent_size": 4, 16 | "highlightjs_language": "coq" 17 | }, 18 | "files": { 19 | "solution": [ 20 | "%{kebab_slug}.v" 21 | ], 22 | "test": [ 23 | "test.v" 24 | ], 25 | "example": [ 26 | "example.v" 27 | ], 28 | "exemplar": [ 29 | ".meta/exemplar.v" 30 | ] 31 | }, 32 | "exercises": { 33 | "concept": [], 34 | "practice": [ 35 | { 36 | "slug": "hello-world", 37 | "name": "Hello World", 38 | "uuid": "a001fd68-5913-4041-80ea-0558b269ba4f", 39 | "practices": [], 40 | "prerequisites": [], 41 | "difficulty": 1, 42 | "topics": [] 43 | }, 44 | { 45 | "slug": "rna-transcription", 46 | "name": "Rna Transcription", 47 | "uuid": "10a7ad13-8564-4713-853b-5b13a829ac50", 48 | "practices": [], 49 | "prerequisites": [], 50 | "difficulty": 1, 51 | "topics": [] 52 | }, 53 | { 54 | "slug": "tautology", 55 | "name": "Tautology", 56 | "uuid": "b647eb59-40ce-49c9-b0ce-775615ce0063", 57 | "practices": [], 58 | "prerequisites": [], 59 | "difficulty": 1, 60 | "topics": [] 61 | } 62 | ] 63 | }, 64 | "concepts": [], 65 | "key_features": [], 66 | "tags": [] 67 | } 68 | -------------------------------------------------------------------------------- /config/exercise_readme.go.tmpl: -------------------------------------------------------------------------------- 1 | # {{ .Spec.Name }} 2 | 3 | {{ .Spec.Description -}} 4 | {{- with .Hints }} 5 | {{ . }} 6 | {{ end }} 7 | ## Getting Started 8 | 9 | For installation and learning resources, refer to the 10 | [exercism help page](http://exercism.io/languages/coq). 11 | 12 | ## Checking the solution (testing everything) 13 | 14 | To see if your solution works you just need to compile every file. 15 | 16 | ```bash 17 | coqc *.v 18 | ``` 19 | 20 | There is no additional testing step needed as we can offload all testing to the type checker! 21 | 22 | ## Feedback, Issues, Pull Requests 23 | 24 | The [exercism/coq](https://github.com/exercism/coq) repository on 25 | GitHub is the home for all of the Coq exercises. 26 | 27 | If you have feedback about an exercise, or want to help implementing a new 28 | one, head over there and create an issue. We'll do our best to help you! 29 | {{ with .Spec.Credits }} 30 | ## Source 31 | 32 | {{ . }} 33 | {{ end }} 34 | ## Submitting Incomplete Solutions 35 | It's possible to submit an incomplete solution so you can see how others have completed the exercise. 36 | -------------------------------------------------------------------------------- /docs/ABOUT.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | Coq is a programming language and a logic system at the same time, based on [Curry-Howard correspondence](https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence). 4 | In order to be a meaningful logic system, the language is designed so that any program written in Coq is guaranteed to terminate. 5 | Due to this, Coq is seldom used for general purposes; instead, it allows to develop *theories in mathematics* and write *certified programs*. 6 | 7 | Coq is also an interactive proof assistant. 8 | It does not automatically solve theorems, but helps the user build proofs via tactics. 9 | The tactic language (Ltac) is a language of its own, which allows to automate parts of the proofs. 10 | A well-written proof script resembles an informal proof written in prose. 11 | 12 | The main application / research areas using Coq include: 13 | 14 | * Mathematics (number theory, set theory, logic theory, computability theory, algebra, geometry, ...) 15 | * Programming languages (compilers, execution models, compiler optimizations, type system, ...) 16 | * Certified algorithms (correctness and termination of algorithms) and extraction into a general-purpose language (usually Ocaml or Haskell) 17 | 18 | Notable Coq developments include: 19 | 20 | * Machine-checked proof of [the Four Color Problem](https://madiot.fr/coq100/#32) 21 | * [CompCert](http://compcert.inria.fr/compcert-C.html), a certified C compiler 22 | 23 | If you are interested in Coq but haven't learned it yet, it is often advised to start with [Software Foundations](https://softwarefoundations.cis.upenn.edu/) series. 24 | Especially the first few chapters (up to "IndProp") will give you the fundamentals you need before you can start working on more interesting concepts and theories. 25 | You might find [other resources](https://coq.inria.fr/documentation) interesting too. 26 | 27 | Discussion about Coq and developments using Coq are usually done at [Reddit /r/coq](https://www.reddit.com/r/Coq/) and [Discourse](https://coq.discourse.group/latest). 28 | If you have questions, you can also get help at [StackOverflow](https://stackoverflow.com/questions/tagged/coq?sort=newest&pageSize=50); don't forget to tag your question with "coq". -------------------------------------------------------------------------------- /docs/INSTALLATION.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | -------------------------------------------------------------------------------- /docs/LEARNING.md: -------------------------------------------------------------------------------- 1 | # Learning 2 | 3 | Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs. 4 | 5 | There are some free resources for learning Coq, such as: 6 | 7 | * Software Foundations series: 8 | + [Volume 1: Logical Foundations](https://softwarefoundations.cis.upenn.edu/lf-current/index.html) 9 | + [Volume 2: Programming Language Foundations](https://softwarefoundations.cis.upenn.edu/plf-current/index.html) 10 | + [Volume 3: Verified Functional Algorithms](https://softwarefoundations.cis.upenn.edu/vfa-current/index.html) 11 | * Certified Programming with Dependent Types: 12 | + Which is avalaible for free in [Adam Chipala's site](http://adam.chlipala.net/cpdt/). -------------------------------------------------------------------------------- /docs/RESOURCES.md: -------------------------------------------------------------------------------- 1 | # Resources 2 | 3 | -------------------------------------------------------------------------------- /docs/SNIPPET.txt: -------------------------------------------------------------------------------- 1 | Require Import Coq.Strings.String. 2 | 3 | Open Scope string_scope. 4 | 5 | Definition hello:string := "Hello, World!". 6 | 7 | (* Unit test *) 8 | Lemma HelloTest: 9 | hello = "Hello, World!" . 10 | Proof. 11 | reflexivity. 12 | Qed. -------------------------------------------------------------------------------- /docs/TESTS.md: -------------------------------------------------------------------------------- 1 | # Tests 2 | 3 | -------------------------------------------------------------------------------- /docs/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "docs": [ 3 | { 4 | "uuid": "7eb8d3f5-ca64-4984-9bda-a1bea1ee498d", 5 | "slug": "learning", 6 | "path": "docs/LEARNING.md", 7 | "title": "How to learn Coq", 8 | "blurb": "An overview of how to get started from scratch with Coq" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /exercises/practice/hello-world/.docs/instructions.md: -------------------------------------------------------------------------------- 1 | # Instructions 2 | 3 | The classical introductory exercise. Just say "Hello, World!". 4 | 5 | ["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is 6 | the traditional first program for beginning programming in a new language 7 | or environment. 8 | 9 | The objectives are simple: 10 | 11 | - Write a function that returns the string "Hello, World!". 12 | - Run the test suite and make sure that it succeeds. 13 | - Submit your solution and check it at the website. 14 | 15 | If everything goes well, you will be ready to fetch your first real exercise. 16 | -------------------------------------------------------------------------------- /exercises/practice/hello-world/.meta/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "authors": [ 3 | "vzaliva" 4 | ], 5 | "contributors": [ 6 | "kytrinyx", 7 | "proger" 8 | ], 9 | "files": { 10 | "solution": [ 11 | "helloworld.v" 12 | ], 13 | "test": [ 14 | "test.v" 15 | ], 16 | "example": [ 17 | ".meta/example.v" 18 | ] 19 | }, 20 | "blurb": "The classical introductory exercise. Just say \"Hello, World!\"", 21 | "source": "This is an exercise to introduce users to using Exercism", 22 | "source_url": "http://en.wikipedia.org/wiki/%22Hello,_world!%22_program" 23 | } 24 | -------------------------------------------------------------------------------- /exercises/practice/hello-world/.meta/example.v: -------------------------------------------------------------------------------- 1 | Require Import Coq.Strings.String. 2 | 3 | Open Scope string_scope. 4 | 5 | Definition hello:string := "Hello, World!". 6 | 7 | (* Unit test *) 8 | Lemma HelloTest: 9 | hello = "Hello, World!" . 10 | Proof. 11 | reflexivity. 12 | Qed. -------------------------------------------------------------------------------- /exercises/practice/hello-world/.meta/tests.toml: -------------------------------------------------------------------------------- 1 | # This is an auto-generated file. 2 | # 3 | # Regenerating this file via `configlet sync` will: 4 | # - Recreate every `description` key/value pair 5 | # - Recreate every `reimplements` key/value pair, where they exist in problem-specifications 6 | # - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) 7 | # - Preserve any other key/value pair 8 | # 9 | # As user-added comments (using the # character) will be removed when this file 10 | # is regenerated, comments can be added via a `comment` key. 11 | 12 | [af9ffe10-dc13-42d8-a742-e7bdafac449d] 13 | description = "Say Hi!" 14 | -------------------------------------------------------------------------------- /exercises/practice/hello-world/helloworld.v: -------------------------------------------------------------------------------- 1 | Require Import Coq.Strings.String. 2 | 3 | Open Scope string_scope. 4 | 5 | Definition hello:string := "Goodbye, Mars!". 6 | -------------------------------------------------------------------------------- /exercises/practice/hello-world/test.v: -------------------------------------------------------------------------------- 1 | Require Import Coq.Strings.String. 2 | 3 | Require Import helloworld. 4 | 5 | Lemma HelloTest: 6 | hello = "Hello, World!"%string. 7 | Proof. 8 | reflexivity. 9 | Qed. 10 | -------------------------------------------------------------------------------- /exercises/practice/rna-transcription/.docs/instructions.md: -------------------------------------------------------------------------------- 1 | # Instructions 2 | 3 | Your task is determine the RNA complement of a given DNA sequence. 4 | 5 | Both DNA and RNA strands are a sequence of nucleotides. 6 | 7 | The four nucleotides found in DNA are adenine (**A**), cytosine (**C**), guanine (**G**) and thymine (**T**). 8 | 9 | The four nucleotides found in RNA are adenine (**A**), cytosine (**C**), guanine (**G**) and uracil (**U**). 10 | 11 | Given a DNA strand, its transcribed RNA strand is formed by replacing each nucleotide with its complement: 12 | 13 | - `G` -> `C` 14 | - `C` -> `G` 15 | - `T` -> `A` 16 | - `A` -> `U` 17 | 18 | ~~~~exercism/note 19 | If you want to look at how the inputs and outputs are structured, take a look at the examples in the test suite. 20 | ~~~~ 21 | -------------------------------------------------------------------------------- /exercises/practice/rna-transcription/.docs/introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | You work for a bioengineering company that specializes in developing therapeutic solutions. 4 | 5 | Your team has just been given a new project to develop a targeted therapy for a rare type of cancer. 6 | 7 | ~~~~exercism/note 8 | It's all very complicated, but the basic idea is that sometimes people's bodies produce too much of a given protein. 9 | That can cause all sorts of havoc. 10 | 11 | But if you can create a very specific molecule (called a micro-RNA), it can prevent the protein from being produced. 12 | 13 | This technique is called [RNA Interference][rnai]. 14 | 15 | [rnai]: https://admin.acceleratingscience.com/ask-a-scientist/what-is-rnai/ 16 | ~~~~ 17 | -------------------------------------------------------------------------------- /exercises/practice/rna-transcription/.meta/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "authors": [ 3 | "vzaliva" 4 | ], 5 | "contributors": [ 6 | "kytrinyx", 7 | "proger" 8 | ], 9 | "files": { 10 | "solution": [ 11 | "rna-transcription.v" 12 | ], 13 | "test": [ 14 | "test.v" 15 | ], 16 | "example": [ 17 | ".meta/example.v" 18 | ] 19 | }, 20 | "blurb": "Given a DNA strand, return its RNA Complement Transcription.", 21 | "source": "Hyperphysics", 22 | "source_url": "http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html" 23 | } 24 | -------------------------------------------------------------------------------- /exercises/practice/rna-transcription/.meta/example.v: -------------------------------------------------------------------------------- 1 | Require Import Coq.Lists.List. 2 | 3 | Definition to_rna: list DNA -> list RNA 4 | := map (fun x => match x with 5 | | dG => rC 6 | | dC => rG 7 | | dT => rA 8 | | dA => rU 9 | end). 10 | 11 | 12 | (* TEST: 13 | Import ListNotations. 14 | Compute to_rna [dA ; dG]. 15 | *) -------------------------------------------------------------------------------- /exercises/practice/rna-transcription/.meta/tests.toml: -------------------------------------------------------------------------------- 1 | # This is an auto-generated file. 2 | # 3 | # Regenerating this file via `configlet sync` will: 4 | # - Recreate every `description` key/value pair 5 | # - Recreate every `reimplements` key/value pair, where they exist in problem-specifications 6 | # - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) 7 | # - Preserve any other key/value pair 8 | # 9 | # As user-added comments (using the # character) will be removed when this file 10 | # is regenerated, comments can be added via a `comment` key. 11 | 12 | [b4631f82-c98c-4a2f-90b3-c5c2b6c6f661] 13 | description = "Empty RNA sequence" 14 | 15 | [a9558a3c-318c-4240-9256-5d5ed47005a6] 16 | description = "RNA complement of cytosine is guanine" 17 | 18 | [6eedbb5c-12cb-4c8b-9f51-f8320b4dc2e7] 19 | description = "RNA complement of guanine is cytosine" 20 | 21 | [870bd3ec-8487-471d-8d9a-a25046488d3e] 22 | description = "RNA complement of thymine is adenine" 23 | 24 | [aade8964-02e1-4073-872f-42d3ffd74c5f] 25 | description = "RNA complement of adenine is uracil" 26 | 27 | [79ed2757-f018-4f47-a1d7-34a559392dbf] 28 | description = "RNA complement" 29 | -------------------------------------------------------------------------------- /exercises/practice/rna-transcription/DNA.v: -------------------------------------------------------------------------------- 1 | (* Type definitions *) 2 | 3 | Inductive DNA := dA | dC | dG | dT. 4 | Inductive RNA := rA | rC | rG | rU. 5 | -------------------------------------------------------------------------------- /exercises/practice/rna-transcription/rna-transcription.v: -------------------------------------------------------------------------------- 1 | Require Import DNA. 2 | 3 | Definition to_rna: list DNA -> list RNA := 4 | (* Add your definition here *) 5 | . 6 | -------------------------------------------------------------------------------- /exercises/practice/tautology/.meta/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "authors": [ 3 | "vzaliva" 4 | ], 5 | "contributors": [ 6 | "kytrinyx", 7 | "proger" 8 | ], 9 | "files": { 10 | "solution": [ 11 | "tautology.v" 12 | ], 13 | "test": [ 14 | "test.v" 15 | ], 16 | "example": [ 17 | ".meta/example.v" 18 | ] 19 | }, 20 | "blurb": "The first rule of the Tautology Club is the first rule of the Tautology Club " 21 | } 22 | -------------------------------------------------------------------------------- /exercises/practice/tautology/.meta/description.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Let us start by proving something we already know is true. 4 | -------------------------------------------------------------------------------- /exercises/practice/tautology/.meta/example.v: -------------------------------------------------------------------------------- 1 | Theorem TautologyExercise: True. 2 | Proof. 3 | tauto. 4 | Qed. -------------------------------------------------------------------------------- /exercises/practice/tautology/.meta/metadata.yml: -------------------------------------------------------------------------------- 1 | --- 2 | blurb: "The first rule of the Tautology Club is the first rule of the Tautology Club " 3 | source: "Coq classics" 4 | -------------------------------------------------------------------------------- /exercises/practice/tautology/tautology.v: -------------------------------------------------------------------------------- 1 | Theorem TautologyExercise: True. 2 | Proof. 3 | (* Add your proof here *) 4 | Qed. -------------------------------------------------------------------------------- /img/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exercism/coq/fc9f2c0dff192c809068bf3b11ff49a5fb8a8041/img/.keep --------------------------------------------------------------------------------