Commit Graph

1266 Commits

Author SHA1 Message Date
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: #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: #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: #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: #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: #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
Achim D. Brucker 6c433ed766 Merge pull request 'class-term-antiquotation-implementation' (#2) from nicolas.meric/Isabelle_DOF:class-term-antiquotation-implementation into master
Reviewed-on: #2
2021-07-02 17:39:52 +02:00
Achim D. Brucker cfbc3311cd Merge branch 'master' into class-term-antiquotation-implementation 2021-07-02 17:39:42 +02:00
Achim D. Brucker 295233cdcf Merge pull request 'all changes' (#1) from nicolas.meric/Isabelle_DOF:eclectic-tutorial-add-todos-fix-typos into master
Reviewed-on: #1
2021-07-02 17:33:32 +02:00
Achim D. Brucker 9569113f9b Merge branch 'master' into eclectic-tutorial-add-todos-fix-typos 2021-07-02 17:27:26 +02:00
Burkhart Wolff 9f9bc25618 no message 2021-07-01 16:25:31 +02:00
Burkhart Wolff 5aad659a85 some observations on invariant code generation 2021-07-01 13:12:18 +02:00
Nicolas Méric 2c01a7118b Add term* cmd and term antiquotations for classes
- Add a term antiquotation for document classes
  and add the term* command which mimics the classical term command
  and adds the possibility to use a term antiquotation
  which references document classes:
  one can use @{A ''A_instance''} to reference
  an instance of the class A in a term* command.
- Reuse and update the ML_isa_check_generic visitor pattern
  to add the function which checks the class instance of a class,
  used by the term antiquotation for document classes.
  Also, the update_isa functions now expect long name
  (See builtin term antiquotations setup)
- The merge of ISA_transformer_tab has been update to avoid conflicts.
  Indeed, the merge is ultra-critical: the transformer tabs were
  just extended by letting *the first* entry
  with the same long-name win.
  Since the range is a (call-back) function, a comparison on its content
  is impossible and some choice has to be made.
  An alternative may be to use Symtab.join
- As classes names as constants are already bound to
  "doc_class Regular_Exp.rexp" constants by add_doc_class_cmd function,
  we use a prefix "doc_class_" when adding
  document classes term antiquotations
2021-06-01 17:32:45 +02:00
Nicolas Méric f11e5b762b all changes 2021-06-01 14:51:22 +02:00
Burkhart Wolff f8801a1121 basically table_inline. 2021-05-13 14:37:27 +02:00
Burkhart Wolff d7b625ae04 little debug. 2021-04-21 20:27:23 +02:00
Burkhart Wolff 3b21df199b addded docitem ML antiquotation. (Kleine Fingeruebung). 2021-04-21 20:24:06 +02:00
Achim D. Brucker 0b6ef076b0 Initial support for svjour3-class from Springer. 2021-04-06 12:15:13 +01:00
Achim D. Brucker 51375ea983 Updated TeX Live dependency to version 2021. 2021-04-01 23:47:35 +01:00
Achim D. Brucker 78987a5ae0 Fixed MarkDown. 2021-03-22 00:40:59 +00:00
Achim D. Brucker 920779b150 Raised requirement of Tex Live to TeX Live 2021 (expected release date: 4th of April 2021). 2021-03-22 00:13:18 +00:00