Commit Graph

62 Commits

Author SHA1 Message Date
Nicolas Méric 234ff18ec0 Use a name space for Onto Classes
ci/woodpecker/push/build Pipeline failed Details
- Use a name space table to store ontological class objects
- Remove docclass_tab table and accesses
2023-02-15 17:49:29 +01:00
Nicolas Méric e01ec9fc21 Use a name space for ML invariants
- Use a name space table to store ML inariants objects
- Remove docclass_inv_tab, docclass_eager_inv_tab,
  and docclass_lazy_inv_tab tables and accesses
2023-02-14 09:20:13 +01:00
Burkhart Wolff e1f143d151 Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF
ci/woodpecker/push/build Pipeline failed Details
2022-12-21 11:35:05 +01:00
Burkhart Wolff fd60cf2312 attempt to add category 'assumption' 2022-12-21 11:34:34 +01:00
Nicolas Méric c0afe1105e Enable high-level invariants checking everywhere
ci/woodpecker/push/build Pipeline was successful Details
By default invariants checking generates warnings.
If invariants_strict_checking theory option is enabled,
the checking generates errors.

- Update 2018-cicm-isabelle_dof-applications/IsaDofApplications.thy
  and 2020-iFM-CSP/paper.thy to pass the checking of
  the low level invariant checking function "check"
  in scholarly_paper.thy,
  which checks that the instances in a sequence of the same class
  have a growing level.
  For a sequence:
  section*[intro::introduction]‹ Introduction ›
  text*[introtext::introduction, level = "Some 1"]‹...›

  introtext must have a level >= than intro.

- Bypass the 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.
2022-12-20 16:31:09 +01:00
Burkhart Wolff e414b97afb rephrasing invariant for core scholarly_paper classes
ci/woodpecker/push/build Pipeline was successful Details
2022-12-19 12:14:30 +01:00
Makarius Wenzel 44cae2e631 More formal management of ontologies in Isabelle/ML/Isar with output via Isabelle/Scala exports 2022-12-04 00:09:29 +01:00
Makarius Wenzel cc3e2a51a4 More antiquotations 2022-12-02 13:50:16 +01:00
Nicolas Méric 0040949cf8 Add trace-attribute term antiquotation
ci/woodpecker/push/build Pipeline was successful Details
- 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
ci/woodpecker/push/build Pipeline was successful Details
Fix markup for docitem_attribute and trace_attribute
ML and text antiquotations
2022-11-24 11:22:02 +01:00
Burkhart Wolff 33490f8f15 table cell syntax implemented; roughly tested.
ci/woodpecker/push/build Pipeline was successful Details
2022-10-09 14:01:53 +02:00
Nicolas Méric 9981c31966 Normalize docobj table value
ci/woodpecker/push/build Pipeline was successful Details
Normalize the record registered as value in the docobj table,
i.e., the logical value of a docitem (a class instance)
2022-05-25 17:10:57 +02:00
Achim D. Brucker 61f167c29c Made all import paths globally qualified.
ci/woodpecker/push/build Pipeline was successful Details
2022-05-06 09:17:10 +01:00
Achim D. Brucker cbad96aba5 Fixed file attributes. 2022-04-18 09:22:57 +01:00
Nicolas Méric e3caad804b Fix {Theorem, Lemma}_default_class theory attributes
ci/woodpecker/push/build Pipeline was successful Details
Fix #11
2022-04-08 12:17:24 +02:00
Nicolas Méric e4e4a708a5 Update assert* to use isabelle/DOF evaluation
ci/woodpecker/pr/build Pipeline failed Details
2022-03-30 08:12:17 +02:00
Achim D. Brucker 2314b2191f Resolved merge conflict. 2022-03-20 20:49:46 +00:00
Burkhart Wolff 35b47223b9 added category 'background' into scholarly paper 2022-01-31 10:42:52 +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
Makarius Wenzel ec49f45966 Adaptations for Isabelle2021-1. 2021-12-18 23:06:51 +01:00
Nicolas Méric d2a6106be5 Fix the record generation in class implementation
- Fix the generation of the record associated with
  a class and used for the logic.
  The old implementation generated a new attribute
  for each attribute defined by a subclass,
  even the ones that were overriding ones of the superclass.
  The new implementation generates the attributes of the subclass
  which are not overriding ones.
  Warning:
  It implies that overridden attributes in a subclass are not
  new attributes added to the theory context.
  So the base name of an attribute will refer to the attribute
  of the last declared class where it is defined.
  If ones wants to refer to atttributes, one should use
  long names, even in the invariants of a subclass definition
  which overrides the attribute used in the invariant.
  For example,
  in ~~/src/ontologies/scholarly_paper/scholarly_paper.thy:

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

  type_synonym tc = technical (* technical content *)

  doc_class example  = text_section +
     referentiable   :: bool <= True
     status          :: status <= "description"
     short_name      :: string <= "''''"

  doc_class math_content = tc +
     referentiable :: bool <= True
     short_name    :: string <= "''''"
     status        :: status <= "semiformal"
     mcc           :: "math_content_class" <= "thm"
     invariant s1  :: "λ σ::math_content. ¬referentiable σ ⟶ short_name σ = ''''"
     invariant s2  :: "λ σ::math_content. technical.status σ = semiformal"

  The class math_content overrride the attribute status
  of the class technical, by using the type synonym tc,
  but the base name of this attribute refers
  to the attribute of the class example where it is last defined
  and not just overridden.
  So in the invariant s2 of the class math_content,
  we must use the long name of the attribute,
  i.e. the base name "status" with its qualifier which refers
  to the superclass where it is defined, the class technical.

  Type synonyms as qualifiers are not yet supported.
