Commit Graph

118 Commits

Author SHA1 Message Date
Nicolas Méric ad4ad52b4e Avoid reporting duplication when possible
ci/woodpecker/push/build Pipeline failed Details
Avoid reporting for meta arguments attributes of isabelle_DOF
commands and for text input of text*

The last reporting duplication not resolved comes
from the document_command command in Isa_DOF,
which parses the meta arguments twice,
one time for the creation of the docitem
with create_and_check_docitem which will add reporting
for the attributes value
(see conv_attrs whichs calls Syntax.read_term_global,
which iwill add reporting)
and the other for the document output
with document_output which also adds reporting
(see meta_args_2_latex which calls
(Syntax.check_term ctxt o Syntax.parse_term ctxt) with
ltx_of_markup and Syntax.parse_term also adds reporting)
2023-01-27 10:32:38 +01:00
Nicolas Méric ba8227e6ab Cleanup and add position to docitem ML antiqutation
ci/woodpecker/push/build Pipeline failed Details
2023-01-26 09:43:51 +01:00
Nicolas Méric 20b0af740d Update meta args syntax and ML* command
ci/woodpecker/push/build Pipeline failed Details
- Make optional meta arguments completely optional
- Make meta arguments context of ML* available in its ML context
- Make meta arguments of ML* mandatory to mimic text*.
  Without meta arguments, its behavior is already captured by
  the ML command
2023-01-23 09:03:59 +01:00
Nicolas Méric 2b1a9d009e Add support invariants on attributes of attributes
ci/woodpecker/push/build Pipeline was successful Details
Support invariants on attributes of classes atttributes.

Example:

doc_class inv_test1 =
  a :: int

doc_class inv_test2 =
  b :: "inv_test1"
  c:: int
  invariant inv_test2 :: "c σ = 1"
  invariant inv_test2' :: "a (b σ) = 2"

doc_class inv_test3 = inv_test1 +
  b :: "inv_test1"
  c:: int
  invariant inv_test3 :: "a σ = 1"
  invariant inv_test3' :: "a (b σ) = 2"

To support invariant on attributes in attributes
and invariant on attributes of the superclasses,
we check that the type of the attribute of the subclass is ground:›
ML‹
val Type(st, [ty]) = \<^typ>‹inv_test1›
val Type(st', [ty']) = \<^typ>‹'a inv_test1_scheme›
val t = ty = \<^typ>‹unit›
›
2023-01-13 08:27:26 +01:00
Nicolas Méric cd758d2c44 Update accepts clause syntax
ci/woodpecker/push/build Pipeline was successful Details
2023-01-12 12:18:58 +01:00
Nicolas Méric 8496963fec Add comment for term_ and value_ ML antiquoatations
ci/woodpecker/push/build Pipeline was successful Details
2023-01-11 14:49:29 +01:00
Nicolas Méric a96e17abf3 Add term_ and value_ ML antiquotations
ci/woodpecker/push/build Pipeline was successful Details
2023-01-09 11:34:40 +01:00
Nicolas Méric a42dd4ea6c Implement term _ and value_ text antiquotations
ci/woodpecker/push/build Pipeline was successful Details
2022-12-22 10:55:03 +01:00
Nicolas Méric a9432c7b52 Add a theory attribute to disable invariants checking 2022-12-22 07:53:42 +01:00
Nicolas Méric a589d4cd47 Update the position of the default class
The default class must stay abtract and as such
can not have a position.
Set its position to Position.none
2022-12-21 18:32:07 +01:00
Nicolas Méric 73dfcd6c1e Implement rejects clause
ci/woodpecker/push/build Pipeline was successful Details
- The current implementation triggers a warning when
  rejected classes are find in the monitor,
  and an error if monitor_strict_checking is enable.
  It follows these rules:
  Inside the scope of a monitor,
  all instances of classes mentioned in its accepts_clause
  (the ∗‹accept-set›) have to appear in the order specified
  by the regular expression.
  Instances not covered by an accept-set may freely occur.
  Monitors may additionally contain a rejects_clause
  with a list of class-ids (the reject-list).
  This allows specifying ranges of
  admissible instances along the class hierarchy:
  - a superclass in the reject-list and a subclass in the
    accept-expression forbids instances superior to the subclass, and
  - a subclass S in the reject-list and a superclass T in the
    accept-list allows instances of superclasses of T to occur freely,
    instances of T to occur in the specified order and forbids
    instances of S.
- No message is triggered for the free classes,
  but two theory options, free_class_in_monitor_checking
  and free_class_in_monitor_strict_checking,
  are added and can be used if we want to trigger warnings or errors,
  in the case we do not want free classes inside a monitor.
- Fix the checking warning when defining a monitor,
  as the monitor was added to the monitor table and then
  the instance of the monitor was added to the theory.
  So a monitor had the bad behavior to check itself.
