Commit Graph

20 Commits

Author SHA1 Message Date
Achim D. Brucker 61f167c29c Made all import paths globally qualified. 2022-05-06 09:17:10 +01:00
Achim D. Brucker bdc7aab6cf Minor syntax cleanup. 2022-03-20 14:55:56 +00: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
Nicolas Méric 18c0557d01 Add the possibility to make request on instances
- Add a new Term Annotation Antiquotation (TA)
  to allow requests on instances.
  Example:
  @{C-instances} will return all the instances of the class "C"
  defined in the generated theory
- Update ISA_transformers elaborate function signature to
  take into account the case where the term argument
  of a TA is irrelevant, for example when a TA has no argument.
  Example with the TA of the instances of a class:
  @{A-instances}
  Here the TA has no argument and none second level type checking is
  wished, so its associated check function can be the identity function
  with respect to the ISA_transformers chek function type.
- Add some request examples in Evaluation.thy
- Fix typos
2021-12-13 16:58:54 +01:00
Burkhart Wolff c14cb31639 ... 2021-10-14 20:31:21 +02:00
Burkhart Wolff f9027ef331 a section explaining the consequences of a doc-class and its shallow semantics in Isabelle records on different levels of representation 2021-07-18 17:34:52 +02:00
Burkhart Wolff 5aad659a85 some observations on invariant code generation 2021-07-01 13:12:18 +02:00
Burkhart Wolff 3b21df199b addded docitem ML antiquotation. (Kleine Fingeruebung). 2021-04-21 20:24:06 +02: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 de5c0fc6e2 added Isar-syntax for define_shortcut* 2020-12-22 08:07:19 +01:00
Burkhart Wolff 7e2224859e mmm 2020-06-22 17:42:40 +02:00
Burkhart Wolff 6cf5708d93 added macro_def mechanism. Bug: Type qualification necessary 2020-04-12 21:11:54 +02:00
Burkhart Wolff aa4e1acf84 Added invariants - and changes of invariant syntax.
Modified scholarly_paper onto wrt to future concepts
of referential semi_formal items (according to discussion
with Achim).
2020-04-08 23:29:15 +02:00
Burkhart Wolff 9035c46023 syntax and 1st level type-checking of invariants 2020-02-21 19:23:51 +01:00
Burkhart Wolff cc98979f43 more on class_id synonyms 2020-02-21 16:33:28 +01:00
Burkhart Wolff 6135820127 Little improvements in examples and presentation. 2019-12-06 15:41:41 +01:00
Burkhart Wolff cc787cb9f1 Added Fred's example on modifying the proof context for parsing. 2019-10-01 17:57:26 +02:00
Achim D. Brucker 60ebbbe12c Updated license information. 2019-08-15 15:09:55 +01:00
Burkhart Wolff b5fe2d9085 Solution to the assert - Bug : stronger checks in doc_class that reject correctly constructed, but lexically illegal long_names for doc_classes. 2019-08-14 17:22:55 +02:00
Achim D. Brucker 8953f37629 Large directory restructuring.
This commit restructures the file hierarchy:
1) implementation is moved into src/ directory to clean up
   the main directory and to make it easier for users to
   find the README.md.
2) ontologies (both, the Isabelle-part and the LaTeX-part) are
   now structured into directories.
2019-07-20 21:12:40 +01:00