Browse Source

Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF

master
Achim D. Brucker 7 months ago
parent
commit
1c5bb85233
100 changed files with 53 additions and 51 deletions
  1. +0
    -0
      .ci/Jenkinsfile
  2. +0
    -0
      .ci/isabelle4isadof/Dockerfile
  3. +0
    -0
      .config
  4. +0
    -0
      .gitattributes
  5. +0
    -0
      .gitignore
  6. +0
    -0
      CHANGELOG.md
  7. +0
    -0
      CITATION
  8. +0
    -0
      LICENSE
  9. +0
    -0
      README.md
  10. +0
    -0
      ROOTS
  11. +0
    -0
      examples/CENELEC_50128/ROOTS
  12. +0
    -0
      examples/CENELEC_50128/mini_odo/ROOT
  13. +0
    -0
      examples/CENELEC_50128/mini_odo/document/figures/df-numerics-encshaft.png
  14. +0
    -0
      examples/CENELEC_50128/mini_odo/document/figures/odometer.jpeg
  15. +0
    -0
      examples/CENELEC_50128/mini_odo/document/figures/three-phase-odo.pdf
  16. +0
    -0
      examples/CENELEC_50128/mini_odo/document/figures/wheel-df.png
  17. +0
    -0
      examples/CENELEC_50128/mini_odo/document/isadof.cfg
  18. +0
    -0
      examples/CENELEC_50128/mini_odo/document/lstisadof.sty
  19. +0
    -0
      examples/CENELEC_50128/mini_odo/document/preamble.tex
  20. +0
    -0
      examples/CENELEC_50128/mini_odo/document/root.bib
  21. +0
    -0
      examples/CENELEC_50128/mini_odo/document/root.mst
  22. +0
    -0
      examples/CENELEC_50128/mini_odo/mini_odo.thy
  23. +0
    -0
      examples/README.md
  24. +0
    -0
      examples/ROOTS
  25. +0
    -0
      examples/math_exam/MathExam/MathExam.thy
  26. +0
    -0
      examples/math_exam/MathExam/ROOT
  27. +0
    -0
      examples/math_exam/MathExam/document/figures/Polynomialdeg5.png
  28. +0
    -0
      examples/math_exam/MathExam/document/isadof.cfg
  29. +0
    -0
      examples/math_exam/MathExam/document/preamble.tex
  30. +0
    -0
      examples/math_exam/ROOTS
  31. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/IsaDofApplications.thy
  32. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/ROOT
  33. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-II-bgnd1.png
  34. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-III-bgnd-text_section.png
  35. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-IV-jumpInDocCLass.png
  36. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-Intro.png
  37. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-V-attribute.png
  38. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-figures.png
  39. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/InteractiveMathSheet.png
  40. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/antiquotations-PIDE.png
  41. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/isabelle-architecture.pdf
  42. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/isabelle-architecture.svg
  43. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/srac-as-es-application.png
  44. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/srac-definition.png
  45. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/isadof.cfg
  46. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/lstisadof.sty
  47. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/preamble.tex
  48. +0
    -0
      examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/root.bib
  49. +0
    -0
      examples/scholarly_paper/ROOTS
  50. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/00_Frontmatter.thy
  51. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/01_Introduction.thy
  52. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/02_Background.thy
  53. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/03_GuidedTour.thy
  54. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/04_RefMan.thy
  55. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/05_Implementation.thy
  56. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/Isabelle_DOF-Manual.thy
  57. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/ROOT
  58. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-II-bgnd1.png
  59. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-III-bgnd-text_section.png
  60. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-IV-jumpInDocCLass.png
  61. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-Intro.png
  62. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-V-attribute.png
  63. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-figures.png
  64. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/Isabelle_DOF-logo.pdf
  65. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/antiquotations-PIDE.png
  66. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/cicm2018-combined.png
  67. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/cicm2018-dof.png
  68. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/cicm2018-pdf.png
  69. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/document-hierarchy.pdf
  70. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/document-hierarchy.svg
  71. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/isabelle-architecture.pdf
  72. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/isabelle-architecture.svg
  73. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/isadof.png
  74. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/srac-as-es-application.png
  75. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/figures/srac-definition.png
  76. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/isadof.cfg
  77. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/lstisadof-manual.sty
  78. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/preamble.tex
  79. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/root.bib
  80. +0
    -0
      examples/technical_report/Isabelle_DOF-Manual/document/root.mst
  81. +0
    -0
      examples/technical_report/ROOTS
  82. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/ROOT
  83. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/TR_MyCommentedIsabelle.thy
  84. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/figures/document-model.pdf
  85. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/figures/isabelle-architecture.pdf
  86. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/figures/markup-demo.png
  87. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/figures/pure-inferences-I.pdf
  88. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/figures/pure-inferences-II.pdf
  89. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/figures/text-element.pdf
  90. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/isadof.cfg
  91. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/preamble.tex
  92. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/prooftree.sty
  93. +0
    -0
      examples/technical_report/TR_my_commented_isabelle/document/root.bib
  94. +0
    -0
      src/DOF/Assert.thy
  95. +0
    -0
      src/DOF/AssertLong.thy
  96. +5
    -3
      src/DOF/Isa_COL.thy
  97. +48
    -48
      src/DOF/Isa_DOF.thy
  98. +0
    -0
      src/DOF/RegExpInterface.thy
  99. +0
    -0
      src/DOF/latex/DOF-COL.sty
  100. +0
    -0
      src/DOF/latex/DOF-core.sty

