Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Adding ML tactic plugins

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Adding ML tactic plugins


Chronological Thread 
  • From: Kenneth Roe <kendroe AT hotmail.com>
  • To: Coq-Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Adding ML tactic plugins
  • Date: Fri, 29 Sep 2017 19:00:53 +0000
  • Accept-language: en-US
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=kendroe AT hotmail.com; spf=Pass smtp.mailfrom=kendroe AT hotmail.com; spf=Pass smtp.helo=postmaster AT NAM02-BL2-obe.outbound.protection.outlook.com
  • Ironport-phdr: 9a23:jnD4HxHDxfXc2/r3fZx+WZ1GYnF86YWxBRYc798ds5kLTJ76ocmwAkXT6L1XgUPTWs2DsrQf1LqQ7viocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TXhpQIVTz74LE9eIvn/UtrZiN3y3OSv8bXSZR9JjXyze+UhAg+xqFDyu88QjJdiYpw2x1OdoXZOd/5RyEtoIk6Wlhf4oMy3+cgwoGxrp/s9+psYAu3BdKMiQOkAAQ==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

I have the following snippet of code in my .ml4 file:

TACTIC EXTEND AR2

| [ "arewrite" ] -> [ arewrite ]

END;;


(* PrintAST command

   The depth specifies the depth at which to unroll nested type definitions *)

VERNAC COMMAND EXTEND AR

| [ "printAST" constr(def) ] -> [ print_ast 0 def ]

| [ "printExp" constr(def) ] -> [ print_exp 0 def ]

| [ "printAST" constr(def) "with" "depth" integer(depth)] -> [ print_ast depth def ]

END;;


When I compile my plugin and run Coqtop, my "arewrite" tactic is not recognized.

Kenneths-MBP:plugin kendroe$ coqtop

Welcome to Coq 8.5pl2 (July 2017)


Coq < Require Export AdvancedRewrite.advancedRewrite.

[Loading ML file AdvancedRewritePlugin.cmxs ... done]


Coq < printAST (1+2).

(App (Definition Coq.Init.Nat.add (Fix (Functions ((Name add) 0 (Prod (Name n) (Name nat) (Prod (Name m) (Name nat) (Name nat))) (Lambda (Name n) (Name nat) (Lambda (Name m) (Name nat) (Case 0 (Lambda (Name n) (Name nat) (Name nat)) (CaseMatch (Name n)) (CaseBranches (Name m) (Lambda (Name p) (Name nat) (App (Construct (Name nat) 2) (App (Name add) (Name p) (Name m)))))))))) 0)) (App (Construct (Name nat) 2) (Construct (Name nat) 1)) (App (Construct (Name nat) 2) (App (Construct (Name nat) 2) (Construct (Name nat) 1))))

Coq < Theorem x: 1+2=3.

1 subgoal

  

  ============================

  1 + 2 = 3


x < arewrite.

Toplevel input, characters 0-8:

> arewrite.

> ^^^^^^^^

Error: The reference arewrite was not found in the current environment.


x <


The "printAST" command that I declared is recognized.  However, the "arewrite" tactic is not.  What do I need to change?

                         - Ken




  • [Coq-Club] Adding ML tactic plugins, Kenneth Roe, 09/29/2017

Archive powered by MHonArc 2.6.18.

Top of Page