Commit Graph

2 Commits

Author SHA1 Message Date
Nicolas Méric 7e01b7de97 Implement long names for classes term-antiquotataions
Examples with value* that now work:

value*‹@{scholarly-paper.author ‹church'›}›
value*‹@{author ‹church›}›
value*‹@{Concept-High-Level-Invariants.author ‹church›}›

value*‹@{scholarly-paper.author-instances}›
value*‹@{author-instances}›
value*‹@{Concept-High-Level-Invariants.author-instances}›
2023-05-11 19:02:55 +02:00
Nicolas Méric c791be2912 Add monitor tests
- Add tests for monitors spanning two theories.
- Fix monitors trace update bug.
  When updating a monitor trace when we define a new instance,
  the monitor instance is already defined.
  But we can not update the instance using the update_instance function
  because  this function needs a binding, i.e. a short name,
  and then it will update or define a new instance if we want
  to update a monitor in a super theory whose name is the same as
  a monitor defined in the current theory.
  Example:

  in the super theory:

  doc_class monitor_M =
  tmM :: int
  rejects "test_monitor_A"
  accepts "test_monitor_head ~~ test_monitor_B ~~ test_monitor_C"

  open_monitor*[test_monitor_M::monitor_M]

  in the current theory:

  doc_class monitor_M =
  tmM :: int
  rejects "test_monitor_B"
  accepts "test_monitor_E ~~ test_monitor_C"

  text*[test_monitor_head2::Concept_MonitorTest1.test_monitor_head]‹›
  open_monitor*[test_monitor_M3::monitor_M]
  ...
  ==> ERROR : the instantiation of test_monitor_head2
              will define a new instance current.test_monitor_M3
              when updating the trace of super.test_monitor_M3

  Hence we use the update_instance_entry function
  which uses long names and only updates the entry.
2023-03-15 11:02:18 +01:00