+ 0
- 0
.ci/Jenkinsfile View File


+ 0
- 0
.ci/isabelle4isadof/Dockerfile View File


+ 0
- 0
.config View File


+ 0
- 0
.gitattributes View File


+ 0
- 0
.gitignore View File


+ 0
- 0
CHANGELOG.md View File


+ 0
- 0
CITATION View File


+ 0
- 0
LICENSE View File


+ 0
- 0
README.md View File


+ 0
- 0
ROOTS View File


+ 0
- 0
examples/CENELEC_50128/ROOTS View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/ROOT View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/document/figures/df-numerics-encshaft.png View File

Before After
Width: 880  |  Height: 190  |  Size: 27 KiB Width: 880  |  Height: 190  |  Size: 27 KiB

+ 0
- 0
examples/CENELEC_50128/mini_odo/document/figures/odometer.jpeg View File

Before After
Width: 1632  |  Height: 1224  |  Size: 407 KiB Width: 1632  |  Height: 1224  |  Size: 407 KiB

+ 0
- 0
examples/CENELEC_50128/mini_odo/document/figures/three-phase-odo.pdf View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/document/figures/wheel-df.png View File

Before After
Width: 349  |  Height: 196  |  Size: 23 KiB Width: 349  |  Height: 196  |  Size: 23 KiB

+ 0
- 0
examples/CENELEC_50128/mini_odo/document/isadof.cfg View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/document/lstisadof.sty View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/document/preamble.tex View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/document/root.bib View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/document/root.mst View File


+ 0
- 0
examples/CENELEC_50128/mini_odo/mini_odo.thy View File


+ 0
- 0
examples/README.md View File


+ 0
- 0
examples/ROOTS View File


+ 0
- 0
examples/math_exam/MathExam/MathExam.thy View File


+ 0
- 0
examples/math_exam/MathExam/ROOT View File


+ 0
- 0
examples/math_exam/MathExam/document/figures/Polynomialdeg5.png View File

Before After
Width: 220  |  Height: 169  |  Size: 4.9 KiB Width: 220  |  Height: 169  |  Size: 4.9 KiB

+ 0
- 0
examples/math_exam/MathExam/document/isadof.cfg View File


+ 0
- 0
examples/math_exam/MathExam/document/preamble.tex View File


+ 0
- 0
examples/math_exam/ROOTS View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/IsaDofApplications.thy View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/ROOT View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-II-bgnd1.png View File

