Commit Graph

1281 Commits

Author SHA1 Message Date
Achim D. Brucker 17d7562d4f Updated year. 2022-03-11 11:43:02 +00:00
Achim D. Brucker 8efc1300b4 Manual import of changes from /2021-ITP-PMTI. 2022-03-11 11:30:34 +00:00
Achim D. Brucker 4c0d3ccee3 Renamed master repository to main repository. 2022-03-11 10:42:50 +00:00
Achim D. Brucker 53eb93367c Cleanup. 2022-03-11 10:41:06 +00:00
Achim D. Brucker 005d18657c Switched to hvlogos. 2022-03-11 07:40:07 +00:00
Achim D. Brucker 6cf004637c Removed ITP paper draft - on own branch. 2022-03-11 07:24:54 +00:00
Achim D. Brucker 462673d31e Removed math example (outdated and currently unused). 2022-03-11 07:24:14 +00:00
Achim D. Brucker 43522215b9 Removed empty README. 2022-03-11 07:14:35 +00:00
Nicolas Méric 8f7e898f4b Fix invariant railroad diagram 2022-01-31 13:01:59 +01:00
Burkhart Wolff e650892b48 changed 'L' - operator to 'Lang' in order to avoid name conflicts in papers. 2022-01-31 10:44:02 +01:00
Burkhart Wolff 35b47223b9 added category 'background' into scholarly paper 2022-01-31 10:42:52 +01:00
Achim D. Brucker 46325cc64b Added unofficial support for lipics-v2021 (warning: this requires a patched version of lipics-v2021.cls). 2022-01-30 22:52:48 +00:00
Nicolas Méric d546a714b7 Merge pull request 'Add checking of invariants for class instances' (#8) from nicolas.meric/Isabelle_DOF:check-invariants-first-draft into master
Reviewed-on: Isabelle_DOF/Isabelle_DOF#8
2022-01-25 07:50:25 +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
Burkhart Wolff 96112ff893 restored ancient SEFM paper example for invariants 2022-01-17 12:06:32 +01:00
Burkhart Wolff 5631010371 added figures from IFM 19 paper 2022-01-14 15:31:15 +01:00
Burkhart Wolff 68e9f64156 added figures from talk 2022-01-13 16:24:07 +01:00
Burkhart Wolff 647f8e86cc Reorg / shoprtening chap 2. 2022-01-11 20:53:07 +01:00
Burkhart Wolff b5939bc9db added basckground chapter . First flush. 2022-01-08 22:22:22 +01:00
Burkhart Wolff 6889e08f33 initial setup of RAS paper 2022-01-02 17:05:15 +01:00
Burkhart Wolff ef7d8caefb added background chapter 2022-01-01 21:03:31 +01:00
Burkhart Wolff 96d6bb8e00 intro proposal completed 2021-12-19 13:31:42 +01:00
Burkhart Wolff 77150aefe2 more on intro 2021-12-19 10:38:00 +01:00
Burkhart Wolff 12d33fa457 more on intro ... 2021-12-17 15:44:47 +01:00
Burkhart Wolff 616ff85721 ... 2021-12-16 15:13:34 +01:00
Burkhart Wolff b0a2214c40 added refs 2021-12-16 15:07:02 +01:00
Burkhart Wolff cbd32874cf Abstract 2021-12-16 14:55:04 +01:00
Burkhart Wolff 6c99612dcd Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2021-12-16 13:49:49 +01:00
Burkhart Wolff 3f09aca090 added paper frame, small things. 2021-12-16 13:49:44 +01:00
Achim D. Brucker 9632c0810b Merge pull request 'clean-up-isa-check-functions' (#7) from nicolas.meric/Isabelle_DOF:clean-up-isa-check-functions into master
Reviewed-on: Isabelle_DOF/Isabelle_DOF#7
2021-12-15 22:25:28 +00:00
Achim D. Brucker a2673b0825 Merge branch 'master' into clean-up-isa-check-functions 2021-12-15 22:25:22 +00:00
Achim D. Brucker 546b4fbcfe Merge pull request 'Add the possibility to make request on instances' (#6) from nicolas.meric/Isabelle_DOF:request-on-instances-first-draft into master
Reviewed-on: Isabelle_DOF/Isabelle_DOF#6
2021-12-15 22:25:03 +00:00
Nicolas Méric 541d2711bd Clean Up ISA check functions
Also remove some dead code
2021-12-13 17:21:46 +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
Achim D. Brucker 84588fccb3 Merge pull request 'Fix the record generation in class implementation' (#5) from nicolas.meric/Isabelle_DOF:fix-record-generation into master
Reviewed-on: Isabelle_DOF/Isabelle_DOF#5
2021-12-07 18:51:33 +00: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
Achim D. Brucker 1d497db5cf Merge pull request 'referential-equivalence-first-draft' (#4) from nicolas.meric/Isabelle_DOF:referential-equivalence-first-draft into master
Reviewed-on: Isabelle_DOF/Isabelle_DOF#4
2021-11-21 12:43:54 +00:00
Achim D. Brucker 42783d6bbe Merge pull request 'First draft of the value* command implementation' (#3) from nicolas.meric/Isabelle_DOF:value-star-first-draft into master
Reviewed-on: Isabelle_DOF/Isabelle_DOF#3
2021-11-21 12:43:44 +00:00
Nicolas Méric 08c101c544 Implement built-ins referential equivalence
- Add a first implementation of a referential equivalence
  for the built-ins term annotations (TA)
- Some built-ins remain as unspecified constants:
  - the docitem TA offers a way to check the reference of
    class instances without checking the instances type.
    It must be avoided for certification
  - the termrepr TA is left as an unspecified constant for now.
    A major refactoring of code should be done to enable
    referential equivalence for termrepr, by changing the dependency
    between the Isa_DOF theory and the Assert theory.
    The assert_cmd function in Assert should use the value* command
    functions, which make the elaboration of the term
    referenced by the TA before passing it to the evaluator
- Update the Evaluation test theory to test the referential equivalence
  and expose some of  current implementation limitations
- Add a warning about the docitem TA in the TermAntiquotations theory
2021-11-09 08:55:02 +01:00
Nicolas Méric 6ac1445147 Change the implementation of the tag attribute
The philosophy is for the tag attribute to be unique
for each class.
So this commit updates the implementation of this attribute
to match the philosophy.
The previous implementation associated a tag attribute
with a class but also with each super-class of this class
up to the top (default) class "text".
Now a class with super-classes has only one tag attribute.
2021-11-08 10:44:29 +01:00
Nicolas Méric 664aede4c0 First draft of the value* command implementation
Add a command value*
- The value* command uses the same code as the value command
  and adds the possibility to evaluate
  Term Annotation Antiquotations (TA)
  with the help of the DOF_core.transduce_term_global function.
  The DOF_core.transduce_term_global function,
  in addition to the validation of a term
  (also called a second level type checking),
  is now able to make a so called elaboration:
  it will construct the term referenced by a TA before
  passing it to the evaluator.
- For a term to be evaluated, it must not be contain
  the "undefined" constant whose evaluation always fails.
  (See the code generation documentation).
  Furthermore, the instance class generation is updated in such a way
  that each of its attributes is initialized with a free variable
  whose name shows to the final user that this attribute
  is not initialized.
  It implies that an instance class evaluation will be pass
  to the normalization by evaluation (nbe) evaluator by default
  if the final user does not specify a class instance entirely,
  i.e. by specifying each attribute of the instance.
  This choice is considered a decent compromise, considering
  the speed and trustworthiness of the nbe evaluator.
  (See the article
  A Compiled Implementation of Normalization by Evaluation from 2008)
- Update the ISA transformer tab to add a function
  which is used for the elaboration of the term referenced by the TA.to pass
- Add a first really basic draft of the implementation
  of the elaboration of the built-ins TA and of an instance class:
  - For the built-ins, the term referenced by the TA is returned
    as it is;
  - For an instance class, the value of the instance is returned.
- Make the tag attribute global by moving it to DOF_core structure
- Add a first draft for some evaluation tests
  and expose the limitations of the current implementation
  in Evaluation.thy
2021-11-08 10:38:11 +01:00
Burkhart Wolff c14cb31639 ... 2021-10-14 20:31:21 +02:00
Burkhart Wolff 9b08e92588 Experiments with the code generator for Isa_DOF class objects. 2021-10-08 16:00:57 +02:00
Burkhart Wolff 5f47588270 added some value-statements for demonstration purposes 2021-10-05 16:22:05 +02:00
Burkhart Wolff eb292a695b added poor man's encoding of inheritance in Cyto-Model. 2021-10-04 15:11:29 +02:00
Burkhart Wolff 4420084d52 restructuring command-syntax doc_class 2021-09-29 14:21:13 +02:00
Burkhart Wolff 3f8880c0f0 added small fun ontology for examples : Cytology 2021-09-29 14:08:28 +02:00
Achim D. Brucker eef8170e40 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2021-08-20 22:33:29 +01:00
Achim D. Brucker 3ac69001ab Use POSIX-compliant method to find isabelle command. 2021-08-20 22:31:14 +01: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