Code Monkey home page Code Monkey logo

language-coq's Introduction

language-coq

CI Pipeline

This repository contains an AST and pretty-printer for Coq. The code in this repository has originally been developed as part of the hs-to-coq compiler but has been extracted for use in the free-compiler

Table of Contents

  1. Directory Structure
  2. Getting Started
  3. Get Involved
  4. License

Directory Structure

This repository is structured as follows.

  • ./src/lib contains the source code of the library. All modules start with the prefix Language.Coq.

    • The AST is located in Language.Coq.Gallina.
    • The pretty-printer can be found in Language.Coq.Pretty.
  • tool contains Bash scripts that are used during development and for testing.

Getting Stated

Required Software

The library is written in Haskell and uses Cabal to manage the dependencies. The library has been tested with the following versions of the GHC and Cabal.

  • GHC, version 8.6.5
  • Cabal, version 3.4.0.0

Installation

The language-coq package is not yet on Hackage. In order to use this package in your own project, include the following stanza in your cabal.project file.

source-repository-package
  type: git
  location: git://github.com/FreeProving/language-coq.git
  tag: v0.4.0.0

Get Involved

Feature requests, enhancement proposals, bug reports, pull requests and all other contributions are welcome!
Have a look at our contributing guidelines for more information on how to contribute.

License

The language-coq library is licensed under the MIT License.
See the LICENSE file for details.

language-coq's People

Contributors

nomeata avatar sweirich avatar antalsz avatar lastland avatar just95 avatar crizkallah avatar jwiegley avatar joscoh avatar marvinlira avatar samuelgruetter avatar abailly avatar daniel-teut avatar liyishuai avatar maclement avatar threonorm avatar

Stargazers

Sandra Dylus avatar Tim Kersey avatar Rick Elrod avatar Joomy Korkut avatar Valentin Robert avatar

Watchers

James Cloos avatar antonio nikishaev avatar Sandra Dylus avatar  avatar Jonas Höfer avatar  avatar

Forkers

qsctr

language-coq's Issues

Expand `Notation` definition

Description

The AST could be expanded such that more complex notations could be represented.
A new constructor for notations should be added where the left hand side is not a single notation identifier but a list of notation and variable identifiers and the right hand side has an additional list of syntax modifiers.

Motivation

To solve an issue #153 for the free-compiler, I need to be able to define smart constructors as notations like the following.

Notation "'Cons' x xs" := (pure (cons x xs))
  (at level 10, x, xs at level 9).

The current representation however only supports notations of the following form.

Notation "'ident'" := (term).

It cannot have identifiers in the notation string for variables and any syntax modifiers.

Alternatives

The simplest notation expansion that solves my problem would be to support abbreviations.

Notation Cons x xs := (pure (cons x xs)).

This solution however requires that the smart constructor name is a valid identifier and it would not be possible to define for example what @Cons means. The solution above would allow this.

Notation "'@Cons' Shape Pos a x xs" := (@pure Shape Pos (List Shape Pos a) (@cons Shape Pos a x xs))
  (at level 10, Shape, Pos, a, x, xs at level 9, only parsing).

Additional Context

Add Hint sentences

Description

Add the possibility to add hints to a hint database in Coq.

Motivation

Hint databases are very useful for automatically building proofs. They need however to be filled with hints which is not possible with the current representation of Coq.

Alternatives

Additional Context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.