Before After
Width: 394  |  Height: 109  |  Size: 14 KiB Width: 394  |  Height: 109  |  Size: 14 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-III-bgnd-text_section.png View File

Before After
Width: 515  |  Height: 124  |  Size: 18 KiB Width: 515  |  Height: 124  |  Size: 18 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-IV-jumpInDocCLass.png View File

Before After
Width: 572  |  Height: 201  |  Size: 23 KiB Width: 572  |  Height: 201  |  Size: 23 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-Intro.png View File

Before After
Width: 1020  |  Height: 490  |  Size: 85 KiB Width: 1020  |  Height: 490  |  Size: 85 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-V-attribute.png View File

Before After
Width: 662  |  Height: 96  |  Size: 16 KiB Width: 662  |  Height: 96  |  Size: 16 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/Dogfood-figures.png View File

Before After
Width: 787  |  Height: 102  |  Size: 18 KiB Width: 787  |  Height: 102  |  Size: 18 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/InteractiveMathSheet.png View File

Before After
Width: 1371  |  Height: 613  |  Size: 75 KiB Width: 1371  |  Height: 613  |  Size: 75 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/antiquotations-PIDE.png View File

Before After
Width: 1390  |  Height: 410  |  Size: 96 KiB Width: 1390  |  Height: 410  |  Size: 96 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/isabelle-architecture.pdf View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/isabelle-architecture.svg View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/srac-as-es-application.png View File

Before After
Width: 1468  |  Height: 234  |  Size: 67 KiB Width: 1468  |  Height: 234  |  Size: 67 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/srac-definition.png View File

Before After
Width: 1428  |  Height: 204  |  Size: 50 KiB Width: 1428  |  Height: 204  |  Size: 50 KiB

+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/isadof.cfg View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/lstisadof.sty View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/preamble.tex View File


+ 0
- 0
examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/root.bib View File


+ 0
- 0
examples/scholarly_paper/ROOTS View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/00_Frontmatter.thy View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/01_Introduction.thy View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/02_Background.thy View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/03_GuidedTour.thy View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/04_RefMan.thy View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/05_Implementation.thy View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/Isabelle_DOF-Manual.thy View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/ROOT View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-II-bgnd1.png View File

Before After
Width: 394  |  Height: 109  |  Size: 14 KiB Width: 394  |  Height: 109  |  Size: 14 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-III-bgnd-text_section.png View File

Before After
Width: 515  |  Height: 124  |  Size: 18 KiB Width: 515  |  Height: 124  |  Size: 18 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-IV-jumpInDocCLass.png View File

Before After
Width: 572  |  Height: 201  |  Size: 23 KiB Width: 572  |  Height: 201  |  Size: 23 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-Intro.png View File

Before After
Width: 1020  |  Height: 490  |  Size: 85 KiB Width: 1020  |  Height: 490  |  Size: 85 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-V-attribute.png View File

Before After
Width: 662  |  Height: 96  |  Size: 16 KiB Width: 662  |  Height: 96  |  Size: 16 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/Dogfood-figures.png View File

Before After
Width: 787  |  Height: 102  |  Size: 18 KiB Width: 787  |  Height: 102  |  Size: 18 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/Isabelle_DOF-logo.pdf View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/antiquotations-PIDE.png View File

Before After
Width: 1390  |  Height: 410  |  Size: 96 KiB Width: 1390  |  Height: 410  |  Size: 96 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/cicm2018-combined.png View File

Before After
Width: 1592  |  Height: 770  |  Size: 214 KiB Width: 1592  |  Height: 770  |  Size: 214 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/cicm2018-dof.png View File

Before After
Width: 1356  |  Height: 829  |  Size: 135 KiB Width: 1356  |  Height: 829  |  Size: 135 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/cicm2018-pdf.png View File

Before After
Width: 640  |  Height: 713  |  Size: 73 KiB Width: 640  |  Height: 713  |  Size: 73 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/document-hierarchy.pdf View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/document-hierarchy.svg View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/isabelle-architecture.pdf View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/isabelle-architecture.svg View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/isadof.png View File

