Commit Graph

95 Commits

Author SHA1 Message Date
Nicolas Méric 9bc493250f Enable invariants checking everywhere
By default invariants checking generates warnings.
if invariants_strict_checking theory option is enabled,
the checking generates errors.

Errors to resolve:
- Option type in invariant:
  See src/ontologies/scholarly_paper/scholarly_paper.thy:133

  doc_class technical = text_section +
     definition_list :: "string list" <=  "[]"
     status          :: status <= "description"
     formal_results  :: "thm list"
     invariant L1    :: "the (level σ) > 0"

  The attribute L1 uses "the" to project the level value
  but the default value is None:
  See src/ontologies/scholarly_paper/scholarly_paper.thy:69

  doc_class text_section = text_element +
   main_author :: "author option"  <=  None
   fixme_list  :: "string list"    <=  "[]"
   level       :: "int  option"    <=  "None"

  It generates an error in src/ontologies/CENELEC_50128/CENELEC_50128.thy
  for the Definition* commands, for which the level is not defined.
  It triggers an error because "the None" triggers an error.
  Get rid of the option type?

  The value None is used in the check function
  in examples/scholarly_paper/2020-iFM-CSP/paper.thy to check
  that a subsequent instance of the same class has a level >= than
  the previous instance of the same class.
  Update this function?

- What to do with the checking done in scholarly_paper (see check function)
  which use low level invariant to check the attributes?
  Migrate to High level invariant?
  If we change the default value of the level attribute in the text_lement
  class from "None" to "Some 0" then check function in scholarly_paper
  is triggered in examples/scholarly_paper/2020-iFM-CSP/paper.thy
  for the introduction instance "introtext" line 55 and generates
  a checking error.
  It comes from the fact that the previous instance introheader line 54
  is a section*, and then has a default value level of 1.
  Then, if the default value of the level attribute in the text_element
  is put to Some 0, the low level checking invariant function "check" in
  scholarly_paper triggers an error, because the "check" function
  checks that the instances in a sequence of the same class
  have a growing level.
  for a sequence: [("scholarly_paper.introduction", "introheader")
                  , ("scholarly_paper.introduction", "introtext")]
  introtext must have a level >= than introheader.
  Same issue with
  the examples/scholarly_paper/2018-cicm-isabelle_dof-applications/IsaDofApplications.thy
  theory.

- Bypass checking of high-level invariants
  when the class default_cid = "text",
  the top (default) document class.
  We want the class default_cid to stay abstract
  and not have the capability to be defined with attribute,
  invariants, etc.
  Hence this bypass handles docitem without a class associated,
  for example when you just want a document element to be referenceable
  without using the burden of ontology classes.
  ex: text*[sdf]\<open> Lorem ipsum @{thm refl}\<close>

  The functions get_doc_class_global and get_doc_class_local trigger
  an error when the class is "text" (default_cid),
  then the functions like check_invariants which use it will fail
  if the checking is enabled by default for all the theories.

A quick and dirty fix is proposed to pass the compilation, but must be revised.
See the diff.
2022-12-14 18:23:18 +01:00
Nicolas Méric 37d7ed7d17 Update rails for annotated text element in manual 2022-12-09 15:13:22 +01:00
Makarius Wenzel b95826962f Tuned documentation 2022-12-02 20:29:40 +01:00
Nicolas Méric 0040949cf8 Add trace-attribute term antiquotation
- Make doc_class type and constant used by regular expression
  in monitors ground
- Make class tag attribute ground (with serial())
- The previous items make possible
  the evaluation of the trace attribute
  and the definition of the trace-attribute term annotation
2022-11-24 16:47:21 +01:00
Nicolas Méric e68c332912 Fix markup for some antiquotations
Fix markup for docitem_attribute and trace_attribute
ML and text antiquotations
2022-11-24 11:22:02 +01:00
Achim D. Brucker b83f7a8abb Updated manual. 2022-06-24 16:58:07 +01:00
Achim D. Brucker 41e6c9ed02 Fixed file attributes. 2022-04-18 09:44:44 +01:00
Nicolas Méric 1457c1cb85 Fix typo in upd_meta_args rail road in manual 2022-04-08 13:04:50 +02:00
Nicolas Méric 17df6a271b Delete some TODOs, now done, in the manual 2022-04-08 12:06:28 +02:00
Nicolas Méric 9603311a9a Fix DOF manual and tests to work with assert* 2022-04-01 09:54:16 +02:00
Nicolas Méric e4e4a708a5 Update assert* to use isabelle/DOF evaluation 2022-03-30 08:12:17 +02:00
Nicolas Méric 9cd5323063 Update DOF manual meta-types as types section
Types of the implementation language inside the HOL type system
are now represented as datatypes and not just abstract types
2022-03-29 15:22:44 +02:00
Achim D. Brucker 05e85edd91 Removed non-distribution note for llncs.cls. This class is now available on CTAN and part of TeXLive (at least from version 2022). 2022-03-26 21:31:05 +00:00
Achim D. Brucker f4286404fb Merge branch 'v1.2.x/Isabelle2021' 2022-03-26 18:25:33 +00:00
Achim D. Brucker a1d83e33ef Updated manual to reflect changes in options for install script. 2022-03-26 18:23:07 +00:00
Achim D. Brucker 1a41e92188 Minor shortenings to improve layout. 2022-03-26 17:47:40 +00:00
Achim D. Brucker 5381182ab2 Spell-checking. 2022-03-26 13:26:51 +00:00
Nicolas Méric cc3f9ab402 Update DOF manual, chapter 3 and 4
- Use antiquotations when possible to reference
  classes and attributes in text (typ, type and const antiquotations)