2022-12-21 10:09:17 +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
Nicolas Méric 0b2d28b547 Update error message for invariant checking
ci/woodpecker/push/build Pipeline was successful Details
2022-12-09 16:11:57 +01:00
Makarius Wenzel 78d61390fe Prefer Isar command, instead of its underlying ML implementation 2022-12-05 11:50:12 +01:00
Makarius Wenzel 5471d873a9 Isabelle/Scala module within session context supports document_build = "dof" without component setup
ci/woodpecker/push/build Pipeline failed Details
2022-12-04 19:13:08 +01:00
Makarius Wenzel afcd78610b More concise export artifact 2022-12-04 18:03:53 +01:00
Makarius Wenzel b8a9ef5118 Tuned comments 2022-12-04 16:38:56 +01:00
Makarius Wenzel a4e75c8b12 Clarified export name for the sake of low-level errors 2022-12-04 16:35:55 +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 e8c7fa6018 Clarified signature 2022-12-03 14:44:04 +01:00
Makarius Wenzel 912d4bb49e Maintain document template in Isabelle/ML via Isar commands:
result becomes export artifact, which is harvested by Isabelle/Scala build engine
2022-12-02 20:05:15 +01:00
Makarius Wenzel a6c1a2baa4 Removed obsolete "extend" operation 2022-12-02 15:31:23 +01:00
Makarius Wenzel cc3e2a51a4 More antiquotations 2022-12-02 13:50:16 +01:00
Makarius Wenzel 9e4e5b49eb More antiquotations from Isabelle2021-1/2022 2022-12-02 11:41:31 +01:00
Makarius Wenzel f44f0af01c Use regular Toplevel.presentation from Isabelle2022, without alternative presentation hook 2022-12-01 22:48:45 +01:00
Makarius Wenzel 9a11baf840 Latex.output_name name is back in Isabelle2022 2022-12-01 22:04:56 +01:00
Nicolas Méric 06833aa190 Upddate single argument handling for compute_attr_access
ci/woodpecker/push/build Pipeline was successful Details
Trigger error when the attribute is not specified as an argument
of the antiquatation and is not an attribujte of the instance.
(In these case, the position of the attribute is NONE)
2022-11-28 10:05:47 +01:00
Nicolas Méric 4f0c7e1e95 Fix type unification clash for trace_attribute term antiquotation
ci/woodpecker/push/build Pipeline was successful Details
2022-11-25 08:57:59 +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
Achim D. Brucker cfdbd18bfa Resolved merge conflict. 2022-10-30 11:52:41 +00:00
Achim D. Brucker 0b807ea4bc Merge branch 'main' into Isabelle_dev
ci/woodpecker/push/build Pipeline failed Details
2022-10-30 11:22:13 +00:00
Makarius Wenzel 0c8a0e1d63 Adapted to Isabelle/1ac2416e8432 -- approx. Isabelle2022 release. 2022-10-24 21:30:49 +02:00
Burkhart Wolff 43871ced48 text-term* and text-value* antiquotation syntax, and more on tables.
ci/woodpecker/push/build Pipeline was successful Details
2022-10-11 21:00:33 +02:00
Burkhart Wolff 8a54831295 more elements for table parser.
ci/woodpecker/push/build Pipeline was successful Details
2022-10-03 08:23:05 +02:00
Achim D. Brucker 9f2e2b53a4 Merge branch 'main' into Isabelle_dev
ci/woodpecker/push/build Pipeline failed Details
2022-08-01 22:58:21 +01:00
Burkhart Wolff 8a9684590a pass through miniôdo: deeper ontological reasoning, less LaTeX.
ci/woodpecker/push/build Pipeline was successful Details
2022-08-01 21:42:32 +02:00
Burkhart Wolff 81c4ae2c13 first version of new commands onto_class // doc_class
ci/woodpecker/push/build Pipeline was successful Details
2022-08-01 15:53:33 +02:00
Achim D. Brucker f40d33b9ed Ad-hoc port to development version of Isabelle.
ci/woodpecker/push/build Pipeline failed Details
2022-07-17 22:46:56 +01:00
Nicolas Méric 03fd491d5d Implement CENELEC Table A.1
ci/woodpecker/push/build Pipeline was successful Details
- Add an eager and lazy invariants checking functions mechanism
  for low level invariants to allow the checking of invariants
  only when opening or closing a monitor instance.
  The state of the monitor instances traces evolves when declaring
  instances between open_monitor* and close_monitor* commands.
  This mechanism can capture the changes be defining
  invariants before or after traces are populated but not
  before and after, with the current mechanism.
  Two tables were added: docclass_eager_inv_tab
  and docclass_lazy_inv_tab to store these invariants
- Implement CENELEC_50128 Table A.1 using this mechanism
2022-06-13 07:56:53 +02:00
Nicolas Méric 9673359688 Enable high level invariants checking for some commands
ci/woodpecker/push/build Pipeline was successful Details
Enable high level invariants checking for the update_instance*
and close_monitor* commands
2022-05-27 17:14:17 +02:00
Nicolas Méric 5d1b271336 Allow access to the monitor table for low level invariants
ci/woodpecker/push/build Pipeline was successful Details
When defining low level invariants checking functions,
access to the monitor table might be useful.
So the table should be populated before the checking takes place.
2022-05-27 14:46:04 +02:00
Nicolas Méric 83c790d66a Handle normalization of trace attribute
ci/woodpecker/push/build Pipeline was successful Details
2022-05-26 12:56:21 +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
Nicolas Méric d8fde4b4f4 Cleanup and add test for meta-args for assert*
ci/woodpecker/push/build Pipeline was successful Details
2022-04-19 14:05:52 +02:00
Nicolas Méric 74420a932f Clean up check_invariants
ci/woodpecker/push/build Pipeline was successful Details
2022-04-07 15:36:01 +02:00
Nicolas Méric 8e1702d2da Add IDE reporting for attributes in meta-argument list
ci/woodpecker/push/build Pipeline was successful Details
2022-04-07 15:33:24 +02:00
Burkhart Wolff 2351e00be6 corrected and re-inserted Ecclectic Man into build
ci/woodpecker/push/build Pipeline failed Details
2022-03-31 15:55:01 +02:00
Burkhart Wolff d2e1d77b01 some corrections in the Eccectic RefMan
ci/woodpecker/push/build Pipeline failed Details
2022-03-31 13:49:46 +02:00
Burkhart Wolff 6a7b5c6afb fixed term* bug (non-evaluation of meta-args). Needs cleanup.
ci/woodpecker/push/build Pipeline failed Details
2022-03-31 06:57:18 +02:00