Before After
Width: 958  |  Height: 489  |  Size: 81 KiB Width: 958  |  Height: 489  |  Size: 81 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/srac-as-es-application.png View File

Before After
Width: 1468  |  Height: 234  |  Size: 67 KiB Width: 1468  |  Height: 234  |  Size: 67 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/figures/srac-definition.png View File

Before After
Width: 1428  |  Height: 204  |  Size: 50 KiB Width: 1428  |  Height: 204  |  Size: 50 KiB

+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/isadof.cfg View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/lstisadof-manual.sty View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/preamble.tex View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/root.bib View File


+ 0
- 0
examples/technical_report/Isabelle_DOF-Manual/document/root.mst View File


+ 0
- 0
examples/technical_report/ROOTS View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/ROOT View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/TR_MyCommentedIsabelle.thy View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/figures/document-model.pdf View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/figures/isabelle-architecture.pdf View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/figures/markup-demo.png View File

Before After
Width: 840  |  Height: 60  |  Size: 13 KiB Width: 840  |  Height: 60  |  Size: 13 KiB

+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/figures/pure-inferences-I.pdf View File

Before After
Width: 736  |  Height: 640  |  Size: 91 KiB Width: 736  |  Height: 640  |  Size: 91 KiB

+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/figures/pure-inferences-II.pdf View File

Before After
Width: 732  |  Height: 172  |  Size: 31 KiB Width: 732  |  Height: 172  |  Size: 31 KiB

+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/figures/text-element.pdf View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/isadof.cfg View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/preamble.tex View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/prooftree.sty View File


+ 0
- 0
examples/technical_report/TR_my_commented_isabelle/document/root.bib View File


+ 0
- 0
src/DOF/Assert.thy View File


+ 0
- 0
src/DOF/AssertLong.thy View File


+ 5
- 3
src/DOF/Isa_COL.thy View File

@@ -80,7 +80,7 @@ fun enriched_document_command level =
NONE => doc_attrs
| SOME(NONE) => (("level",@{here}),"None")::doc_attrs
| SOME(SOME x) => (("level",@{here}),"Some("^ Int.toString x ^"::int)")::doc_attrs
in gen_enriched_document_command I transform end;
in gen_enriched_document_command {inline=true} I transform end;

val enriched_document_command_macro = enriched_document_command (* TODO ... *)

@@ -92,7 +92,7 @@ fun enriched_formal_statement_command ncid (S: (string * string) list) =
| _ => X)
fun transform_attr doc_attrs = (map (fn(cat,tag) => ((cat,@{here}),tag)) S) @
(("formal_results",@{here}),"([]::thm list)")::doc_attrs
in gen_enriched_document_command transform_cid transform_attr end;
in gen_enriched_document_command {inline=true} transform_cid transform_attr end;


