Skip to content

Coq plugin for printing term abstract syntax trees and their digests

License

Notifications You must be signed in to change notification settings

proofengineering/coq-ast

Repository files navigation

AST Coq Plugin

Build Status

A Coq plugin for printing semi-canonical abstract syntax trees (ASTs) with unique kernel names or digests of such trees.

Requirements

Building

The easiest way to install the plugin is via OPAM:

opam repo add proofengineering-dev http://opam-dev.proofengineering.org
opam install coq-ast

To build the plugin manually, run make in the root directory. Then, to install it, run make install.

Usage Examples

(* require and import plugin *)
Require Import AST.AST.

(* constants to analyze *)
Require Import List.

(* print list of identifier ASTs as JSON to stdout *)
AST map filter.

(* print list of identifier ASTs as JSON to file *)
AST "asts.json" map filter.

(* print MD5 digests of identifiers as JSON to stdout *)
Digest MD5 map filter.

(* print Adler32 digests of identifiers as JSON to stdout *)
Digest ADLER32 map filter.

(* print MD5 digests of identifiers as JSON to file digests.json *)
Digest MD5 "digests.json" map filter.

(* print ASTs for all identifiers in modules List and Logic as JSON to file asts.json *)
ModuleAST "asts.json" Logic List.

(* print MD5 digests for all identifiers in modules List and Logic as JSON to file digests.json *)
ModuleDigest MD5 "digests.json" Logic List.

About

Coq plugin for printing term abstract syntax trees and their digests

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages