All Projects → Lysxia → Advent Of Coq 2018

Lysxia / Advent Of Coq 2018

Advent of Code 2018, in Coq! (https://adventofcode.com/2018)

Labels

Projects that are alternatives of or similar to Advent Of Coq 2018

Coq Serapi
Coq Protocol Playground with Se(xp)rialization of Internal Structures.
Stars: ✭ 87 (-36.5%)
Mutual labels:  coq
Coqtail
Interactive Coq Proofs in Vim
Stars: ✭ 109 (-20.44%)
Mutual labels:  coq
Dot
formalization of the Dependent Object Types (DOT) calculus
Stars: ✭ 132 (-3.65%)
Mutual labels:  coq
Peacoq
PeaCoq is a pretty Coq, isn't it?
Stars: ✭ 99 (-27.74%)
Mutual labels:  coq
Ceramist
Verified hash-based AMQ structures in Coq
Stars: ✭ 107 (-21.9%)
Mutual labels:  coq
Iron
Coq formalizations of functional languages.
Stars: ✭ 114 (-16.79%)
Mutual labels:  coq
Vscoq
Coq Support for Visual Studio Code
Stars: ✭ 85 (-37.96%)
Mutual labels:  coq
Proofs
A selection of formal proofs in Coq.
Stars: ✭ 135 (-1.46%)
Mutual labels:  coq
Ergo
The Language for Smart Legal Contracts
Stars: ✭ 108 (-21.17%)
Mutual labels:  coq
Geocoq
A formalization of geometry in Coq based on Tarski's axiom system
Stars: ✭ 128 (-6.57%)
Mutual labels:  coq
Coq Pipes
Stars: ✭ 101 (-26.28%)
Mutual labels:  coq
Mindless Coding
Mindless, verified (erasably) coding using dependent types
Stars: ✭ 104 (-24.09%)
Mutual labels:  coq
Coq Of Ocaml
Import OCaml programs to Coq 🐓 🐫
Stars: ✭ 117 (-14.6%)
Mutual labels:  coq
Ttlite
A SuperCompiler for Martin-Löf's Type Theory
Stars: ✭ 94 (-31.39%)
Mutual labels:  coq
Interactiontrees
A Library for Representing Recursive and Impure Programs in Coq
Stars: ✭ 133 (-2.92%)
Mutual labels:  coq
Fourcolor
Formal proof of the Four Color Theorem
Stars: ✭ 87 (-36.5%)
Mutual labels:  coq
Awesome Provable
A curated set of links to formal methods involving provable code.
Stars: ✭ 111 (-18.98%)
Mutual labels:  coq
Coq Haskell
A library for formalizing Haskell types and functions in Coq
Stars: ✭ 135 (-1.46%)
Mutual labels:  coq
Math Classes
A library of abstract interfaces for mathematical structures in Coq [[email protected]]
Stars: ✭ 133 (-2.92%)
Mutual labels:  coq
Fiat
Mostly Automated Synthesis of Correct-by-Construction Programs
Stars: ✭ 119 (-13.14%)
Mutual labels:  coq

Advent of Code 2018 in Coq

This repository contains solutions for the Advent of Code 2018 (https://adventofcode.com/2018). Some of them are formally verified. This is an example of applying verification to small programming challenges of that kind. (If you're aiming for prizes, this is probably not the way to go.)

Contributions welcome

It will probably take much longer than the actual span of the AoC to complete this project, so any help implementing, specifying, or verifying solutions is welcome. If you have any questions, open an issue or send me an email ([email protected]).

Suggested tasks

  • day02_2.v, day03_2.v are bare of any verification effort.

  • Implement Day 6 (Manhattan geometry).

Project status

As of December 2, the two solutions of Day 1's challenge are verified (significant caveats apply).

Read more about my approach in SUMMARY.md.

Dependencies

  • coq-simple-io, master

    This project serves to test coq-simple-io and see what is missing to make it practical to write executable programs in Coq.

  • coq-ext-lib, 0.10

  • Coq, 8.8.2

  • OCaml, 4.07.0

Older versions of these are likely to work.

Optional dependency

  • coq-itree, master. A library of free monads and algebraic effects (WIP).

Experimental proofs using itree instead of io_rel can be found in files sol/day*_*_extra.v.

To install coq-itree with opam and make it known to advent-of-coq:

git clone https://github.com/DeepSpec/InteractionTrees
opam pin add coq-itree ./InteractionTrees

# Inside advent-of-coq-2018, create a symbolic link _CoqConfig.append
# to _CoqConfig.extras
# The -f option overwrites any existing _CoqConfig.append
ln -sf _CoqConfig.extras _CoqConfig.append

# (Re)generate _CoqProject and compile lib.itree
make lib

Install the development version of coq-simple-io with opam

# Get the source
git clone https://github.com/Lysxia/coq-simple-io

# Register the local version of coq-simple-io with opam
opam pin add -k git coq-simple-io ./coq-simple-io

# When coq-simple-io is updated
cd coq-simple-io && git pull coq-simple-io
opam reinstall coq-simple-io

Build

To compile and run day01_1.v for example:

make exe/day01_1
./exe/day01_1 < txt/day01
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].