fun assertion_cmd'((((((oid,pos),cid_pos),doc_attrs),name_opt:string option),modes : string list),
@@ -104,7 +104,9 @@ fun assertion_cmd'((((((oid,pos),cid_pos),doc_attrs),name_opt:string option),mod
fun mks thy = case DOF_core.get_object_global_opt oid thy of
SOME NONE => (error("update of declared but not created doc_item:" ^ oid))
| SOME _ => (update_instance_command (((oid,pos),cid_pos),conv_attrs' thy) thy)
| NONE => (create_and_check_docitem false oid pos cid_pos (conv_attrs thy) thy)
| NONE => (create_and_check_docitem
{is_monitor = false} {is_inline = false}
oid pos cid_pos (conv_attrs thy) thy)
val check = (assert_cmd name_opt modes prop) o Proof_Context.init_global
in
(* Toplevel.keep (check o Toplevel.context_of) *)


+ 48
- 48
src/DOF/Isa_DOF.thy View File

@@ -166,8 +166,10 @@ struct

type docobj = {pos : Position.T,
thy_name : string,
value : term,
id : serial, cid : string}
value : term,
inline : bool,
id : serial,
cid : string}

type docobj_tab ={tab : (docobj option) Symtab.table,
maxano : int
@@ -570,9 +572,10 @@ fun get_value_local oid ctxt = case get_object_local oid ctxt of
(* missing : setting terms to ground (no type-schema vars, no schema vars. )*)
fun update_value_global oid upd thy =
case get_object_global oid thy of
SOME{pos,thy_name,value,id,cid} =>
SOME{pos,thy_name,value,inline,id,cid} =>
let val tab' = Symtab.update(oid,SOME{pos=pos,thy_name=thy_name,
value=upd value,id=id, cid=cid})
value=upd value,id=id,
inline=inline,cid=cid})
in map_data_global (upd_docobj_tab(fn{tab,maxano}=>{tab=tab' tab,maxano=maxano})) thy end
| NONE => error("undefined doc object: "^oid)

@@ -623,11 +626,14 @@ fun writeln_docrefs ctxt = let val {tab,...} = #docobj_tab(get_data ctxt)

fun print_doc_items b ctxt =
let val {docobj_tab={tab = x, ...},...}= get_data ctxt;
val _ = writeln "=====================================";
fun print_item (n, SOME({cid,id,pos,thy_name,value})) =
val _ = writeln "=====================================";
fun dfg true = "true"
|dfg false= "false"
fun print_item (n, SOME({cid,id,pos,thy_name,inline,value})) =
(writeln ("docitem: "^n);
writeln (" type: "^cid);
writeln (" origine: "^thy_name);
writeln (" inline: "^dfg inline);
writeln (" value: "^(Syntax.string_of_term ctxt value))
)
| print_item (n, NONE) =
@@ -942,28 +948,8 @@ fun document_command markdown (loc, txt) =

*)

ML\<open> Pure_Syn.document_command;
structure Pure_Syn_Ext =
struct
(* This interface function has not been exported from Pure_Syn (2018);
it should replace
Thy_Output.output_text: Toplevel.state -> {markdown: bool} -> Input.source -> string (2017) *)


fun output_document state markdown src =
let
val ctxt = Toplevel.presentation_context state;
val _ = Context_Position.report ctxt
(Input.pos_of src)
(Markup.language_document (Input.is_delimited src));
in Thy_Output.output_document ctxt markdown src end;
(* this thing converts also source to (latex) string ... *)

end;

Pure_Syn_Ext.output_document : Toplevel.state -> {markdown: bool} -> Input.source -> Latex.text list;

\<close>

ML\<open>
structure ODL_Command_Parser =
@@ -1038,7 +1024,7 @@ fun cid_2_cidType cid_long thy =

fun base_default_term thy cid_long = Const(@{const_name "undefined"},cid_2_cidType thy cid_long)

fun check_classref is_monitor (SOME(cid,pos')) thy =
fun check_classref {is_monitor=is_monitor} (SOME(cid,pos')) thy =
let
val cid_long = DOF_core.read_cid_global thy cid
@@ -1149,7 +1135,7 @@ fun register_oid_cid_in_open_monitors oid pos cid_long thy =
rejected_cids=rejected_cids,
automatas=aS}) tab end
fun update_trace mon_oid = DOF_core.update_value_global mon_oid (def_trans mon_oid)
val update_automatons = DOF_core.upd_monitor_tabs(fold update_info delta_autoS)
val update_automatons = DOF_core.upd_monitor_tabs(fold update_info delta_autoS)
in thy |> (* update traces of all enabled monitors *)
fold (update_trace) (enabled_monitors)
|> (* check class invariants of enabled monitors *)
@@ -1159,7 +1145,7 @@ fun register_oid_cid_in_open_monitors oid pos cid_long thy =
end


fun create_and_check_docitem is_monitor oid pos cid_pos doc_attrs thy =
fun create_and_check_docitem is_monitor {is_inline=is_inline} oid pos cid_pos doc_attrs thy =
let val id = serial ();
val _ = Position.report pos (docref_markup true oid id pos);
(* creates a markup label for this position and reports it to the PIDE framework;
@@ -1172,11 +1158,12 @@ fun create_and_check_docitem is_monitor oid pos cid_pos doc_attrs thy =
fun conv_attrs ((lhs, pos), rhs) = (markup2string lhs,pos,"=", Syntax.read_term_global thy rhs)
val assns' = map conv_attrs doc_attrs
val (value_term, _(*ty*), _) = calc_update_term thy cid_long assns' defaults
val check_inv = (DOF_core.get_class_invariant cid_long thy oid {is_monitor=is_monitor})
val check_inv = (DOF_core.get_class_invariant cid_long thy oid is_monitor)
o Context.Theory
in thy |> DOF_core.define_object_global (oid, {pos = pos,
thy_name = Context.theory_name thy,
value = value_term,
inline = is_inline,
id = id,
cid = cid_long})
|> register_oid_cid_in_open_monitors oid pos cid_long
@@ -1195,7 +1182,7 @@ fun update_instance_command (((oid:string,pos),cid_pos),
val _ = Context_Position.report ctxt pos markup;
in cid end
| NONE => error("undefined doc_class.")
val cid_long = check_classref false cid_pos thy
val cid_long = check_classref {is_monitor = false} cid_pos thy
val _ = if cid_long = DOF_core.default_cid orelse cid = cid_long
then ()
else error("incompatible classes:"^cid^":"^cid_long)
@@ -1214,29 +1201,37 @@ fun update_instance_command (((oid:string,pos),cid_pos),



fun gen_enriched_document_command cid_transform attr_transform
fun gen_enriched_document_command {inline=is_inline} cid_transform attr_transform
markdown
(((((oid,pos),cid_pos), doc_attrs) : meta_args_t,
xstring_opt:(xstring * Position.T) option),
toks:Input.source)
: theory -> theory =
let
(* as side-effect, generates markup *)
fun check_text thy = (Pure_Syn_Ext.output_document(Toplevel.theory_toplevel thy) markdown toks;
thy)
let val toplvl = Toplevel.theory_toplevel
(* checking and markup generation *)
fun check thy = let val ctxt = Toplevel.presentation_context (toplvl thy);
val _ = Context_Position.report ctxt
(Input.pos_of toks)
(Markup.language_document (Input.is_delimited toks));
in thy end
(* ... generating the level-attribute syntax *)
in
( create_and_check_docitem false oid pos (cid_transform cid_pos) (attr_transform doc_attrs)
#> check_text)
( create_and_check_docitem {is_monitor=false} {is_inline=is_inline}
oid pos (cid_transform cid_pos) (attr_transform doc_attrs)
#> check )
(* Thanks Frederic Tuong! ! ! *)
end;


(* General criticism : attributes like "level" were treated here in the kernel instead of dragging
them out into the COL -- bu *)

fun open_monitor_command ((((oid,pos),cid_pos), doc_attrs) : meta_args_t) =
let fun o_m_c oid pos cid_pos doc_attrs thy = create_and_check_docitem
true oid pos cid_pos doc_attrs thy
{is_monitor=true} (* this is a monitor *)
{is_inline=false} (* monitors are always inline *)
oid pos cid_pos doc_attrs thy
fun compute_enabled_set cid thy =
case DOF_core.get_doc_class_global cid thy of
SOME X => let val ralph = RegExpInterface.alphabet (#rejectS X)
@@ -1301,13 +1296,15 @@ val _ =
val _ =
Outer_Syntax.command ("text*", @{here}) "formal comment (primary style)"
(attributes -- Parse.opt_target -- Parse.document_source
>> (Toplevel.theory o (gen_enriched_document_command I I {markdown = true} )));
>> (Toplevel.theory o (gen_enriched_document_command {inline=true}
I I {markdown = true} )));

(* This is just a stub at present *)
val _ =
Outer_Syntax.command ("text-macro*", @{here}) "formal comment macro"
(attributes -- Parse.opt_target -- Parse.document_source
>> (Toplevel.theory o (gen_enriched_document_command I I {markdown = true} )));
>> (Toplevel.theory o (gen_enriched_document_command {inline=false} (* declare as macro *)
I I {markdown = true} )));

val _ =
Outer_Syntax.command @{command_keyword "declare_reference*"}
@@ -1455,12 +1452,15 @@ struct
val basic_entity = Thy_Output.antiquotation_pretty_source
: binding -> 'a context_parser -> (Proof.context -> 'a -> Pretty.T) -> theory -> theory;

fun check_and_mark ctxt cid_decl (str:{strict_checking: bool}) pos name =
fun check_and_mark ctxt cid_decl (str:{strict_checking: bool}) {inline=inline_req} pos name =
let
val thy = Proof_Context.theory_of ctxt;
in
if DOF_core.is_defined_oid_global name thy
then let val {pos=pos_decl,id,cid,...} = the(DOF_core.get_object_global name thy)
then let val {pos=pos_decl,id,cid,inline,...} = the(DOF_core.get_object_global name thy)
val _ = if not inline_req
then if inline then () else error("referred text-element is macro! (try option display)")
else if not inline then () else error("referred text-element is no macro!")
val markup = docref_markup false name id pos_decl;
val _ = Context_Position.report ctxt pos markup;
(* this sends a report for a ref application to the PIDE interface ... *)
@@ -1476,7 +1476,8 @@ fun check_and_mark ctxt cid_decl (str:{strict_checking: bool}) pos name =
else error("undefined document reference: "^name)
end

val _ = check_and_mark : Proof.context -> string -> {strict_checking: bool} ->
val _ = check_and_mark : Proof.context -> string ->
{strict_checking: bool} -> {inline:bool} ->
Position.T -> Symtab.key -> unit

(* generic syntax for doc_class links. *)
@@ -1497,8 +1498,9 @@ val docitem_antiquotation_parser = (Scan.lift (docitem_modes -- Args.text_input)

fun pretty_docitem_antiquotation_generic cid_decl ctxt ({unchecked, define}, src ) =
let val (str,pos) = Input.source_content src
val _ = check_and_mark ctxt cid_decl ({strict_checking = not unchecked}) pos str
val inline = Config.get ctxt Document_Antiquotation.thy_output_display
val _ = check_and_mark ctxt cid_decl {strict_checking = not unchecked}
{inline = inline} pos str
val enc = Latex.enclose_block
in
(case (define,inline) of
@@ -1673,8 +1675,6 @@ fun read_fields raw_fields ctxt =
let
val Ts = Syntax.read_typs ctxt (map (fn ((_, raw_T, _),_) => raw_T) raw_fields);
val terms = map ((map_option (Syntax.read_term ctxt)) o snd) raw_fields
val count = Unsynchronized.ref (0 - 1);
fun incr () = Unsynchronized.inc count
fun test t1 t2 = Sign.typ_instance (Proof_Context.theory_of ctxt)
(t1, ODL_Command_Parser.generalize_typ 0 t2)
fun check_default (ty,SOME trm) =
@@ -1740,7 +1740,7 @@ fun add_doc_class_cmd overloaded (raw_params, binding)
fun check_n_filter thy (bind,ty,mf) =
case DOF_core.get_attribute_info parent_cid_long (Binding.name_of bind) thy of
NONE => (* no prior declaration *) SOME(bind,ty,mf)
| SOME{def_occurrence,long_name,typ,def_pos} => if ty = typ
| SOME{def_occurrence,long_name,typ,...} => if ty = typ
then (warning("overriding attribute:"^long_name^
" in doc class:" ^ def_occurrence);
SOME(bind,ty,mf))


+ 0
- 0
src/DOF/RegExpInterface.thy View File


+ 0
- 0
src/DOF/latex/DOF-COL.sty View File


+ 0
- 0
src/DOF/latex/DOF-core.sty View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save