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
- 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
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.