- Qualify classes that only override attributes of their superclass
  as vitual classes by adding a virtual attribute.
  This attribute is used to discriminate virtual classes and generate
  an adequate make function to initialize their associated record.
  The implementation uses an hidden attribute (the tag_attribute)
  to force the virtual class to be concrete or the logic
  by having a full new record definition associated with it.
  For example:

  doc_class W =
    a::"int" <= "1"

  doc_class X = W +
    a::"int" <= "2"

  The class X is tagged as a virtual class and
  the record make functions of the classes W and X are:

  W.make W_tag_attribute W_a
  X.make X_tag_attribute X_a X_tag_attribute

  So a record definition is added to the theory context for each class,
  even though a virtual class only overrides
  attributes of its superclass.
  This behavior allows us to support definitions of new default values
  for attributes in the subclass, as shown in the example.
- Factorize make name components
- Use Record name components instead of strings to refer to Record
  components
- Fix typos
2021-12-07 10:04:47 +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 4c5aacb39f activated syntactic checks for trimming macros 2020-12-23 11:30:42 +01:00
Burkhart Wolff 005922ffda built in syntactic checks for trimming macros 2020-12-23 09:41:26 +01:00
Burkhart Wolff 6899c4059e improved macro syntax 2020-12-22 20:37:15 +01:00
Burkhart Wolff 5593c22a36 first version with macro syntax (no ML support) 2020-12-22 19:50:00 +01:00
Burkhart Wolff de5c0fc6e2 added Isar-syntax for define_shortcut* 2020-12-22 08:07:19 +01:00
Burkhart Wolff 0e64608a58 enforcing shorter Definition* - style in examples (CC,CENELEC,...) 2020-12-02 09:32:48 +01:00
Burkhart Wolff 8771d8581b default class checking bug fixed; new attributes for default classes in ontological macros Definition* Theorem* Lemma* 2020-12-01 23:18:13 +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 bad7dfc2ef new set of macros : author* and abstract* --- not working yet 2020-11-03 19:00:33 +01:00
Burkhart Wolff fe8f63690d macro-arrangement ... 2020-11-02 18:30:40 +01:00
Burkhart Wolff aa1fed2440 sdf 2020-11-02 14:12:27 +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 d655effcf8 pushup. 2020-09-22 16:47:05 +02:00
Burkhart Wolff 9956bbf062 pushup, stiluebungen. 2020-09-22 16:35:28 +02:00
Burkhart Wolff ef93285ec7 added a little useful template generation command
Isabelle_DOF/Isabelle_DOF/pipeline/head There was a failure building this commit Details
2020-06-23 14:02:04 +02:00
Burkhart Wolff f5622c2f59 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-06-23 11:22:41 +02:00
Burkhart Wolff af9e399f50 some experiments with OoOP and the code support presentations. 2020-06-23 11:22:33 +02:00
Burkhart Wolff 7e2224859e mmm 2020-06-22 17:42:40 +02:00
Burkhart Wolff 9b0c2cdcd8 added support for defn, lem, thm short-calls. 2020-05-19 17:32:25 +02:00
Burkhart Wolff fa931b45e2 re-localization of onto macros. Tested. 2020-04-23 18:30:46 +02:00
Burkhart Wolff 8328626fa4 Restructuring library prep. 2020-04-23 16:08:05 +02:00
Burkhart Wolff 9496b535b7 restructuring Lib. Adaption LaTeX. Reorg COL. 2020-04-23 14:31:59 +02:00
Burkhart Wolff 2e0d88a3f7 restructuring of COL, scholarly_paper, etc. Facturong out Macros. 2020-04-22 15:31:47 +02:00
Burkhart Wolff 88d4b7674e support along AMS style for mcc. 2020-04-14 14:44:42 +02:00
Burkhart Wolff e98e945b53 debugging. 2020-04-09 20:56:12 +02:00
Burkhart Wolff d82870d1a0 support for math_example into the Urschleim. 2020-04-09 18:12:14 +02:00