referential-equivalence-first-draft #4

Merged
adbrucker merged 2 commits from nicolas.meric/Isabelle_DOF:referential-equivalence-first-draft into master 2021-11-21 12:43:56 +00:00
Collaborator

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
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
nicolas.meric added 3 commits 2021-11-10 14:47:22 +00:00
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
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.
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
nicolas.meric requested review from wolff 2021-11-10 14:49:20 +00:00
nicolas.meric requested review from adbrucker 2021-11-10 14:49:20 +00:00
adbrucker merged commit 1d497db5cf into master 2021-11-21 12:43:56 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Isabelle_DOF/Isabelle_DOF#4
No description provided.