- Add explanation for cid, obj-id and oid
- Update ML*, text* an value* railroads
- Fix typos
- Add some TODOs for the next revision of the manual
2022-03-23 09:07:43 +01:00
Nicolas Méric 3585b6a2f1 Explain queries on instances in DOF manual 2022-03-15 08:28:10 +01:00
Nicolas Méric 3895ba550c Import of DOF manual changes from /2021-ITP-PMTI 2022-03-14 17:08:59 +01:00
Nicolas Méric 8f7e898f4b Fix invariant railroad diagram 2022-01-31 13:01:59 +01:00
Nicolas Méric 76612ae6f3 Add checking of invariants for class instances
- Warning: the current implementation does yet not support
    some use-cases, like invariant on monitors,
    or the initialization of docitem without a class associated.
- Add first draft of the checking of invariants.
  For now, it is disabled by default because some cases
  are not yet supported, like the initialization of docitem
  without a class associated.
  ex: text*[sdf]‹ Lorem ipsum @{thm refl}›
- To enable the checking, one can use the theory attribute
  "invariants_checking" by declaring it in a theory like this:
  declare [[invariants_strict_checking = true]]
- A checking using basic tactics (unfolding and auto) can be enable
  with the "invariants_checking_with_tactics" theory attribute
  for specific use-cases
- The specification of invariants is now automatically abstracted,
  so one must define an invariant like this now:

  doc_class W =
  w::"int"
  invariant w :: "w σ ≥ 3"

  The old form:

  doc_class W =
  w::"int"
  invariant w :: "λσ. w σ ≥ 3"

  is now deprecated.
  The specification of the invariant still uses the σ-notation
  and is defined globally by the name component "invariantN"
- Update the invariants definition in the theories to match
  the new implementation
- Update the manual to explain this new feature
- Add small examples in src/tests/High_Level_Syntax_Invariants.thy
  and src/tests/Ontology_Matching_Example.thy
2022-01-24 17:30:48 +01:00
Burkhart Wolff 96112ff893 restored ancient SEFM paper example for invariants 2022-01-17 12:06:32 +01:00
Achim D. Brucker 389fd6d033 Switch from pdf(la)tex to lua(la)tex. 2021-03-10 23:51:18 +00:00
Achim D. Brucker 15c958ec64 Revised Chapter 4. 2021-02-11 19:10:38 +00:00
Achim D. Brucker 29661f6734 Revised Sec. 4.2. 2021-02-10 09:05:59 +00:00
Achim D. Brucker 3649fb855e Revised Sec. 4.1. 2021-02-09 20:56:56 +00:00
Achim D. Brucker 43184a9995 Migrated \inlinebawsh{}. 2021-02-08 15:34:59 +00:00
Achim D. Brucker ed8cd2ad9d Migrated \inlinebawsh{}. 2021-02-08 15:33:45 +00:00
Achim D. Brucker 029ae709e6 Migrated \inlineltx{}, except when argument contained { or }. 2021-02-07 20:01:43 +00:00
Achim D. Brucker b81eef7bd2 Converted bash-environments to antiqotations. 2021-02-01 05:06:15 +00:00
Nicolas Méric 4d9de40037 Add TODOs to improve the wording 2021-01-28 13:04:29 +01:00
Nicolas Méric 1fb97c8fb0 Add TODOs to delete references to where clause
The where clause for ontology classes is deprecated
in favor of the accepts and rejects clauses.
2021-01-28 12:48:54 +01:00
Nicolas Méric 5b618562a2 Fix some typos 2021-01-28 12:46:20 +01:00
Burkhart Wolff d86e708154 a first imprfect solution for the assert* problem; 4th chapter roughly completed. 2021-01-03 14:07:21 +01:00
Burkhart Wolff aee1d33709 renaming ISA's; new shortcuts; more content in the RefMan. 2021-01-02 15:57:28 +01:00
Burkhart Wolff b71be9c4a8 Reorganization Chap 4. <4.3.2 2021-01-01 21:34:05 +01:00
Burkhart Wolff 396ef1d477 More content in 4, better tree printing. 2021-01-01 21:23:21 +01:00
Burkhart Wolff 950a86aa5a Adding better explanation of the core functionalities... 2021-01-01 16:12:07 +01:00
Burkhart Wolff 480f0ada37 Reorganization Chap 4. ... 2020-12-31 11:02:27 +01:00
Burkhart Wolff 242bb536bc Reorganization Chap 4. <4.3.2 2020-12-30 23:07:19 +01:00
Burkhart Wolff d6832cc8f8 Reorganization Chap 4. 2020-12-30 15:06:11 +01:00
Burkhart Wolff 04f0cc7f5c Reorganization: Pushed Macro Core Mechanism into the DOF Core; adapted the RefMan accordingly. 2020-12-30 12:47:54 +01:00
Burkhart Wolff efeee1e863 Eliminated deprecated abstract class residuals; lifted Definition* to math_content. 2020-11-10 13:07:54 +01:00
Burkhart Wolff da0f3e63f1 more steps to reform document macro mechanism 2020-11-04 13:13:24 +01:00
Burkhart Wolff abd32a802d First Pass of Chap 4 - Added invariant syntax description, more semantic content 2020-10-26 12:27:33 +01:00
Burkhart Wolff f093b033f5 started pass on chap 4 in Refman. 2020-10-26 10:08:22 +01:00
Achim D. Brucker 58617e87e6 Conversion: \isadof -> \<^isadof>. 2020-09-08 13:45:09 +01:00
Achim D. Brucker 37a71a613e Ad hoc conversion: \inlineisar|...| -> @{boxed_theory_text ... }. 2020-09-08 07:30:14 +01:00
Achim D. Brucker 3dabf4fc82 Improvements: @{boxed_theory_text [display] ... }. 2020-09-08 06:51:36 +01:00