Compare commits

...
This repository has been archived on 2024-04-22. You can view files and clone it, but cannot push or open issues or pull requests.

750 Commits

Author SHA1 Message Date
Nicolas Méric 8513f7d267 Update doc_class rails to match accepts clause 2023-01-17 09:01:55 +01:00
Nicolas Méric 2b1a9d009e Add support invariants on attributes of attributes
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 2023-01-12 12:18:58 +01:00
Nicolas Méric 8496963fec Add comment for term_ and value_ ML antiquoatations 2023-01-11 14:49:29 +01:00
Nicolas Méric 72d8000f7b Further explain evaluator option syntax for value_ text antiquotation 2023-01-09 15:34:59 +01:00
Nicolas Méric 17ec11b297 Explain evaluator option syntax for value_ text antiquotation 2023-01-09 15:13:23 +01:00
Nicolas Méric a96e17abf3 Add term_ and value_ ML antiquotations 2023-01-09 11:34:40 +01:00
Nicolas Méric 74b60e47d5 Document term _ and value_ text antiquotations 2022-12-22 16:50:53 +01:00
Nicolas Méric a42dd4ea6c Implement term _ and value_ text antiquotations 2022-12-22 10:55:03 +01:00
Nicolas Méric b162a24749 Comment out hack for Assumption in scholarly_paper 2022-12-22 09:55:46 +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 9f28d4949e Limit scope of free class checking in examples 2022-12-22 07:32:37 +01:00
Nicolas Méric 885c23a138 Explain lazy and eager invariants 2022-12-22 07:14:29 +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
Burkhart Wolff e1f143d151 Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2022-12-21 11:35:05 +01:00
Burkhart Wolff fd60cf2312 attempt to add category 'assumption' 2022-12-21 11:34:34 +01:00
Nicolas Méric 73dfcd6c1e Implement rejects clause
- 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
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
Burkhart Wolff e414b97afb rephrasing invariant for core scholarly_paper classes 2022-12-19 12:14:30 +01:00
Nicolas Méric 0b2d28b547 Update error message for invariant checking 2022-12-09 16:11:57 +01:00
Nicolas Méric 37d7ed7d17 Update rails for annotated text element in manual 2022-12-09 15:13:22 +01:00
Nicolas Méric 312734afbd Update Attributes examples 2022-12-09 15:12:38 +01:00
Burkhart Wolff 8cee80d78e advanced example on trace-attribute term-antiquotations 2022-12-07 16:01:38 +01:00
Makarius Wenzel ec0d525426 Tuned messages, following Isabelle/d6a2a8bc40e1 2022-12-05 15:21:26 +01:00
Makarius Wenzel 791990039b Tuned messages and options, following Isabelle/c7f3e94fce7b 2022-12-05 12:37:59 +01:00
Makarius Wenzel 78d61390fe Prefer Isar command, instead of its underlying ML implementation 2022-12-05 11:50:12 +01:00
Makarius Wenzel ffcf1f3240 Add missing file (amending 5471d873a9) 2022-12-04 19:26:28 +01:00
Makarius Wenzel 5471d873a9 Isabelle/Scala module within session context supports document_build = "dof" without component setup 2022-12-04 19:13:08 +01:00
Makarius Wenzel df37250a00 Simplified args, following README.md 2022-12-04 19:00:23 +01:00
Makarius Wenzel 185daeb577 Tuned 2022-12-04 18:25:29 +01:00
Makarius Wenzel 8037fd15f2 Tuned messages, following isabelle.Export.message 2022-12-04 18:20:54 +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 d20e9ccd22 Proper session qualifier for theory imports (amending 44cae2e631) 2022-12-04 00:45:07 +01:00
Makarius Wenzel f2ee5d3780 Tuned 2022-12-04 00:10:43 +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 7b2bf35353 More strict treatment of document export artifacts 2022-12-03 14:54:14 +01:00
Makarius Wenzel e8c7fa6018 Clarified signature 2022-12-03 14:44:04 +01:00
Makarius Wenzel b12e61511d Discourage etc/options 2022-12-03 13:55:56 +01:00
Makarius Wenzel 3cac42e6cb Clarified order 2022-12-03 12:39:00 +01:00
Makarius Wenzel aee8ba1df1 Prefer DOF parameters over Isabelle options 2022-12-03 12:37:58 +01:00
Makarius Wenzel d93e1383d4 Afford full-scale command-line tool 2022-12-03 12:29:24 +01:00
Makarius Wenzel 3d5d1e7476 Further attempts at woodpecker environment 2022-12-02 22:54:02 +01:00
Makarius Wenzel 4264e7cd15 Build Scala/Java components to get proper ISABELLE_CLASSPATH 2022-12-02 21:40:59 +01:00
Makarius Wenzel 96f4077c53 Tuned message 2022-12-02 21:29:45 +01:00
Makarius Wenzel d7fb39d7eb Adhoc command-line tool replaces old options 2022-12-02 21:14:55 +01:00
Makarius Wenzel b95826962f Tuned documentation 2022-12-02 20:29:40 +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 bb5963c6e2 Proper usage of dof_mkroot, although its Bash pretty-printing in LaTeX is a bit odd 2022-12-02 14:35:17 +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 b65ecbdbef Updated to Isabelle2022 2022-12-02 10:34:15 +01:00
Makarius Wenzel 3be2225dcf Tuned comments 2022-12-01 22:54:01 +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
Makarius Wenzel 48c167aa23 Proper DOF.artifact_url 2022-12-01 21:45:06 +01:00
Makarius Wenzel 700a9bbfee clarified DOF.options: hard-wired document_comment_latex always uses LaTeX version of comment.sty 2022-12-01 21:30:32 +01:00
Makarius Wenzel 73299941ad Tuned 2022-12-01 17:26:29 +01:00
Makarius Wenzel 5a8c438c41 Omit excessive quotes 2022-12-01 16:48:33 +01:00
Makarius Wenzel 7772c73aaa More accurate defaults 2022-12-01 16:39:41 +01:00
Makarius Wenzel ca18453043 Clarified signature: more explicit types and operations 2022-12-01 16:28:44 +01:00
Makarius Wenzel 1a122b1a87 More robust default 2022-12-01 15:48:52 +01:00
Makarius Wenzel 47d95c467e Tuned whitespace 2022-12-01 15:33:16 +01:00
Makarius Wenzel bf3085d4c0 Clairifed defaults and command-line options 2022-12-01 15:26:48 +01:00
Makarius Wenzel 068e6e0411 Tuned 2022-12-01 14:23:00 +01:00
Makarius Wenzel 09e9980691 Tuned 2022-12-01 14:22:32 +01:00
Makarius Wenzel 94ce3fdec2 Prefer constants in Scala, to make this independent from component context 2022-12-01 14:15:17 +01:00
Makarius Wenzel 44819bff02 Updated message, following c29ec9641a 2022-12-01 12:44:03 +01:00
Makarius Wenzel a6ab1e101e Update Isabelle + AFP URLs 2022-12-01 11:55:51 +01:00
Makarius Wenzel c29ec9641a Simplified installation 2022-12-01 11:45:12 +01:00
Nicolas Méric 06833aa190 Upddate single argument handling for compute_attr_access
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 2022-11-25 08:57:59 +01:00
Nicolas Méric 0040949cf8 Add trace-attribute term antiquotation
- 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
Fix markup for docitem_attribute and trace_attribute
ML and text antiquotations
2022-11-24 11:22:02 +01:00
Burkhart Wolff b2c4f40161 Some LaTeX experiments with Achim 2022-11-18 10:30:33 +01:00
Burkhart Wolff 309952e0ce syntactic rearrangements 2022-11-09 11:19:00 +01:00
Burkhart Wolff 830e1b440a ported another Figure* in OutOfOrderPresntn to Isabelle2022 2022-11-09 06:06:30 +01:00
Burkhart Wolff 2149db9efc semantics of fig_content (untested) 2022-11-08 20:52:58 +01:00
Burkhart Wolff 1547ace64b added some semantics to fig_content 2022-11-08 19:27:07 +01:00
Burkhart Wolff 39acd61dfd Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2022-11-08 10:03:30 +01:00
Burkhart Wolff 29770b17ee added syntax for fig_content 2022-11-08 10:03:15 +01:00
Achim D. Brucker b4f4048cff Made clear that more than two AFP entries are required. 2022-11-07 17:05:04 +00:00
Achim D. Brucker eac94f2a01 Merge branch 'Isabelle_dev' 2022-11-02 07:28:23 +00:00
Achim D. Brucker ab1877ce8e Linting. 2022-11-01 20:58:34 +00:00
Achim D. Brucker fc575a5be5 Fixed mardown. 2022-10-31 21:33:26 +00:00
Achim D. Brucker 4e47c38860 Declared installation script as deprecated. 2022-10-31 19:20:34 +00:00
Achim D. Brucker 943af164f4 Fixed typo. 2022-10-30 21:15:45 +00:00
Achim D. Brucker 873151b4f3 Update to Isabelle 2022. 2022-10-30 17:56:15 +00:00
Achim D. Brucker 82645c2e8e Update to Isabelle 2022. 2022-10-30 17:30:21 +00:00
Achim D. Brucker f09a2df943 Merge branch 'makarius-isabelle_dev' into Isabelle_dev 2022-10-30 11:53:13 +00: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 2022-10-30 11:22:13 +00:00
Makarius Wenzel 516f5d2f79 Merely use session structure instead of component settings. 2022-10-24 22:11:30 +02:00
Makarius Wenzel 5ac41a72ac More accurate treatment of sty files: do not just copy from all examples. 2022-10-24 21:58:10 +02:00
Makarius Wenzel 15feeb7d92 More standard package name: appears to work properly in Isabelle2022. 2022-10-24 21:38:01 +02:00
Makarius Wenzel 0c8a0e1d63 Adapted to Isabelle/1ac2416e8432 -- approx. Isabelle2022 release. 2022-10-24 21:30:49 +02:00
Burkhart Wolff 0aec98b95a cell row column parser setup 2022-10-11 21:43:13 +02:00
Burkhart Wolff 43871ced48 text-term* and text-value* antiquotation syntax, and more on tables. 2022-10-11 21:00:33 +02:00
Burkhart Wolff 0fa1048d6d description of the tab model. 2022-10-10 13:51:54 +02:00
Burkhart Wolff 33490f8f15 table cell syntax implemented; roughly tested. 2022-10-09 14:01:53 +02:00
Burkhart Wolff 01632b5251 hoisting cm pt syntax intp COL 2022-10-06 16:59:42 +02:00
Burkhart Wolff 8a54831295 more elements for table parser. 2022-10-03 08:23:05 +02:00
Burkhart Wolff 427226f593 some stuff with tables 2022-09-27 12:16:31 +02:00
Achim D. Brucker f14c0bebbb Merge branch 'main' into Isabelle_dev 2022-08-11 23:04:29 +01:00
Achim D. Brucker 7f500dc257 Migration to latest Isabelle development version. 2022-08-11 23:04:07 +01:00
Burkhart Wolff c05bb0bf4d fixing latex error(thank jenkins for alerting me) 2022-08-04 12:00:18 +02:00
Burkhart Wolff 66f78001eb little game with scalar type 2022-08-04 11:31:53 +02:00
Burkhart Wolff 5a06d3618b Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2022-08-04 11:27:39 +02:00
Burkhart Wolff e63ef4e189 ... 2022-08-04 11:27:31 +02:00
Burkhart Wolff bba7d9d5c5 syntactic massage of an interface description. 2022-08-03 11:44:33 +02:00
Burkhart Wolff 07a9c10001 Converntion for ROOTS restored. 2022-08-02 15:00:45 +02:00
Burkhart Wolff 5779c729a4 added more examples for use of SI units in mini-odo. 2022-08-02 11:58:26 +02:00
Burkhart Wolff 03f2836f5d ... 2022-08-02 10:58:35 +02:00
Burkhart Wolff d2703b0dbd added first examples for use of SI units in mini-odo. 2022-08-02 10:46:50 +02:00
Achim D. Brucker 9f2e2b53a4 Merge branch 'main' into Isabelle_dev 2022-08-01 22:58:21 +01:00
Achim D. Brucker 4caee16cb6 Merge branch 'main' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-08-01 22:24:50 +01:00
Achim D. Brucker 6ee7058d51 Check for the presence of Physical_Quantities. 2022-08-01 22:22:55 +01:00
Burkhart Wolff 583636404f renamed cenelec_document into cenelec_report. 2022-08-01 21:50:49 +02:00
Burkhart Wolff 8a9684590a pass through miniôdo: deeper ontological reasoning, less LaTeX. 2022-08-01 21:42:32 +02:00
Burkhart Wolff 81c4ae2c13 first version of new commands onto_class // doc_class 2022-08-01 15:53:33 +02:00
Achim D. Brucker 2c1b56d277 Port to development version of Isabelle. 2022-07-23 16:14:14 +01:00
Achim D. Brucker f40d33b9ed Ad-hoc port to development version of Isabelle. 2022-07-17 22:46:56 +01:00
Achim D. Brucker 6a94728747 Port to development version of Isabelle. 2022-07-17 20:47:17 +01:00
Achim D. Brucker 99facb109c Fixed link to latest version of the manual. 2022-07-08 12:57:43 +01:00
Achim D. Brucker f6d97db0d3 Fixed markdown. 2022-07-08 12:37:04 +01:00
Achim D. Brucker 4a6fa93644 Fixed markdown. 2022-07-08 12:36:35 +01:00
Achim D. Brucker 6ca0b0fd21 Fixed markdown. 2022-07-08 12:36:09 +01:00
Achim D. Brucker 65ae177fbc Switched back to unreleased. 2022-07-08 12:35:15 +01:00
Achim D. Brucker b93ff8f65c Bumped version to 1.3.0. 2022-07-08 12:16:00 +01:00
Achim D. Brucker adf87dfde4 Bumped version to 1.3.0. 2022-07-08 12:05:39 +01:00
Achim D. Brucker df5d037942 Bumped version to 1.3.0. 2022-07-08 12:04:20 +01:00
Achim D. Brucker f2f48f2340 Updated Changelog for the release of v1.3.0. 2022-07-08 11:34:18 +01:00
Achim D. Brucker 6839f63129 Initial commit. 2022-07-07 22:43:25 +01:00
Achim D. Brucker 3febf83b3c Check that Isabelle/DOF is registered as a component. 2022-07-02 22:38:39 +01:00
Achim D. Brucker fb8dbfac49 Removed component installations. 2022-07-02 22:31:44 +01:00
Achim D. Brucker 45e4a11a74 Clarified that before calling the install-afp script, Isabelle/DOF needs to be registered as a component. 2022-07-02 22:21:07 +01:00
Burkhart Wolff c8a3c58f7f end of discussion with Achim 2022-06-30 12:58:49 +02:00
Achim D. Brucker 1939ffeea4 Added missing line break declaration. 2022-06-29 23:33:29 +01:00
Achim D. Brucker 74093dfaae Improved quick and dirty mode for CI. 2022-06-29 23:20:01 +01:00
Achim D. Brucker d2b6cb81aa LIPIcs needs to stay unsupported, right now. 2022-06-29 21:57:07 +01:00
Achim D. Brucker b24ede4400 LIPIcs needs to stay unsupported, right now. 2022-06-29 21:46:39 +01:00
Achim D. Brucker 205aa5a6b1 Moved core ACM styles into DOF-core.sty. 2022-06-29 21:45:09 +01:00
Achim D. Brucker c8f3bfc65d Removed unused imports. 2022-06-29 20:17:40 +01:00
Achim D. Brucker 44f9317b35 Integrated dof-common.tex into DOF-core.sty. 2022-06-29 20:12:32 +01:00
Achim D. Brucker 6c2a0d6876 Renaming to ensure compliance with naming restrictions. 2022-06-29 19:08:56 +01:00
Achim D. Brucker 909dda1ea2 Documented component registration. 2022-06-29 18:50:44 +01:00
Achim D. Brucker 367d8f28ad Improved installation instructions. 2022-06-29 16:25:32 +01:00
Achim D. Brucker d3f41dca9e In quick and dirty mode, do not require a clean build. 2022-06-29 15:59:02 +01:00
Achim D. Brucker ae3d35e363 Fixed quick and dirty mode. 2022-06-29 15:34:27 +01:00
Achim D. Brucker 41a6c22822 Optimised quick&dirty setup. 2022-06-29 14:51:04 +01:00
Achim D. Brucker 4ac7c84403 Optimised quick&dirty setup. 2022-06-29 13:57:07 +01:00
Achim D. Brucker 38f6516ad9 Optimised quick&dirty setup. 2022-06-29 13:37:35 +01:00
Achim D. Brucker 03b721f014 Added renaming of mkroot_DOF. 2022-06-27 06:40:18 +01:00
Achim D. Brucker c5752ba4a2 Grammar/spell-checking. 2022-06-27 06:35:06 +01:00
Achim D. Brucker 5721398340 Documented document_build=dof option. 2022-06-26 19:14:08 +01:00
Achim D. Brucker 6c0d325673 Use full qualified name for templates. 2022-06-26 19:06:49 +01:00
Achim D. Brucker b40069bedd Use full qualified name for templates. 2022-06-26 19:06:45 +01:00
Achim D. Brucker 70b2647e7c Using full-qualified names for ontologies in ROOT files. 2022-06-26 18:45:47 +01:00
Achim D. Brucker c1efddf252 Changed order of lualatex and pdflatex Ci build [CI SKIP]. 2022-06-26 17:23:53 +01:00
Achim D. Brucker 9ded308371 Use full qualified name for scholarly_paper. 2022-06-26 17:12:09 +01:00
Achim D. Brucker f63d922096 Fixed woodpecker config. 2022-06-26 16:56:46 +01:00
Achim D. Brucker 11b309da02 Only build distributin archive for lualatex build. 2022-06-26 16:46:56 +01:00
Achim D. Brucker 1444f8f48b Fixed outdated use of mkroot_DOF and added (not yet tested) setup to create build archive during CI build. 2022-06-26 16:35:23 +01:00
Achim D. Brucker e6ca682114 Merge branch 'main' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-06-26 16:01:57 +01:00
Achim D. Brucker 15fb6fdc2d Added quick-and-dirty mode. 2022-06-26 16:00:06 +01:00
Achim D. Brucker 9d5c71d4e1 Migrated release script to new setup using Isabelle options for configuration. 2022-06-26 15:24:49 +01:00
Burkhart Wolff 013296f25e experiments on tables 2022-06-26 13:48:03 +02:00
Achim D. Brucker d10b277c60 Fixed documentation. 2022-06-25 17:34:08 +01:00
Achim D. Brucker 7c50ffb3af Refactoring. 2022-06-25 17:15:04 +01:00
Achim D. Brucker 3a9826901a Cleanup. 2022-06-25 17:11:01 +01:00
Achim D. Brucker a54373ad2f Merge branch 'config_as_options' 2022-06-25 16:36:46 +01:00
Achim D. Brucker aa7d0aec09 Print help message, if script is invoked without prefixing 'isabelle env'. 2022-06-24 18:50:32 +01:00
Achim D. Brucker 31778374ed Read settings from options. 2022-06-24 18:45:48 +01:00
Achim D. Brucker 0d55da68de Removed unused option. 2022-06-24 17:49:04 +01:00
Achim D. Brucker a973707a73 Implemented -h. 2022-06-24 17:02:12 +01:00
Achim D. Brucker b83f7a8abb Updated manual. 2022-06-24 16:58:07 +01:00
Achim D. Brucker e138855623 Use comment.sty in LaTeX mode by default. 2022-06-24 16:07:25 +01:00
Achim D. Brucker 5582644068 Improved description of latest changes. 2022-06-24 16:01:27 +01:00
Achim D. Brucker 5278608b89 Merging main into config_as_options. 2022-06-24 15:57:59 +01:00
Achim D. Brucker 59658cea6f mkroot_DOF is not replaced by dof_mkroot, which is implemented in Scala. 2022-06-24 14:55:53 +01:00
Achim D. Brucker ef674b5ae2 Migrated, tested, and debugged new configuration setup. 2022-06-24 14:48:49 +01:00
Achim D. Brucker ac8c939179 Initial setup using configurations as options, retiring both the build script (LaTeX build) and the mkroo_DOF script (replaced by a Scala-based tooling). 2022-06-24 14:02:19 +01:00
Burkhart Wolff c16ec333f1 experiments on multi-commands - multi-figures 2022-06-24 08:15:03 +02:00
Burkhart Wolff d1e4fd173b Experiments with multi-commands and -figures.
- added multi-arg syntax (only one arg evaluated so far)
- added figure_content built-in antiquotation
- added new Figure* - multi-arg command.
2022-06-22 16:32:31 +02:00
Burkhart Wolff 43c857af2c roughly ported Latex testbench to 21-1 2022-06-17 20:35:32 +02:00
Burkhart Wolff 0cc010cecc debugged merge 2022-06-17 09:37:43 +02:00
Burkhart Wolff ba7bd6dc03 Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2022-06-17 09:31:29 +02:00
Burkhart Wolff 43b0a3049f Modelling sample for tables 2022-06-17 09:31:17 +02:00
Nicolas Méric 03fd491d5d Implement CENELEC Table A.1
- 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
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
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 2022-05-26 12:56:21 +02:00
Nicolas Méric 9981c31966 Normalize docobj table value
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 319b39905f Update CENELEC_50128 implementation
- Update phase datatype to be accurate with 7.3 in the standard
- Update cenelec_document class: according to the table C.1 in the
  standard, written by, first check, and second check can be optional.
  See Phase Planning line 4 in the table, for example
- Some specifications are external to the standard: implement them
  as external_specification subclasses
- Fix phases attributes of classes
2022-05-18 18:23:57 +02:00
Nicolas Méric c00c6ed31d Fix Terms and Definitons section in CENELEC 2022-05-12 16:04:09 +02:00
Nicolas Méric ae3300ac2c Import of CENELEC_50128.thy changes from /ICFEM-2022 2022-05-11 18:15:33 +02:00
Achim D. Brucker 61f167c29c Made all import paths globally qualified. 2022-05-06 09:17:10 +01:00
Achim D. Brucker 2833deff90 Harmonizing the various root templates. 2022-04-22 20:51:42 +01:00
Achim D. Brucker a8424979eb Removed support for oldstyle font commands. 2022-04-21 22:59:11 +01:00
Achim D. Brucker f6f6f32b50 Merge branch 'main' into config_as_options 2022-04-20 11:09:01 +01:00
Achim D. Brucker 15e71fe189 Merge branch 'main' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-04-20 11:08:29 +01:00
Achim D. Brucker 45c23b4330 Fixed environment for isamarkupabstract. 2022-04-20 11:07:06 +01:00
Achim D. Brucker 995feb6685 Fixed environment for isamarkupabstract. 2022-04-20 11:06:35 +01:00
Nicolas Méric d8fde4b4f4 Cleanup and add test for meta-args for assert* 2022-04-19 14:05:52 +02:00
Achim D. Brucker 41e6c9ed02 Fixed file attributes. 2022-04-18 09:44:44 +01:00
Achim D. Brucker cbad96aba5 Fixed file attributes. 2022-04-18 09:22:57 +01:00
Achim D. Brucker 82c9a07c1a Fixed file attributes. 2022-04-18 09:20:55 +01:00
Achim D. Brucker ae8b91ac4e Fixed file attributes. 2022-04-18 09:20:36 +01:00
Achim D. Brucker 0f3f5d4b56 Fixed file attributes. 2022-04-17 16:32:12 +01:00
Achim D. Brucker fee83a2a29 Remove outdated and obsoleted ontologies. 2022-04-16 09:13:31 +01:00
Achim D. Brucker a0993b6eea Initial commit. 2022-04-15 22:05:19 +01:00
Achim D. Brucker 64b4eca5ea Avoid using natbib. 2022-04-15 21:56:01 +01:00
Achim D. Brucker 2e4fb5d174 Added development version of authorarchive.sty, as version in TexLive 2022 is outdated. 2022-04-15 21:13:10 +01:00
Achim D. Brucker 317c5a7759 Merge branch 'main' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-04-15 21:03:59 +01:00
Achim D. Brucker 12f1b230e6 Use LNCS template. 2022-04-15 21:01:53 +01:00
Achim D. Brucker 530783c23b Bug fix: handling of arguments for top-level author* command. 2022-04-15 20:49:05 +01:00
Nicolas Méric 1457c1cb85 Fix typo in upd_meta_args rail road in manual 2022-04-08 13:04:50 +02:00
Nicolas Méric e3caad804b Fix {Theorem, Lemma}_default_class theory attributes
Fix #11
2022-04-08 12:17:24 +02:00
Nicolas Méric 17df6a271b Delete some TODOs, now done, in the manual 2022-04-08 12:06:28 +02:00
Nicolas Méric a331b80095 Update images for meta arguments list attribute exploration
Fix #10
2022-04-08 11:33:41 +02:00
Nicolas Méric 74420a932f Clean up check_invariants 2022-04-07 15:36:01 +02:00
Nicolas Méric 8e1702d2da Add IDE reporting for attributes in meta-argument list 2022-04-07 15:33:24 +02:00
Achim D. Brucker 609f09e919 Merge branch 'main' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-04-04 16:04:51 +01:00
Achim D. Brucker 0f5e5bf6f6 Bug fix: -o option not working (reporting an error claiming that ontologies could not be found). 2022-04-04 16:04:10 +01:00
Achim D. Brucker 5c886d49b4 Defined basic set of options. 2022-04-03 22:45:47 +01:00
Nicolas Méric b1f73e9235 Delete Isabelle marks file 2022-04-01 11:54:49 +02:00
Nicolas Méric 9603311a9a Fix DOF manual and tests to work with assert* 2022-04-01 09:54:16 +02:00
Burkhart Wolff 2351e00be6 corrected and re-inserted Ecclectic Man into build 2022-03-31 15:55:01 +02:00
Burkhart Wolff 3e99e9e013 more discrepancies in the EcclecticMan solved. 2022-03-31 15:42:18 +02:00
Burkhart Wolff d2e1d77b01 some corrections in the Eccectic RefMan 2022-03-31 13:49:46 +02:00
Burkhart Wolff 96726fc507 Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2022-03-31 10:12:51 +02:00
Burkhart Wolff a68ecb4f11 ... 2022-03-31 10:12:46 +02:00
Achim D. Brucker 1ea897e660 Merge branch 'main' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-03-31 06:39:46 +01:00
Achim D. Brucker 1b25a08da8 Added email notification for failed builds. 2022-03-31 06:39:01 +01:00
Burkhart Wolff 6a7b5c6afb fixed term* bug (non-evaluation of meta-args). Needs cleanup. 2022-03-31 06:57:18 +02:00
Burkhart Wolff 9403afd86f addressing the value* transmission problem - not yet solved completely 2022-03-30 17:54:02 +02:00
Burkhart Wolff 894166a630 Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2022-03-30 16:19:36 +02:00
Burkhart Wolff 34df9f6fcd some bugs corrected 2022-03-30 16:19:31 +02:00
Nicolas Méric c5a3239d2b Merge pull request 'eager-and-lazy-elaboration' (#17) from nicolas.meric/Isabelle_DOF:eager-and-lazy-elaboration into main
Reviewed-on: Isabelle_DOF/Isabelle_DOF#17
2022-03-30 06:48:31 +00:00
Nicolas Méric e4e4a708a5 Update assert* to use isabelle/DOF evaluation 2022-03-30 08:12:17 +02:00
Nicolas Méric 9cd5323063 Update DOF manual meta-types as types section
Types of the implementation language inside the HOL type system
are now represented as datatypes and not just abstract types
2022-03-29 15:22:44 +02:00
Nicolas Méric 444d6d077c Add eager and lazy elaboration
- Isabelle uses eager evaluation, so should the elaboration of terms
  which are evaluated.
  The value of instances are now registered in the data tables
  of Isabelle/DOF when fully elaborated, ie,
  term annotation antiquotations proposed by Isabelle/DOF in
  an instance value are replaced by its value before registration
  in Isabelle/DOF data
  A new field, input_term, stores the lazy elaboration
  and is used when elaboration is not wished
  (to print the original input term declared by the user, for example)
- Clean up the simplication mechanism of the internal trace attribute
  (used by monitor classes)
2022-03-29 15:22:44 +02:00
Nicolas Méric ec33e70bbf Loosen dependency on Toplevel.transition
Loosen the dependency of the implementation of value* and term*
on Toplevel.transition.
Toplevel.transition should be avoided as it has specific behaviors
like only allowing atomic transactions.
2022-03-29 15:22:44 +02:00
Achim D. Brucker f655d2a784 Removed adding build script (no longer needed). 2022-03-27 21:40:51 +01:00
Achim D. Brucker d80d5b0538 Support for local styles and templates. 2022-03-27 21:29:25 +01:00
Achim D. Brucker e5874396c4 Re-added build badge. 2022-03-27 21:15:10 +01:00
Achim D. Brucker 60b7216daa Removed confusing build status. 2022-03-27 15:51:32 +01:00
Achim D. Brucker 4a7605b43e Removed build script from default document directory layout. 2022-03-27 14:59:43 +01:00
Achim D. Brucker 8a2828f3bf Fixed markdown. 2022-03-27 14:07:51 +01:00
Achim D. Brucker 9522597733 Updated release script to new installation setup. 2022-03-27 14:05:05 +01:00
Achim D. Brucker 9f773ca129 Fixed markdown. 2022-03-27 14:04:45 +01:00
Achim D. Brucker 7b8ae0a93d Make use of install script optional in favor of registration as Isabelle component. Style files, templates, and scripts are no longer installed into ISABELLE_USER_HOME. 2022-03-27 13:21:55 +01:00
Achim D. Brucker 700855411e Do not register build script in default ROOT file (no longer needed). 2022-03-27 12:21:14 +01:00
Achim D. Brucker 5348a609be Official support for lipics-v2021 (fixes #13). 2022-03-27 12:20:49 +01:00
Achim D. Brucker 46c46af880 Removed outdated lipics v2019 setup. 2022-03-27 12:02:48 +01:00
Achim D. Brucker 7b4450450d Hide use of build script from users. 2022-03-27 12:02:15 +01:00
Achim D. Brucker 1d48fb810f Updated messages to users and removed outdated checks. 2022-03-27 11:01:20 +01:00
Achim D. Brucker c2fbd57f12 Fixed deployment directories. 2022-03-26 22:11:03 +00:00
Achim D. Brucker 1f1a504bf0 Ensure that etc-directory in ISABELLE_HOME_USER exists. 2022-03-26 21:57:22 +00:00
Achim D. Brucker 05e85edd91 Removed non-distribution note for llncs.cls. This class is now available on CTAN and part of TeXLive (at least from version 2022). 2022-03-26 21:31:05 +00:00
Achim D. Brucker 57b9720d99 Test mkroot_DOF as part of CI build. 2022-03-26 21:30:15 +00:00
Achim D. Brucker 846237b515 Support for Isabelle 2021-1. 2022-03-26 21:25:40 +00:00
Achim D. Brucker 74368af56c Do not install tools in ISABELLE_HOME_USER. 2022-03-26 21:17:01 +00:00
Achim D. Brucker 21ab0ff6b9 Removed reference to Docker use. 2022-03-26 20:08:17 +00:00
Achim D. Brucker b7948659ad Ignore Isabelle/JEdit tmp files. 2022-03-26 19:56:23 +00:00
Achim D. Brucker 95cda1aaea Removed empty line. 2022-03-26 19:48:14 +00:00
Achim D. Brucker 0f6ec7dcd1 Updated Isabelle version to 2021-1. 2022-03-26 19:43:53 +00:00
Achim D. Brucker 250755e7f1 Removed outdated .gitattributes. 2022-03-26 19:35:41 +00:00
Achim D. Brucker 68e8d0be4a Ensure etc directory exists. 2022-03-26 19:34:38 +00:00
Achim D. Brucker aff78b0625 Restructuring. 2022-03-26 19:31:23 +00:00
Achim D. Brucker 9f5d20a586 Updated version to Unreleased. 2022-03-26 19:00:39 +00:00
Achim D. Brucker 3c49a9aaba Removed outdated test session. 2022-03-26 18:53:33 +00:00
Achim D. Brucker f4286404fb Merge branch 'v1.2.x/Isabelle2021' 2022-03-26 18:25:33 +00:00
Achim D. Brucker a1d83e33ef Updated manual to reflect changes in options for install script. 2022-03-26 18:23:07 +00:00
Achim D. Brucker 5ae72e1103 Merge branch 'porting_to_Isabelle2021-1' 2022-03-26 18:17:57 +00:00
Achim D. Brucker de67a05160 Improved documentation. 2022-03-26 18:17:46 +00:00
Achim D. Brucker 97bfdcff58 Re-added simple Changelog file. 2022-03-26 17:50:46 +00:00
Achim D. Brucker 1a41e92188 Minor shortenings to improve layout. 2022-03-26 17:47:40 +00:00
Achim D. Brucker 5381182ab2 Spell-checking. 2022-03-26 13:26:51 +00:00
Achim D. Brucker d3270f4afa Updated copyright headers. 2022-03-25 22:24:47 +00:00
Achim D. Brucker ac2fab895b Added artifact links for version 1.2.0. 2022-03-25 22:24:25 +00:00
Achim D. Brucker 20a81d3428 Cleanup. 2022-03-25 22:23:04 +00:00
Achim D. Brucker 20b77577cb Updated version and DOI. 2022-03-25 22:21:40 +00:00
Achim D. Brucker 16bd3b3a94 Install AFP entries as components instead of adding them to the ROOTS file. 2022-03-24 14:26:53 +00:00
Achim D. Brucker f3f24c0d2e Initial support for matrix setup generating documents using pdflatex and lualatex. 2022-03-24 10:00:01 +00:00
Achim D. Brucker 76582f75fd Merge branch 'master' into porting_to_Isabelle2021-1 2022-03-23 14:33:44 +00:00
Nicolas Méric a4f39bb700 Add TODO referring to an issue in DOF Manual
Reference the issue
Isabelle_DOF/Isabelle_DOF#10
in a TODO in the DOF manual to remember to update the manual
when the issue is fixed
2022-03-23 11:27:11 +01:00
Nicolas Méric 13835fbed9 Fix typos in DOF manual, chapter 5 2022-03-23 11:17:30 +01:00
Nicolas Méric cc3f9ab402 Update DOF manual, chapter 3 and 4
- Use antiquotations when possible to reference
  classes and attributes in text (typ, type and const antiquotations)
- Add explanation for cid, obj-id and oid
- Update ML*, text* an value* railroads
- Fix typos
- Add some TODOs for the next revision of the manual
2022-03-23 09:07:43 +01:00
Achim D. Brucker 442835442f Towards Isabelle 2021-1 support. 2022-03-22 22:19:35 +00:00
Achim D. Brucker c69b11a312 First steps towards Isabelle 2021-1 support. 2022-03-22 21:47:26 +00:00
Achim D. Brucker 0c9dcfb6e1 Merge branch 'master' into porting_to_Isabelle2021-1 2022-03-21 20:32:19 +00:00
Nicolas Méric 5d0136a168 Fix typo in DOF Manual, Chapter 3 2022-03-21 14:15:09 +01:00
Nicolas Méric 3e9adb026b Update DOF manual Chapter 3
- Fix some minor issues:
  - Some figures did not longer correspond to their descriptions
  - Some mechanisms (definitions - examples - etc.) in referencing
    did not work any longer in the setting that we distribute.
- Fix typos
2022-03-21 14:09:18 +01:00
Achim D. Brucker f51ee34681 Register Isabelle/DOF as proper component. 2022-03-21 08:47:05 +00:00
Achim D. Brucker ef89a95307 Fixed oversight during merge and removed patches that are no longer needed. 2022-03-20 22:41:09 +00:00
Achim D. Brucker 62726920a7 Fixed oversight during merge and removed patches that are no longer needed. 2022-03-20 22:39:18 +00:00
Achim D. Brucker 7bb4ab58e9 Removed Docker file, no longer needed for Isabelle 2021-1. 2022-03-20 22:07:33 +00:00
Achim D. Brucker 010202e34a Removed Docker instructions. 2022-03-20 22:05:38 +00:00
Achim D. Brucker 62eefcee5d Updated required Isabelle and TexLive version. 2022-03-20 22:05:08 +00:00
Achim D. Brucker abe7713f1e Disabled patch installation and updated Isabelle version. 2022-03-20 22:03:10 +00:00
Achim D. Brucker 2314b2191f Resolved merge conflict. 2022-03-20 20:49:46 +00:00
Burkhart Wolff 6bb62fb08a minor presentation bug 2022-03-20 19:04:52 +01:00
Burkhart Wolff fb91700a43 added a remark on @{cite ...} 2022-03-20 19:02:14 +01:00
Burkhart Wolff d86173834f merge 2022-03-20 18:47:18 +01:00
Burkhart Wolff 49f4c5b95b added hacky para on alternative lexical notations. 2022-03-20 18:45:53 +01:00
Achim D. Brucker 658e7a68a1 Disabled non-working antiquotation - needs to have a second look. 2022-03-20 14:57:03 +00:00
Achim D. Brucker bdc7aab6cf Minor syntax cleanup. 2022-03-20 14:55:56 +00:00
Achim D. Brucker 50e42ca5c0 Reorganized CI setup. 2022-03-20 11:04:23 +00:00
Achim D. Brucker d7cf6f1fc7 Removed outdated Jenkinsfile. 2022-03-19 21:07:12 +00:00
Achim D. Brucker a89878079e Generate link to latest artifacts. 2022-03-19 20:29:22 +00:00
Achim D. Brucker 90416c2310 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-03-18 20:29:35 +00:00
Achim D. Brucker 36c0e415e3 Made use of hvlogos.sty optional. 2022-03-18 20:29:22 +00:00
Burkhart Wolff 2ca84fd40f Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2022-03-18 19:20:29 +01:00
Burkhart Wolff 306d117231 ... 2022-03-18 19:20:25 +01:00
Nicolas Méric 2886f7df99 Update CENELEC_50128 theory
An application condition should be an assumption
2022-03-18 17:00:06 +01:00
Achim D. Brucker 703b9a055d Renamed build step. 2022-03-17 22:32:35 +00:00
Achim D. Brucker a950142749 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-03-17 22:28:49 +00:00
Achim D. Brucker 6c74a2e0f5 Basic Woodpecker setup (migration from Jenkins). 2022-03-17 22:28:31 +00:00
Nicolas Méric b7d7015423 Cleanup Manual chapter 03 2022-03-17 17:28:40 +01:00
Nicolas Méric e4195a68a2 Update DOF manual, chapters 02-03
- Use antiquotations when possible to reference
  classes and attributes in text (typ and const antiquotations)
- Update some isar code examples
- Fix typos
2022-03-17 17:14:20 +01:00
Achim D. Brucker 54c9bc2d74 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2022-03-17 08:56:41 +00:00
Achim D. Brucker f6e9e39a58 Removed reference to lncs as a special case, as llncs.cls finally arrived on CTAN. 2022-03-17 08:51:37 +00:00
Achim D. Brucker a66e90cf25 Switchted to notion of upstream repository. 2022-03-17 08:48:25 +00:00
Burkhart Wolff 63c0b1e442 cosmetics in Evaluation 2022-03-16 13:25:56 +01:00
Nicolas Méric 3585b6a2f1 Explain queries on instances in DOF manual 2022-03-15 08:28:10 +01:00
Nicolas Méric 8bc2e60d2f Update high level invariants tests 2022-03-14 18:44:09 +01:00
Nicolas Méric 3895ba550c Import of DOF manual changes from /2021-ITP-PMTI 2022-03-14 17:08:59 +01:00
Nicolas Méric eb9edd66d5 Clean up code 2022-03-14 16:17:28 +01:00
Nicolas Méric a332109dca Fix scheduling problem for term* and value*
Toplevel transition only allows atomic transactions.
So we avoid sequantial combinators
2022-03-14 15:27:13 +01:00
Burkhart Wolff 5af219469d Corrected scheduling problem of ML*. must be atomic transaction. 2022-03-14 12:23:54 +01:00
Achim D. Brucker 17d7562d4f Updated year. 2022-03-11 11:43:02 +00:00
Achim D. Brucker 8efc1300b4 Manual import of changes from /2021-ITP-PMTI. 2022-03-11 11:30:34 +00:00
Achim D. Brucker 4c0d3ccee3 Renamed master repository to main repository. 2022-03-11 10:42:50 +00:00
Achim D. Brucker 53eb93367c Cleanup. 2022-03-11 10:41:06 +00:00
Achim D. Brucker 005d18657c Switched to hvlogos. 2022-03-11 07:40:07 +00:00
Achim D. Brucker 6cf004637c Removed ITP paper draft - on own branch. 2022-03-11 07:24:54 +00:00
Achim D. Brucker 462673d31e Removed math example (outdated and currently unused). 2022-03-11 07:24:14 +00:00
Achim D. Brucker 43522215b9 Removed empty README. 2022-03-11 07:14:35 +00:00
Nicolas Méric 8f7e898f4b Fix invariant railroad diagram 2022-01-31 13:01:59 +01:00
Burkhart Wolff e650892b48 changed 'L' - operator to 'Lang' in order to avoid name conflicts in papers. 2022-01-31 10:44:02 +01:00
Burkhart Wolff 35b47223b9 added category 'background' into scholarly paper 2022-01-31 10:42:52 +01:00
Achim D. Brucker 46325cc64b Added unofficial support for lipics-v2021 (warning: this requires a patched version of lipics-v2021.cls). 2022-01-30 22:52:48 +00:00
Nicolas Méric d546a714b7 Merge pull request 'Add checking of invariants for class instances' (#8) from nicolas.meric/Isabelle_DOF:check-invariants-first-draft into master
Reviewed-on: Isabelle_DOF/Isabelle_DOF#8
2022-01-25 07:50:25 +00:00
Nicolas Méric 76612ae6f3 Add checking of invariants for class instances
- Warning: the current implementation does yet not support
    some use-cases, like invariant on monitors,
    or the initialization of docitem without a class associated.
- Add first draft of the checking of invariants.
  For now, it is disabled by default because some cases
  are not yet supported, like the initialization of docitem
  without a class associated.
  ex: text*[sdf]‹ Lorem ipsum @{thm refl}›
- To enable the checking, one can use the theory attribute
  "invariants_checking" by declaring it in a theory like this:
  declare [[invariants_strict_checking = true]]
- A checking using basic tactics (unfolding and auto) can be enable
  with the "invariants_checking_with_tactics" theory attribute
  for specific use-cases
- The specification of invariants is now automatically abstracted,
  so one must define an invariant like this now:

  doc_class W =
  w::"int"
  invariant w :: "w σ ≥ 3"

  The old form:

  doc_class W =
  w::"int"
  invariant w :: "λσ. w σ ≥ 3"

  is now deprecated.
  The specification of the invariant still uses the σ-notation
  and is defined globally by the name component "invariantN"
- Update the invariants definition in the theories to match
  the new implementation
- Update the manual to explain this new feature
- Add small examples in src/tests/High_Level_Syntax_Invariants.thy
  and src/tests/Ontology_Matching_Example.thy
2022-01-24 17:30:48 +01:00
Burkhart Wolff 96112ff893 restored ancient SEFM paper example for invariants 2022-01-17 12:06:32 +01:00
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
Makarius Wenzel 4352691e95 Support Isabelle2021-1 without patches:
in the next release it will be simpler again.
2021-12-20 21:02:57 +01:00
Makarius Wenzel 2547b2324e Adhoc examples for ML antiquotations. 2021-12-20 16:27:16 +01:00
Makarius Wenzel 99264edc02 More NOTES. 2021-12-20 09:22:13 +01:00
Makarius Wenzel 70617f59fe Avoid pointless Latex comments: as an example of how to re-define document output. 2021-12-19 17:51:38 +01:00
Makarius Wenzel fadd982285 More on Isabelle/Scala services, notably document preparation. 2021-12-19 17:16:37 +01:00
Makarius Wenzel 4e4995bde5 Isabelle/Scala build.props with some pro-forma services
(unusual package name prevents problems with Maven/IntelliJ).
2021-12-19 16:50:21 +01:00
Makarius Wenzel 2e4d37e3ca More on Document preparation in Isabelle/ML. 2021-12-19 15:23:33 +01:00
Makarius Wenzel ff32bac3fc Miscellaneous NEWS and Notes. 2021-12-19 13:48:45 +01:00
Burkhart Wolff 96d6bb8e00 intro proposal completed 2021-12-19 13:31:42 +01:00
Makarius Wenzel bcf7849083 Proper component setup. 2021-12-19 13:22:07 +01:00
Burkhart Wolff 77150aefe2 more on intro 2021-12-19 10:38:00 +01:00
Makarius Wenzel 86b555b56e Disable TR_my_commented_isabelle for now: does not work with Isabelle2021-1. 2021-12-18 23:07:25 +01:00
Makarius Wenzel ec49f45966 Adaptations for Isabelle2021-1. 2021-12-18 23:06:51 +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: Isabelle_DOF/Isabelle_DOF#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: Isabelle_DOF/Isabelle_DOF#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: Isabelle_DOF/Isabelle_DOF#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: Isabelle_DOF/Isabelle_DOF#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: Isabelle_DOF/Isabelle_DOF#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: Isabelle_DOF/Isabelle_DOF#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: Isabelle_DOF/Isabelle_DOF#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
Achim D. Brucker e20e73be90 Added ERT 2018 publication and added note about required version of tcolorbox.sty. 2021-03-22 00:12:00 +00:00
Achim D. Brucker b96397800d Updated Isabelle base image. 2021-03-21 00:00:13 +00:00
Achim D. Brucker 8d8d418f0e Update after Isabelle/DOF 1.1.0/Isabelle2021 release. 2021-03-20 23:56:46 +00:00
Achim D. Brucker 712cea7ac9 Merge branch 'v1.1.x/Isabelle2020' 2021-03-20 22:26:14 +00:00
Achim D. Brucker 0300a64119 Added v.1.1.0. 2021-03-20 22:25:29 +00:00
Achim D. Brucker 6d166ecee4 Added links for 1.1.0/Isabelle2020 release. 2021-03-20 22:19:57 +00:00
Achim D. Brucker a0654d8db9 Added Nicolas Méric as contributor. 2021-03-20 22:05:57 +00:00
Achim D. Brucker e048bbe508 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2021-03-15 10:25:16 +00:00
Achim D. Brucker 201d12a01a Fixed spelling. 2021-03-15 10:24:58 +00:00
Achim D. Brucker aadbce7844 Removed direct link to TeX Live installation instructions that are somewhat misleading for OS X users. The main TeX Live instructions are, actually, more helpful. 2021-03-15 10:24:31 +00:00
Burkhart Wolff cfad21e296 Ref auf Makarius Text added 2021-03-14 15:45:42 +01:00
Burkhart Wolff ad18d3c179 ... 2021-03-14 12:03:52 +01:00
Achim D. Brucker 46875b0560 Fixed version number. 2021-03-11 00:03:37 +00:00
Achim D. Brucker 389fd6d033 Switch from pdf(la)tex to lua(la)tex. 2021-03-10 23:51:18 +00:00
Achim D. Brucker f975672901 Removed check for \expanded{}: Isabelle 2021 defaults to luatex as TeX-engine, which has \expanded{} since a very long time. 2021-03-10 22:12:39 +00:00
Achim D. Brucker 4a1f15be02 Removed check for \expanded{}: Isabelle 2021 defaults to luatex as TeX-engine, which has \expanded{} since a very long time. 2021-03-10 22:10:12 +00:00
Achim D. Brucker 06dddeacf5 Porting to Isabelle 2021. 2021-03-10 22:04:09 +00:00
Achim D. Brucker e495a7b2fe Revising Chapter 5. 2021-02-13 17:04:17 +00:00
Achim D. Brucker 018bfa4bcd Added default escapechar for ltx environment. 2021-02-12 02:24:31 +00:00
Achim D. Brucker 15c958ec64 Revised Chapter 4. 2021-02-11 19:10:38 +00:00
Achim D. Brucker 29661f6734 Revised Sec. 4.2. 2021-02-10 09:05:59 +00:00
Achim D. Brucker 3649fb855e Revised Sec. 4.1. 2021-02-09 20:56:56 +00:00
Achim D. Brucker 43184a9995 Migrated \inlinebawsh{}. 2021-02-08 15:34:59 +00:00
Achim D. Brucker ed8cd2ad9d Migrated \inlinebawsh{}. 2021-02-08 15:33:45 +00:00
Achim D. Brucker 029ae709e6 Migrated \inlineltx{}, except when argument contained { or }. 2021-02-07 20:01:43 +00:00
Achim D. Brucker 85d94848b6 Revised Chapter 3. 2021-02-06 12:08:18 +00:00
Achim D. Brucker b61346fd64 Revised Sec. 3.2. 2021-02-05 06:58:22 +00:00
Achim D. Brucker 3d0cbf6a4f Revised Sec. 3.1. 2021-02-04 18:52:38 +00:00
Achim D. Brucker 50d3dde1a0 Converted \inlinesml{...}. 2021-02-03 05:13:05 +00:00
Achim D. Brucker d605e23218 Converted \inlinesml{...}. 2021-02-02 12:22:35 +00:00
Achim D. Brucker 2d3e521296 Converted \inlinebash{...}. 2021-02-02 12:20:03 +00:00
Achim D. Brucker b81eef7bd2 Converted bash-environments to antiqotations. 2021-02-01 05:06:15 +00:00
Achim D. Brucker a1332ec9a4 Converted bash-environments to antiqotations. 2021-01-31 16:54:22 +00:00
Achim D. Brucker 243556467a Merge remote-tracking branch 'origin/add-todos-fix-typos' 2021-01-30 06:47:47 +00:00
Burkhart Wolff 9bba4301c1 nitty gritties. 2021-01-28 15:20:10 +01:00
Nicolas Méric 4d9de40037 Add TODOs to improve the wording 2021-01-28 13:04:29 +01:00
Nicolas Méric 76266fbd5e Add TODOs to improve text consistency
There are some inconsistencies between some figures and the text
which refers to them.
2021-01-28 12:59:48 +01:00
Nicolas Méric 1fb97c8fb0 Add TODOs to delete references to where clause
The where clause for ontology classes is deprecated
in favor of the accepts and rejects clauses.
2021-01-28 12:48:54 +01:00
Nicolas Méric 5b618562a2 Fix some typos 2021-01-28 12:46:20 +01:00
Achim D. Brucker e9fc175cb6 Cleanup. 2021-01-25 23:34:23 +00:00
Achim D. Brucker 7e3c82f65e Cleanup. 2021-01-21 16:20:27 +00:00
Achim D. Brucker b4482b02d9 Modernized comment syntax. 2021-01-20 23:25:17 +00:00
Achim D. Brucker a9737762fd Fixed spacing in front of index entries.. 2021-01-19 23:12:58 +00:00
Achim D. Brucker fc2817db0d Cleanup. 2021-01-18 20:30:39 +00:00
Achim D. Brucker 6ed771ef04 Workaround to support lualatex. 2021-01-17 06:37:14 +00:00
Achim D. Brucker 9e605d2e3c Removed fixme. 2021-01-15 00:46:29 +00:00
Achim D. Brucker 676b0304a8 Print abstract title/name and removed table of contents. 2021-01-14 05:24:10 +00:00
Achim D. Brucker c03b54584c Fixed package name. 2021-01-13 12:12:18 +00:00
Achim D. Brucker 1c57e9b08b Fixed package name. 2021-01-12 23:46:47 +00:00
Achim D. Brucker e0305a6694 Updated TeXLive dependency to TeXLive 2020. 2021-01-11 19:21:08 +00:00
Achim D. Brucker be09cb7d89 Fixed file permissions. 2021-01-10 06:56:28 +00:00
Achim D. Brucker 88504abf33 Added wrapper for amssymb to support amssymb-like commands for both pdflatex and luatex. 2021-01-10 06:56:05 +00:00
Achim D. Brucker 6927781d26 Merge. 2021-01-09 06:32:17 +00:00
Achim D. Brucker 7e01ff7021 Cleanup. 2021-01-08 03:54:37 +00:00
Achim D. Brucker 82121d7204 Cleanup. 2021-01-07 04:39:28 +00:00
Achim D. Brucker 225309482b Updated copyright information. 2021-01-06 06:48:36 +00:00
Achim D. Brucker 78a17a66b5 Fixed copyright header. 2021-01-05 11:32:26 +00:00
Achim D. Brucker 20b3e7c0b7 Removed pdflatex check (TeX Live 2019 should available everywhere and the dependency is still checked during installation. 2021-01-05 11:25:55 +00:00
Achim D. Brucker d2dcc71229 Removed explicit vspaces to clean up layout. 2021-01-04 06:32:56 +00:00
Burkhart Wolff d86e708154 a first imprfect solution for the assert* problem; 4th chapter roughly completed. 2021-01-03 14:07:21 +01:00
Burkhart Wolff aee1d33709 renaming ISA's; new shortcuts; more content in the RefMan. 2021-01-02 15:57:28 +01:00
Burkhart Wolff b71be9c4a8 Reorganization Chap 4. <4.3.2 2021-01-01 21:34:05 +01:00
Burkhart Wolff 396ef1d477 More content in 4, better tree printing. 2021-01-01 21:23:21 +01:00
Burkhart Wolff 950a86aa5a Adding better explanation of the core functionalities... 2021-01-01 16:12:07 +01:00
Burkhart Wolff 480f0ada37 Reorganization Chap 4. ... 2020-12-31 11:02:27 +01:00
Burkhart Wolff 242bb536bc Reorganization Chap 4. <4.3.2 2020-12-30 23:07:19 +01:00
Burkhart Wolff d6832cc8f8 Reorganization Chap 4. 2020-12-30 15:06:11 +01:00
Burkhart Wolff 04f0cc7f5c Reorganization: Pushed Macro Core Mechanism into the DOF Core; adapted the RefMan accordingly. 2020-12-30 12:47:54 +01:00
Burkhart Wolff 2f721d0f4b activated syntactic checks for trimming macros 2020-12-24 04:53:27 +01:00
Burkhart Wolff 4c5aacb39f activated syntactic checks for trimming macros 2020-12-23 11:30:42 +01:00
Burkhart Wolff 4c5fc4bc53 built in syntactic checks for trimming macros 2020-12-23 09:43:22 +01:00
Burkhart Wolff 005922ffda built in syntactic checks for trimming macros 2020-12-23 09:41:26 +01:00
Burkhart Wolff 6899c4059e improved macro syntax 2020-12-22 20:37:15 +01:00
Burkhart Wolff 5593c22a36 first version with macro syntax (no ML support) 2020-12-22 19:50:00 +01:00
Burkhart Wolff de5c0fc6e2 added Isar-syntax for define_shortcut* 2020-12-22 08:07:19 +01:00
Burkhart Wolff 0e64608a58 enforcing shorter Definition* - style in examples (CC,CENELEC,...) 2020-12-02 09:32:48 +01:00
Burkhart Wolff 8771d8581b default class checking bug fixed; new attributes for default classes in ontological macros Definition* Theorem* Lemma* 2020-12-01 23:18:13 +01:00
Achim D. Brucker c11e68e3ea Bug fix: Definition environment. 2020-12-01 07:46:20 +00:00
Burkhart Wolff 698da3dd24 intermediate session with Macro-Bug. 2020-11-24 10:57:17 +01:00
Burkhart Wolff efeee1e863 Eliminated deprecated abstract class residuals; lifted Definition* to math_content. 2020-11-10 13:07:54 +01:00
Burkhart Wolff 2ecb62a80e added Lemma*, Theorem* and Definition* support. Bug: referencing does not work. 2020-11-04 15:55:43 +01:00
Burkhart Wolff 4ad06ce39a deactivated class check. 2020-11-04 14:25:14 +01:00
Burkhart Wolff da0f3e63f1 more steps to reform document macro mechanism 2020-11-04 13:13:24 +01:00
Burkhart Wolff 7f4b587274 steps to reform cicm/csp paper and manual 2020-11-04 11:18:43 +01:00
Burkhart Wolff dc7ed74c57 Second steps to reform cicm paper 2020-11-04 10:12:31 +01:00
Burkhart Wolff 84c7cabec0 First steps to reform cicm paper 2020-11-04 09:22:49 +01:00
Burkhart Wolff fbefa85586 First steps to reform cicm paper 2020-11-04 03:27:24 +01:00
Burkhart Wolff c991e693dc tested and enforced new author* and abstract* macros. 2020-11-04 02:52:55 +01:00
Achim D. Brucker 0b52e5872d Use author*. 2020-11-03 21:50:19 +00:00
Achim D. Brucker 1ad81aff35 Added support for explicit abstract* command. 2020-11-03 21:47:05 +00:00
Achim D. Brucker 1129a0ed3e Added support for explicit author* command. 2020-11-03 21:43:55 +00:00
Burkhart Wolff bad7dfc2ef new set of macros : author* and abstract* --- not working yet 2020-11-03 19:00:33 +01:00
Burkhart Wolff fe8f63690d macro-arrangement ... 2020-11-02 18:30:40 +01:00
Burkhart Wolff e59ac46299 removed SI --- went to AFP 2020-11-02 14:32:41 +01:00
Burkhart Wolff 4e26aa6204 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-11-02 14:15:17 +01:00
Burkhart Wolff 1f403a09f6 dfg 2020-11-02 14:14:52 +01:00
Burkhart Wolff aa1fed2440 sdf 2020-11-02 14:12:27 +01:00
Burkhart Wolff abd32a802d First Pass of Chap 4 - Added invariant syntax description, more semantic content 2020-10-26 12:27:33 +01:00
Burkhart Wolff f093b033f5 started pass on chap 4 in Refman. 2020-10-26 10:08:22 +01:00
Burkhart Wolff 3ba9454ac7 Slight improvements of the layout 2020-10-25 12:57:43 +01:00
Burkhart Wolff 3c6197e6ca FINISHED MY PASS ON THE PROGRAMMING MANUAL. 2020-10-25 12:02:44 +01:00
Burkhart Wolff 7999ee9a38 recvision till line 2000 (Term Parsing) 2020-10-21 13:49:01 +02:00
Burkhart Wolff 9b2c08183e recvision till line 2000 (Term Parsing) 2020-10-20 18:26:20 +02:00
Burkhart Wolff 9ad51e9d70 Actualized Para on Toplevel Management 2020-10-20 14:22:53 +02:00
Achim D. Brucker 538292b972 Fixed LaTeX compiliation error. 2020-10-06 04:45:30 +01:00
Achim D. Brucker a175871474 Improved definition of \ie and \eg. 2020-10-06 04:45:14 +01:00
Burkhart Wolff c554b12be2 minor embellishments 2020-09-29 10:15:12 +02:00
Burkhart Wolff 873eda8ee0 stiluebungen 2020-09-25 13:38:34 +02:00
Burkhart Wolff cdc1e0a7d8 stiluebungen < 1150 2020-09-23 13:57:32 +02:00
Burkhart Wolff 2cdf9f3124 stiluebungen < 1150 2020-09-23 13:23:20 +02:00
Burkhart Wolff bea648530b pushup. 2020-09-22 16:57:50 +02:00
Burkhart Wolff d655effcf8 pushup. 2020-09-22 16:47:05 +02:00
Burkhart Wolff 9956bbf062 pushup, stiluebungen. 2020-09-22 16:35:28 +02:00
Burkhart Wolff c1d6694b7c stiluebungen am PML 2020-09-22 14:50:57 +02:00
Burkhart Wolff ad6ba9e302 stiluebungen am PML 2020-09-21 21:24:08 +02:00
Burkhart Wolff 6f36efae7f stiluebungen am PML 2020-09-21 19:41:47 +02:00
Burkhart Wolff b9de7663b6 added some paras in Guided Tour, corrected figure config Bug, exercice de style in MyCommentedIsa 2020-09-19 12:49:37 +02:00
Burkhart Wolff 6c6644ae0c Updated MyCommentedIsabelle (a little; finished Guided Tour 2020-09-18 17:01:49 +02:00
Burkhart Wolff 5c22b80fb4 Nearly complete pass through chap 3 2020-09-16 14:24:39 +02:00
Achim D. Brucker 137262890e Improved 'verbatim' output (removed generated %-signs). 2020-09-15 07:28:32 +01:00
Burkhart Wolff 77e3490477 ... 2020-09-09 16:56:19 +02:00
Burkhart Wolff 41ac6006f8 rough pass through the guided tour. 2020-09-09 16:51:59 +02:00
Burkhart Wolff 2f95c56060 Version mit LaTeX Bizarrerie - verbatim _ 2020-09-09 14:54:09 +02:00
Burkhart Wolff 2d2f4320e0 intermediate status with LaTeX pblsm 2020-09-09 13:17:22 +02:00
Achim D. Brucker 58617e87e6 Conversion: \isadof -> \<^isadof>. 2020-09-08 13:45:09 +01:00
Achim D. Brucker 640929ea71 Removed listings-based Isar setup. 2020-09-08 07:41:09 +01:00
Achim D. Brucker 37a71a613e Ad hoc conversion: \inlineisar|...| -> @{boxed_theory_text ... }. 2020-09-08 07:30:14 +01:00
Achim D. Brucker 3dabf4fc82 Improvements: @{boxed_theory_text [display] ... }. 2020-09-08 06:51:36 +01:00
Achim D. Brucker 109802a76a Ad hoc conversion: \begin{isar}...\end{isar} -> @{boxed_theory_text [display] ... }. 2020-09-08 06:18:01 +01:00
Achim D. Brucker 6c2ad62df2 Cleanup. 2020-09-08 00:11:22 +01:00
Achim D. Brucker ee251a8000 Removed unused LaTeX definitions and style files. 2020-09-08 00:01:50 +01:00
Achim D. Brucker 3eef2291e5 Integrated DOF-scholarly_paper-thm.sty. 2020-09-07 23:57:15 +01:00
Achim D. Brucker 7956a3009a Initial commit: style for providing theorem-like default environments. 2020-09-07 23:56:43 +01:00
Achim D. Brucker 75719a933a Added 2020-iFM-CSP example based on scrartcl.cls. 2020-09-07 23:35:43 +01:00
Achim D. Brucker 6b4bd6fea4 Removed boxed isar. 2020-09-07 23:19:41 +01:00
Burkhart Wolff 685f020b22 more content in Guided Tour. 2020-09-07 23:17:36 +01:00
Burkhart Wolff 39efc61686 some inpuit on Guided Tour 2020-09-07 23:17:36 +01:00
Burkhart Wolff 2321945dc4 sdf 2020-09-07 23:17:36 +01:00
Burkhart Wolff fd532d985a activated the new markup wherever possible. Started to revise chap 3. 2020-08-28 17:41:16 +02:00
Burkhart Wolff bb68be990b added wrapper to achims listings environments. 2020-08-28 12:49:28 +02:00
Burkhart Wolff 094281cf89 added wrapper to achims listings environments. 2020-08-28 12:42:20 +02:00
Burkhart Wolff d206bf9f7c shifted new env up into COL. Declared in the Frontmatter. 2020-08-27 15:54:51 +02:00
Burkhart Wolff 38ba8cace0 brought experiments with generic sub-text-element-environments into shape 2020-08-27 14:08:49 +02:00
Burkhart Wolff fef4243e45 added define_macro2 2020-08-27 10:13:52 +02:00
Burkhart Wolff b3ff21e210 introducing and testing of macros bindex and index. 2020-08-26 17:08:45 +02:00
Burkhart Wolff 41a1eaed44 added define_macros, corrections in 02_Background 2020-08-26 14:38:39 +02:00
Burkhart Wolff 00c4d15259 first feedback on Yakoubs CC 2020-08-26 11:48:25 +02:00
Burkhart Wolff 1dd07880ea inbtroduced shortcut interface. 2020-08-26 09:56:25 +02:00
Burkhart Wolff 7a768cfdeb versatile 2020-08-26 08:43:39 +02:00
Burkhart Wolff 338bb7d4a4 Code cleanup. 2020-08-25 11:59:10 +02:00
Burkhart Wolff a792cc79d2 was lucky to solve a deep bug in standard antiquotation evaluation inside text* soon. 2020-08-25 11:11:38 +02:00
Burkhart Wolff f239b36b49 Reworked textually abstract, intro, background. Eliminate \emph 2020-08-25 09:17:36 +02:00
Burkhart Wolff 8002ec31bb cleanups after discussion 2020-08-24 14:36:22 +02:00
Burkhart Wolff ff63b441b0 more on aop 2020-08-24 13:18:25 +02:00
Burkhart Wolff dbce392e8b experiments with latex generation for aoo presentation. 2020-08-24 12:11:30 +02:00
Burkhart Wolff 7cb6577797 solved presentation bug (brown) and eliminated some code dups 2020-08-24 11:33:32 +02:00
Burkhart Wolff d088d19f38 renamings - no reference to Iso which is possibly different 2020-08-24 09:40:56 +02:00
Burkhart Wolff 9a8b0c7c55 adapting Yakoubs Version on CC into our structure. Using our Definition setup. 2020-08-24 09:01:54 +02:00
Burkhart Wolff f35d498ad8 added stubs for CC project 2020-08-20 12:53:39 +02:00
Burkhart Wolff 1470776428 slight correction of the template, and addition of SML template instance in DOF-technical_report. Does not work for test-case in 05_Implementation (Commented out) 2020-06-24 13:11:26 +02:00
Burkhart Wolff ef93285ec7 added a little useful template generation command 2020-06-23 14:02:04 +02:00
Burkhart Wolff f5622c2f59 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-06-23 11:22:41 +02:00
Burkhart Wolff af9e399f50 some experiments with OoOP and the code support presentations. 2020-06-23 11:22:33 +02:00
Achim D. Brucker 1c5bb85233 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2020-06-23 07:29:20 +01:00
Achim D. Brucker 44f40dbb75 Update to Isabelle 2020. 2020-06-23 06:57:18 +01:00
Achim D. Brucker 81ee0d9bbb Bug fix: support for UTF8 characters in author's names. 2020-06-23 06:56:35 +01:00
Burkhart Wolff 016a9e6454 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-06-22 17:42:48 +02:00
Burkhart Wolff 7e2224859e mmm 2020-06-22 17:42:40 +02:00
Burkhart Wolff 4717925eea Zwischenzustand OoO Generation 2020-06-16 09:08:36 +02:00
Burkhart Wolff d86c713e37 first running study of OoO - Presentation 2020-06-12 16:36:54 +02:00
Burkhart Wolff 0f9b6731af replaced structure with legecy code: Pure_Syn_Ext. 2020-06-12 15:00:49 +02:00
Burkhart Wolff d2d908534d Small corrections 2020-05-20 14:55:49 +02:00
Burkhart Wolff 3c6eda2cbb Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-05-19 17:32:31 +02:00
Burkhart Wolff 9b0c2cdcd8 added support for defn, lem, thm short-calls. 2020-05-19 17:32:25 +02:00
Simon Foster 1839afa883 Added proofs that quantities from a real normed vector space 2020-05-15 13:55:11 +01:00
Achim D. Brucker 640ba5db6d Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2020-05-03 14:59:01 +01:00
Achim D. Brucker 3de76c8023 Improved description of TeX requirements. 2020-05-03 14:58:43 +01:00
Burkhart Wolff fa931b45e2 re-localization of onto macros. Tested. 2020-04-23 18:30:46 +02:00
Burkhart Wolff 6f8cd88623 nitty gritties 2020-04-23 16:59:49 +02:00
Burkhart Wolff 8328626fa4 Restructuring library prep. 2020-04-23 16:08:05 +02:00
Burkhart Wolff 9496b535b7 restructuring Lib. Adaption LaTeX. Reorg COL. 2020-04-23 14:31:59 +02:00
Burkhart Wolff 2e0d88a3f7 restructuring of COL, scholarly_paper, etc. Facturong out Macros. 2020-04-22 15:31:47 +02:00
Achim D. Brucker c320b58dd3 Merge remote-tracking branch 'origin/Unreleased/Isabelle2020-RC4' 2020-04-21 08:37:59 +01:00
Achim D. Brucker 2adf50fe83 Merge branch 'Unreleased/Isabelle2020-RC4' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF into Unreleased/Isabelle2020-RC4 2020-04-21 08:29:41 +01:00
Achim D. Brucker aa74c32c7d Updated to the official Isabelle 2020 release and corresponding AFP version. 2020-04-20 18:54:22 +01:00
Achim D. Brucker 74ab956b11 Updated to the official Isabelle 2020 release and corresponding AFP version. 2020-04-20 18:51:04 +01:00
Burkhart Wolff 2e7513271b support along AMS style for mcc. 2020-04-14 14:48:16 +02:00
Burkhart Wolff 88d4b7674e support along AMS style for mcc. 2020-04-14 14:44:42 +02:00
Burkhart Wolff 6cf5708d93 added macro_def mechanism. Bug: Type qualification necessary 2020-04-12 21:11:54 +02:00
Achim D. Brucker fa25654db9 Merge branch 'master' into Unreleased/Isabelle2020-RC4 2020-04-10 20:26:34 +01:00
Burkhart Wolff e642243847 added macrodef - expand mechanism 2020-04-10 18:30:33 +02:00
Burkhart Wolff 0c4a5a5fea eliminating deprecated syntax 2020-04-09 23:58:58 +02:00
Burkhart Wolff e98e945b53 debugging. 2020-04-09 20:56:12 +02:00
Burkhart Wolff d82870d1a0 support for math_example into the Urschleim. 2020-04-09 18:12:14 +02:00
Burkhart Wolff f1b376d4b6 added support for math_content-class in scholarly_paper in Knuth's Urschleim. 2020-04-09 17:25:09 +02:00
Burkhart Wolff aa4e1acf84 Added invariants - and changes of invariant syntax.
Modified scholarly_paper onto wrt to future concepts
of referential semi_formal items (according to discussion
with Achim).
2020-04-08 23:29:15 +02:00
Achim D. Brucker 358be52b61 Updated Isabelle version. 2020-04-08 21:40:34 +01:00
Achim D. Brucker 968694f153 Port to Isabelle 2020 (tested with Isabelle 2020 RC4). 2020-04-08 16:26:00 +01:00
Achim D. Brucker f13e325f6a Port to Isabelle 2020 (tested with Isabelle 2020 RC4). 2020-04-08 13:19:32 +01:00
Achim D. Brucker 0c41ee46bb Port to Isabelle 2020 (tested with Isabelle 2020 RC4). 2020-04-08 13:12:17 +01:00
Achim D. Brucker 6ec427e716 Cleanup. 2020-04-08 10:51:27 +01:00
Simon Foster 4cba4bbdc8 Added some additional non-SI units 2020-03-20 16:50:01 +00:00
Simon Foster 4b605faa2d Improved proof support. Added some proofs of the astronomical constants. 2020-03-20 10:29:49 +00:00
Simon Foster 31c0dd56e8 Some renaming, cleaning, and addition of astronomical units 2020-03-18 16:02:09 +00:00
Simon Foster 25f2c76f1b Restructured the document into the ISQ and SI parts 2020-03-18 12:03:56 +00:00
Simon Foster 0c73aa1ce7 Commented on the relationship between units and quantities, and added several supporting definitions and types. 2020-03-13 16:10:51 +00:00
Simon Foster cf10043680 A few more revisions and explanations. 2020-03-13 14:54:46 +00:00
Simon Foster 1e31cbb8a1 Some fixes and improvements for proof support 2020-03-13 12:06:57 +00:00
Simon Foster 6feaeee050 More refactoring. The mechanisation is now split conveniently into a quantity and unit part. Most of the technical foundations
can be found in the former.
2020-03-13 11:21:43 +00:00
Simon Foster da74d4ecc4 Revision of the narrative in Dimensions and Quantities 2020-03-12 17:23:47 +00:00
Simon Foster 1ee0a1610f Refactoring to better distinguish quantities and units, which are now distinct entities. 2020-03-12 11:11:30 +00:00
Simon Foster 75e62c7356 Added definition of a base unit 2020-03-12 09:25:40 +00:00
Simon Foster 3fa136ec72 A few additional properties and proofs 2020-02-25 15:42:53 +00:00
Burkhart Wolff 3c90e19d11 added lemma into sty; fresh discussion with ADB on scholarly_paper onto. 2020-02-25 12:38:59 +01:00
Burkhart Wolff f505e6cb79 polishing. 2020-02-24 18:47:51 +01:00
Burkhart Wolff 493a6c5559 improved intro, improved global structure (TOC), normalized terminology. 2020-02-24 18:36:07 +01:00
Burkhart Wolff 17c64ea60b smoothening text 2020-02-24 13:10:21 +01:00
Burkhart Wolff db810d7d9a first version LaTeX infrastructure 2020-02-24 12:51:33 +01:00
Burkhart Wolff 54d641a1cc renamings for units, poslishing. SOme more documentation of key elements. 2020-02-23 19:46:49 +01:00
Burkhart Wolff edcfd988d3 renamings for dimensions-2 2020-02-23 19:11:11 +01:00
Burkhart Wolff ed439e3731 renamings for dimensions-2 2020-02-23 19:10:21 +01:00
Burkhart Wolff 3f4348825b renamings for dimensions 2020-02-23 19:06:32 +01:00
Burkhart Wolff 77d6c2212f first elements on SI 2020-02-23 18:36:59 +01:00
Burkhart Wolff 9035c46023 syntax and 1st level type-checking of invariants 2020-02-21 19:23:51 +01:00
Burkhart Wolff cc98979f43 more on class_id synonyms 2020-02-21 16:33:28 +01:00
Burkhart Wolff 15e605a1e7 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-02-21 15:40:13 +01:00
Burkhart Wolff 3faf3102ee First version with some places where type_synonyms were used to identify doc_classes 2020-02-21 15:39:50 +01:00
Simon Foster dd5f983d70 A few more prefixes 2020-02-20 20:09:45 +00:00
Simon Foster e1d4079c0f Renamed Unit to Dimension. Added several more definitions and results from the standard. 2020-02-20 19:58:43 +00:00
Burkhart Wolff 2599caed01 Deleting outdated experiments. 2020-02-20 17:15:29 +01:00
Burkhart Wolff 75b6baea53 minimal changes due to revisions 2020-02-20 17:12:38 +01:00
Burkhart Wolff 818b9c9b4c Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-02-20 13:30:56 +01:00
Burkhart Wolff 9df43f0085 various changes of the DOF-core interface: read_cid. Preparations for type_synonyms for cids. (unfinished). Updated scholarly_paper onto 2020-02-20 13:30:51 +01:00
Simon Foster c40088199c Some tidying of the proof strategy and derived properties 2020-02-20 09:54:45 +00:00
Burkhart Wolff 1de90a23b2 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-02-19 18:13:46 +01:00
Burkhart Wolff 5b0db2efb1 New Regrouping in the scholarly Onto + LaTeX support. Tested. 2020-02-19 18:13:33 +01:00
Simon Foster 240c10eb58 Factored out definitions, and added several additional units 2020-02-19 17:02:24 +00:00
Simon Foster 583637859a Cleaning up the proof procedure, and additional algebraic laws 2020-02-19 13:59:47 +00:00
Simon Foster b8e347b4c8 Removed the scalar product and associated class instantiations in favour of scaleQ 2020-02-18 20:31:05 +00:00
Simon Foster c104f1e2b2 Added the the scaleQ function that should allow removal of the scalar product operator 2020-02-18 20:25:45 +00:00
Simon Foster 2c63ef07e9 Added core physical constants of the 2019 SI standard, dimensionless units, and various proof facilities for support. 2020-02-18 17:46:53 +00:00
Burkhart Wolff 5c303a7192 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2020-02-17 23:08:03 +01:00
Burkhart Wolff c5b5f994ef added onto markup support for definitions and examples in scholarly_paper lncs style 2020-02-17 23:07:34 +01:00
Simon Foster 02eefef9d9 Revised the way that dimensions are encoded. Added some example physical constants. 2020-02-17 15:38:09 +00:00
Burkhart Wolff fe8a6c5c87 refinements of the technical class; added the document antiquotation doc_class; some experiments in SI. 2020-02-13 11:17:20 +01:00
Simon Foster 9199bc3109 Split out SI units into several files, and began adapting proof automation 2020-02-10 12:03:51 +00:00
Burkhart Wolff ec32ed0486 reasoning on SI equivalence 2020-02-10 11:38:23 +01:00
Burkhart Wolff 7899e4ee9a reasoning on SI equivalence 2020-02-10 10:12:46 +01:00
Burkhart Wolff 1172f0f30a Varous little changes, and attemps to improve example sections and proof support. 2020-02-05 14:00:59 +01:00
Achim D. Brucker 85af8bc3ed Bug fix for older e-tex versions requireing reserveinsert. 2020-01-14 17:46:56 +00:00
Achim D. Brucker 2f8b79e0f1 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2020-01-14 17:27:00 +00:00
Burkhart Wolff 80f7a73b88 added a publisher to avoid a warning 2020-01-14 18:16:31 +01:00
Achim D. Brucker 97db02c61d Bug fix: default ontology was always included, if if not needed or even conflicting. 2020-01-07 16:59:17 +00:00
Burkhart Wolff 727b53edb6 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2019-12-17 13:25:52 +01:00
Burkhart Wolff cb1ead378a added new sections in CommentedIsabelle concerning definitions and internal proofs 2019-12-17 13:25:43 +01:00
Simon Foster 726ff605d7 Integrated record version of SI units, and fixed a few problems arising. 2019-12-11 15:54:41 +00:00
Achim D. Brucker 1c07c13a31 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2019-12-11 15:53:31 +00:00
Achim D. Brucker 0ad18b9e5b \reserveinserts{} is only needed for older TeX installations and no longer supported on recent TeX versions. 2019-12-11 15:52:57 +00:00
Burkhart Wolff f7f1a0d10d hint to a dimension bug... 2019-12-10 10:46:06 +01:00
Burkhart Wolff 890eee8b24 first step to fusion SI 2019-12-09 14:50:34 +01:00
Burkhart Wolff 6135820127 Little improvements in examples and presentation. 2019-12-06 15:41:41 +01:00
Achim D. Brucker 1de920a19c Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2019-12-06 13:29:38 +00:00
Achim D. Brucker 5a97a2bb4b Mentioned Isabelle/DOF manual in the first paragraph (instead of only in the release notes). 2019-12-06 13:29:25 +00:00
Achim D. Brucker 6ca30df9ba Added IFM paper. 2019-12-06 13:25:00 +00:00
Burkhart Wolff aa0331ae13 refined shot reflecting discussion on tuesday afternoon 2019-11-19 18:48:26 +01:00
Burkhart Wolff 0d37763e02 refined shot reflecting discussion on tuesday afternoon 2019-11-19 18:25:02 +01:00
Burkhart Wolff ca20a55cfb added class invariant check_exercise_inv_1 2019-11-19 11:11:56 +01:00
Burkhart Wolff c0812396de implemented discussed onto-model for exams // except invariants 2019-11-18 20:55:43 +01:00
Burkhart Wolff c8d87af2e6 intermediate stage for onto after discussion this morning. 2019-11-15 11:33:29 +01:00
Burkhart Wolff b3540f8f45 Some elements 2019-11-15 05:15:32 +01:00
Burkhart Wolff 6a2a479699 intermediate stage for onto after discussion this morning. 2019-11-12 13:13:39 +01:00
Burkhart Wolff 33fd8a0f7b startpunkt 2019-11-12 10:27:34 +01:00
Burkhart Wolff a1941b2f15 startpunkt 2019-11-12 10:10:25 +01:00
Burkhart Wolff cc787cb9f1 Added Fred's example on modifying the proof context for parsing. 2019-10-01 17:57:26 +02:00
Achim D. Brucker b863a0178f Define new TOCs only when used together with the KOMA-Script classes. 2019-09-21 15:21:34 +01:00
Achim D. Brucker 750a176cd1 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2019-08-19 09:49:08 +01:00
Achim D. Brucker 32e9c3f71c Added version independent DOI. 2019-08-19 09:48:45 +01:00
Burkhart Wolff a4aade4ffa merge with better conclusion of commented isa 2019-08-19 10:14:07 +02:00
Achim D. Brucker 4db68c45db Added DOIs for listed publications. 2019-08-18 21:39:43 +01:00
Achim D. Brucker 718d759bd6 Re-set version to UNRELEASED. 2019-08-18 21:15:51 +01:00
Achim D. Brucker d0b183af79 Improved docker run command. 2019-08-18 18:02:54 +01:00
Achim D. Brucker 8836c7b02f Improved docker run command. 2019-08-18 17:50:57 +01:00
Achim D. Brucker d4485d764d Fix registration of Isabelle/DOF. 2019-08-18 15:11:41 +01:00
Achim D. Brucker 4a208f2a73 Fixed manual generation. 2019-08-18 14:56:17 +01:00
Achim D. Brucker 8c6d4ca18b Addes support for DOIs. 2019-08-18 14:55:56 +01:00
Achim D. Brucker b191029743 Added zenodo DOI. 2019-08-18 14:34:19 +01:00
Achim D. Brucker c698a7a811 Added information on how to run Isabelle/DOF using Docker and added setup for documenting latest release. 2019-08-18 14:05:00 +01:00
Achim D. Brucker 1d2f7a808f Cleanup. 2019-08-18 13:57:51 +01:00
Achim D. Brucker 9117bed209 Updated config for release 1.0.0/Isabelle2019. 2019-08-18 10:39:42 +01:00
Achim D. Brucker 1eff5c7550 Updated Changelog for release 1.0.0/Isabelle2019. 2019-08-18 10:39:24 +01:00
Achim D. Brucker 1a87a4dcea Install PDF manual as well. 2019-08-18 10:38:52 +01:00
Achim D. Brucker 79317c3f9b Bug fix: registration of Isabelle/DOF in user ROOTS file. 2019-08-17 23:31:51 +01:00
Achim D. Brucker 68a5bbfc82 Fixed typo. 2019-08-17 23:27:04 +01:00
Achim D. Brucker 45c7d4b291 Fixed signing message. 2019-08-17 22:08:45 +01:00
Achim D. Brucker 39919ad3e1 Fixed typo. 2019-08-17 16:43:40 +01:00
Achim D. Brucker c806cbb2a0 Added LNCS volume for SEFM paper. 2019-08-17 16:40:22 +01:00
Achim D. Brucker d6d9e1bb5c New command "reflect_ML_exports" for loading ML exported code into Isabelle's ML environment using the Isabelle's virtual file system. 2019-08-17 16:31:27 +01:00
Achim D. Brucker 8c41589310 Fixed markdown. 2019-08-17 10:53:04 +01:00
Achim D. Brucker a30bf33d99 Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2019-08-17 10:51:21 +01:00
Achim D. Brucker ad0a3b293d Removed outdated and unused file. 2019-08-17 10:50:43 +01:00
Burkhart Wolff bb5d190143 added build and tests in the README. 2019-08-17 11:39:42 +02:00
Achim D. Brucker fdd9509eac Remove and ignore autogenerated file. 2019-08-17 10:23:41 +01:00
Burkhart Wolff 242664e6fd Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2019-08-17 11:19:30 +02:00
Burkhart Wolff f7d7dd6d23 changed awkward sentences. 2019-08-17 11:19:12 +02:00
Achim D. Brucker 982bd0c5fb Updated refernce to SEFM paper. 2019-08-17 10:15:04 +01:00
Achim D. Brucker 1330308091 Bug fix: ensure creation of doc directory before creating CONTENTS. 2019-08-17 10:14:28 +01:00
Burkhart Wolff e6c6592143 Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2019-08-17 11:07:22 +02:00
Burkhart Wolff dc15a31db6 removed awkward sentence. 2019-08-17 11:07:08 +02:00
Achim D. Brucker 679408cfed Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2019-08-17 10:02:36 +01:00
Achim D. Brucker 4692201cb0 Normalized BibTeX keys. 2019-08-17 10:02:13 +01:00
Burkhart Wolff 7474fc231d Merge branch 'master' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF 2019-08-17 10:48:34 +02:00
Burkhart Wolff b707eff08d bug in article class. 2019-08-17 10:48:15 +02:00
Achim D. Brucker c92376871c Fixes spacing. 2019-08-17 09:46:17 +01:00
Achim D. Brucker c34b13ba2f Reverted 7aefbde58b. 2019-08-17 09:40:25 +01:00
Achim D. Brucker a78b1a4bfc Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2019-08-17 09:38:52 +01:00
Burkhart Wolff f649f08c5e adding LNCS number. 2019-08-17 10:37:07 +02:00
Burkhart Wolff 3f4fb48602 clarifying some sentences in intro. 2019-08-17 10:32:56 +02:00
Burkhart Wolff 7aefbde58b typos, and a more general abstract. 2019-08-17 10:23:16 +02:00
Achim D. Brucker 3aaa460bbc Install CICM paper example and generate CONTENTS file. 2019-08-16 19:49:15 +01:00
Achim D. Brucker dfa0e543b6 Register doc directory. 2019-08-16 19:13:04 +01:00
Achim D. Brucker 032a9e9278 Added organization name to image name. 2019-08-15 20:37:40 +01:00
Achim D. Brucker 48884ea2a8 Renamed repository to lh-docker-isabelle. 2019-08-15 20:27:42 +01:00
Achim D. Brucker 5cc14c697f Bug fix: naming of archive and git tag. 2019-08-15 17:10:16 +01:00
Achim D. Brucker 294a3c1769 Use config from checkout. 2019-08-15 16:55:40 +01:00
Achim D. Brucker 71ec7994cd During install, infer DATE from git commit and also add commit id. 2019-08-15 16:55:12 +01:00
Achim D. Brucker ecc7cec514 Documented default for $TAG. 2019-08-15 15:55:20 +01:00
Achim D. Brucker ff0a40b62a Bug fix: checkout $TAG. 2019-08-15 15:53:42 +01:00
Achim D. Brucker 6b1864e677 Updated help text. 2019-08-15 15:52:47 +01:00
Achim D. Brucker 60ebbbe12c Updated license information. 2019-08-15 15:09:55 +01:00
Achim D. Brucker 6cd8cb098b Updated license information. 2019-08-15 14:52:15 +01:00
Achim D. Brucker 22529362a1 Update version information during installation. 2019-08-15 14:37:04 +01:00
Achim D. Brucker 1f6149b0c0 Removed outdated stuff that never should have been comitted in the first place. 2019-08-15 13:46:20 +01:00
Achim D. Brucker 59c6a1304b Removed outdated stuff that never should have been comitted in the first place. 2019-08-15 13:45:56 +01:00
Achim D. Brucker 618997f34c Merge branch 'master' of git.logicalhacking.com:Isabelle_DOF/Isabelle_DOF 2019-08-15 13:44:32 +01:00
Achim D. Brucker 23f68ce6c8 Improved layout. 2019-08-15 13:40:03 +01:00
Achim D. Brucker 8eb233e6eb Improved layout. 2019-08-15 13:31:16 +01:00
Burkhart Wolff 4d5fce3f1e older files. Flesh out useful stuff and eliminate the rest if necessary 2019-08-15 13:57:43 +02:00
Burkhart Wolff 1da0433451 improved layout 2019-08-15 11:44:29 +02:00
Burkhart Wolff 6414e1e568 improved layout 2019-08-15 11:40:47 +02:00
Burkhart Wolff ed1143cae3 resolved conflict[D 2019-08-15 11:32:29 +02:00
Burkhart Wolff 6e44230efb Updated COL section ... 2019-08-15 11:30:42 +02:00
141 changed files with 25271 additions and 8877 deletions

27
.ci/Jenkinsfile vendored
View File

@ -1,27 +0,0 @@
pipeline {
agent any
stages {
stage('Build Docker') {
steps {
sh 'cp src/patches/thy_output.ML .ci/isabelle4isadof/'
sh 'docker build -t logicalhacking:isabelle4dof .ci/isabelle4isadof'
sh 'rm -f .ci/isabelle4isadof/thy_output.ML'
}
}
stage('Check Docker') {
when { changeset "src/patches/*" }
steps {
sh 'cp src/patches/thy_output.ML .ci/isabelle4isadof/'
sh 'docker build --no-cache -t logicalhacking:isabelle4dof .ci/isabelle4isadof'
sh 'rm -f .ci/isabelle4isadof/thy_output.ML'
}
}
stage('Build Isabelle/DOF') {
steps {
sh 'find -type d -name "output" -exec rm -rf {} \\; || true'
sh 'docker run -v $PWD:/DOF logicalhacking:isabelle4dof sh -c "cd /DOF && ./install && isabelle build -D ."'
}
}
}
}

View File

@ -1,32 +0,0 @@
# Copyright (c) 2019 Achim D. Brucker
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
FROM logicalhacking:isabelle2019
WORKDIR /home/isabelle
COPY thy_output.ML /home/isabelle/Isabelle/src/Pure/Thy
RUN Isabelle/bin/isabelle build -b Functional-Automata

View File

@ -1,177 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2019The University of Exeter.
# 2019 The University of Paris-Saclay.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
#set -e
shopt -s nocasematch
print_help()
{
echo "Usage: mk_release [OPTION] "
echo ""
echo " A tool for building $ISADOF_TAR.tar.xz"
echo ""
echo "Run ..."
echo ""
echo " --help, -h display this help message"
echo " --sign -s sign release archive"
echo " (default: $SIGN)"
echo " --isabelle, -i isabelle isabelle command used for installation"
echo " (default: $ISABELLE)"
echo " --tag -t tag use tag for release archive"
echo " --p --publish publish generated artefact"
echo " (use master: $PUBLISH)"
}
read_config() {
if [ ! -f .config ]; then
echo "Error: .config not found (not started in the main directory?)!"
exit 1
else
source .config
fi
}
check_isabelle_version() {
ACTUAL_ISABELLE_VERSION=`$ISABELLE version`
echo "* Checking Isabelle version:"
if [ "$ISABELLE_VERSION" != "$ACTUAL_ISABELLE_VERSION" ]; then
echo "* Expecting $ISABELLE_VERSION, found $ACTUAL_ISABELLE_VERSION: ERROR"
exit 1
else
echo "* Expecting $ISABELLE_VERSION, found $ACTUAL_ISABELLE_VERSION: success"
fi
}
clone_repo()
{
echo "* Cloning into $ISADOF_DIR"
git clone . $ISADOF_DIR
if [ "$USE_TAG" = "true" ]; then
echo " * Switching to tag $DOF_VERSION/$ISABELLE_SHORT_VERSION"
(cd $ISADOF_DIR && git checkout $DOF_VERSION/$ISABELLE_SHORT_VERSION)
else
echo " * Not tag specified, using master branch"
fi
}
build_and_install_manual()
{
echo "* Building manual"
ROOTS=$ISABELLE_HOME_USER/ROOTS
if [ -f $ROOTS ]; then
mv $ROOTS $ROOTS.backup
fi
(cd $ISADOF_DIR && ./install)
(cd $ISADOF_DIR && $ISABELLE build -c Isabelle_DOF-Manual)
mkdir -p $ISADOF_DIR/doc
cp $ISADOF_DIR/examples/technical_report/Isabelle_DOF-Manual/output/document.pdf \
$ISADOF_DIR/doc/Isabelle_DOF-Manual.pdf
find $ISADOF_DIR -type d -name "output" -exec rm -rf {} \; || true
rm -rf $ISADOF_DIR/.git* $ISADOF_DIR/.ci $ISADOF_DIR/.afp
if [ -f $ROOTS.backup ]; then
mv $ROOTS.backup $ROOTS
fi
}
create_archive()
{
echo "* Creating archive"
(cd $BUILD_DIR && tar cf $ISADOF_TAR.tar $ISADOF_TAR && xz $ISADOF_DIR.tar)
mv $BUILD_DIR/$ISADOF_TAR.tar.xz .
rm -rf $BUILD_DIR
}
sign_archive()
{
echo "* Publish archive not yet implemented"
gpg --armor --output $ISADOF_TAR.tar.xz.asc --detach-sig $ISADOF_TAR.tar.xz
}
publish_archive()
{
echo "* Publish archive"
ssh 0x5f.org mkdir -p www/$DOF_ARTIFACT_HOST/htdocs/$DOF_ARTIFACT_DIR
scp $ISADOF_TAR.tar.xz* 0x5f.org:www/$DOF_ARTIFACT_HOST/htdocs/$DOF_ARTIFACT_DIR/
ssh 0x5f.org chmod go+u-w -R www/$DOF_ARTIFACT_HOST/htdocs/$DOF_ARTIFACT_DIR
}
read_config
ISABELLE=`which isabelle`
USE_TAG="false"
SIGN="false"
PUBLISH="false"
ISABELLE_SHORT_VERSION=`echo $ISABELLE_VERSION | sed -e 's/:.*$//'`
TAG="$DOF_VERSION/$ISABELLE_SHORT_VERSION"
BUILD_DIR=`mktemp -d`
ISADOF_TAR="Isabelle_DOF-"$DOF_VERSION"_"$ISABELLE_SHORT_VERSION
ISADOF_DIR="$BUILD_DIR/$ISADOF_TAR"
while [ $# -gt 0 ]
do
case "$1" in
--isabelle|-i)
ISABELLE="$2";
shift;;
--tag|-t)
TAG="$2";
USE_TAG="true"
shift;;
--sign|-s)
SIGN="true";;
--publish|-p)
PUBLISH="true";;
--help|-h)
print_help
exit 0;;
*) print_help
exit 1;;
esac
shift
done
check_isabelle_version
VARS=`$ISABELLE getenv ISABELLE_HOME_USER`
for i in $VARS; do
export "$i"
done
clone_repo
build_and_install_manual
create_archive
if [ "$SIGN" = "true" ]; then
sign_archive
fi
if [ "$PUBLISH" = "true" ]; then
publish_archive
fi
exit 0

View File

@ -1,8 +0,0 @@
DOF_VERSION="Unreleased"
ISABELLE_VERSION="Isabelle2019: June 2019"
ISABELLE_URL="https://isabelle.in.tum.de/website-Isabelle2019/"
DOF_URL="https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF"
DOF_ARTIFACT_DIR="releases/Isabelle_DOF/Isabelle_DOF"
DOF_ARTIFACT_HOST="artifacts.logicalhacking.com"
AFP_DATE="afp-2019-06-17"
AFP_URL="https://www.isa-afp.org/release/"$AFP_DATE".tar.gz"

5
.gitattributes vendored
View File

@ -1,3 +1,2 @@
install -crlf
document-generator/Tools/DOF_mkroot -crlf
document-generator/document-template/build -crlf
core.autocrlf false
core.eol lf

2
.gitignore vendored Normal file → Executable file
View File

@ -1,4 +1,4 @@
output
*.template.sty
.afp
*~
*#

18
.woodpecker/README.md Normal file
View File

@ -0,0 +1,18 @@
# Continuous Build and Release Setup
[![status-badge](https://ci.logicalhacking.com/api/badges/Isabelle_DOF/Isabelle_DOF/status.svg)](https://ci.logicalhacking.com/Isabelle_DOF/Isabelle_DOF)
This directory contains the CI configuration for the [Woodpecker CI](https://woodpecker-ci.org/).
It may also contain additional tools and script that are useful for preparing a release.
## Generated Artifacts
### Latest Build
* lualatex
* [browser_info](https://artifacts.logicalhacking.com/ci/Isabelle_DOF/Isabelle_DOF/main/latest/lualatex/browser_info/Unsorted/)
* [aux files](https://artifacts.logicalhacking.com/ci/Isabelle_DOF/Isabelle_DOF/main/latest/lualatex/)
* pdflatex
* [browser_info](https://artifacts.logicalhacking.com/ci/Isabelle_DOF/Isabelle_DOF/main/latest/pdflatex/browser_info/Unsorted/)
* [aux files](https://artifacts.logicalhacking.com/ci/Isabelle_DOF/Isabelle_DOF/main/latest/pdflatex/)
* [Isabelle_DOF-Unreleased_Isabelle2022.tar.xz](https://artifacts.logicalhacking.com/ci/Isabelle_DOF/Isabelle_DOF/main/latest/Isabelle_DOF-Unreleased_Isabelle2022.tar.xz)

55
.woodpecker/build.yml Normal file
View File

@ -0,0 +1,55 @@
pipeline:
build:
image: docker.io/logicalhacking/isabelle2022
commands:
- export ARTIFACT_DIR=$CI_WORKSPACE/.artifacts/$CI_REPO/$CI_BRANCH/$CI_BUILD_NUMBER/$LATEX
- mkdir -p $ARTIFACT_DIR
- export `isabelle getenv ISABELLE_HOME_USER`
- mkdir -p $ISABELLE_HOME_USER/etc
- echo "ISABELLE_PDFLATEX=\"$LATEX --file-line-error\"" >> $ISABELLE_HOME_USER/etc/settings
- isabelle build -D . -o browser_info
- isabelle components -u .
- isabelle build -D . -o browser_info
- isabelle dof_mkroot -q DOF_test
- isabelle build -D DOF_test
- cp -r $ISABELLE_HOME_USER/browser_info $ARTIFACT_DIR
- cd $ARTIFACT_DIR
- cd ../..
- ln -s * latest
archive:
image: docker.io/logicalhacking/isabelle2022
commands:
- export ARTIFACT_DIR=$CI_WORKSPACE/.artifacts/$CI_REPO/$CI_BRANCH/$CI_BUILD_NUMBER/$LATEX
- mkdir -p $ARTIFACT_DIR
- export ISABELLE_VERSION=`isabelle version`
- ./.woodpecker/mk_release -d
- cp Isabelle_DOF-Unreleased_$ISABELLE_VERSION.tar.xz $ARTIFACT_DIR/../
when:
matrix:
LATEX: lualatex
deploy:
image: docker.io/drillster/drone-rsync
settings:
hosts: [ "ci.logicalhacking.com"]
port: 22
source: .artifacts/$CI_REPO_OWNER/*
target: $CI_REPO_OWNER
include: [ "**.*"]
key:
from_secret: artifacts_ssh
user: artifacts
notify:
image: drillster/drone-email
settings:
host: smtp.0x5f.org
username: woodpecker
password:
from_secret: email
from: ci@logicalhacking.com
when:
status: [ failure ]
matrix:
LATEX:
- lualatex
- pdflatex

224
.woodpecker/mk_release Executable file
View File

@ -0,0 +1,224 @@
#!/usr/bin/env bash
# Copyright (c) 2019-2022 University of Exeter.
# 2019 University of Paris-Saclay.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
set -e
shopt -s nocasematch
print_help()
{
echo "Usage: mk_release [OPTION] "
echo ""
echo " A tool for building an Isabelle/DOF release archive."
echo ""
echo "Run ..."
echo ""
echo " --help, -h display this help message"
echo " --sign, -s sign release archive"
echo " (default: $SIGN)"
echo " --isabelle, -i isabelle isabelle command used for installation"
echo " (default: $ISABELLE)"
echo " --tag tag, -t tag use tag for release archive"
echo " (default: use master branch)"
echo " --publish, -p publish generated artefact"
echo " (default: $PUBLISH)"
echo " --quick-and-dirty, -d only build required artifacts, no complete test"
echo " (default: $DIRTY)"
}
check_isabelle_version() {
ACTUAL_ISABELLE_VERSION=`$ISABELLE version`
echo "* Checking Isabelle version:"
if [ "$ISABELLE_VERSION" != "$ACTUAL_ISABELLE_VERSION" ]; then
echo "* Expecting $ISABELLE_VERSION, found $ACTUAL_ISABELLE_VERSION: ERROR"
exit 1
else
echo "* Expecting $ISABELLE_VERSION, found $ACTUAL_ISABELLE_VERSION: success"
fi
}
clone_repo()
{
echo "* Cloning into $ISADOF_WORK_DIR"
git clone . $ISADOF_WORK_DIR
if [ "$USE_TAG" = "true" ]; then
echo " * Switching to tag $TAG"
(cd $ISADOF_WORK_DIR && git checkout $TAG)
else
echo " * No tag specified, using master branch"
fi
(cd $ISADOF_WORK_DIR && git show -s --format="COMMIT=%H%nDATE=%cd" --date=short | sed -e 's|-|/|g') >> $ISADOF_WORK_DIR/etc/settings
}
build_and_install_manuals()
{
echo "* Building manual"
if [ "$DIRTY" = "true" ]; then
if [ -z ${ARTIFACT_DIR+x} ]; then
echo " * Quick and Dirty Mode (local build)"
$ISABELLE build -d . Isabelle_DOF-Manual 2018-cicm-isabelle_dof-applications
mkdir -p $ISADOF_WORK_DIR/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/output/
cp examples/scholarly_paper/2018-cicm-isabelle_dof-applications/output/document.pdf \
$ISADOF_WORK_DIR/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/output/
mkdir -p $ISADOF_WORK_DIR/examples/technical_report/Isabelle_DOF-Manual/output/
cp examples/technical_report/Isabelle_DOF-Manual/output/document.pdf \
$ISADOF_WORK_DIR/examples/technical_report/Isabelle_DOF-Manual/output/;
else
echo " * Quick and Dirty Mode (running on CI)"
mkdir -p $ISADOF_WORK_DIR/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/output/
cp $ARTIFACT_DIR/browser_info/Unsorted/2018-cicm-isabelle_dof-applications/document.pdf \
$ISADOF_WORK_DIR/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/output/
mkdir -p $ISADOF_WORK_DIR/examples/technical_report/Isabelle_DOF-Manual/output/
cp $ARTIFACT_DIR/browser_info/Unsorted/Isabelle_DOF-Manual/document.pdf \
$ISADOF_WORK_DIR/examples/technical_report/Isabelle_DOF-Manual/output/;
fi
else
(cd $ISADOF_WORK_DIR && $ISABELLE env ./install-afp)
(cd $ISADOF_WORK_DIR && $ISABELLE build -c -D . )
fi
mkdir -p $ISADOF_WORK_DIR/doc
echo "Isabelle/DOF Manuals!" > $ISADOF_WORK_DIR/doc/Contents
cp $ISADOF_WORK_DIR/examples/technical_report/Isabelle_DOF-Manual/output/document.pdf \
$ISADOF_WORK_DIR/doc/Isabelle_DOF-Manual.pdf
echo " Isabelle_DOF-Manual User and Implementation Manual for Isabelle/DOF" >> $ISADOF_WORK_DIR/doc/Contents
cp $ISADOF_WORK_DIR/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/output/document.pdf \
$ISADOF_WORK_DIR/doc/2018-cicm-isabelle_dof-applications.pdf
echo " 2018-cicm-isabelle_dof-applications Example academic paper" >> $ISADOF_WORK_DIR/doc/Contents
find $ISADOF_WORK_DIR -type d -name "output" -exec rm -rf {} \; &> /dev/null || true
rm -rf $ISADOF_WORK_DIR/.git* $ISADOF_WORK_DIR/.woodpecker $ISADOF_WORK_DIR/.afp
}
create_archive()
{
echo "* Creating archive"
cp $ISADOF_WORK_DIR/doc/Isabelle_DOF-Manual.pdf $ISADOF_TAR.pdf
(mv $ISADOF_WORK_DIR $ISADOF_DIR)
(cd $BUILD_DIR && tar cf $ISADOF_TAR.tar $ISADOF_TAR && xz $ISADOF_DIR.tar)
mv $BUILD_DIR/$ISADOF_TAR.tar.xz .
}
sign_archive()
{
echo "* Signing archive"
gpg --armor --output $ISADOF_TAR.tar.xz.asc --detach-sig $ISADOF_TAR.tar.xz
}
publish_archive()
{
echo "* Publish archive"
ssh 0x5f.org mkdir -p www/$DOF_ARTIFACT_HOST/htdocs/$DOF_ARTIFACT_DIR
scp $ISADOF_TAR.* 0x5f.org:www/$DOF_ARTIFACT_HOST/htdocs/$DOF_ARTIFACT_DIR/
ssh 0x5f.org chmod go+u-w -R www/$DOF_ARTIFACT_HOST/htdocs/$DOF_ARTIFACT_DIR
}
ISABELLE=`which isabelle`
USE_TAG="false"
SIGN="false"
PUBLISH="false"
DIRTY="false"
BUILD_DIR=`mktemp -d`
ISADOF_WORK_DIR="$BUILD_DIR/Isabelle_DOF"
while [ $# -gt 0 ]
do
case "$1" in
--isabelle|-i)
ISABELLE="$2";
shift;;
--tag|-t)
TAG="$2";
USE_TAG="true"
shift;;
--sign|-s)
SIGN="true";;
--publish|-p)
PUBLISH="true";;
--quick-and-dirty|-d)
DIRTY="true";;
--help|-h)
print_help
exit 0;;
*) print_help
exit 1;;
esac
shift
done
clone_repo
ISADOF_MAIN_DIR=`pwd`
if [ "$DIRTY" = "true" ]; then
echo "Running in Quick and Dirty mode!"
$ISABELLE components -u $ISADOF_MAIN_DIR
else
$ISABELLE components -x $ISADOF_MAIN_DIR
$ISABELLE components -u $ISADOF_WORK_DIR
fi
VARS=`$ISABELLE getenv ISABELLE_TOOL`
for i in $VARS; do
export "$i"
done
ISABELLE_VERSION="Isabelle$($ISABELLE_TOOL dof_param -b isabelle_version)"
DOF_VERSION="$($ISABELLE_TOOL dof_param -b dof_version)"
ISABELLE_SHORT_VERSION=`echo $ISABELLE_VERSION | sed -e 's/:.*$//'`
ISADOF_TAR="Isabelle_DOF-"$DOF_VERSION"_"$ISABELLE_SHORT_VERSION
ISADOF_DIR="$BUILD_DIR/$ISADOF_TAR"
check_isabelle_version
build_and_install_manuals
if [ "$DIRTY" != "true" ]; then
$ISABELLE components -x $ISADOF_WORK_DIR
$ISABELLE components -u $ISADOF_MAIN_DIR
fi
create_archive
if [ "$SIGN" = "true" ]; then
sign_archive
fi
if [ "$PUBLISH" = "true" ]; then
publish_archive
fi
rm -rf $BUILD_DIR
exit 0

View File

@ -7,3 +7,45 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Added
### Changed
- Updated Isabelle version to Isabelle 2022
## [1.3.0] - 2022-07-08
### Changed
- The project-specific configuration is not part of the `ROOT` file, the formerly
used `isadof.cfg` is obsolete and no longer supported.
- Removed explicit use of `document/build` script. Requires removing the `build` script
entry from ROOT files.
- Isabelle/DOF is now a proper Isabelle component that should be installed using the
`isabelle components` command. The installation script is now only a convenient way
of installing the required AFP entries.
- `mkroot_DOF` has been renamed to `dof_mkroot` (and reimplemented in Scala).
## [1.2.0] - 2022-03-26
## [1.1.0] - 2021-03-20
### Added
- New antiquotations, consistency checks
### Changed
- Updated manual
- Restructured setup for ontologies (Isabelle theories and LaTeX styles)
## 1.0.0 - 2018-08-18
### Added
- First public release
[Unreleased]: https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF/compare/v1.3.0/Isabelle2021...HEAD
[1.3.0]: https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF/compare/v1.2.0/Isabelle2021...v1.3.0/Isabelle2021-1
[1.2.0]: https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF/compare/v1.1.0/Isabelle2021...v1.2.0/Isabelle2021
[1.1.0]: https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF/compare/v1.0.0/Isabelle2019...v1.1.0/Isabelle2021

View File

@ -1,5 +1,4 @@
To cite Isabelle/DOF in publications, please use
Achim D. Brucker, Idir Ait-Sadoune, Paolo Crisafulli, and Burkhart
Wolff. Using The Isabelle Ontology Framework: Linking the Formal

View File

@ -1,6 +1,6 @@
Copyright (C) 2018-2019 The University of Sheffield
2019-2019 The University of Exeter
2018-2019 The University of Paris-Saclay
2019-2022 The University of Exeter
2018-2022 The University of Paris-Saclay
All rights reserved.
Redistribution and use in source and binary forms, with or without

175
README.md
View File

@ -1,67 +1,67 @@
# [Isabelle/DOF](https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF): Document Preparation Setup
Isabelle/DOF is a novel Document Ontology Framework on top of Isabelle.
Isabelle/DOF allows for both conventional typesetting as well as formal
development.
Isabelle/DOF allows for both conventional typesetting and formal development.
The manual for [Isabelle/DOF 1.3.0/Isabelle2021-1 is available
online.](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.3.0_Isabelle2021-1.pdf)
## Pre-requisites
Isabelle/DOF has two major pre-requisites:
* **Isabelle:** Isabelle/DOF requires [Isabelle 2019](http://isabelle.in.tum.de/website-Isabelle2019/).
Please download the Isabelle 2019 distribution for your operating
system from the [Isabelle website](http://isabelle.in.tum.de/website-Isabelle2019/).
* **LaTeX:** Isabelle/DOF requires a modern pdfTeX-engine supporting the \expanded{}-primitive. This
is, for example, included in the [TeXLive 2019](https://www.tug.org/texlive/) (or later)
distribution. Please follow the [TeXLive installation instructions](https://www.tug.org/texlive/acquire-netinstall.html)
for installing TeXLive.
Isabelle/DOF has three major prerequisites:
* **Isabelle:** Isabelle/DOF requires [Isabelle
2022](https://isabelle.in.tum.de/website-Isabelle2022/). Please download the
Isabelle 2022 distribution for your operating system from the [Isabelle
website](https://isabelle.in.tum.de/website-Isabelle2022/).
* **AFP:** Isabelle/DOF requires several entries from the [Archive of Formal Proofs
(AFP)](https://www.isa-afp.org/). Please install the AFP following the
instructions given at <https://www.isa-afp.org/using.html>.
* **LaTeX:** Isabelle/DOF requires a modern LaTeX installation, i.e., at least
[TeX Live 2022](https://www.tug.org/texlive/) with all available updates
applied.
## Installation
In most case, the DOF-plugin can be installed as follows:
Isabelle/DOF is provided as an Isabelle component. After installing the
prerequisites, change into the directory containing Isabelle/DOF (this should be
the directory containing this `README.md` file) and execute (if you executed
this command already during the installation of the prerequisites, you can skip
it now):
```console
foo@bar:~$ ./install
foo@bar:~$ isabelle components -u .
```
If a specific Isabelle version should be used (i.e., not the default
one), the full path to the ``isabelle`` command needs to be passed as
using the ``--isabelle`` command line argument of the ``install`` script:
The final step for the installation is:
```console
foo@bar:~$ ./install --isabelle /usr/local/Isabelle2019/bin/isabelle
foo@bar:~$ isabelle build -D .
```
For further command line options of the installer, please use the
built-in help:
```console
foo@bar:~$ ./install --help
```
This will compile Isabelle/DOF and run the example suite.
## Usage
### Opening an Example
If you want to work with or extend one of the examples, e.g., you can
open it similar to any standard Isabelle theory:
If you want to work with or extend one of the examples, e.g., you can open it
similar to any standard Isabelle theory:
```console
isabelle jedit -d . -l Isabelle_DOF examples/scholarly_paper/2018_cicm/IsaDofApplications.thy
```
This will open an example of a scientific paper using the pre-compiled
session ``Isabelle_DOF``, i.e., you will not be able to edit the
ontology definitions. If you want to edit the ontology definition,
just open the theory file with the default HOL session:
This will open an example of a scientific paper using the pre-compiled session
``Isabelle_DOF``, i.e., you will not be able to edit the ontology definitions.
If you want to edit the ontology definition, just open the theory file with the
default HOL session:
```console
isabelle jedit -d . -l HOL examples/scholarly_paper/2018_cicm/IsaDofApplications.thy
```
While this gives you more flexibility, it might "clutter" your editing
experience, as a lot of internal theories are loaded into Isabelle's
editor.
experience, as a lot of internal theories are loaded into Isabelle's editor.
### Creating a New Project
@ -69,50 +69,72 @@ The DOF-plugin provides an alternative to Isabelle's ``mkroot`` command.
Isabelle projects that use DOF need to be created using
```console
foo@bar:~$ isabelle mkroot_DOF
foo@bar:~$ isabelle dof_mkroot
```
The ``mkroot_DOF`` command takes the same parameter as the standard
``mkroot`` command of Isabelle. Thereafter, the normal Isabelle
command for building documents can be used.
The ``dof_mkroot`` command takes the same parameter as the standard ``mkroot``
command of Isabelle. Thereafter, the normal Isabelle command for building
documents can be used.
Using the ``-o`` option, different ontology setups can be
selected and using the ``-t`` option, different LaTeX setups
can be selected. For example,
Using the ``-o`` option, different ontology setups can be selected and using the
``-t`` option, different LaTeX setups can be selected. For example,
```console
foo@bar:~$ isabelle mkroot_DOF -o scholarly_paper -t scrartcl
foo@bar:~$ isabelle dof_mkroot -o scholarly_paper -t scrartcl
```
creates a setup using the scholarly_paper ontology and the article
class from the KOMA-Script bundle.
creates a setup using the scholarly_paper ontology and the article class from
the KOMA-Script bundle.
The help (option ``-h``) show a list of all supported ontologies and
document templates:
The help (option ``-h``) show a list of all supported ontologies and document
templates:
```console
foo@bar:~$ isabelle mkroot_DOF -h
foo@bar:~$ isabelle dof_mkroot -h
Usage: isabelle mkroot_DOF [OPTIONS] [DIR]
Usage: isabelle dof_mkroot [OPTIONS] [DIRECTORY]
Options are:
-h print this help text and exit
-n NAME alternative session name (default: DIR base name)
-o ONTOLOGY (default: scholarly_paper)
Available ontologies:
* cenelec_50128
* mathex
* scholarly_paper
-t TEMPLATE (default: scrartcl)
Available document templates:
* lncs
* scrartcl
* scrreprt
* scrreprt-modern
-I init Mercurial repository and add generated files
-h print help
-n NAME alternative session name (default: directory base name)
-o NAMES list of ontologies, separated by blanks
(default: "technical_report scholarly_paper")
-q quiet mode: less verbosity
-t NAME template (default: "scrreprt-modern")
Prepare session root DIR (default: current directory).
Create session root directory for Isabelle/DOF (default: current directory).
```
## Releases
For releases, signed archives including a PDF version of the Isabelle/DOF manual
are available:
* Isabelle/DOF 1.3.0/Isabelle2021-1
* [Isabelle_DOF-1.3.0_Isabelle2021-1.pdf](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.3.0_Isabelle2021-1.pdf)
* [Isabelle_DOF-1.3.0_Isabelle2021-1.tar.xz](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.3.0_Isabelle2021-1.tar.xz)
* [Isabelle_DOF-1.3.0_Isabelle2021-1.tar.xz.asc](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.3.0_Isabelle2021-1.tar.xz.asc)
### Older Releases
* Isabelle/DOF 1.2.0/Isabelle2021
* [Isabelle_DOF-1.2.0_Isabelle2021.pdf](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.2.0_Isabelle2021.pdf)
* [Isabelle_DOF-1.2.0_Isabelle2021.tar.xz](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.2.0_Isabelle2021.tar.xz)
* [Isabelle_DOF-1.2.0_Isabelle2021.tar.xz.asc](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.2.0_Isabelle2021.tar.xz.asc)
* Isabelle/DOF 1.1.0/Isabelle2021
* [Isabelle_DOF-1.1.0_Isabelle2021.pdf](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.1.0_Isabelle2021.pdf)
* [Isabelle_DOF-1.1.0_Isabelle2021.tar.xz](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.1.0_Isabelle2021.tar.xz)
* [Isabelle_DOF-1.1.0_Isabelle2021.tar.xz.asc](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.1.0_Isabelle2021.tar.xz.asc)
* Isabelle/DOF 1.1.0/Isabelle2020
* [Isabelle_DOF-1.1.0_Isabelle2020.pdf](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.1.0_Isabelle2020.pdf)
* [Isabelle_DOF-1.1.0_Isabelle2020.tar.xz](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.1.0_Isabelle2020.tar.xz)
* [Isabelle_DOF-1.1.0_Isabelle2020.tar.xz.asc](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.1.0_Isabelle2020.tar.xz.asc)
* Isabelle/DOF 1.0.0/Isabelle2019
* [Isabelle_DOF-1.0.0_Isabelle2019.pdf](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.0.0_Isabelle2019.pdf)
* [Isabelle_DOF-1.0.0_Isabelle2019.tar.xz](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.0.0_Isabelle2019.tar.xz)
* [Isabelle_DOF-1.0.0_Isabelle2019.tar.xz.asc](https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-1.0.0_Isabelle2019.tar.xz.asc)
## Team
Main contacts:
@ -125,6 +147,7 @@ Main contacts:
* Idir Ait-Sadoune
* Paolo Crisafulli
* Chantal Keller
* Nicolas Méric
## License
@ -134,18 +157,32 @@ SPDX-License-Identifier: BSD-2-Clause
## Publications
* Achim D. Brucker, Idir Ait-Sadoune, Paolo Crisafulli, and Burkhart
Wolff. [Using The Isabelle Ontology Framework: Linking the Formal
with the Informal](https://www.brucker.ch/bibliography/download/2018/brucker.ea-isabelle-ontologies-2018.pdf).
In Conference on Intelligent Computer Mathematics (CICM). Lecture
Notes in Computer Science (11006), Springer-Verlag, 2018.
* Achim D. Brucker, Idir Ait-Sadoune, Paolo Crisafulli, and Burkhart Wolff.
[Using The Isabelle Ontology Framework: Linking the Formal with the
Informal](https://www.brucker.ch/bibliography/download/2018/brucker.ea-isabelle-ontologies-2018.pdf).
In Conference on Intelligent Computer Mathematics (CICM). Lecture Notes in
Computer Science (11006), Springer-Verlag, 2018.
[doi:10.1007/978-3-319-96812-4_3](https://doi.org/10.1007/978-3-319-96812-4_3).
* Achim D. Brucker and Burkhart Wolff. [Isabelle/DOF: Design and
Implementation](https://www.brucker.ch/bibliography/download/2019/brucker.ea-isabelledof-2019.pdf).
In Software Engineering and Formal Methods (SEFM). Lecture Notes in
Computer Science, Springer-Verlag, 2019.
In Software Engineering and Formal Methods (SEFM). Lecture Notes in Computer
Science (11724), Springer-Verlag, 2019.
[doi:10.1007/978-3-030-30446-1_15](https://doi.org/10.1007/978-3-030-30446-1_15).
## Master Repository
* Achim D. Brucker, Burkhart Wolff. [Using Ontologies in Formal Developments
Targeting
Certification](https://www.brucker.ch/bibliography/download/2019/brucker.ea-ontologies-certification-2019.pdf).
In Integrated Formal Methods (IFM). Lecture Notes in Computer Science (11918).
Springer-Verlag 2019.
[doi:10.1007/978-3-030-34968-4_4](http://dx.doi.org/10.1007/978-3-030-34968-4_4)
The master git repository for this project is hosted
<https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF>.
* Sergio Bezzecchi, Paolo Crisafulli, Charlotte Pichot, and Burkhart Wolff.
[Making Agile Development Processes fit for V-style Certification
Procedures.](https://hal.archives-ouvertes.fr/hal-01702815/document). In ERTS
2018. <https://hal.archives-ouvertes.fr/hal-01702815>
## Upstream Repository
The upstream git repository, i.e., the single source of truth, for this project
is hosted at <https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF>.

13
etc/build.props Normal file
View File

@ -0,0 +1,13 @@
title = Isabelle/DOF
module = $ISABELLE_HOME_USER/DOF/isabelle_dof.jar
no_build = false
requirements = \
env:ISABELLE_SCALA_JAR
sources = \
src/scala/dof.scala \
src/scala/dof_document_build.scala \
src/scala/dof_mkroot.scala \
src/scala/dof_tools.scala
services = \
isabelle.dof.DOF_Tools \
isabelle.dof.DOF_Document_Build$Engine

4
etc/settings Normal file
View File

@ -0,0 +1,4 @@
# -*- shell-script -*- :mode=shellscript:
ISABELLE_DOF_HOME="$COMPONENT"
ISABELLE_DOCS="$ISABELLE_DOF_HOME/doc:$ISABELLE_DOCS"

View File

@ -0,0 +1,90 @@
theory PikeOS_ST (*Security Target *)
imports "../../../src/ontologies/CC_v3.1_R5/CC_v3_1_R5"
(* Isabelle_DOF.CC_v3_1_R5 in the future. *)
begin
section \<open>ST PikeOS\<close>
open_monitor*[stpkos::ST_MNT]
section*[pkosstintrosec::st_ref_cls]\<open> ST Introduction \<close>
open_monitor*[PikosIntro::ST_INTRO_MNT]
subsection*[pkosstrefsubsec::st_ref_cls]\<open> ST Reference \<close>
text*[pkosstref::st_ref_cls, title="''PikeOS Security Target''", st_version ="(0,4,5)",
authors= "[]", st_date= "''29072020''"]
\<open>This document is the @{docitem st} for the Common Criteria evaluation of PikeOS.
It complies with the Common Criteria for Information Technology Security Evaluation
Version 3.1 Revision 4.\<close>
subsection*[pkossttoerefsubsec::st_ref_cls]\<open>TOE Reference\<close>
text*[pkostoeref::toe_ref_cls, dev_name="''''", toe_name="''PikeOS''",
toe_version= "(0,3,4)", prod_name="Some ''S3725''"]
\<open>The @{docitem toe_def} is the operating system PikeOS version 3.4
running on the microprocessor family x86 hosting different applications.
The @{docitem toe_def} is referenced as PikeOS 3.4 base
product build S3725 for Linux and Windows development host with PikeOS 3.4
Certification Kit build S4250 and PikeOS 3.4 Common Criteria Kit build S4388.\<close>
subsection*[pkossttoeovrvwsubsec::st_ref_cls]\<open> TOE Overview \<close>
text*[pkosovrw1::toe_ovrw_cls]\<open>The @{definition \<open>toe\<close> } is a special kind of operating
system, that allows to effectively separate
different applications running on the same platform from each other. The TOE can host
user applications that can also be operating systems. User applications can also be
malicious, and even in that case the TOE ensures that malicious user applications are
harming neither the TOE nor other applications in other partitions. The TOE will be
installed and run on a hardware platform (e.g. embedded systems).
The TOE is intended to be used as a component (the separation kernel) in MILS systems.
MILS (Multiple Independent Levels of Security) systems are explained in .
The TOE controls usage of memory, devices, processors, and communication channels
to ensure complete separation of user applications and to prevent unexpected
interference between user applications. The TOE enforces restrictions on the
communication between the separated user applications as specified by the configuration
data.
The major security services provided by the TOE are:
Separation in space of applications hosted in different partitions from each other
and from the PikeOS operating system according to the configuration data by
Page 3 of 44using the underlying hardware,
2086 Separation in time of applications hosted in different partitions from each other
and from the PikeOS operating system according to the configuration data,
Provision and management of communication objects,
 Management of and access to the TOE and TOE data,
 PikeOS operating system self-protection and accuracy of security functionality,
 Generation and treatment of audit data according to the configuration data.\<close>
text*[pkosovrw2::toe_ovrw_cls, toe_type="''OS separation kernel''"]
\<open>The TOE is a special kind of operating system providing a separation kernel with real-
time support.
The typical life cycle phases for this TOE type are development (source code
development), manufacturing (compilation to binary), system integration (by the system
integrator), installation (by the system operator), and finally, operational use (by the
system operator). Operational use of the TOE is explicitly in the focus of this ST. A
security evaluation/certification according to the assurance package chosen in this ST
(see Section 2.3 “Package Claim” below) involves all these life cycle phases.\<close>
text*[pkosdesc::toe_desc_cls]\<open>\<close>
close_monitor*[PikosIntro]
open_monitor*[PikosCCLM::CONF_CLAIMS_MNT]
close_monitor*[PikosCCLM]
open_monitor*[PikosSPD::SEC_PROB_DEF_MNT]
close_monitor*[PikosSPD]
open_monitor*[PikosSO::SEC_OBJ_MNT]
close_monitor*[PikosSO]
open_monitor*[PikosSR::SEC_REQ_MNT]
close_monitor*[PikosSR]
close_monitor*[stpkos]
end

View File

@ -1,11 +1,11 @@
session "mini_odo" = "Isabelle_DOF" +
options [document = pdf, document_output = "output"]
options [document = pdf, document_output = "output", document_build = dof]
sessions
"Physical_Quantities"
theories
"mini_odo"
document_files
"isadof.cfg"
"preamble.tex"
"build"
"root.bib"
"root.mst"
"lstisadof.sty"
@ -13,3 +13,4 @@ session "mini_odo" = "Isabelle_DOF" +
"figures/odometer.jpeg"
"figures/three-phase-odo.pdf"
"figures/wheel-df.png"

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2019 The University of Sheffield. All rights reserved.
# 2018 The University of Paris-Saclay. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
set -e
if [ ! -f $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh ]; then
echo ""
echo "Error: Isabelle/DOF not installed"
echo "====="
echo "This is a Isabelle/DOF project. The document preparation requires"
echo "the Isabelle/DOF framework. Please obtain the framework by cloning"
echo "the Isabelle/DOF git repository, i.e.: "
echo " git clone https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF"
echo "You can install the framework as follows:"
echo " cd Isabelle_DOF/document-generator"
echo " ./install"
echo ""
exit 1
fi
cp $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh .
source build_lib.sh

View File

@ -1,3 +0,0 @@
Template: scrreprt-modern
Ontology: technical_report
Ontology: cenelec_50128

View File

@ -1,3 +1,16 @@
%% Copyright (C) 2018 The University of Sheffield
%% 2018 The University of Paris-Saclay
%% 2019 The University of Exeter
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\definecolor{OliveGreen} {cmyk}{0.64,0,0.95,0.40}
\definecolor{BrickRed} {cmyk}{0,0.89,0.94,0.28}

View File

@ -1,3 +1,17 @@
%% Copyright (C) 2018 The University of Sheffield
%% 2018 The University of Paris-Saclay
%% 2019 The University of Exeter
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
%% This is a placeholder for user-specific configuration and packages.
\usepackage{listings}
\usepackage{lstisadof}
@ -5,8 +19,6 @@
\usepackage{paralist}
\usepackage{numprint}
\newcommand{\fixIsarList}{\vspace{-\topsep}\vspace{-\baselineskip}\mbox{}\\[0pt]\noindent}
\newcommand{\eg}{e.\,g.}
\newcommand{\ie}{i.\,e.}
\author{}
\title{}

View File

@ -1,27 +1,65 @@
(*************************************************************************
* Copyright (C)
* 2019 The University of Exeter
* 2018-2019 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
(*<*)
theory
mini_odo
imports
imports
"Isabelle_DOF.CENELEC_50128"
"Isabelle_DOF.technical_report"
"Physical_Quantities.SI" "Physical_Quantities.SI_Pretty"
begin
use_template "scrreprt-modern"
use_ontology technical_report and CENELEC_50128
declare[[strict_monitor_checking=true]]
define_shortcut* dof \<rightleftharpoons> \<open>\dof\<close>
isadof \<rightleftharpoons> \<open>\isadof{}\<close>
(*>*)
title*[title::title]\<open>The CENELEC 50128 Ontology\<close>
subtitle*[subtitle::subtitle]\<open>Case Study: An Odometer-Subsystem\<close>
chapter*[casestudy::technical]\<open>A Case-Study: An Odometer-Subsystem\<close>
chapter*[casestudy::technical]\<open>An Odometer-Subsystem\<close>
text\<open>
In our case study, we will follow the phases of analysis, design, and implementation of the
odometry function of a train. This software processes data from an odometer to compute the position,
speed, and acceleration of a train. This system provides the basis for many
safety critical decisions, \eg, the opening of the doors. Due to its relatively small size, it
odometry function of a train. This \<^cenelec_term>\<open>SF\<close> processes data from an odometer to compute
the position, speed, and acceleration of a train. This system provides the basis for many
safety critical decisions, \<^eg>, the opening of the doors. Due to its relatively small size, it
is a manageable, albeit realistic target for a comprehensive formal development: it covers a
physical model of the environment, the physical and architectural model of the odometer including
the problem of numerical sampling, and the boundaries of efficient computations. The interplay
between environment and measuring-device as well as the implementation problems on a platform
with limited resources makes the odometer a fairly typical safety critical embedded system.
physical model of the environment, the physical and architectural model of the odometer,
but also the \<^cenelec_term>\<open>SFRS\<close> aspects including the problem of numerical sampling and the
boundaries of efficient computations. The interplay between environment and measuring-device as
well as the implementation problems on a platform with limited resources makes the odometer a
fairly typical \<^cenelec_term>\<open>safety\<close> critical \<^cenelec_term>\<open>component\<close> of an embedded system.
The case-study is presented in form of an \<^emph>\<open>integrated source\<close> in \<^isadof> containing all four
reports from the phases:
\<^item> \<^term>\<open>software_requirements\<close> with deliverable \<^doc_class>\<open>SWRS\<close>
(or long:\<^typ>\<open>software_requirements_specification\<close>(-report))
\<^item> \<^term>\<open>software_architecture_and_design\<close> with deliverable \<^doc_class>\<open>SWDS\<close>
(or long: \<^typ>\<open>software_design_specification\<close>(-report))
\<^item> \<^term>\<open>software_component_design\<close> with deliverable \<^doc_class>\<open>SWCDVR\<close>
(or long: \<^typ>\<open>software_component_design_verification\<close>(-report).)
\<^item> \<^term>\<open>component_implementation_and_testing\<close> with deliverable \<^doc_class>\<open>SWADVR\<close>
(or long: \<^typ>\<open>software_architecture_and_design_verification\<close>(-report))
The objective of this case study is to demonstrate deep-semantical ontologoies in
software developments targeting certifications, and in particular, how \<^isadof>'s
integrated source concept permits to assure \<^cenelec_term>\<open>traceability\<close>.
\<^bold>\<open>NOTE\<close> that this case study has aspects that were actually covered by CENELEC 50126 -
the 'systems'-counterpart covering hardware aspects. Recall that the CENELEC 50128 covers
software.
Due to space reasons, we will focus on the analysis part of the integrated
document; the design and code parts will only be outlined in a final resume. The
@ -32,7 +70,8 @@ text\<open>
development.
\<close>
section\<open>System Requirements Specification as an \<^emph>\<open>Integrated Source\<close>\<close>
section\<open>A CENELEC-conform development as an \<^emph>\<open>Integrated Source\<close>\<close>
text\<open>Accurate information of a train's location along a track is in an important prerequisite
to safe railway operation. Position, speed and acceleration measurement usually lies on a
set of independent measurements based on different physical principles---as a way to enhance
@ -46,9 +85,9 @@ text\<open>
related to the trains progress. By measuring the fractional rotation of the encoders shaft and
considering the wheels effective ratio, relative movement of the train can be calculated.
\begin{wrapfigure}[8]{l}{3.9cm}
\begin{wrapfigure}[8]{l}{4.6cm}
\centering
\vspace{-.7cm}
\vspace{-.5cm}
\includegraphics[width=3.4cm]{figures/wheel-df}
\caption{Motion sensing via an odometer.}
\label{wheel-df}
@ -61,17 +100,23 @@ text\<open>
This model is already based on several fundamental assumptions relevant for the correct
functioning of the system and for its integration into the system as a whole. In
particular, we need to make the following assumptions explicit:\vspace{-.3cm}
\<^item> that the wheel is perfectly circular with a given, constant radius,
\<^item> that the slip between the trains wheel and the track negligible,
\<^item> the distance between all teeth of a wheel is the same and constant, and
\<^item> the sampling rate of positions is a given constant.
particular, we need to make the following assumptions explicit: \<^vs>\<open>-0.3cm\<close>\<close>
text*["perfect-wheel"::assumption]
\<open>\<^item> the wheel is perfectly circular with a given, constant radius. \<^vs>\<open>-0.3cm\<close>\<close>
text*["no-slip"::assumption]
\<open>\<^item> the slip between the trains wheel and the track negligible. \<^vs>\<open>-0.3cm\<close>\<close>
text*["constant-teeth-dist"::assumption]
\<open>\<^item> the distance between all teeth of a wheel is the same and constant, and \<^vs>\<open>-0.3cm\<close>\<close>
text*["constant-sampling-rate"::assumption]
\<open>\<^item> the sampling rate of positions is a given constant.\<close>
text\<open>
These assumptions have to be traced throughout the certification process as
\<^emph>\<open>derived requirements\<close> (or, in CENELEC terminology, as \<^emph>\<open>exported constraints\<close>), which is
also reflected by their tracing throughout the body of certification documents. This may result
in operational regulations, \eg, regular checks for tolerable wheel defects. As for the
in operational regulations, \<^eg>, regular checks for tolerable wheel defects. As for the
\<^emph>\<open>no slip\<close>-assumption, this leads to the modeling of constraints under which physical
slip can be neglected: the device can only produce reliable results under certain physical
constraints (speed and acceleration limits). Moreover, the \<^emph>\<open>no slip\<close>-assumption motivates
@ -80,57 +125,53 @@ text\<open>
\<close>
subsection\<open>Capturing ``System Architecture.''\<close>
figure*["three-phase"::figure,relative_width="70",src="''figures/three-phase-odo''"]
\<open>An odometer with three sensors \<open>C1\<close>, \<open>C2\<close>, and \<open>C3\<close>.\<close>
text\<open>
\begin{figure}
\centering
\includegraphics[width=.70\textwidth]{figures/three-phase-odo}
\begin{picture}(0,0)
\put(-112,44){\includegraphics[width=.30\textwidth]{figures/odometer}}
\end{picture}
\caption{An odometer with three sensors \inlineisar{C1}, \inlineisar{C2}, and \inlineisar{C3}.}\label{three-phase}
\end{figure}
The requirements analysis also contains a sub-document \<^emph>\<open>system architecture description\<close>
(CENELEC notion) that contains technical drawing of the odometer, a timing diagrams
(see \autoref{three-phase}), and tables describing the encoding of the position
for the possible signal transitions of the sensors \inlineisar{C1}, \inlineisar{C2}, and $C3.$
The requirements analysis also contains a document \<^doc_class>\<open>SYSAD\<close>
(\<^typ>\<open>system_architecture_description\<close>) that contains technical drawing of the odometer,
a timing diagram (see \<^figure>\<open>three-phase\<close>), and tables describing the encoding of the position
for the possible signal transitions of the sensors \<open>C1\<close>, \<open>C2\<close>, and \<open>C3\<close>.
\<close>
subsection\<open>Capturing ``System Interfaces.''\<close>
text\<open>
The requirements analysis also contains a sub-document \<^emph>\<open>functions and interfaces\<close>
(CENELEC notion) describing the technical format of the output of the odometry function.
This section, \eg, specifies the output \<^emph>\<open>speed\<close> as given by a \<^verbatim>\<open>int_32\<close> to be the
``Estimation of the speed (in mm/sec) evaluated over the latest $N_{\text{avg}}$ samples''
where the speed refers to the physical speed of the train and $N_{\text{avg}}$ a parameter of the
The requirements analysis also contains a sub-document \<^doc_class>\<open>FnI\<close> (\<^typ>\<open>functions_and_interfaces\<close>)
describing the technical format of the output of the odometry function.
This section, \<^eg>, specifies the output \<^emph>\<open>speed\<close> as given by a \<^verbatim>\<open>int_32\<close> to be the
``Estimation of the speed (in mm/sec) evaluated over the latest \<open>N\<^sub>a\<^sub>v\<^sub>g\<close> samples''
where the speed refers to the physical speed of the train and \<open>N\<^sub>a\<^sub>v\<^sub>g\<close> a parameter of the
sub-system configuration. \<close>
(*<*)
declare_reference*["df-numerics-encshaft"::figure]
declare_reference*["df-numerics-encshaft"::figure]
(*>*)
subsection\<open>Capturing ``Required Performances.''\<close>
text\<open>
The given analysis document is relatively implicit on the expected precision of the measurements;
however, certain interface parameters like \inlineisar*Odometric_Position_TimeStamp*
(a counter on the number of samplings) and \inlineisar*Relative_Position* are defined by as
however, certain interface parameters like \<open>Odometric_Position_TimeStamp\<close>
(a counter on the number of samplings) and \<open>Relative_Position\<close> are defined by as
unsigned 32 bit integer. These definitions imply that exported constraints concerning the acceptable
time of service as well the maximum distance before a necessary reboot of the subsystem.
For our case-study, we assume maximum deviation of the \inlineisar*Relative_Position* to the
For our case-study, we assume maximum deviation of the \<open>Relative_Position\<close> to the
theoretical distance.
The requirement analysis document describes the physical environment, the architecture
of the measuring device, and the required format and precision of the measurements of the odometry
function as represented (see @{figure (unchecked) "df-numerics-encshaft"}).\<close>
figure*["df-numerics-encshaft"::figure,relative_width="76",src="''figures/df-numerics-encshaft''"]
\<open>Real distance vs. discrete distance vs. shaft-encoder sequence\<close>
subsection\<open>Capturing the ``Software Design Spec'' (Resume).\<close>
text\<open>
\enlargethispage{\baselineskip}
The design provides a function that manages an internal first-in-first-out buffer of
shaft-encodings and corresponding positions. Central for the design is a step-function analyzing
new incoming shaft encodings, checking them and propagating two kinds of error-states (one allowing
recovery, another one, fatal, signaling, \eg, a defect of the receiver hardware),
recovery, another one, fatal, signaling, \<^eg>, a defect of the receiver hardware),
calculating the relative position, speed and acceleration.
\<close>
@ -148,88 +189,123 @@ text\<open>
in AutoCorres.
\<close>
(*<*)
definition teeth_per_wheelturn::nat ("tpw") where "tpw \<equiv> SOME x. x > 0"
definition wheel_diameter ::"real[m]" ("w\<^sub>d") where "w\<^sub>d \<equiv> SOME x. x > 0"
definition wheel_circumference::"real[m]" ("w\<^sub>0") where "w\<^sub>0 \<equiv> pi *\<^sub>Q w\<^sub>d"
definition \<delta>s\<^sub>r\<^sub>e\<^sub>s ::"real[m]" where "\<delta>s\<^sub>r\<^sub>e\<^sub>s \<equiv> 1 / (2 * 3 * tpw) *\<^sub>Q w\<^sub>0 "
(*>*)
section\<open>Formal Enrichment of the Software Requirements Specification\<close>
text\<open>
After the \<^emph>\<open>capture\<close>-phase, where we converted/integrated existing informal analysis and design
documents as well as code into an integrated Isabelle document, we entered into the phase of
\<open>formal enrichment\<close>. For example, from the assumptions in the architecture follow
the definitions:
\begin{isar}
definition teeth_per_wheelturn::nat ("tpw") where "tpw \<equiv> SOME x. x > 0"
definition wheel_diameter::real ("w$_d$") where "w$_d$ \<equiv> SOME x. x > 0"
definition wheel_circumference::real ("w$_{\text{circ}}$") where "w$_{\text{circ}}$ \<equiv> pi * w$_d$"
definition \<delta>s$_{\text{res}}$::real where "\<delta>s$_{\text{res}}$ \<equiv> w$_{\text{circ}}$ / (2 * 3 * tpw)"
\end{isar}
Here, \inlineisar{real} refers to the real numbers as defined in the HOL-Analysis
library, which provides concepts such as Cauchy Sequences, limits,
differentiability, and a very substantial part of classical Calculus. \inlineisar{SOME} is the
Hilbert choice operator from HOL; the definitions of the model parameters admit all possible positive values as uninterpreted
constants. Our perfect-wheel assumption is translated into a calculation of the circumference of the
wheel, while \inlineisar{\<delta>s<bsub>res<esub>}, the resolution of the odometer, can be calculated
\<open>formal enrichment\<close>. For example, from the assumptions in the architecture follow
the definitions:
@{theory_text [display]\<open>
definition teeth_per_wheelturn::nat ("tpw") where "tpw \<equiv> SOME x. x > 0"
definition wheel_diameter::"real[m]" ("w\<^sub>d") where "w\<^sub>d \<equiv> SOME x. x > 0"
definition wheel_circumference::"real[m]" ("w\<^sub>0") where "w\<^sub>0 \<equiv> pi *\<^sub>Q w\<^sub>d"
definition \<delta>s\<^sub>r\<^sub>e\<^sub>s::"real[m]" where "\<delta>s\<^sub>r\<^sub>e\<^sub>s \<equiv> 1 / (2 * 3 * tpw) *\<^sub>Q w\<^sub>0 "
\<close>}
Here, \<open>real\<close> refers to the real numbers as defined in the HOL-Analysis library, which provides
concepts such as Cauchy Sequences, limits, differentiability, and a very substantial part of
classical Calculus. \<open>SOME\<close> is the Hilbert choice operator from HOL; the definitions of the
model parameters admit all possible positive values as uninterpreted constants. Our
\<^assumption>\<open>perfect-wheel\<close> is translated into a calculation of the circumference of the
wheel, while \<open>\<delta>s\<^sub>r\<^sub>e\<^sub>s\<close>, the resolution of the odometer, can be calculated
from the these parameters. HOL-Analysis permits to formalize the fundamental physical observables:
\begin{isar}
type_synonym distance_function = "real\<Rightarrow>real"
definition Speed::"distance_function\<Rightarrow>real\<Rightarrow>real" where "Speed f \<equiv> deriv f"
definition Accel::"distance_function\<Rightarrow>real\<Rightarrow>real"
where "Accel f \<equiv> deriv (deriv f)"
\end{isar}
which permits to constrain the central observable \inlineisar|distance_function| in a
\<close>
(*<*)
type_synonym distance_function = "real[s] \<Rightarrow> real[m]"
consts Speed::"distance_function \<Rightarrow> real[s] \<Rightarrow> real[m\<cdot>s\<^sup>-\<^sup>1]"
consts Accel::"distance_function \<Rightarrow> real[s] \<Rightarrow> real[m\<cdot>s\<^sup>-\<^sup>2]"
consts Speed\<^sub>M\<^sub>a\<^sub>x::"real[m\<cdot>s\<^sup>-\<^sup>1]"
(* Non - SI conform common abrbreviations *)
definition "kmh \<equiv> kilo *\<^sub>Q metre \<^bold>/ hour :: 'a::{field,ring_char_0}[m\<cdot>s\<^sup>-\<^sup>1]"
definition "kHz \<equiv> kilo *\<^sub>Q hertz :: 'a::{field,ring_char_0}[s\<^sup>-\<^sup>1]"
(*>*)
text\<open>
@{theory_text [display]\<open>
type_synonym distance_function = "real[s]\<Rightarrow>real[m]"
definition Speed::"distance_function\<Rightarrow>real\<Rightarrow>real" where "Speed f \<equiv> deriv f"
definition Accel::"distance_function\<Rightarrow>real\<Rightarrow>real" where "Accel f \<equiv> deriv (deriv f)"
\<close>}
which permits to constrain the central observable \<open>distance_function\<close> in a
way that they describe the space of ``normal behavior'' where we expect the odometer to produce
reliable measurements over a \inlineisar|distance_function df|.
reliable measurements over a \<open>distance_function df\<close> .
The essence of the physics of the train is covered by the following definition:
\begin{isar}
definition normally_behaved_distance_function :: "(real \<Rightarrow> real) \<Rightarrow> bool"
where normally_behaved_distance_function df =
( \<forall> t. df(t) \<in> \<real>$_{\ge 0}$ \<and> (\<forall> t \<in> \<real>$_{\le 0}$. df(t) = 0)
\<and> df differentiable on$_{\text{R}}$ \<and> (Speed df)differentiable on$_{\text{R}}$
\<and> (Accel df)differentiable on$_{\ensuremath{R}}$
\<and> (\<forall> t. (Speed df) t \<in> {-Speed$_{\text{Max}}$ .. Speed$_{\text{Max}}$})
\<and> (\<forall> t. (Accel df) t \<in> {-\<bar>Accel$_{\text{Max}}$\<bar> .. \<bar>Accel$_{\text{Max}}$\<bar>}))
\end{isar}
@{theory_text [display]\<open>
definition normally_behaved_distance_function :: "(real \<Rightarrow> real) \<Rightarrow> bool"
where normally_behaved_distance_function df =
( \<forall> t. df(t) \<in> \<real>\<^sub>\<ge>\<^sub>0 \<and> (\<forall> t \<in> \<real>\<real>\<^sub>\<ge>\<^sub>0. df(t) = 0)
\<and> df differentiable on \<real>\<^sub>\<ge>\<^sub>0 \<and> (Speed df)differentiable on \<real>\<^sub>\<ge>\<^sub>0$
\<and> (Accel df)differentiable on \<real>\<^sub>\<ge>\<^sub>0
\<and> (\<forall> t. (Speed df) t \<in> {Speed\<^sub>M\<^sub>i\<^sub>n .. Speed\<^sub>M\<^sub>a\<^sub>x})
\<and> (\<forall> t. (Accel df) t \<in> {Accel\<^sub>M\<^sub>i\<^sub>n .. Accel\<^sub>M\<^sub>a\<^sub>x}))
\<close>}
which constrains the distance functions in the bounds described of the informal descriptions and
states them as three-fold differentiable function in certain bounds concerning speed and acceleration.
Note that violations, in particular of the constraints on speed and acceleration, \<^emph>\<open>do\<close> occur in practice.
In such cases, the global system adapts recovery strategies that are out of the scope of our model.
Concepts like \inlineisar+shaft_encoder_state+ (a triple with the sensor values
\inlineisar{C1}, \inlineisar{C2}, \inlineisar{C3}) were formalized as types, while tables were defined as recursive functions:
\enlargethispage{2\baselineskip}\begin{isar}
fun phase$_0$ :: "nat \<Rightarrow> shaft_encoder_state" where
"phase$_0$ (0) = \<lparr> C1 = False, C2 = False, C3 = True \<rparr>"
|"phase$_0$ (1) = \<lparr> C1 = True, C2 = False, C3 = True \<rparr>"
|"phase$_0$ (2) = \<lparr> C1 = True, C2 = False, C3 = False\<rparr>"
|"phase$_0$ (3) = \<lparr> C1 = True, C2 = True, C3 = False\<rparr>"
|"phase$_0$ (4) = \<lparr> C1 = False, C2 = True, C3 = False\<rparr>"
|"phase$_0$ (5) = \<lparr> C1 = False, C2 = True, C3 = True \<rparr>"
|"phase$_0$ x = phase$_0$(x - 6)"
definition Phase ::"nat\<Rightarrow>shaft_encoder_state" where Phase(x) = phase$_0$(x-1)
\end{isar}
We now define shaft encoder sequences as
translations of distance functions:
\begin{isar}
definition encoding::"distance_function\<Rightarrow>nat\<Rightarrow>real\<Rightarrow>shaft_encoder_state"
where "encoding df init$_{\text{pos}}$ \<equiv> \<lambda>x. Phase(nat\<lfloor>df(x) / \<delta>s$_{\text{res}}$\<rfloor> + init$_{\text{pos}}$)"
\end{isar}
where \inlineisar+init$_{\text{pos}}$+ is the initial position of the wheel.
\inlineisar+sampling+'s were constructed from encoding sequences over discretized time points:
\begin{isar}
definition $\!\!$sampling::"distance$\!$_function\<Rightarrow>nat\<Rightarrow>real\<Rightarrow>nat\<Rightarrow>shaft$\!$_encoder$\!$_state"
where "sampling df init$_{\text{pos}}$ \<delta>t \<equiv> \<lambda>n::nat. encoding df init$_{\text{pos}}$ (n * \<delta>t)"
\end{isar}
The sampling interval \inlineisar+\<delta>t+ (the inverse of the sampling frequency) is a critical
states them as three-fold differentiable function in certain bounds concerning speed and
acceleration. Note that violations, in particular of the constraints on speed and acceleration,
\<^emph>\<open>do\<close> occur in practice. In such cases, the global system adapts recovery strategies that are out
of the scope of our model. Concepts like \<open>shaft_encoder_state\<close> (a triple with the sensor values
\<open>C1\<close>, \<open>C2\<close>, \<open>C3\<close>) were formalized as types, while tables were
defined as recursive functions:
@{theory_text [display]\<open>
fun phase\<^sub>0 :: "nat \<Rightarrow> shaft_encoder_state" where
"phase\<^sub>0 (0) = \<lparr> C1 = False, C2 = False, C3 = True \<rparr>"
|"phase\<^sub>0 (1) = \<lparr> C1 = True, C2 = False, C3 = True \<rparr>"
|"phase\<^sub>0 (2) = \<lparr> C1 = True, C2 = False, C3 = False\<rparr>"
|"phase\<^sub>0 (3) = \<lparr> C1 = True, C2 = True, C3 = False\<rparr>"
|"phase\<^sub>0 (4) = \<lparr> C1 = False, C2 = True, C3 = False\<rparr>"
|"phase\<^sub>0 (5) = \<lparr> C1 = False, C2 = True, C3 = True \<rparr>"
|"phase\<^sub>0 x = phase\<^sub>0(x - 6)"
definition Phase ::"nat\<Rightarrow>shaft_encoder_state" where Phase(x) = phase\<^sub>0(x-1)
\<close>}
We now define shaft encoder sequences as translations of distance functions:
@{theory_text [display]\<open>
definition encoding::"distance_function\<Rightarrow>nat\<Rightarrow>real\<Rightarrow>shaft_encoder_state"
where "encoding df init\<^sub>p\<^sub>o\<^sub>s \<equiv> \<lambda>x. Phase(nat\<lfloor>df(x) / \<delta>s\<^sub>r\<^sub>e\<^sub>s\<rfloor> + init\<^sub>p\<^sub>o\<^sub>s)"
\<close>}
where \<open>init\<^sub>p\<^sub>o\<^sub>s\<close> is the initial position of the wheel.
\<open>sampling\<close>'s were constructed from encoding sequences over discretized time points:
@{theory_text [display]\<open>
definition sampling::"distance_function\<Rightarrow>nat\<Rightarrow>real\<Rightarrow>nat\<Rightarrow>shaft_encoder_state"
where "sampling df init\<^sub>p\<^sub>o\<^sub>s \<delta>t \<equiv> \<lambda>n::nat. encoding df initinit\<^sub>p\<^sub>o\<^sub>s (n * \<delta>t)"
\<close>}
parameter of the configuration of a system.
Finally, we can formally define the required performances. From the interface description
and the global model parameters such as wheel diameter, the number of teeth per wheel, the sampling
frequency etc., we can infer the maximal time of service as well the maximum distance the
device can measure.
As an example configuration, choosing 1m for
\inlineisar+w$_d$+, 100 for \inlineisar+tpw+, 80km/h \inlineisar+Speed$_{\text{Max}}$+,
and 14400Hz for the sampling frequency, results in an odometer resolution of 2.3mm,
a maximum distance of 9878km, and a maximal system up-time of 123.4 hours.
Finally, we can formally define the required performances. From the interface description
and the global model parameters such as wheel diameter, the number of teeth per wheel, the
sampling frequency etc., we can infer the maximal time of service as well the maximum distance
the device can measure. As an example configuration, choosing:
\<^item> \<^term>\<open>(1 *\<^sub>Q metre):: real[m]\<close> for \<^term>\<open>w\<^sub>d\<close> (wheel-diameter),
\<^item> \<^term>\<open>100 :: real\<close> for \<^term>\<open>tpw\<close> (teeth per wheel),
\<^item> \<^term>\<open>80 *\<^sub>Q kmh :: real[m\<cdot>s\<^sup>-\<^sup>1]\<close> for \<^term>\<open>Speed\<^sub>M\<^sub>a\<^sub>x\<close>,
\<^item> \<^term>\<open>14.4 *\<^sub>Q kHz :: real[s\<^sup>-\<^sup>1]\<close> for the sampling frequency,
results in an odometer resolution of \<^term>\<open>2.3 *\<^sub>Q milli *\<^sub>Q metre\<close>, a maximum distance of
\<^term>\<open>9878 *\<^sub>Q kilo *\<^sub>Q metre\<close>, and a maximal system up-time of \<^term>\<open>123.4 *\<^sub>Q hour\<close>s.
The required precision of an odometer can be defined by a constant describing
the maximally allowed difference between \inlineisar+df(n*\<delta>t)+ and
\inlineisar+sampling df init$_{\text{pos}}$ \<delta>t n+ for all \inlineisar+init$_{\text{pos}}$ \<in>{0..5}+.
the maximally allowed difference between \<open>df(n*\<delta>t)\<close> and
\<open>sampling df init\<^sub>p\<^sub>o\<^sub>s \<delta>t n\<close> for all \<open>init\<^sub>p\<^sub>o\<^sub>s \<in>{0..5}\<close>.
\<close>
(*<*)
ML\<open>val two_thirty2 = 1024 * 1024 * 1024 * 4;
@ -239,41 +315,50 @@ ML\<open>val two_thirty2 = 1024 * 1024 * 1024 * 4;
section*[verific::technical]\<open>Verification of the Software Requirements Specification\<close>
text\<open>The original documents contained already various statements that motivate certain safety
properties of the device. For example, the \inlineisar+Phase+-table excludes situations in which
all sensors \inlineisar{C1}, \inlineisar{C2}, and \inlineisar{C3} are all ``off'' or situations in
properties of the device. For example, the \<open>Phase\<close>-table excludes situations in which
all sensors \<open>C1\<close>, \<open>C2\<close>, and \<open>C3\<close> are all ``off'' or situations in
which sensors are ``on,'' reflecting a physical or electrical error in the odometer. It can be
shown by a very small Isabelle case-distinction proof that this safety requirement follows indeed from the
above definitions:
\begin{isar}
lemma Encoder_Property_1:(C1(Phase x) \<and> C2(Phase x) \<and> C3(Phase x))=False
proof (cases x)
case 0 then show ?thesis by (simp add: Phase_def)
next
case (Suc n) then show ?thesis
by(simp add: Phase_def,rule_tac n = n in cycle_case_split,simp_all)
qed
\end{isar}
for all positions \inlineisar+x+. Similarly, it is proved that the table is indeed
cyclic: \inlineisar+ phase$_0$ x = phase$_0$(x mod 6)+ and locally injective:
\inlineisar+\<forall>x<6. \<forall>y<6. phase$_0$ x = phase$_0$ y \<longrightarrow> x = y+.
These lemmas, building the ``theory of an odometer,'' culminate in a theorem
that we would like to present in more detail.
\begin{isar}
theorem minimal_sampling :
assumes * : normally_behaved_distance_function df
and ** : \<delta>t * Speed$_{\text{Max}}$ < \<delta>s$_{\text{res}}$
shows \<forall> \<delta>X\<le>\<delta>t. 0<\<delta>X \<longrightarrow>
\<exists>f. retracting (f::nat\<Rightarrow>nat) \<and>
sampling df init$_{\text{pos}}$ \<delta>X = (sampling df init$_{\text{pos}}$ \<delta>t) o f
shown by a very small Isabelle case-distinction proof that this safety requirement follows indeed
from the above definitions:
\end{isar}
This theorem states for \inlineisar+normally_behaved_distance_function+s that there is
@{theory_text [display]\<open>
lemma Encoder_Property_1:(C1(Phase x) \<and> C2(Phase x) \<and> C3(Phase x))=False
proof (cases x)
case 0 then show ?thesis by (simp add: Phase_def)
next
case (Suc n) then show ?thesis
by(simp add: Phase_def,rule_tac n = n in cycle_case_split,simp_all)
qed
\<close>}
for all positions \<open>x\<close>. Similarly, it is proved that the table is indeed cyclic:
\<open>phase\<^sub>0 x = phase\<^sub>0(x mod 6)\<close>
and locally injective:
\<open>\<forall>x<6. \<forall>y<6. phase\<^sub>0 x = phase\<^sub>0 y \<longrightarrow> x = y\<close>
These lemmas, building the ``theory of an odometer,'' culminate in a theorem
that we would like to present in more detail.
@{theory_text [display]\<open>
theorem minimal_sampling :
assumes * : normally_behaved_distance_function df
and ** : \<delta>t * Speed\<^sub>M\<^sub>a\<^sub>x < \<delta>s\<^sub>r\<^sub>e\<^sub>s
shows \<forall> \<delta>X\<le>\<delta>t. 0<\<delta>X \<longrightarrow>
\<exists>f. retracting (f::nat\<Rightarrow>nat) \<and>
sampling df init\<^sub>p\<^sub>o\<^sub>s \<delta>X = (sampling df init\<^sub>p\<^sub>o\<^sub>s \<delta>t) o f
\<close>}
This theorem states for \<open>normally_behaved_distance_function\<close>s that there is
a minimal sampling frequency assuring the safety of the measurements; samplings on
some \inlineisar$df$ gained from this minimal sampling frequency can be ``pumped up''
some \<open>df\<close> gained from this minimal sampling frequency can be ``pumped up''
to samplings of these higher sampling frequencies; they do not contain more information.
Of particular interest is the second assumption, labelled ``\inlineisar|**|,'' which
establishes a lower bound from \inlineisar+w$_{\text{circ}}$+, \inlineisar+tpw+,
\inlineisar+Speed$_{\text{Max}}$+ for the sampling frequency. Methodologically, this represents
Of particular interest is the second assumption, labelled ``\<open>**\<close>'' which
establishes a lower bound from \<open>w\<^sub>0\<close>, \<open>tpw\<close>,
\<open>Speed\<^sub>M\<^sub>a\<^sub>x\<close> for the sampling frequency. Methodologically, this represents
an exported constraint that can not be represented \<^emph>\<open>inside\<close> the design model: it means that the
computations have to be fast enough on the computing platform in order to assure that the
calculations are valid. It was in particular this exported constraint that forced us to give up
@ -287,6 +372,7 @@ standard~@{cite "bsi:50128:2014"}, 7.2.4.22 and are usually addressed in an own
\<close>
chapter*[ontomodeling::text_section]\<open>The CENELEC 50128 Ontology\<close>
text\<open>
Modeling an ontology from a semi-formal text such as~@{cite"bsi:50128:2014"} is,
like any other modeling activity, not a simple one-to-one translation of some
@ -298,125 +384,144 @@ text\<open>
section*[lhf::text_section]
\<open>Tracking Concepts and Definitions\<close>
text\<open>
\isadof is designed to annotate text elements with structured meta-information and to reference
\<^isadof> is designed to annotate text elements with structured meta-information and to reference
these text elements throughout the integrated source. A classical application of this capability
is the annotation of concepts and terms definitions---be them informal, semi-formal or formal---and
their consistent referencing. In the context of our CENELEC ontology, \eg, we can translate the
their consistent referencing. In the context of our CENELEC ontology, \<^eg>, we can translate the
third chapter of @{cite "bsi:50128:2014"} ``Terms, Definitions and Abbreviations'' directly
into our Ontology Definition Language (ODL). Picking one example out of 49, consider the definition
of the concept ``traceability'' in paragraphs 3.1.46 (a notion referenced 31 times in the standard),
which we translated directly into:
\begin{isar}
Definition*[traceability::concept]<open> degree to which relationship
can be established between two or more products of a development
process, especially those having a predecessor/successor or
master/subordinate relationship to one another. <close>
\end{isar}
In the integrated source of the odometry study, we can reference in a text element to this
of the concept \<^cenelec_term>\<open>traceability\<close> in paragraphs 3.1.46 (a notion referenced 31 times in
the standard), which we translated directly into:
@{theory_text [display]\<open>
Definition*[traceability, short_name="''traceability''"]
\<open>degree to which relationship can be established between two or more products of a
development process, especially those having a predecessor/successor or
master/subordinate relationship to one another.\<close>
\<close>}
In the integrated source of the odometry study, we can reference in a text element to this
concept as follows:
\begin{isar}
text*[...]<open> ... to assure <@>{concept traceability} for
<@>{requirement bitwiseAND}, we prove ... <close>
\end{isar}
The presentation of this document element inside \isadof is immediately hyperlinked against the
\inlineisar+Definition*+ element shown above; this serves as documentation of
@{theory_text [display]\<open>
text*[...]\<open> ... to assure <@>{cenelec_term traceability} for
<@>{requirement bitwiseAND}, we prove ... \<close>
\<close>}
\<^isadof> also uses the underlying ontology to generate the navigation markup inside the IDE, \<^ie>
the presentation of this document element inside \<^isadof> is immediately hyperlinked against the
@{theory_text \<open> Definition* \<close>}-element shown above; this serves as documentation of
the standard for the development team working on the integrated source. The PDF presentation
of such links depends on the actual configurations for the document generation; We will explain
this later.
CENELEC foresees also a number of roles, phases, safety integration levels, etc., which were
directly translated into HOL enumeration types usable in ontological concepts of ODL.
\begin{isar}
datatype role =
PM (* Program Manager *) | RQM (* Requirements Manager *)
| DES (* Designer *) | IMP (* Implementer *) |
| VER (* Verifier *) | VAL (* Validator *) | ...
datatype phase =
SYSDEV_ext (* System Development *) | SPl (* Software Planning *)
| SR (* Software Requirement *) | SA (* Software Architecture *)
| SDES (* Software Design *) | ...
\end{isar}
Similarly, we can formalize the Table A.5: Verification and Testing of @{cite "bsi:50128:2014"}:
a classification of \<^emph>\<open>verification and testing techniques\<close>:
\begin{isar}
datatype vnt_technique =
@{theory_text [display]\<open>
datatype role =
PM (* Program Manager *) | RQM (* Requirements Manager *)
| DES (* Designer *) | IMP (* Implementer *) |
| VER (* Verifier *) | VAL (* Validator *) | ...
datatype phase =
SYSDEV_ext (* System Development *) | SPl (* Software Planning *)
| SR (* Software Requirement *) | SA (* Software Architecture *)
| SDES (* Software Design *) | ...
\<close>}
Similarly, we can formalize the Table A.5: Verification and Testing of @{cite "bsi:50128:2014"}:
a classification of \<^emph>\<open>verification and testing techniques\<close>:
@{theory_text [display]\<open>
datatype vnt_technique =
formal_proof "thm list" | stat_analysis
| dyn_analysis dyn_ana_kind | ...
\end{isar}
In contrast to the standard, we can parameterize \inlineisar+formal_proof+ with a list of
theorems, an entity known in the Isabelle kernel. Here, \isadof assures for text elements
\<close>}
In contrast to the standard, we can parameterize \<open>formal_proof\<close> with a list of
theorems, an entity known in the Isabelle kernel. Here, \<^isadof> assures for text elements
annotated with theorem names, that they refer indeed to established theorems in the Isabelle
environment. Additional checks could be added to make sure that these theorems have a particular
form.
While we claim that this possibility to link to theorems (and test-results) is unique in the
world of systems attempting to assure traceability, referencing a particular (proven) theorem is
definitively not sufficient to satisfy the claimed requirement. Human evaluators will always have
to check that the provided theorem \<open>adequately\<close> represents the claim; we do not in the slightest
suggest that their work is superfluous. Our framework allows to statically check that tests or proofs
have been provided, at places where the ontology requires them to be, and both assessors and developers
can rely on this check and navigate through related information easily. It does not guarantee that
intended concepts for, \eg, safety or security have been adequately modeled.
world of systems attempting to assure \<^cenelec_term>\<open>traceability\<close>, referencing a particular
(proven) theorem is definitively not sufficient to satisfy the claimed requirement. Human
evaluators will always have to check that the provided theorem \<open>adequately\<close> represents the claim;
we do not in the slightest suggest that their work is superfluous. Our framework allows to
statically check that tests or proofs have been provided, at places where the ontology requires
them to be, and both assessors and developers can rely on this check and navigate through
related information easily. It does not guarantee that intended concepts for, \<^eg>, safety
or security have been adequately modeled.
\<close>
section*[moe::text_section]
\<open>Major Ontological Entities: Requirements and Evidence\<close>
text\<open>
We introduce central concept of a \<^emph>\<open>requirement\<close> as an ODL \inlineisar*doc_class*
based on some generic basic library \inlineisar*text_element* providing basic layout attributes.
\begin{isar}
doc_class requirement = text_element +
long_name :: "string option"
is_concerned :: "role set"
\end{isar}
where the \inlineisar*roles* are exactly the ones defined in the previous section and represent
the groups of stakeholders in the CENELEC process. Therefore, the \inlineisar+is_concerned+-attribute
allows expressing who ``owns'' this text-element. \isadof supports a role-based
presentation, \eg, different presentation styles of the
integrated source may decide to highlight, to omit, to defer into an annex, text entities
according to the role-set.
We introduce central concept of a \<^emph>\<open>requirement\<close> as an ODL \<^theory_text>\<open>doc_class\<close>
based on the generic basic library \<^doc_class>\<open>text_element\<close> providing basic layout attributes.
@{theory_text [display]\<open>
doc_class requirement = text_element +
long_name :: "string option"
is_concerned :: "role set"
\<close>}
the groups of stakeholders in the CENELEC process. Therefore, the \<open>is_concerned\<close>-attribute
allows expressing who ``owns'' this text-element. \<^isadof> supports a role-based
presentation, \<^eg>, different presentation styles of the integrated source may decide to highlight,
to omit, to defer into an annex, text entities according to the role-set.
Since ODL supports single inheritance, we can express sub-requirements and therefore a style
of requirement decomposition as advocated in GSN~@{cite "kelly.ea:goal:2004"}:
\begin{isar}
doc_class sub_requirement =
decomposes :: "requirement"
relates_to :: "requirement set"
\end{isar}\<close>
@{theory_text [display]\<open>
doc_class sub_requirement =
decomposes :: "requirement"
relates_to :: "requirement set"
\<close>}
\<close>
section*[claimsreqevidence::text_section]\<open>Tracking Claims, Derived Requirements and Evidence\<close>
text\<open>An example for making explicit implicit principles,
consider the following statement @{cite "bsi:50128:2014"}, pp. 25.:\vspace{-1.5mm}
consider the following statement @{cite "bsi:50128:2014"}, pp. 25.: \<^vs>\<open>-0.15cm\<close>
\begin{quote}\small
The objective of software verification is to examine and arrive at a judgment based on
evidence that output items (process, documentation, software or application) of a specific
development phase fulfill the requirements and plans with respect to completeness, correctness
and consistency.
\end{quote}\vspace{-1.5mm}
The terms \<^emph>\<open>judgment\<close> and \<^emph>\<open>evidence\<close> are used as a kind of leitmotif throughout the CENELEC
standard, but they are neither explained nor even listed in the general glossary. However, the
standard is fairly explicit on the \<^emph>\<open>phase\<close>s and the organizational roles that different stakeholders
should have in the process. Our version to express this key concept of judgment, \eg, by
the following concept:
\begin{isar}
doc_class judgement =
refers_to :: requirement
evidence :: "vnt_technique list"
status :: status
is_concerned :: "role set" <= "{VER,ASR,VAL}"
\end{isar}
\end{quote} \<^vs>\<open>-0.15cm\<close>
The terms \<^onto_class>\<open>judgement\<close> based on \<^term>\<open>evidence\<close> are used as a kind of leitmotif throughout
the CENELEC standard, but they are neither explained nor even listed in the general glossary.
However, the standard is fairly explicit on the \<^emph>\<open>phase\<close>s and the organizational roles that
different stakeholders should have in the process. Our version to express this key concept of
\<^onto_class>\<open>judgement\<close> , \<^eg>, by the following concept:
@{theory_text [display]\<open>
doc_class judgement =
refers_to :: requirement
evidence :: "vnt_technique list"
status :: status
is_concerned :: "role set" <= "{VER,ASR,VAL}"
\<close>}
As one can see, the role set is per default set to the verification team, the assessors and the
validation team.
There are different views possible here: an alternative would be to define \inlineisar+evidence+
as ontological concept with \inlineisar+vnt_technique+'s (rather than an attribute of judgement)
and consider the basis of judgments as a relation between requirements and relation:
\begin{isar}
doc_class judgement =
based_on :: "(requirement \<times> evidence) set"
status :: status
is_concerned :: "role set" <= "{VER,ASR,VAL}"
\end{isar}
There are different views possible here: an alternative would be to define \<^term>\<open>evidence\<close>
as ontological concept with \<^typ>\<open>vnt_technique\<close>'s (rather than an attribute of judgement)
and consider the basis of a summary containing the relation between requirements and relation:
@{theory_text [display]\<open>
doc_class summary =
based_on :: "(requirement \<times> evidence) set"
status :: status
is_concerned :: "role set" <= "{VER,ASR,VAL}"
\<close>}
More experimentation will be needed to find out what kind of ontological modeling is most
adequate for developers in the context of \isadof.
@ -428,60 +533,66 @@ text\<open>From the variety of different possibilities for adding CENELEC annota
integrated source, we will, in the following, point out three scenarios.\<close>
subsection\<open>Internal Verification of Claims in the Requirements Specification.\<close>
text\<open>In our case, the SR-team early on detected a property necessary
for error-detection of the device (c.f. @{docitem verific}):
\enlargethispage{2\baselineskip}\begin{isar}
text*[encoder_props::requirement]<open> The requirement specification team ...
C1 & C2 & C3 = 0 (bitwise logical AND operation)
C1 | C2 | C3 = 1 (bitwise logical OR operation) <close>
\end{isar}
After the Isabelle proofs shown in @{docitem verific}, we can either register the theorems
text\<open>In our case, the \<^term>\<open>SR\<close>-team early on detected a property necessary
for error-detection of the device (c.f. @{technical verific}):
@{theory_text [display]\<open>
text*[encoder_props::requirement]\<open> The requirement specification team identifies the property:
C1 & C2 & C3 = 0 (bitwise logical AND operation)
C1 | C2 | C3 = 1 (bitwise logical OR operation) \<close>
\<close>}
After the Isabelle proofs shown in @{technical verific}, we can either register the theorems
directly in an evidence statement:
\begin{isar}
text*[J1::judgement, refers_to="<@>{docitem <open>encoder_props<close>}",
evidence="[formal_proof[<@>{thm <open>Encoder_Property_1<close>},
<@>{thm <open>Encoder_Property_2<close>}]]"]
<open>The required encoder properties are in fact verified to be consistent
with the formalization of <@>{term "phase$_0$"}.<close>
\end{isar}
The references \inlineisar|<@>{...}|, called antiquotation, allow us not only to reference to
@{theory_text [display]\<open>
text*[J1::judgement, refers_to="@{docitem <open>encoder_props<close>}",
evidence="[formal_proof[@{thm <open>Encoder_Property_1<close>},
@{thm <open>Encoder_Property_2<close>}]]"]
\<open>The required encoder properties are in fact verified to be consistent
with the formalization of @{term "phase\<^sub>0"}.\<close>
\<close>}
The references \<open>@{...}\<close>, called antiquotation, allow us not only to reference to
formal concepts, they are checked for consistency and there are also antiquotations that
print the formally checked content (\eg, the statement of a theorem).
print the formally checked content (\<^eg>, the statement of a theorem).
\<close>
subsection\<open>Exporting Claims of the Requirements Specification.\<close>
text\<open>By definition, the main purpose of the requirement specification is the
identification of the safety requirements. As an example, we state the required precision of an
odometric function: for any normally behaved distance function \inlineisar+df+, and any representable
and valid sampling sequence that can be constructed for \inlineisar+df+, we require that the
difference between the physical distance and distance calculable from the
@{term Odometric_Position_Count} is bound by the minimal resolution of the odometer.
\begin{isar}
text*[R5::safety_requirement]<open>We can now state ... <close>
definition
Odometric_Position_Count_precise::(shaft_encoder_state list\<Rightarrow>output)\<Rightarrow>bool
where Odometric_Position_Count_precise odofunction \<equiv>
(\<forall> df. \<forall>S. normally_behaved_distance_function df
\<longrightarrow> representable S
\<longrightarrow> valid_sampling S df
\<longrightarrow> (let pos = uint(Odometric_Position_Count(odofunction S))
in \<bar>df((length S - 1)*\<delta>t$_{\text{odo}}$) - (\<delta>s$_{\text{res}}$ * pos)\<bar> \<le> \<delta>s$_{\text{res}}$))
update_instance*[R5::safety_requirement,
formal_definition:="[<@>{thm <open>Odometric_Position_Count_precise_def<close>}]"]
\end{isar}
By \inlineisar+update_instance*+, we book the property \inlineisar+Position_Count_precise_def+ as
\inlineisar+safety_requirement+, a specific sub-class of \inlineisar+requirement+s
text\<open>By definition, the main purpose of the requirement specification is the identification of
the safety requirements. As an example, we state the required precision of an odometric function:
for any normally behaved distance function \<open>df\<close>, and any representable and valid
sampling sequence that can be constructed for \<open>df\<close>, we require that the difference
between the physical distance and distance calculable from the @{term Odometric_Position_Count}
is bound by the minimal resolution of the odometer.
@{theory_text [display]\<open>
text*[R5::safety_requirement]\<open>We can now state ... \<close>
definition Odometric_Position_Count_precise :: "(shaft_encoder_state list\<Rightarrow>output)\<Rightarrow>bool"
where "Odometric_Position_Count_precise odofunction \<equiv>
(\<forall> df. \<forall>S. normally_behaved_distance_function df
\<longrightarrow> representable S
\<longrightarrow> valid_sampling S df
\<longrightarrow> (let pos = uint(Odometric_Position_Count(odofunction S))
in \<bar>df((length S - 1)*\<delta>t\<^sub>o\<^sub>d\<^sub>o) - (\<delta>s\<^sub>r\<^sub>e\<^sub>s * pos)\<bar> \<le> \<delta>s\<^sub>r\<^sub>e\<^sub>s))"
update_instance*[R5::safety_requirement,
formal_definition:="[@{thm \<open>Odometric_Position_Count_precise_def\<close>}]"]
\<close>}
By \<^theory_text>\<open>update_instance*\<close>, we book the property \<open>Position_Count_precise_def\<close> as
\<^onto_class>\<open>safety_requirement\<close>, a specific sub-class of \<^onto_class>\<open>requirement\<close>s
requesting a formal definition in Isabelle.\<close>
subsection\<open>Exporting Derived Requirements.\<close>
text\<open>Finally, we discuss the situation where the verification team discovered a critical side-condition
for a major theorem necessary for the safety requirements; this was in our development the case for
the condition labelled ``\inlineisar|**|'' in @{docitem verific}. The current CENELEC standard clearly separates
the condition labelled ``\<open>**\<close>'' in @{docitem verific}. The current CENELEC standard clearly separates
``requirement specifications'' from ``verification reports,'' which is probably motivated
by the overall concern of organizational separation and of document consistency. While this
document organization is possible in \isadof, it is in our experience often counter-productive
document organization is possible in \<^isadof>, it is in our experience often counter-productive
in practice: organizations tend to defend their documents because the impact of changes is more and more
difficult to oversee. This effect results in a dramatic development slow-down and an increase of
costs. Furthermore, these barriers exclude situations where developers perfectly know, for example,
@ -496,65 +607,71 @@ different PDF versions and for each version, document specific consistency guara
automatically enforced.
In our case study, we define this condition as predicate, declare an explanation of it as
\inlineisar+SRAC+ (CENELEC for: safety-related application condition; ontologically, this is a
derived class from \inlineisar+requirement+.) and add the definition of the predicate into the
\<^onto_class>\<open>SRAC\<close> (CENELEC for: safety-related application condition; ontologically, this is a
derived class from \<^onto_class>\<open>requirement\<close>.) and add the definition of the predicate into the
document instance as described in the previous section.\<close>
text\<open>\appendix\<close>
chapter\<open>Appendix\<close>
text\<open>
\<^item> \inlineisar|<@>{thm refl}|: @{thm refl}
\<^item> \inlineisar|<@>{thm [source] refl}|: @{thm [source] refl}
\<^item> \inlineisar|<@>{thm[mode=Rule] conjI}|: @{thm[mode=Rule] conjI}
\<^item> \inlineisar|<@>{file "mini_odo.thy"}|: @{file "mini_odo.thy"}
\<^item> \inlineisar|<@>{value "3+4::int"}|: @{value "3+4::int"}
\<^item> \inlineisar|<@>{const hd}|: @{const hd}
\<^item> \inlineisar|<@>{theory HOL.List}|: @{theory HOL.List}
\<^item> \inlineisar|<@>{term "3"}|: @{term "3"}
\<^item> \inlineisar|<@>{type bool}|: @{type bool}
\<^item> \inlineisar|<@>{term [show_types] "f x = a + x"}|: @{term [show_types] "f x = a + x"}
\<^item> \<open>@{thm refl}\<close> : @{thm refl}
\<^item> \<open>@{thm [source] refl}\<close> : @{thm [source] refl}
\<^item> \<open>@{thm[mode=Rule] conjI}\<close> : @{thm[mode=Rule] conjI}
\<^item> \<open>@{file "mini_odo.thy"}\<close> : @{file "mini_odo.thy"}
\<^item> \<open>@{value "3+4::int"}}\<close> : @{value "3+4::int"}
\<^item> \<open>@{const hd}\<close> : @{const hd}
\<^item> \<open>@{theory HOL.List}\<close> : @{theory HOL.List}s
\<^item> \<open>@{tserm "3"}\<close> : @{term "3"}
\<^item> \<open>@{type bool}\<close> : @{type bool}
\<^item> \<open>@{thm term [show_types] "f x = a + x"}\<close> : @{term [show_types] "f x = a + x"}
\<close>
text\<open>Examples for declaration of typed doc-items "assumption" and "hypothesis",
text\<open>Examples for declaration of typed doc-classes "assumption" (sic!) and "hypothesis" (sic!!),
concepts defined in the underlying ontology @{theory "Isabelle_DOF.CENELEC_50128"}. \<close>
text*[ass1::assumption, long_name="Some ''assumption one''"] \<open> The subsystem Y is safe. \<close>
text*[hyp1::hypothesis] \<open> P not equal NP \<close>
text*[ass2::assumption, long_name="Some ''assumption one''"] \<open> The subsystem Y is safe. \<close>
text*[hyp1::hypothesis] \<open> \<open>P \<noteq> NP\<close> \<close>
text\<open>A real example fragment from a larger project, declaring a text-element as a
"safety-related application condition", a concept defined in the
@{theory "Isabelle_DOF.CENELEC_50128"} ontology:\<close>
text\<open>
A real example fragment fsrom a larger project, declaring a text-element as a
"safety-related application condition", a concept defined in the
@{theory "Isabelle_DOF.CENELEC_50128"} ontology:\<close>
text*[hyp2::hypothesis]\<open>Under the assumption @{assumption \<open>ass1\<close>} we establish the following: ... \<close>
text*[hyp2::hypothesis]\<open>Under the assumption @{assumption \<open>ass2\<close>} we establish the following: ... \<close>
text*[ass122::SRAC, long_name="Some ''ass122''"] \<open> The overall sampling frequence of the odometer
subsystem is therefore 14 khz, which includes sampling, computing and
result communication times... \<close>
text*[ass122::SRAC, long_name="Some ''ass122''"]
\<open> The overall sampling frequence of the odometer subsystem is therefore 14 khz,
which includes sampling, computing and result communication times... \<close>
text*[ass123::SRAC] \<open> The overall sampling frequence of the odometer
subsystem is therefore 14 khz, which includes sampling, computing and
result communication times... \<close>
text*[ass123::SRAC]
\<open> The overall sampling frequence of the odometer subsystem is therefore 14 khz,
which includes sampling, computing and result communication times... \<close>
text*[ass124::EC, long_name="Some ''ass124''"] \<open> The overall sampling frequence of the odometer
subsystem is therefore 14 khz, which includes sampling, computing and
result communication times... \<close>
text*[ass124::EC, long_name="Some ''ass124''"]
\<open> The overall sampling frequence of the odometer subsystem is therefore 14 khz,
which includes sampling, computing and result communication times... \<close>
text*[t10::test_result] \<open> This is a meta-test. This could be an ML-command
that governs the external test-execution via, eg., a makefile or specific calls
to a test-environment or test-engine \<close>
text*[t10::test_result]
\<open> This is a meta-test. This could be an ML-command that governs the external
test-execution via, \<^eg>, a makefile or specific calls to a test-environment or test-engine. \<close>
text\<open>Finally some examples of references to doc-items, i.e. text-elements with declared
meta-information and status. \<close>
text \<open> As established by @{docref (unchecked) \<open>t10\<close>},
@{docref (define) \<open>t10\<close>} \<close>
text \<open> the @{docref \<open>t10\<close>}
as well as the @{docref \<open>ass122\<close>}\<close>
text \<open> Finally some examples of references to doc-items, i.e. text-elements
with declared meta-information and status. \<close>
text \<open> As established by @{test_result (unchecked) \<open>t10\<close>},
@{test_result (define) \<open>t10\<close>} \<close>
text \<open> the @{test_result \<open>t10\<close>}
as well as the @{SRAC \<open>ass122\<close>}\<close>
text \<open> represent a justification of the safety related applicability
condition @{SRAC \<open>ass122\<close>} aka exported constraint @{EC \<open>ass122\<close>}.\<close>
text \<open> due to notational conventions for antiquotations, one may even write:
"represent a justification of the safety related applicability
condition \<^SRAC>\<open>ass122\<close> aka exported constraint \<^EC>\<open>ass122\<close>."\<close>
(*<*)
end
(*>*)

View File

@ -1,4 +1,3 @@
scholarly_paper
technical_report
math_exam
CENELEC_50128

View File

@ -0,0 +1,90 @@
theory Cytology
imports "Isabelle_DOF.scholarly_paper"
begin
text\<open>A small example ontology for demonstration purposes.
The presentation follows closely: \<^url>\<open>https://www.youtube.com/watch?v=URUJD5NEXC8\<close>.\<close>
datatype protein = filaments | motor_proteins | rna | dna |nucleolus
type_synonym desc = "string"
onto_class organelles = description :: desc
find_theorems (60) name:"organelles"
term "Cytology.organelles.make"
onto_class ribosomes = organelles + description :: desc
onto_class mytochondria = organelles + description :: desc
onto_class golgi_apparatus = organelles + description :: desc
onto_class lysosome = organelles + description :: desc
text\<open>the control center of the cell:\<close>
onto_class nucleus = organelles +
description :: desc
components :: "protein list" <= "[nucleolus]"
(* Not so nice construction to mimick inheritance on types useds in attribute positions. *)
datatype organelles' = upcast\<^sub>r\<^sub>i\<^sub>b\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e\<^sub>s (get_ribosomes:ribosomes)
| upcast\<^sub>m\<^sub>y\<^sub>t\<^sub>o\<^sub>c\<^sub>h\<^sub>o\<^sub>n\<^sub>d\<^sub>r\<^sub>i\<^sub>a (get_mytochondria:mytochondria)
| upcast\<^sub>g\<^sub>o\<^sub>l\<^sub>g\<^sub>i\<^sub>_\<^sub>a\<^sub>p\<^sub>p\<^sub>a\<^sub>r\<^sub>a\<^sub>t\<^sub>u\<^sub>s (get_golgi_apparatus: golgi_apparatus)
| upcast\<^sub>l\<^sub>y\<^sub>s\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e (get_lysosome : lysosome)
| upcast\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s (get_nucleus : nucleus)
fun is\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s where "is\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s (upcast\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s X) = True" | "is\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s ( _) = False"
(* ... *)
fun downcast\<^sub>r\<^sub>i\<^sub>b\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e\<^sub>s
where "downcast\<^sub>r\<^sub>i\<^sub>b\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e\<^sub>s (upcast\<^sub>r\<^sub>i\<^sub>b\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e\<^sub>s X) = X" | "downcast\<^sub>r\<^sub>i\<^sub>b\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e\<^sub>s _ = undefined"
fun downcast\<^sub>m\<^sub>y\<^sub>t\<^sub>o\<^sub>c\<^sub>h\<^sub>o\<^sub>n\<^sub>d\<^sub>r\<^sub>i\<^sub>a
where "downcast\<^sub>m\<^sub>y\<^sub>t\<^sub>o\<^sub>c\<^sub>h\<^sub>o\<^sub>n\<^sub>d\<^sub>r\<^sub>i\<^sub>a (upcast\<^sub>m\<^sub>y\<^sub>t\<^sub>o\<^sub>c\<^sub>h\<^sub>o\<^sub>n\<^sub>d\<^sub>r\<^sub>i\<^sub>a X) = X" | "downcast\<^sub>m\<^sub>y\<^sub>t\<^sub>o\<^sub>c\<^sub>h\<^sub>o\<^sub>n\<^sub>d\<^sub>r\<^sub>i\<^sub>a _ = undefined"
fun downcast\<^sub>g\<^sub>o\<^sub>l\<^sub>g\<^sub>i\<^sub>_\<^sub>a\<^sub>p\<^sub>p\<^sub>a\<^sub>r\<^sub>a\<^sub>t\<^sub>u\<^sub>s
where "downcast\<^sub>g\<^sub>o\<^sub>l\<^sub>g\<^sub>i\<^sub>_\<^sub>a\<^sub>p\<^sub>p\<^sub>a\<^sub>r\<^sub>a\<^sub>t\<^sub>u\<^sub>s (upcast\<^sub>g\<^sub>o\<^sub>l\<^sub>g\<^sub>i\<^sub>_\<^sub>a\<^sub>p\<^sub>p\<^sub>a\<^sub>r\<^sub>a\<^sub>t\<^sub>u\<^sub>s X) = X" | "downcast\<^sub>g\<^sub>o\<^sub>l\<^sub>g\<^sub>i\<^sub>_\<^sub>a\<^sub>p\<^sub>p\<^sub>a\<^sub>r\<^sub>a\<^sub>t\<^sub>u\<^sub>s _ = undefined"
fun downcast\<^sub>l\<^sub>y\<^sub>s\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e
where "downcast\<^sub>l\<^sub>y\<^sub>s\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e (upcast\<^sub>l\<^sub>y\<^sub>s\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e X) = X" | "downcast\<^sub>l\<^sub>y\<^sub>s\<^sub>o\<^sub>s\<^sub>o\<^sub>m\<^sub>e _ = undefined"
fun downcast\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s
where "downcast\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s (upcast\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s X) = X" | "downcast\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s _ = undefined"
onto_class cell =
name :: string
membrane :: desc <= "\<open>The outer boundary of the cell\<close>"
cytoplasm :: desc <= "\<open>The liquid in the cell\<close>"
cytoskeleton :: desc <= "\<open>includes the thread-like microfilaments\<close>"
genetic_material :: "protein list" <= "[rna, dna]"
text\<open>Cells are devided into two categories: \<^emph>\<open>procaryotic\<close> cells (unicellular organisms some
bacteria) without a substructuring in organelles and \<^emph>\<open>eucaryotic\<close> cells, as occurring in
pluricellular organisms\<close>
onto_class procaryotic_cells = cell +
name :: string
onto_class eucaryotic_cells = cell +
organelles :: "organelles' list"
invariant has_nucleus :: "\<lambda>\<sigma>::eucaryotic_cells. \<exists> org \<in> set (organelles \<sigma>). is\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s org"
\<comment> \<open>Cells must have at least one nucleus. However, this should be executable.\<close>
find_theorems (70)name:"eucaryotic_cells"
find_theorems name:has_nucleus
value "is\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s (mk\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s X)"
term \<open>eucaryotic_cells.organelles\<close>
value \<open>(eucaryotic_cells.organelles(eucaryotic_cells.make X Y Z Z Z [] 3 []))\<close>
value \<open>has_nucleus_inv(eucaryotic_cells.make X Y Z Z Z [] 3 [])\<close>
value \<open>has_nucleus_inv(eucaryotic_cells.make X Y Z Z Z [] 3
[upcast\<^sub>n\<^sub>u\<^sub>c\<^sub>l\<^sub>e\<^sub>u\<^sub>s (nucleus.make a b c d [])])\<close>
end

View File

@ -1,98 +0,0 @@
(*<*)
theory MathExam
imports "Isabelle_DOF.math_exam"
HOL.Real
begin
(*>*)
(* open_monitor*[exam::MathExam] *)
section*[header::Header,examSubject= "[algebra]",
date="''02-05-2018''", timeAllowed="90::int"] \<open>Exam number 1\<close>
text\<open>
\begin{itemize}
\item Use black ink or black ball-point pen.
\item Draw diagrams in pencil.
\item Answer all questions in the spaces provided.
\end{itemize}
\<close>
text*[idir::Author, affiliation="''CentraleSupelec''",
email="''idir.aitsadoune@centralesupelec.fr''"]
\<open>Idir AIT SADOUNE\<close>
figure*[figure::figure, spawn_columns=False,
relative_width="80",
src="''figures/Polynomialdeg5''"]
\<open>A Polynome.\<close>
subsubsection*[exo1 :: Exercise, content="[q1::Task,q2::Task]"]\<open>Exercise 1\<close>
text\<open>
Here are the first four lines of a number pattern.
\begin{itemize}
\item Line 1 : @{term "1*6 + 2*4 = 2*7"}
\item Line 2 : @{term "2*7 + 2*5 = 3*8"}
\item Line 3 : @{term "3*8 + 2*6 = 4*9"}
\item Line 4 : @{term "4*9 + 2*7 = 5*10"}
\end{itemize}
\<close>
declare [[show_sorts=false]]
subsubsection*[exo2 :: Exercise, content="[q1::Task,q2::Task]"]\<open>Exercise 2\<close>
text\<open>Find the roots of the polynome:
@{term "(x^3) - 6 * x^2 + 5 * x + 12"}.
Note the intermediate steps in the following fields and submit the solution.\<close>
text\<open>
\begin{Form}[action={http://your-web-server.com/path/receiveform.cgi}]
\begin{tabular}{l}
From @{term "(x^3) - 6 * x^2 + 5 * x + 12"} \\\\
\TextField{have 1} \\\\
\TextField{have 2} \\\\
\TextField{have 3} \\\\
\TextField{finally show} \\\\
\CheckBox[width=1em]{Has the polynomial as many solutions as its degree ? } \\\\
\Submit{Submit}\\
\end{tabular}
\end{Form}
\<close>
(* a bit brutal, as long as lemma* does not yet work *)
(*<*)
lemma check_polynome :
fixes x::real
shows "(x^3) - 6 * x^2 + 5 * x + 12 = (x-4) * (x+1) * (x - 3)"
proof -
have * : "(x-4) * (x+1) * (x - 3) = (x-4) * ((x+1) * (x-3))"
by simp
have ** : "... = (x-4) * (x^2 - 2*x - 3)"
apply(auto simp: right_diff_distrib add.commute semiring_normalization_rules(1)[symmetric])
by (simp add: semiring_normalization_rules(29))
have *** : "... = x^3 - 6 * x^2 + 5 * x + 12"
apply(auto simp: right_diff_distrib left_diff_distrib add.commute semiring_normalization_rules(1)[symmetric])
by (simp add: numeral_3_eq_3 semiring_normalization_rules(29))
show ?thesis
by(simp only: * ** ***)
qed
(*>*)
text*[a1::Answer_Formal_Step]\<open>First Step: Fill in term and justification\<close>
text*[a2::Answer_Formal_Step]\<open>Next Step: Fill in term and justification\<close>
text*[a3::Answer_Formal_Step]\<open>Next Step: Fill in term and justification\<close>
text*[a4::Answer_Formal_Step]\<open>Next Step: Fill in term and justification\<close>
text*[q1::Task, local_grade="oneStar", mark="1::int", type="formal"]
\<open>Complete Line 10 : @{term "10*x + 2*y = 11*16"}\<close>
subsubsection*[exo3 :: Exercise, content="[q1::Task,q2::Task]"]\<open>Exercise 3\<close>
text*[q2::Task, local_grade="threeStars", mark="3::int", type="formal"]
\<open>Prove that @{term "n*(n+5) + 2*(n+3) "} is always the product of two numbers
with a difference of 5.
\<close>
(* this does not work on the level of the LaTeX output for known restrictions of the Toplevel. *)
(* close_monitor*[exam :: MathExam] *)
end

View File

@ -1,10 +0,0 @@
session "MathExam" = "Isabelle_DOF" +
options [document = pdf, document_output = "output"]
theories
MathExam
document_files
"preamble.tex"
"isadof.cfg"
"preamble.tex"
"build"
"figures/Polynomialdeg5.png"

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2019 The University of Sheffield. All rights reserved.
# 2018 The University of Paris-Saclay. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
set -e
if [ ! -f $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh ]; then
echo ""
echo "Error: Isabelle/DOF not installed"
echo "====="
echo "This is a Isabelle/DOF project. The document preparation requires"
echo "the Isabelle/DOF framework. Please obtain the framework by cloning"
echo "the Isabelle/DOF git repository, i.e.: "
echo " git clone https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF"
echo "You can install the framework as follows:"
echo " cd Isabelle_DOF/document-generator"
echo " ./install"
echo ""
exit 1
fi
cp $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh .
source build_lib.sh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -1,2 +0,0 @@
Template: scrartcl
Ontology: math_exam

View File

@ -1,18 +0,0 @@
%% Copyright (C) 2018 The University of Sheffield
%% 2018 The University of Paris-Saclay
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%% This is a placeholder for user-specific configuration and packages.
\title{<TITLE>}
\author{<AUTHOR>}

View File

@ -1 +0,0 @@
MathExam

View File

@ -1,51 +1,80 @@
(*************************************************************************
* Copyright (C)
* 2019 The University of Exeter
* 2018-2019 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
(*<*)
theory IsaDofApplications
imports "Isabelle_DOF.scholarly_paper"
begin
use_template "lncs"
use_ontology "scholarly_paper"
open_monitor*[this::article]
declare[[strict_monitor_checking=false]]
define_shortcut* isadof \<rightleftharpoons> \<open>\isadof\<close>
LaTeX \<rightleftharpoons> \<open>\LaTeX{}\<close>
dots \<rightleftharpoons> \<open>\ldots\<close>
isabelle \<rightleftharpoons> \<open>Isabelle/HOL\<close>
Protege \<rightleftharpoons> \<open>Prot{\'e}g{\'e}\<close>
(* slanted text in contrast to italics *)
define_macro* slanted_text \<rightleftharpoons> \<open>\textsl{\<close> _ \<open>}\<close>
(*>*)
title*[tit::title]\<open>Using the Isabelle Ontology Framework\<close>
title*[tit::title] \<open>Using the Isabelle Ontology Framework\<close>
subtitle*[stit::subtitle]\<open>Linking the Formal with the Informal\<close>
text*[adb:: author,
email="''a.brucker@sheffield.ac.uk''",
orcid="''0000-0002-6355-1200''",
affiliation="''The University of Sheffield, Sheffield, UK''"]\<open>Achim D. Brucker\<close>
text*[idir::author,
email = "''idir.aitsadoune@centralesupelec.fr''",
affiliation = "''CentraleSupelec, Paris, France''"]\<open>Idir Ait-Sadoune\<close>
text*[paolo::author,
email = "''paolo.crisafulli@irt-systemx.fr''",
affiliation= "''IRT-SystemX, Paris, France''"]\<open>Paolo Crisafulli\<close>
text*[bu::author,
email = "\<open>wolff@lri.fr\<close>",
affiliation = "\<open>Université Paris-Saclay, Paris, France\<close>"]\<open>Burkhart Wolff\<close>
author*[adb,
email ="''a.brucker@sheffield.ac.uk''",
orcid ="''0000-0002-6355-1200''",
affiliation ="''The University of Sheffield, Sheffield, UK''"]\<open>Achim D. Brucker\<close>
author*[idir,
email = "''idir.aitsadoune@centralesupelec.fr''",
affiliation = "''CentraleSupelec, Paris, France''"]\<open>Idir Ait-Sadoune\<close>
author*[paolo,
email = "''paolo.crisafulli@irt-systemx.fr''",
affiliation = "''IRT-SystemX, Paris, France''"]\<open>Paolo Crisafulli\<close>
author*[bu,
email = "\<open>wolff@lri.fr\<close>",
affiliation = "\<open>Université Paris-Saclay, Paris, France\<close>"]\<open>Burkhart Wolff\<close>
text*[abs::abstract,
keywordlist="[''Ontology'',''Ontological Modeling'',''Isabelle/DOF'']"]\<open>
While Isabelle is mostly known as part of Isabelle/HOL (an interactive
theorem prover), it actually provides a framework for developing a wide
spectrum of applications. A particular strength
of the Isabelle framework is the combination of text editing, formal verification,
and code generation.
abstract*[abs::abstract, keywordlist="[''Ontology'',''Ontological Modeling'',''Isabelle/DOF'']"]\<open>
While Isabelle is mostly known as part of \<^isabelle> (an interactive
theorem prover), it actually provides a framework for developing a wide
spectrum of applications. A particular strength
of the Isabelle framework is the combination of text editing, formal verification,
and code generation.
Up to now, Isabelle's document preparation system lacks a mechanism
for ensuring the structure of different document types (as, e.g.,
required in certification processes) in general and, in particular,
mechanism for linking informal and formal parts of a document.
In this paper, we present \<^isadof>, a novel Document Ontology Framework
on top of Isabelle. \<^isadof> allows for conventional typesetting
\<^emph>\<open>as well\<close> as formal development. We show how to model document
ontologies inside \<^isadof>, how to use the resulting meta-information
for enforcing a certain document structure, and discuss ontology-specific
IDE support.
Up to now, Isabelle's document preparation system lacks a mechanism
for ensuring the structure of different document types (as, e.g.,
required in certification processes) in general and, in particular,
mechanism for linking informal and formal parts of a document.
In this paper, we present \isadof, a novel Document Ontology Framework
on top of Isabelle. \isadof allows for conventional typesetting
\<^emph>\<open>as well\<close> as formal development. We show how to model document
ontologies inside \isadof, how to use the resulting meta-information
for enforcing a certain document structure, and discuss ontology-specific IDE support.
%% If you consider citing this paper, please refer to
%% @{cite "brucker.ea:isabelle-ontologies:2018"}.
\<close>
section*[intro::introduction]\<open> Introduction \<close>
text*[introtext::introduction]\<open>
text*[introtext::introduction, level = "Some 1"]\<open>
The linking of the \<^emph>\<open>formal\<close> to the \<^emph>\<open>informal\<close> is perhaps the
most pervasive challenge in the digitization of knowledge and its
propagation. This challenge incites numerous research efforts
@ -53,7 +82,7 @@ summarized under the labels ``semantic web'', ``data mining'', or any
form of advanced ``semantic'' text processing. A key role in
structuring this linking play \<^emph>\<open>document ontologies\<close> (also called
\<^emph>\<open>vocabulary\<close> in the semantic web community~@{cite "w3c:ontologies:2015"}),
\ie, a machine-readable form of the structure of documents as well as
\<^ie>, a machine-readable form of the structure of documents as well as
the document discourse.
Such ontologies can be used for the scientific discourse within scholarly
@ -67,22 +96,22 @@ describing \<^emph>\<open>attributes\<close> of the concept, as well as \<^emph>
them. A particular link between concepts is the \<^emph>\<open>is-a\<close> relation declaring
the instances of a subclass to be instances of the super-class.
The main objective of this paper is to present \isadof, a novel
The main objective of this paper is to present \<^isadof>, a novel
framework to \<^emph>\<open>model\<close> typed ontologies and to \<^emph>\<open>enforce\<close> them during
document evolution. Based on Isabelle infrastructures, ontologies may refer to
types, terms, proven theorems, code, or established assertions.
Based on a novel adaption of the Isabelle IDE, a document is checked to be
\<^emph>\<open>conform\<close> to a particular ontology---\isadof is designed to give fast user-feedback
\<^emph>\<open>conform\<close> to a particular ontology---\<^isadof> is designed to give fast user-feedback
\<^emph>\<open>during the capture of content\<close>. This is particularly valuable in case of document
changes, where the \<^emph>\<open>coherence\<close> between the formal and the informal parts of the
content can be mechanically checked.
To avoid any misunderstanding: \isadof is \<^emph>\<open>not a theory in HOL\<close>
To avoid any misunderstanding: \<^isadof> is \<^emph>\<open>not a theory in HOL\<close>
on ontologies and operations to track and trace links in texts,
it is an \<^emph>\<open>environment to write structured text\<close> which \<^emph>\<open>may contain\<close>
Isabelle/HOL definitions and proofs like mathematical articles, tech-reports and
scientific papers---as the present one, which is written in \isadof
itself. \isadof is a plugin into the Isabelle/Isar
\<^isabelle> definitions and proofs like mathematical articles, tech-reports and
scientific papers---as the present one, which is written in \<^isadof>
itself. \<^isadof> is a plugin into the Isabelle/Isar
framework in the style of~@{cite "wenzel.ea:building:2007"}.
\<close>
@ -94,29 +123,29 @@ declare_reference*[ontomod::text_section]
declare_reference*[ontopide::text_section]
declare_reference*[conclusion::text_section]
(*>*)
text*[plan::introduction]\<open> The plan of the paper is follows: we start by introducing the underlying
Isabelel sytem (@{docitem (unchecked) \<open>bgrnd\<close>}) followed by presenting the
essentials of \isadof and its ontology language (@{docitem (unchecked) \<open>isadof\<close>}).
It follows @{docitem (unchecked) \<open>ontomod\<close>}, where we present three application
scenarios from the point of view of the ontology modeling. In @{docitem_ref (unchecked) \<open>ontopide\<close>}
text*[plan::introduction, level="Some 1"]\<open> The plan of the paper is follows: we start by introducing the underlying
Isabelle system (@{text_section (unchecked) \<open>bgrnd\<close>}) followed by presenting the
essentials of \<^isadof> and its ontology language (@{text_section (unchecked) \<open>isadof\<close>}).
It follows @{text_section (unchecked) \<open>ontomod\<close>}, where we present three application
scenarios from the point of view of the ontology modeling. In @{text_section (unchecked) \<open>ontopide\<close>}
we discuss the user-interaction generated from the ontological definitions. Finally, we draw
conclusions and discuss related work in @{docitem_ref (unchecked) \<open>conclusion\<close>}. \<close>
conclusions and discuss related work in @{text_section (unchecked) \<open>conclusion\<close>}. \<close>
section*[bgrnd::text_section,main_author="Some(@{docitem ''adb''}::author)"]
section*[bgrnd::text_section,main_author="Some(@{docitem ''bu''}::author)"]
\<open> Background: The Isabelle System \<close>
text*[background::introduction]\<open>
text*[background::introduction, level="Some 1"]\<open>
While Isabelle is widely perceived as an interactive theorem prover
for HOL (Higher-order Logic)~@{cite "nipkow.ea:isabelle:2002"}, we
would like to emphasize the view that Isabelle is far more than that:
it is the \<^emph>\<open>Eclipse of Formal Methods Tools\<close>. This refers to the
``\textsl{generic system framework of Isabelle/Isar underlying recent
``\<^slanted_text>\<open>generic system framework of Isabelle/Isar underlying recent
versions of Isabelle. Among other things, Isar provides an
infrastructure for Isabelle plug-ins, comprising extensible state
components and extensible syntax that can be bound to ML
programs. Thus, the Isabelle/Isar architecture may be understood as
an extension and refinement of the traditional `LCF approach', with
explicit infrastructure for building derivative
\<^emph>\<open>systems\<close>.}''~@{cite "wenzel.ea:building:2007"}
\<^emph>\<open>systems\<close>.\<close>''~@{cite "wenzel.ea:building:2007"}
The current system framework offers moreover the following features:
@ -133,24 +162,24 @@ figure*[architecture::figure,relative_width="100",src="''figures/isabelle-archit
asynchronous communication between the Isabelle system and
the IDE (right-hand side). \<close>
text*[blug::introduction]\<open> The Isabelle system architecture shown in @{docitem_ref \<open>architecture\<close>}
text*[blug::introduction, level="Some 1"]\<open> The Isabelle system architecture shown in @{figure \<open>architecture\<close>}
comes with many layers, with Standard ML (SML) at the bottom layer as implementation
language. The architecture actually foresees a \<^emph>\<open>Nano-Kernel\<close> (our terminology) which
resides in the SML structure \texttt{Context}. This structure provides a kind of container called
resides in the SML structure \<^ML_structure>\<open>Context\<close>. This structure provides a kind of container called
\<^emph>\<open>context\<close> providing an identity, an ancestor-list as well as typed, user-defined state
for components (plugins) such as \isadof. On top of the latter, the LCF-Kernel, tactics,
for components (plugins) such as \<^isadof>. On top of the latter, the LCF-Kernel, tactics,
automated proof procedures as well as specific support for higher specification constructs
were built. \<close>
text\<open> We would like to detail the documentation generation of the architecture,
which is based on literate specification commands such as \inlineisar+section+ \ldots,
\inlineisar+subsection+ \ldots, \inlineisar+text+ \ldots, etc.
which is based on literate specification commands such as \inlineisar+section+ \<^dots>,
\inlineisar+subsection+ \<^dots>, \inlineisar+text+ \<^dots>, etc.
Thus, a user can add a simple text:
\begin{isar}
text\<Open>This is a description.\<Close>
\end{isar}
These text-commands can be arbitrarily mixed with other commands stating definitions, proofs, code, etc.,
and will result in the corresponding output in generated \LaTeX{} or HTML documents.
and will result in the corresponding output in generated \<^LaTeX> or HTML documents.
Now, \<^emph>\<open>inside\<close> the textual content, it is possible to embed a \<^emph>\<open>text-antiquotation\<close>:
\begin{isar}
text\<Open>According to the reflexivity axiom \at{thm refl}, we obtain in \<Gamma>
@ -165,45 +194,45 @@ For the antiquotation \inlineisar+\at{value "fac 5"}+ we assume the usual defin
\inlineisar+fac+ in HOL.
\<close>
text*[anti]\<open> Thus, antiquotations can refer to formal content, can be type-checked before being
text*[anti::introduction, level = "Some 1"]\<open> Thus, antiquotations can refer to formal content, can be type-checked before being
displayed and can be used for calculations before actually being typeset. When editing,
Isabelle's PIDE offers auto-completion and error-messages while typing the above
\<^emph>\<open>semi-formal\<close> content. \<close>
section*[isadof::technical,main_author="Some(@{docitem ''adb''}::author)"]\<open> \isadof \<close>
section*[isadof::technical,main_author="Some(@{docitem ''adb''}::author)"]\<open> \<^isadof> \<close>
text\<open> An \isadof document consists of three components:
text\<open> An \<^isadof> document consists of three components:
\<^item> the \<^emph>\<open>ontology definition\<close> which is an Isabelle theory file with definitions
for document-classes and all auxiliary datatypes.
\<^item> the \<^emph>\<open>core\<close> of the document itself which is an Isabelle theory
importing the ontology definition. \isadof provides an own family of text-element
importing the ontology definition. \<^isadof> provides an own family of text-element
commands such as \inlineisar+title*+, \inlineisar+section*+, \inlineisar+text*+, etc.,
which can be annotated with meta-information defined in the underlying ontology definition.
\<^item> the \<^emph>\<open>layout definition\<close> for the given ontology exploiting this meta-information.
\<close>
text\<open>\isadof is a novel Isabelle system component providing specific support for all these
text\<open>\<^isadof> is a novel Isabelle system component providing specific support for all these
three parts. Note that the document core \<^emph>\<open>may\<close>, but \<^emph>\<open>must\<close> not
use Isabelle definitions or proofs for checking the formal content---the
present paper is actually an example of a document not containing any proof.
The document generation process of \isadof is currently restricted to \LaTeX, which means
that the layout is defined by a set of \LaTeX{} style files. Several layout
The document generation process of \<^isadof> is currently restricted to \LaTeX, which means
that the layout is defined by a set of \<^LaTeX> style files. Several layout
definitions for one ontology are possible and pave the way that different \<^emph>\<open>views\<close> for
the same central document were generated, addressing the needs of different purposes `
and/or target readers.
While the ontology and the layout definition will have to be developed by an expert
with knowledge over Isabelle and \isadof and the back end technology depending on the layout
with knowledge over Isabelle and \<^isadof> and the back end technology depending on the layout
definition, the core is intended to require only minimal knowledge of these two. The situation
is similar to \LaTeX{}-users, who usually have minimal knowledge about the content in
style-files (\<^verbatim>\<open>.sty\<close>-files). In the document core authors \<^emph>\<open>can\<close> use \LaTeX{} commands in
is similar to \<^LaTeX>-users, who usually have minimal knowledge about the content in
style-files (\<^verbatim>\<open>.sty\<close>-files). In the document core authors \<^emph>\<open>can\<close> use \<^LaTeX> commands in
their source, but this limits the possibility of using different representation technologies,
\eg, HTML, and increases the risk of arcane error-messages in generated \LaTeX{}.
\<^eg>, HTML, and increases the risk of arcane error-messages in generated \<^LaTeX>.
The \isadof ontology specification language consists basically on a notation for
The \<^isadof> ontology specification language consists basically on a notation for
document classes, where the attributes were typed with HOL-types and can be instantiated
by terms HOL-terms, \ie, the actual parsers and type-checkers of the Isabelle system were reused.
This has the particular advantage that \isadof commands can be arbitrarily mixed with
by terms HOL-terms, \<^ie>, the actual parsers and type-checkers of the Isabelle system were reused.
This has the particular advantage that \<^isadof> commands can be arbitrarily mixed with
Isabelle/HOL commands providing the machinery for type declarations and term specifications such
as enumerations. In particular, document class definitions provide:
\<^item> a HOL-type for each document class as well as inheritance,
@ -218,7 +247,7 @@ The HOL-types inside the document specification language support built-in types
\inlineisar+typ+'s, \inlineisar+term+'s, and \inlineisar+thm+'s reflecting internal Isabelle's
internal types for these entities; when denoted in HOL-terms to instantiate an attribute, for
example, there is a specific syntax (called \<^emph>\<open>inner syntax antiquotations\<close>) that is checked by
\isadof for consistency.
\<^isadof> for consistency.
Document classes can have a \inlineisar+where+ clause containing a regular
expression over class names. Classes with such a \inlineisar+where+ were called \<^emph>\<open>monitor classes\<close>.
@ -227,10 +256,10 @@ in an object-oriented manner, monitor classes enforce structural organization
of documents via the language specified by the regular expression
enforcing a sequence of text-elements that must belong to the corresponding classes.
To start using \isadof, one creates an Isabelle project (with the name
To start using \<^isadof>, one creates an Isabelle project (with the name
\inlinebash{IsaDofApplications}):
\begin{bash}
isabelle mkroot_DOF -o scholarly_paper -t lncs -d IsaDofApplications
isabelle dof_mkroot -o scholarly_paper -t lncs IsaDofApplications
\end{bash}
where the \inlinebash{-o scholarly_paper} specifies the ontology for writing scientific articles and
\inlinebash{-t lncs} specifies the use of Springer's \LaTeX-configuration for the Lecture Notes in
@ -241,8 +270,8 @@ article in PDF using the following command:
\end{bash}
\<close>
section*[ontomod::text_section]\<open> Modeling Ontologies in \isadof \<close>
text\<open> In this section, we will use the \isadof document ontology language
section*[ontomod::text_section]\<open> Modeling Ontologies in \<^isadof> \<close>
text\<open> In this section, we will use the \<^isadof> document ontology language
for three different application scenarios: for scholarly papers, for mathematical
exam sheets as well as standardization documents where the concepts of the
standard are captured in the ontology. For space reasons, we will concentrate in all three
@ -250,11 +279,11 @@ cases on aspects of the modeling due to space limitations.\<close>
subsection*[scholar_onto::example]\<open> The Scholar Paper Scenario: Eating One's Own Dog Food. \<close>
text\<open> The following ontology is a simple ontology modeling scientific papers. In this
\isadof application scenario, we deliberately refrain from integrating references to
(Isabelle) formal content in order demonstrate that \isadof is not a framework from
\<^isadof> application scenario, we deliberately refrain from integrating references to
(Isabelle) formal content in order demonstrate that \<^isadof> is not a framework from
Isabelle users to Isabelle users only.
Of course, such references can be added easily and represent a particular strength
of \isadof.
of \<^isadof>.
\begin{figure}
@ -285,18 +314,18 @@ with the usual text-elements of a scientific paper. The attributes \inlineisar+s
Our model prescribes an optional \inlineisar+main_author+ and a todo-list attached to an arbitrary
text section; since instances of this class are mutable (meta)-objects of text-elements, they
can be modified arbitrarily through subsequent text and of course globally during text evolution.
Since \inlineisar+author+ is a HOL-type internally generated by \isadof framework and can therefore
Since \inlineisar+author+ is a HOL-type internally generated by \<^isadof> framework and can therefore
appear in the \inlineisar+main_author+ attribute of the \inlineisar+text_section+ class;
semantic links between concepts can be modeled this way.
The translation of its content to, \eg, Springer's \LaTeX{} setup for the Lecture Notes in Computer
The translation of its content to, \<^eg>, Springer's \<^LaTeX> setup for the Lecture Notes in Computer
Science Series, as required by many scientific conferences, is mostly straight-forward. \<close>
figure*[fig1::figure,spawn_columns=False,relative_width="95",src="''figures/Dogfood-Intro''"]
\<open> Ouroboros I: This paper from inside \ldots \<close>
\<open> Ouroboros I: This paper from inside \<^dots> \<close>
text\<open> @{docitem \<open>fig1\<close>} shows the corresponding view in the Isabelle/PIDE of thqqe present paper.
Note that the text uses \isadof's own text-commands containing the meta-information provided by
text\<open> @{figure \<open>fig1\<close>} shows the corresponding view in the Isabelle/PIDE of thqqe present paper.
Note that the text uses \<^isadof>'s own text-commands containing the meta-information provided by
the underlying ontology.
We proceed by a definition of \inlineisar+introduction+'s, which we define as the extension of
\inlineisar+text_section+ which is intended to capture common infrastructure:
@ -378,15 +407,15 @@ doc_class figure = text_section +
text\<open> Alternatively, by including the HOL-libraries for rationals, it is possible to
use fractions or even mathematical reals. This must be counterbalanced by syntactic
and semantic convenience. Choosing the mathematical reals, \eg, would have the drawback that
and semantic convenience. Choosing the mathematical reals, \<^eg>, would have the drawback that
attribute evaluation could be substantially more complicated.\<close>
figure*[fig_figures::figure,spawn_columns=False,relative_width="85",src="''figures/Dogfood-figures''"]
\<open> Ouroboros II: figures \ldots \<close>
\<open> Ouroboros II: figures \<^dots> \<close>
text\<open> The document class \inlineisar+figure+ --- supported by the \isadof text command
text\<open> The document class \inlineisar+figure+ --- supported by the \<^isadof> text command
\inlineisar+figure*+ --- makes it possible to express the pictures and diagrams in this paper
such as @{docitem_ref \<open>fig_figures\<close>}.
such as @{figure \<open>fig_figures\<close>}.
\<close>
subsection*[math_exam::example]\<open> The Math-Exam Scenario \<close>
@ -398,12 +427,12 @@ during the exam and the preparation requires a very rigorous process, as the fre
We assume that the content has four different types of addressees, which have a different
\<^emph>\<open>view\<close> on the integrated document:
\<^item> the \<^emph>\<open>setter\<close>, \ie, the author of the exam,
\<^item> the \<^emph>\<open>checker\<close>, \ie, an internal person that checks
\<^item> the \<^emph>\<open>setter\<close>, \<^ie>, the author of the exam,
\<^item> the \<^emph>\<open>checker\<close>, \<^ie>, an internal person that checks
the exam for feasibility and non-ambiguity,
\<^item> the \<^emph>\<open>external examiner\<close>, \ie, an external person that checks
\<^item> the \<^emph>\<open>external examiner\<close>, \<^ie>, an external person that checks
the exam for feasibility and non-ambiguity, and
\<^item> the \<^emph>\<open>student\<close>, \ie, the addressee of the exam.
\<^item> the \<^emph>\<open>student\<close>, \<^ie>, the addressee of the exam.
\<close>
text\<open> The latter quality assurance mechanism is used in many universities,
where for organizational reasons the execution of an exam takes place in facilities
@ -477,7 +506,7 @@ In many institutions, it makes sense to have a rigorous process of validation
for exam subjects: is the initial question correct? Is a proof in the sense of the
question possible? We model the possibility that the @{term examiner} validates a
question by a sample proof validated by Isabelle (see \autoref{fig:onto-exam-monitor}).
In our scenario this sample proofs are completely \<^emph>\<open>intern\<close>, \ie, not exposed to the
In our scenario this sample proofs are completely \<^emph>\<open>intern\<close>, \<^ie>, not exposed to the
students but just additional material for the internal review process of the exam.
\begin{figure}
\begin{isar}
@ -503,15 +532,15 @@ doc_class MathExam=
declare_reference*["fig_qcm"::figure]
text\<open> Using the \LaTeX{} package hyperref, it is possible to conceive an interactive
text\<open> Using the \<^LaTeX> package hyperref, it is possible to conceive an interactive
exam-sheets with multiple-choice and/or free-response elements
(see @{docitem_ref (unchecked) \<open>fig_qcm\<close>}). With the
(see @{figure (unchecked) \<open>fig_qcm\<close>}). With the
help of the latter, it is possible that students write in a browser a formal mathematical
derivation---as part of an algebra exercise, for example---which is submitted to the examiners
electronically. \<close>
figure*[fig_qcm::figure,spawn_columns=False,
relative_width="90",src="''figures/InteractiveMathSheet''"]
\<open> A Generated QCM Fragment \ldots \<close>
\<open> A Generated QCM Fragment \<^dots> \<close>
subsection*[cenelec_onto::example]\<open> The Certification Scenario following CENELEC \<close>
text\<open> Documents to be provided in formal certifications (such as CENELEC
@ -586,7 +615,7 @@ doc_class srac = ec +
section*[ontopide::technical]\<open> Ontology-based IDE support \<close>
text\<open> We present a selection of interaction scenarios @{example \<open>scholar_onto\<close>}
and @{example \<open>cenelec_onto\<close>} with Isabelle/PIDE instrumented by \isadof. \<close>
and @{example \<open>cenelec_onto\<close>} with Isabelle/PIDE instrumented by \<^isadof>. \<close>
subsection*[scholar_pide::example]\<open> A Scholarly Paper \<close>
text\<open> In \autoref{fig-Dogfood-II-bgnd1} and \autoref{fig-bgnd-text_section} we show how
@ -619,7 +648,7 @@ figure*[figDogfoodVIlinkappl::figure,relative_width="80",src="''figures/Dogfood-
\<open> Exploring an attribute (hyperlinked to the class). \<close>
subsection*[cenelec_pide::example]\<open> CENELEC \<close>
declare_reference*[figfig3::figure]
text\<open> The corresponding view in @{docitem_ref (unchecked) \<open>figfig3\<close>} shows core part of a document,
text\<open> The corresponding view in @{docitem (unchecked) \<open>figfig3\<close>} shows core part of a document,
coherent to the @{example \<open>cenelec_onto\<close>}. The first sample shows standard Isabelle antiquotations
@{cite "wenzel:isabelle-isar:2017"} into formal entities of a theory. This way, the informal parts
of a document get ``formal content'' and become more robust under change.\<close>
@ -628,20 +657,20 @@ figure*[figfig3::figure,relative_width="80",src="''figures/antiquotations-PIDE''
\<open> Standard antiquotations referring to theory elements.\<close>
declare_reference*[figfig5::figure]
text\<open> The subsequent sample in @{docitem_ref (unchecked) \<open>figfig5\<close>} shows the definition of an
text\<open> The subsequent sample in @{figure (unchecked) \<open>figfig5\<close>} shows the definition of an
\<^emph>\<open>safety-related application condition\<close>, a side-condition of a theorem which
has the consequence that a certain calculation must be executed sufficiently fast on an embedded
device. This condition can not be established inside the formal theory but has to be
checked by system integration tests.\<close>
figure*[figfig5::figure, relative_width="80", src="''figures/srac-definition''"]
\<open> Defining a SRAC reference \ldots \<close>
\<open> Defining a SRAC reference \<^dots> \<close>
figure*[figfig7::figure, relative_width="80", src="''figures/srac-as-es-application''"]
\<open> Using a SRAC as EC document reference. \<close>
text\<open> Now we reference in @{docitem_ref (unchecked) \<open>figfig7\<close>} this safety-related condition;
text\<open> Now we reference in @{figure (unchecked) \<open>figfig7\<close>} this safety-related condition;
however, this happens in a context where general \<^emph>\<open>exported constraints\<close> are listed.
\isadof's checks establish that this is legal in the given ontology.
\<^isadof>'s checks establish that this is legal in the given ontology.
This example shows that ontological modeling is indeed adequate for large technical,
collaboratively developed documentations, where modifications can lead easily to incoherence.
@ -664,22 +693,20 @@ The control of monitors is done by the commands:
\<^item> \inlineisar+close_monitor* + <doc-class>
\<close>
text\<open>
where the automaton of the monitor class is expected
to be in a final state. In the final state, user-defined SML
Monitors can be nested, so it is possible to "overlay" one or more monitoring
classes and imposing different sets of structural constraints in a
Classes which are neither directly nor indirectly (via inheritance) mentioned in the
monitor are \<^emph>\<open>independent\<close> from a monitor; instances of independent test elements
may occur freely. \<close>
where the automaton of the monitor class is expected to be in a final state. In the final state,
user-defined SML Monitors can be nested, so it is possible to "overlay" one or more monitoring
classes and imposing different sets of structural constraints in a Classes which are neither
directly nor indirectly (via inheritance) mentioned in the monitor are \<^emph>\<open>independent\<close> from a
monitor; instances of independent test elements may occur freely. \<close>
section*[conclusion::conclusion]\<open> Conclusion and Related Work\<close>
text\<open> We have demonstrated the use of \isadof, a novel ontology modeling and enforcement
text\<open> We have demonstrated the use of \<^isadof>, a novel ontology modeling and enforcement
IDE deeply integrated into the Isabelle/Isar Framework. The two most distinguishing features are
\<^item> \isadof and its ontology language are a strongly typed language that allows
for referring (albeit not reasoning) to entities of Isabelle/HOL, most notably types, terms,
\<^item> \<^isadof> and its ontology language are a strongly typed language that allows
for referring (albeit not reasoning) to entities of \<^isabelle>, most notably types, terms,
and (formally proven) theorems, and
\<^item> \isadof is supported by the Isabelle/PIDE framework; thus, the advantages of an IDE for
\<^item> \<^isadof> is supported by the Isabelle/PIDE framework; thus, the advantages of an IDE for
text-exploration (which is the type of this link? To which text element does this link refer?
Which are the syntactic alternatives here?) were available during editing
instead of a post-hoc validation process.
@ -698,27 +725,27 @@ on documents mixing formal and informal content---a type of documents
that is very common in technical certification processes. We see
mainly one area of related works: IDEs and text editors that support
editing and checking of documents based on an ontology. There is a
large group of ontology editors (\eg, Prot{\'e}g{\'e}~@{cite "protege"},
large group of ontology editors (\<^eg>, \<^Protege>~@{cite "protege"},
Fluent Editor~@{cite "cognitum"}, NeOn~@{cite "neon"}, or
OWLGrEd~@{cite "owlgred"}). With them, we share the support for defining
ontologies as well as auto-completion when editing documents based on
an ontology. While our ontology definitions are currently based on a
textual definition, widely used ontology editors (\eg,
textual definition, widely used ontology editors (\<^eg>,
OWLGrEd~@{cite "owlgred"}) also support graphical notations. This could
be added to \isadof in the future. A unique feature of \isadof is the
be added to \<^isadof> in the future. A unique feature of \<^isadof> is the
deep integration of formal and informal text parts. The only other
work in this area we are aware of is rOntorium~@{cite "rontorium"}, a plugin
for Prot{\'e}g{\'e} that integrates R~@{cite "adler:r:2010"} into an
for \<^Protege> that integrates R~@{cite "adler:r:2010"} into an
ontology environment. Here, the main motivation behind this
integration is to allow for statistically analyze ontological
documents. Thus, this is complementary to our work.
\<close>
text\<open> \isadof in its present form has a number of technical short-comings as well
text\<open> \<^isadof> in its present form has a number of technical short-comings as well
as potentials not yet explored. On the long list of the short-comings is the
fact that strings inside HOL-terms do not support, for example, Unicode.
For the moment, \isadof is conceived as an
add-on for Isabelle/HOL; a much deeper integration of \isadof into Isabelle
For the moment, \<^isadof> is conceived as an
add-on for \<^isabelle>; a much deeper integration of \<^isadof> into Isabelle
could increase both performance and uniformity. Finally, different target
presentation (such as HTML) would be highly desirable in particular for the
math exam scenarios. And last but not least, it would be desirable that PIDE

View File

@ -1,13 +1,13 @@
session "2018-cicm-isabelle_dof-applications" = "Isabelle_DOF" +
options [document = pdf, document_output = "output", quick_and_dirty = true]
options [document = pdf, document_output = "output", document_build = dof, quick_and_dirty = true]
theories
IsaDofApplications
document_files
"isadof.cfg"
"root.bib"
"authorarchive.sty"
"preamble.tex"
"build"
"lstisadof.sty"
"vector_iD_icon.pdf"
"figures/isabelle-architecture.pdf"
"figures/Dogfood-Intro.png"
"figures/InteractiveMathSheet.png"

View File

@ -0,0 +1,339 @@
%% Copyright (C) 2008-2019 Achim D. Brucker, https://www.brucker.ch
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\NeedsTeXFormat{LaTeX2e}\relax
\ProvidesPackage{authorarchive}
[0000/00/00 Unreleased v1.1.1+%
Self-archiving information for scientific publications.]
%
\PassOptionsToPackage{hyphens}{url}
%
\RequirePackage{ifthen}
\RequirePackage[inline]{enumitem}
\RequirePackage{graphicx}
\RequirePackage{eso-pic}
\RequirePackage{intopdf}
\RequirePackage{kvoptions}
\RequirePackage{hyperref}
\RequirePackage{calc}
\RequirePackage{qrcode}
\RequirePackage{hvlogos}
%
%Better url breaking
\g@addto@macro{\UrlBreaks}{\UrlOrds}
%
% Option declarations
% -------------------
\SetupKeyvalOptions{
family=AA,
prefix=AA@
}
%
\DeclareStringOption[.]{bibtexdir}
\DeclareStringOption[https://duckduckgo.com/?q=]{baseurl}
\DeclareStringOption[.pdf]{suffix}
\DeclareStringOption[UNKNOWN PUBLISHER]{publisher}[]
\DeclareStringOption[UNKNOWN YEAR]{year}[]
\DeclareStringOption[]{key}[]
\DeclareStringOption[]{doi}[]
\DeclareStringOption[]{doiText}[]
\DeclareStringOption[]{publisherurl}[]
\DeclareStringOption[UNKNOWN START PAGE]{startpage}[]
\DeclareStringOption[UNKNOWN PUBLICATION]{publication}[]
\DeclareBoolOption{ACM}
\DeclareBoolOption{acmart}
\DeclareBoolOption{ENTCS}
\DeclareBoolOption{IEEE}
\DeclareBoolOption{LNCS}
\DeclareBoolOption{LNI}
\DeclareBoolOption{nocopyright}
\DeclareBoolOption{nourl}
\DeclareBoolOption{nobib}
\DeclareBoolOption{orcidicon}
%\ProcessOptions\relax
% Default option rule
\DeclareDefaultOption{%
\ifx\CurrentOptionValue\relax
\PackageWarningNoLine{\@currname}{%
Unknown option `\CurrentOption'\MessageBreak
is passed to package `authorarchive'%
}%
% Pass the option to package color.
% Again it is better to expand \CurrentOption.
\expandafter\PassOptionsToPackage\expandafter{\CurrentOption}{color}%
\else
% Package color does not take options with values.
% We provide the standard LaTeX error.
\@unknownoptionerror
\fi
}
\ProcessKeyvalOptions*
% Provide command for dynamic configuration seutp
\def\authorsetup{\kvsetkeys{AA}}
% Load local configuration
\InputIfFileExists{authorarchive.config}{}{}
\newlength\AA@x
\newlength\AA@y
\newlength\AA@width
\def\AA@bibBibTeX{\AA@bibtexdir/\AA@key.bib}
\def\AA@bibBibTeXLong{\AA@bibtexdir/\AA@key.bibtex}
\def\AA@bibWord{\AA@bibtexdir/\AA@key.word.xml}
\def\AA@bibEndnote{\AA@bibtexdir/\AA@key.enw}
\def\AA@bibRIS{\AA@bibtexdir/\AA@key.ris}
\newboolean{AA@bibExists}
\setboolean{AA@bibExists}{false}
\IfFileExists{\AA@bibBibTeX}{\setboolean{AA@bibExists}{true}}{}
\IfFileExists{\AA@bibBibTeXLong}{\setboolean{AA@bibExists}{true}}{}
\IfFileExists{\AA@bibWord}{\setboolean{AA@bibExists}{true}}{}
\IfFileExists{\AA@bibEndnote}{\setboolean{AA@bibExists}{true}}{}
\IfFileExists{\AA@bibRIS}{\setboolean{AA@bibExists}{true}}{}
\setlength\AA@x{1in+\hoffset+\oddsidemargin}
\newcommand{\authorcrfont}{\footnotesize}
\newcommand{\authorat}[1]{\AtPageUpperLeft{\put(\LenToUnit{\AA@x},\LenToUnit{.2cm-\paperheight}){#1}}}
\newcommand{\authorwidth}[1]{\setlength{\AA@width}{#1}}
\setlength{\AA@width}{\textwidth}
\def\AA@pageinfo{}
\ifthenelse{\equal{\AA@startpage}{UNKNOWN START PAGE}}{%
}{%
\setcounter{page}{\AA@startpage}%
\def\AA@pageinfo{pp. \thepage--\pageref{\aa@lastpage}, }
}
%%%% sig-alternate.cls
\ifAA@ACM%
\ifthenelse{\equal{\AA@publisher}{UNKNOWN PUBLISHER}}{%
\setkeys{AA}{publisher=ACM}
}{}
\global\boilerplate={}
\global\copyrightetc={}
\renewcommand{\conferenceinfo}[2]{}
\renewcommand{\authorcrfont}{\scriptsize}
\setlength\AA@x{1in+\hoffset+\oddsidemargin}
\setlength\AA@y{-\textheight+\topmargin+\headheight-\footskip} % -\voffset-\topmargin-\headheight-\footskip}
\renewcommand{\authorat}[1]{\put(\LenToUnit{\AA@x},\LenToUnit{\AA@y}){#1}}
\setlength{\AA@width}{\columnwidth}
\fi
%
%%%% acmart.cls
\ifAA@acmart%
\ifthenelse{\equal{\AA@publisher}{UNKNOWN PUBLISHER}}{%
\setkeys{AA}{publisher=ACM}
}{}
\renewcommand{\authorat}[1]{\AtPageUpperLeft{\put(\LenToUnit{\AA@x},\LenToUnit{0.2cm-\paperheight}){#1}}}
\setlength{\AA@width}{\textwidth}
\fi
%
%%%% LNCS
\ifAA@LNCS%
\ifAA@orcidicon%
\renewcommand{\orcidID}[1]{\href{https://orcid.org/#1}{%
\textsuperscript{\,\includegraphics[height=2\fontcharht\font`A]{vector_iD_icon}}}}
\else\relax\fi%
%
\ifthenelse{\equal{\AA@publisher}{UNKNOWN PUBLISHER}}{%
\setkeys{AA}{publisher=Springer-Verlag}
}{}
\renewcommand{\authorcrfont}{\scriptsize}
\@ifclasswith{llncs}{a4paper}{%
\ExplSyntaxOn
\@ifundefined{pdfmanagement_add:nnn}{%
\pdfpagesattr{/CropBox [92 114 523 780]}%
}{%
\pdfmanagement_add:nnn {Pages}{CropBox}{[92~114~523~780]}
}%
\ExplSyntaxOff
\renewcommand{\authorat}[1]{\put(\LenToUnit{\AA@x},40){#1}}%
}{%
\ExplSyntaxOn
\@ifundefined{pdfmanagement_add:nnn}{%
\pdfpagesattr{/CropBox [92 65 523 731]}% LNCS page: 152x235 mm
}{%
\pdfmanagement_add:nnn {Pages}{CropBox}{[92~62~523~731]}
}%
\ExplSyntaxOff
\renewcommand{\authorat}[1]{\put(\LenToUnit{\AA@x},23){#1}}
}
\setlength{\AA@width}{\textwidth}
\setcounter{tocdepth}{2}
\fi
%
%%%% LNI
\ifAA@LNI%
\ifthenelse{\equal{\AA@publisher}{UNKNOWN PUBLISHER}}{%
\setkeys{AA}{publisher=GI}
}{}
\renewcommand{\authorat}[1]{\put(\LenToUnit{\AA@x},35){#1}}
\renewcommand{\authorcrfont}{\scriptsize}
\pdfpagesattr{/CropBox [70 65 526.378 748.15]} % TODO
\setlength{\AA@width}{\textwidth}
\setcounter{tocdepth}{2}
\fi
%
%%%% ENTCS
\ifAA@ENTCS%
\addtolength{\voffset}{1cm}
\ifthenelse{\equal{\AA@publisher}{UNKNOWN PUBLISHER}}{%
\setkeys{AA}{publisher=Elsevier Science B.~V.}
}{}
\renewcommand{\authorat}[1]{\put(\LenToUnit{\AA@x},\LenToUnit{-.5cm-\the\ht\AA@authoratBox}){#1}}
\renewcommand{\authorcrfont}{\scriptsize}
\setlength{\AA@width}{\textwidth}
\fi
%
%%%% IEEE
\ifAA@IEEE%
\ifthenelse{\equal{\AA@publisher}{UNKNOWN PUBLISHER}}{%
\setkeys{AA}{publisher=IEEE}
}{}
\renewcommand{\authorat}[1]{\put(\LenToUnit{\AA@x},6){#1}}
\renewcommand{\authorcrfont}{\scriptsize}
\setlength{\AA@width}{\textwidth}
\setcounter{tocdepth}{2}
\fi
%
\hypersetup{%
draft = false,
bookmarksopen = true,
bookmarksnumbered= true,
pdfauthor = {\@author},
pdftitle = {\@title},
}
\@ifpackageloaded{totpages}{%
\def\aa@lastpage{TotPages}
}{%
\RequirePackage{lastpage}
\def\aa@lastpage{LastPage}
}
\newsavebox{\AA@authoratBox}
\AddToShipoutPicture*{%
\setlength{\unitlength}{1mm}%
\savebox{\AA@authoratBox}{%
\parbox{1.4cm}{%
\bgroup%
\normallineskiplimit=0pt%
\ifAA@nourl%
\ifx\AA@doi\@empty\relax%
\else%
\qrcode[hyperlink,height=1.17cm,padding]{https://doi.org/\AA@doi}%
\fi%
\else%
\qrcode[hyperlink,height=1.17cm,padding]{\AA@baseurl/\AA@key\AA@suffix}%
\fi%
\egroup%
}%
\ifAA@nourl\ifx\AA@doi\@empty\addtolength{\AA@width}{1.4cm}\fi\fi
\parbox{\AA@width-1.4cm}{\authorcrfont%
\ifAA@LNCS%
\AA@publication, \AA@pageinfo \AA@year. %
\ifAA@nocopyright\else
\textcopyright~\AA@year~\AA@publisher.
\fi
This is the author's
version of the work. It is posted
\ifAA@nourl\relax\else%
at \url{\AA@baseurl/\AA@key\AA@suffix} %
\fi
\ifAA@nocopyright\relax\else
by permission of \AA@publisher{}
\fi
for your personal use.
\ifx\AA@doi\@empty%
\relax
\else
The final publication is available at Springer via
\ifx\AA@doiText\@empty%
\url{https://doi.org/\AA@doi}.
\else
\href{https://doi.org/\AA@doi}{\AA@doiText}.
\fi
\fi
\else
\ifAA@nocopyright\relax\else
\textcopyright~\AA@year~\AA@publisher. %
\fi%
This is the author's
version of the work. It is posted
\ifAA@nourl\relax\else%
at \url{\AA@baseurl/\AA@key\AA@suffix} %
\fi
\ifAA@nocopyright\relax\else
by permission of \AA@publisher{} %
\fi
for your personal use. Not for redistribution. The definitive
version was published in \emph{\AA@publication}, \AA@pageinfo \AA@year%
\ifx\AA@doi\@empty%
\ifx\AA@publisherurl\@empty%
.%
\else
\url{\AA@publisherurl}.%
\fi
\else
\ifx\AA@doiText\@empty%
, doi: \href{https://doi.org/\AA@doi}{\AA@doi}.%
\else
, doi: \href{https://doi.org/\AA@doi}{\AA@doiText}.%
\fi
\fi
\fi
\ifAA@nobib\relax\else%
\ifthenelse{\boolean{AA@bibExists}}{%
\hfill
\begin{itemize*}[label={}, itemjoin={,}]
\IfFileExists{\AA@bibBibTeX}{%
\item \attachandlink{\AA@bibBibTeX}[application/x-bibtex]{BibTeX entry of this paper}{\BibTeX}%
}{%
\IfFileExists{\AA@bibBibTeXLong}{%
\item \attachandlink[\AA@key.bib]{\AA@bibBibTeXLong}[application/x-bibtex]{BibTeX entry of this paper}{\BibTeX}%
}{%
\typeout{No file \AA@bibBibTeX{} (and no \AA@bibBibTeXLong) found. Not embedded reference in BibTeX format.}%
}%
}%
\IfFileExists{\AA@bibWord}{%
\item \attachandlink{\AA@bibWord}[application/xml]{XML entry of this paper (e.g., for Word 2007 and later)}{Word}%
}{%
\typeout{No file \AA@bibWord{} found. Not embedded reference for Word 2007 and later.}%
}%
\IfFileExists{\AA@bibEndnote}{%
\item \attachandlink{\AA@bibEndnote}[application/x-endnote-refer]{Endnote entry of this paper}{EndNote}%
}{%
\typeout{No file \AA@bibEndnote{} found. Not embedded reference in Endnote format.}%
}%
\IfFileExists{\AA@bibRIS}{%
\item \attachandlink{\AA@bibRIS}[application/x-research-info-systems]{RIS entry of this paper}{RIS}%
}{%
\typeout{No file \AA@bibRIS{} found. Not embedded reference in RIS format.}%
}%
\end{itemize*}\\
}{%
\PackageError{authorarchive}{No bibliographic files found. Specify option 'nobib' if this is intended.}
}
\fi
}
}
\authorat{\raisebox{\the\ht\AA@authoratBox}{\usebox{\AA@authoratBox}}}
}

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2019 The University of Sheffield. All rights reserved.
# 2018 The University of Paris-Saclay. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
set -e
if [ ! -f $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh ]; then
echo ""
echo "Error: Isabelle/DOF not installed"
echo "====="
echo "This is a Isabelle/DOF project. The document preparation requires"
echo "the Isabelle/DOF framework. Please obtain the framework by cloning"
echo "the Isabelle/DOF git repository, i.e.: "
echo " git clone https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF"
echo "You can install the framework as follows:"
echo " cd Isabelle_DOF/document-generator"
echo " ./install"
echo ""
exit 1
fi
cp $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh .
source build_lib.sh

View File

@ -1,2 +0,0 @@
Template: scrartcl
Ontology: scholarly_paper

View File

@ -1,3 +1,16 @@
%% Copyright (C) 2018 The University of Sheffield
%% 2018 The University of Paris-Saclay
%% 2019 The University of Exeter
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\definecolor{OliveGreen} {cmyk}{0.64,0,0.95,0.40}
\definecolor{BrickRed} {cmyk}{0,0.89,0.94,0.28}

View File

@ -22,7 +22,6 @@
\usepackage{listings}
\usepackage{lstisadof}
\usepackage{xspace}
\usepackage[draft]{fixme}
\lstloadlanguages{bash}
\lstdefinestyle{bash}{language=bash,
@ -53,27 +52,19 @@
\usepackage[caption]{subfig}
\usepackage[size=footnotesize]{caption}
\newcommand{\ie}{i.e.}
\newcommand{\eg}{e.g.}
\subject{Example of an Academic Paper\footnote{%
This document is an example setup for writing academic paper. While
it is optimized for Springer's LNCS class, it uses a Koma Script
LaTeX class to avoid the need for distributing \texttt{llncs.cls},
which would violate Springer's copyright. This example has been
published at CICM 2018:
\protect\begin{quote}
Achim D. Brucker, Idir Ait-Sadoune, Paolo Crisafulli, and
Burkhart Wolff. Using The Isabelle Ontology Framework: Linking
the Formal with the Informal. In Conference on Intelligent
Computer Mathematics (CICM). Lecture Notes in Computer Science
(11006), Springer-Verlag, 2018.
\protect\end{quote}
Note that the content of this example is not updated and, hence,
might not be correct with respect to the latest version of
\isadof{}.
}}
\usepackage[LNCS,
orcidicon,
key=brucker.ea-isabelle-ontologies-2018,
year=2018,
publication={F. Rabe et al. (Eds.): CICM 2018, LNAI 11006},
nobib,
startpage={1},
doi={10.1007/978-3-319-96812-4_3},
doiText={10.1007/978-3-319-96812-4\_3},
]{authorarchive}
\authorrunning{A. D. Brucker et al.}
\pagestyle{headings}
\title{<TITLE>}

View File

@ -108,7 +108,7 @@
volume = 2283,
doi = {10.1007/3-540-45949-9},
abstract = {This book is a self-contained introduction to interactive
proof in higher-order logic (\acs{hol}), using the proof
proof in higher-order logic HOL, using the proof
assistant Isabelle2002. It is a tutorial for potential
users rather than a monograph for researchers. The book has
three parts.
@ -121,7 +121,7 @@
such advanced topics as nested and mutual recursion. 2.
Logic and Sets presents a collection of lower-level tactics
that you can use to apply rules selectively. It also
describes Isabelle/\acs{hol}'s treatment of sets, functions
describes Isabelle/HOL's treatment of sets, functions
and relations and explains how to define sets inductively.
One of the examples concerns the theory of model checking,
and another is drawn from a classic textbook on formal
@ -279,3 +279,21 @@
year = {2018}
}
@incollection{brucker.ea:isabelle-ontologies:2018,
abstract = {While Isabelle is mostly known as part of Isabelle/HOL (an interactive theorem prover), it actually provides a framework for developing a wide spectrum of applications. A particular strength of the Isabelle framework is the combination of text editing, formal verification, and code generation.\\\\Up to now, Isabelle's document preparation system lacks a mechanism for ensuring the structure of different document types (as, e.g., required in certification processes) in general and, in particular, mechanism for linking informal and formal parts of a document.\\\\In this paper, we present Isabelle/DOF, a novel Document Ontology Framework on top of Isabelle. Isabelle/DOF allows for conventional typesetting \emph{as well} as formal development. We show how to model document ontologies inside Isabelle/DOF, how to use the resulting meta-information for enforcing a certain document structure, and discuss ontology-specific IDE support.},
address = {Heidelberg},
author = {Achim D. Brucker and Idir Ait-Sadoune and Paolo Crisafulli and Burkhart Wolff},
booktitle = {Conference on Intelligent Computer Mathematics (CICM)},
doi = {10.1007/978-3-319-96812-4_3},
keywords = {Isabelle/Isar, HOL, Ontologies},
language = {USenglish},
location = {Hagenberg, Austria},
number = {11006},
pdf = {https://www.brucker.ch/bibliography/download/2018/brucker.ea-isabelle-ontologies-2018.pdf},
publisher = {Springer-Verlag},
series = {Lecture Notes in Computer Science},
title = {Using The Isabelle Ontology Framework: Linking the Formal with the Informal},
url = {https://www.brucker.ch/bibliography/abstract/brucker.ea-isabelle-ontologies-2018},
year = {2018}
}

View File

@ -0,0 +1,7 @@
session "2020-iFM-csp" = "Isabelle_DOF" +
options [document = pdf, document_output = "output", document_build = dof]
theories
"paper"
document_files
"root.bib"
"preamble.tex"

View File

@ -0,0 +1,8 @@
%% This is a placeholder for user-specific configuration and packages.
\usepackage{stmaryrd}
\title{<TITLE>}
\author{<AUTHOR>}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +1,2 @@
2018-cicm-isabelle_dof-applications
2020-iFM-CSP

View File

@ -1,44 +1,143 @@
(*************************************************************************
* Copyright (C)
* 2019-2022 The University of Exeter
* 2018-2022 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
(*<*)
theory "00_Frontmatter"
imports "Isabelle_DOF.technical_report"
begin
section\<open>Local Document Setup.\<close>
text\<open>Introducing document specific abbreviations and macros:\<close>
define_shortcut* dof \<rightleftharpoons> \<open>\dof\<close>
isadof \<rightleftharpoons> \<open>\isadof{}\<close>
define_shortcut* TeXLive \<rightleftharpoons> \<open>\TeXLive\<close>
BibTeX \<rightleftharpoons> \<open>\BibTeX{}\<close>
LaTeX \<rightleftharpoons> \<open>\LaTeX{}\<close>
TeX \<rightleftharpoons> \<open>\TeX{}\<close>
pdf \<rightleftharpoons> \<open>PDF\<close>
text\<open>Note that these setups assume that the associated \<^LaTeX> macros
are defined, \<^eg>, in the document prelude. \<close>
define_macro* index \<rightleftharpoons> \<open>\index{\<close> _ \<open>}\<close>
define_macro* bindex \<rightleftharpoons> \<open>\bindex{\<close> _ \<open>}\<close>
ML\<open>
fun boxed_text_antiquotation name (* redefined in these more abstract terms *) =
DOF_lib.gen_text_antiquotation name DOF_lib.report_text
(fn ctxt => DOF_lib.string_2_text_antiquotation ctxt
#> DOF_lib.enclose_env false ctxt "isarbox")
val neant = K(Latex.text("",\<^here>))
fun boxed_theory_text_antiquotation name (* redefined in these more abstract terms *) =
DOF_lib.gen_text_antiquotation name DOF_lib.report_theory_text
(fn ctxt => DOF_lib.string_2_theory_text_antiquotation ctxt
#> DOF_lib.enclose_env false ctxt "isarbox"
(* #> neant *)) (*debugging *)
fun boxed_sml_text_antiquotation name =
DOF_lib.gen_text_antiquotation name (K(K()))
(fn ctxt => Input.source_content
#> Latex.text
#> DOF_lib.enclose_env true ctxt "sml")
(* the simplest conversion possible *)
fun boxed_pdf_antiquotation name =
DOF_lib.gen_text_antiquotation name (K(K()))
(fn ctxt => Input.source_content
#> Latex.text
#> DOF_lib.enclose_env true ctxt "out")
(* the simplest conversion possible *)
fun boxed_latex_antiquotation name =
DOF_lib.gen_text_antiquotation name (K(K()))
(fn ctxt => Input.source_content
#> Latex.text
#> DOF_lib.enclose_env true ctxt "ltx")
(* the simplest conversion possible *)
fun boxed_bash_antiquotation name =
DOF_lib.gen_text_antiquotation name (K(K()))
(fn ctxt => Input.source_content
#> Latex.text
#> DOF_lib.enclose_env true ctxt "bash")
(* the simplest conversion possible *)
\<close>
setup\<open>(* std_text_antiquotation \<^binding>\<open>my_text\<close> #> *)
boxed_text_antiquotation \<^binding>\<open>boxed_text\<close> #>
(* std_text_antiquotation \<^binding>\<open>my_cartouche\<close> #> *)
boxed_text_antiquotation \<^binding>\<open>boxed_cartouche\<close> #>
(* std_theory_text_antiquotation \<^binding>\<open>my_theory_text\<close>#> *)
boxed_theory_text_antiquotation \<^binding>\<open>boxed_theory_text\<close> #>
boxed_sml_text_antiquotation \<^binding>\<open>boxed_sml\<close> #>
boxed_pdf_antiquotation \<^binding>\<open>boxed_pdf\<close> #>
boxed_latex_antiquotation \<^binding>\<open>boxed_latex\<close>#>
boxed_bash_antiquotation \<^binding>\<open>boxed_bash\<close>
\<close>
open_monitor*[this::report]
(*>*)
title*[title::title]\<open>Isabelle/DOF\<close>
title*[title::title] \<open>Isabelle/DOF\<close>
subtitle*[subtitle::subtitle]\<open>User and Implementation Manual\<close>
text*[adb:: author,
email="\<open>a.brucker@exeter.ac.uk\<close>",
orcid="\<open>0000-0002-6355-1200\<close>",
http_site="\<open>https://www.brucker.ch/\<close>",
affiliation="\<open>University of Exeter, Exeter, UK\<close>"]\<open>Achim D. Brucker\<close>
text*[bu::author,
email = "\<open>wolff@lri.fr\<close>",
affiliation = "\<open>Université Paris-Saclay, LRI, Paris, France\<close>"]\<open>Burkhart Wolff\<close>
author*[ adb,
email ="\<open>a.brucker@exeter.ac.uk\<close>",
orcid ="\<open>0000-0002-6355-1200\<close>",
http_site ="\<open>https://www.brucker.ch/\<close>",
affiliation ="\<open>University of Exeter, Exeter, UK\<close>"]\<open>Achim D. Brucker\<close>
author*[ bu,
email = "\<open>wolff@lri.fr\<close>",
affiliation = "\<open>Université Paris-Saclay, LRI, Paris, France\<close>"]\<open>Burkhart Wolff\<close>
text*[abs::abstract,
keywordlist="[''Ontology'', ''Ontological Modeling'', ''Document Management'',
''Formal Document Development'', ''Document Authoring'', ''Isabelle/DOF'']"]
\<open> \isadof provides an implementation of \dof on top of Isabelle/HOL.
\dof itself is a novel framework for \<^emph>\<open>defining\<close> ontologies
and \<^emph>\<open>enforcing\<close> them during document development and document
evolution. A major goal of \dof is the integrated development of
formal certification documents (\eg, for Common Criteria or CENELEC
50128) that require consistency across both formal and informal
arguments.
abstract*[abs, keywordlist="[\<open>Ontology\<close>, \<open>Ontological Modeling\<close>, \<open>Document Management\<close>,
\<open>Formal Document Development\<close>,\<open>Document Authoring\<close>,\<open>Isabelle/DOF\<close>]"]
\<open> \<^isadof> provides an implementation of \<^dof> on top of Isabelle/HOL.
\<^dof> itself is a novel framework for \<^emph>\<open>defining\<close> ontologies
and \<^emph>\<open>enforcing\<close> them during document development and document
evolution. \<^isadof> targets use-cases such as mathematical texts referring
to a theory development or technical reports requiring a particular structure.
A major application of \<^dof> is the integrated development of
formal certification documents (\<^eg>, for Common Criteria or CENELEC
50128) that require consistency across both formal and informal
arguments.
\isadof is integrated into Isabelle's IDE, which
allows for smooth ontology development as well as immediate
ontological feedback during the editing of a document.
\<^isadof> is integrated into Isabelle's IDE, which
allows for smooth ontology development as well as immediate
ontological feedback during the editing of a document.
Its checking facilities leverage the collaborative
development of documents required to be consistent with an
underlying ontological structure.
In this user-manual, we give an in-depth presentation of the design
concepts of \<^dof>'s Ontology Definition Language (ODL) and describe
comprehensively its major commands. Many examples show typical best-practice
applications of the system.
In this paper, we give an in-depth presentation of the design
concepts of \dof's Ontology Definition Language (ODL) and key
aspects of the technology of its implementation. \isadof is the
first ontology language supporting machine-checked
links between the formal and informal parts in an LCF-style
interactive theorem proving environment.
It is an unique feature of \<^isadof> that ontologies may be used to control
the link between formal and informal content in documents in a machine
checked way. These links can connect both text elements and formal
modeling elements such as terms, definitions, code and logical formulas,
altogether \<^emph>\<open>integrated\<close> in a state-of-the-art interactive theorem prover.
\<close>
(*<*)

View File

@ -1,3 +1,16 @@
(*************************************************************************
* Copyright (C)
* 2019-2021 The University of Exeter
* 2018-2021 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
(*<*)
theory "01_Introduction"
imports "00_Frontmatter"
@ -10,7 +23,7 @@ The linking of the \<^emph>\<open>formal\<close> to the \<^emph>\<open>informal\
digitization of knowledge and its propagation. This challenge incites numerous research efforts
summarized under the labels ``semantic web,'' ``data mining,'' or any form of advanced ``semantic''
text processing. A key role in structuring this linking play \<^emph>\<open>document ontologies\<close> (also called
\<^emph>\<open>vocabulary\<close> in the semantic web community~@{cite "w3c:ontologies:2015"}), \ie, a machine-readable
\<^emph>\<open>vocabulary\<close> in the semantic web community~@{cite "w3c:ontologies:2015"}), \<^ie>, a machine-readable
form of the structure of documents as well as the document discourse.
Such ontologies can be used for the scientific discourse within scholarly articles, mathematical
@ -20,8 +33,8 @@ have to follow a structure. In practice, large groups of developers have to pro
set of documents where the consistency is notoriously difficult to maintain. In particular,
certifications are centered around the \<^emph>\<open>traceability\<close> of requirements throughout the entire
set of documents. While technical solutions for the traceability problem exists (most notably:
DOORS~\cite{doors}), they are weak in the treatment of formal entities (such as formulas and their
logical contexts).
DOORS~@{cite "ibm:doors:2019"}), they are weak in the treatment of formal entities (such as formulas
and their logical contexts).
Further applications are the domain-specific discourse in juridical texts or medical reports.
In general, an ontology is a formal explicit description of \<^emph>\<open>concepts\<close> in a domain of discourse
@ -29,20 +42,21 @@ In general, an ontology is a formal explicit description of \<^emph>\<open>conce
as \<^emph>\<open>links\<close> between them. A particular link between concepts is the \<^emph>\<open>is-a\<close> relation declaring
the instances of a subclass to be instances of the super-class.
To adress this challenge, we present developed the Document Ontology Framework (\dof). \dof is
designed for building scalable and user-friendly tools on top of interactive theorem provers,
and an implementation of DOF called \isadof. \isadof is a novel framework, extending of
Isabelle/HOL, to \<^emph>\<open>model\<close> typed ontologies and to \<^emph>\<open>enforce\<close> them during document evolution. Based
on Isabelle infrastructures, ontologies may refer to types, terms, proven theorems, code, or
established assertions. Based on a novel adaption of the Isabelle IDE, a document is checked to be
\<^emph>\<open>conform\<close> to a particular ontology---\isadof is designed to give fast user-feedback \<^emph>\<open>during the
To address this challenge, we present the Document Ontology Framework (\<^dof>) and an
implementation of \<^dof> called \<^isadof>. \<^dof> is designed for building scalable and user-friendly
tools on top of interactive theorem provers. \<^isadof> is an instance of this novel framework,
implemented as extension of Isabelle/HOL, to \<^emph>\<open>model\<close> typed ontologies and to \<^emph>\<open>enforce\<close> them
during document evolution. Based on Isabelle's infrastructures, ontologies may refer to types,
terms, proven theorems, code, or established assertions. Based on a novel adaption of the Isabelle
IDE (called PIDE, @{cite "wenzel:asynchronous:2014"}), a document is checked to be
\<^emph>\<open>conform\<close> to a particular ontology---\<^isadof> is designed to give fast user-feedback \<^emph>\<open>during the
capture of content\<close>. This is particularly valuable in case of document evolution, where the
\<^emph>\<open>coherence\<close> between the formal and the informal parts of the content can be mechanically checked.
To avoid any misunderstanding: \isadof is \<^emph>\<open>not a theory in HOL\<close> on ontologies and operations to
To avoid any misunderstanding: \<^isadof> is \<^emph>\<open>not a theory in HOL\<close> on ontologies and operations to
track and trace links in texts, it is an \<^emph>\<open>environment to write structured text\<close> which
\<^emph>\<open>may contain\<close> Isabelle/HOL definitions and proofs like mathematical articles, tech-reports and
scientific papers---as the present one, which is written in \isadof itself. \isadof is a plugin
scientific papers---as the present one, which is written in \<^isadof> itself. \<^isadof> is a plugin
into the Isabelle/Isar framework in the style of~@{cite "wenzel.ea:building:2007"}.\<close>
subsubsection\<open>How to Read This Manual\<close>
@ -55,50 +69,41 @@ declare_reference*[isadof_developers::text_section]
text\<open>
This manual can be read in different ways, depending on what you want to accomplish. We see three
different main user groups:
\<^enum> \<^emph>\<open>\isadof users\<close>, \ie, users that just want to edit a core document, be it for a paper or a
\<^enum> \<^emph>\<open>\<^isadof> users\<close>, \<^ie>, users that just want to edit a core document, be it for a paper or a
technical report, using a given ontology. These users should focus on
@{docitem_ref (unchecked) \<open>isadof_tour\<close>} and, depending on their knowledge of Isabelle/HOL, also
@{docitem_ref (unchecked) \<open>background\<close>}.
\<^enum> \<^emph>\<open>Ontology developers\<close>, \ie, users that want to develop new ontologies or modify existing
@{docitem (unchecked) \<open>isadof_tour\<close>} and, depending on their knowledge of Isabelle/HOL, also
@{docitem (unchecked) \<open>background\<close>}.
\<^enum> \<^emph>\<open>Ontology developers\<close>, \<^ie>, users that want to develop new ontologies or modify existing
document ontologies. These users should, after having gained acquaintance as a user, focus
on @{docitem_ref (unchecked) \<open>isadof_ontologies\<close>}.
\<^enum> \<^emph>\<open>\isadof developers\<close>, \ie, users that want to extend or modify \isadof, \eg, by adding new
text-elements. These users should read @{docitem_ref (unchecked) \<open>isadof_developers\<close>}
on @{docitem (unchecked) \<open>isadof_ontologies\<close>}.
\<^enum> \<^emph>\<open>\<^isadof> developers\<close>, \<^ie>, users that want to extend or modify \<^isadof>, \<^eg>, by adding new
text-elements. These users should read @{docitem (unchecked) \<open>isadof_developers\<close>}
\<close>
subsubsection\<open>Typographical Conventions\<close>
text\<open>
We acknowledge that understanding \isadof and its implementation in all details requires
We acknowledge that understanding \<^isadof> and its implementation in all details requires
separating multiple technological layers or languages. To help the reader with this, we
will type-set the different languages in different styles. In particular, we will use
\<^item> a light-blue background for input written in Isabelle's Isar language, \eg:
\begin{isar}
lemma refl: "x = x"
by simp
\end{isar}
\<^item> a green background for examples of generated document fragments (\ie, PDF output):
\begin{out}
The axiom refl
\end{out}
\<^item> a red background for For (S)ML-code:
\begin{sml}
fun id x = x
\end{sml}
\<^item> a light-blue background for input written in Isabelle's Isar language, \<^eg>:
@{boxed_theory_text [display]
\<open>lemma refl: "x = x"
by simp\<close>}
\<^item> a green background for examples of generated document fragments (\<^ie>, PDF output):
@{boxed_pdf [display] \<open>The axiom refl\<close>}
\<^item> a red background for (S)ML-code:
@{boxed_sml [display] \<open>fun id x = x\<close>}
\<^item> a yellow background for \LaTeX-code:
\begin{ltx}
\newcommand{\refl}{$x = x$}
\end{ltx}
@{boxed_latex [display] \<open>\newcommand{\refl}{$x = x$}\<close>}
\<^item> a grey background for shell scripts and interactive shell sessions:
\begin{bash}
ë\prompt{}ë ls
CHANGELOG.md CITATION examples install LICENSE README.md ROOTS src
\end{bash}
@{boxed_bash [display]\<open>ë\prompt{}ë ls
CHANGELOG.md CITATION examples install LICENSE README.md ROOTS src\<close>}
\<close>
subsubsection\<open>How to Cite \isadof\<close>
subsubsection\<open>How to Cite \<^isadof>\<close>
text\<open>
If you use or extend \isadof in your publications, please use
\<^item> for the \isadof system~@{cite "brucker.ea:isabelle-ontologies:2018"}:
If you use or extend \<^isadof> in your publications, please use
\<^item> for the \<^isadof> system~@{cite "brucker.ea:isabelle-ontologies:2018"}:
\begin{quote}\small
A.~D. Brucker, I.~Ait-Sadoune, P.~Crisafulli, and B.~Wolff. Using the {Isabelle} ontology
framework: Linking the formal with the informal. In \<^emph>\<open>Conference on Intelligent Computer
@ -106,21 +111,30 @@ text\<open>
Heidelberg, 2018. \href{https://doi.org/10.1007/978-3-319-96812-4\_3}
{10.1007/978-3-319-96812-4\_3}.
\end{quote}
A \BibTeX-entry is available at:
\url{https://www.brucker.ch/bibliography/abstract/brucker.ea-isabelle-ontologies-2018}.
\<^item> for the implementation of \isadof~@{cite "brucker.ea:isabelledof:2019"}:
A \<^BibTeX>-entry is available at:
\<^url>\<open>https://www.brucker.ch/bibliography/abstract/brucker.ea-isabelle-ontologies-2018\<close>.
\<^item> for the implementation of \<^isadof>~@{cite "brucker.ea:isabelledof:2019"}:
\begin{quote}\small
A.~D. Brucker and B.~Wolff. \isadof: Design and implementation. In P.~{\"O}lveczky and
G.~Sala{\"u}n, editors, \<^emph>\<open>Software Engineering and Formal Methods (SEFM)\<close>, Lecture Notes
in Computer Science. Springer-Verlag, Heidelberg, 2019.
A.~D. Brucker and B.~Wolff. \<^isadof>: Design and implementation. In P.C.~{\"O}lveczky and
G.~Sala{\"u}n, editors, \<^emph>\<open>Software Engineering and Formal Methods (SEFM)\<close>, number 11724 in
Lecture Notes in Computer Science. Springer-Verlag, Heidelberg, 2019.
\href{https://doi.org/10.1007/978-3-030-30446-1_15}{10.1007/978-3-030-30446-1\_15}.
\end{quote}
A \<^BibTeX>-entry is available at:
\<^url>\<open>https://www.brucker.ch/bibliography/abstract/brucker.ea-isabelledof-2019\<close>.
\<^item> for an application of \<^isadof> in the context of certifications:
\begin{quote}\small
A.~D. Brucker and B.~Wolff.
Using Ontologies in Formal Developments Targeting Certification.
In W. Ahrendt and S. Tarifa, editors. \<^emph>\<open>Integrated Formal Methods (IFM)\<close>, number 11918.
Lecture Notes in Computer Science. Springer-Verlag, Heidelberg, 2019.
\href{https://doi.org/10.1007/978-3-030-34968-4\_4}.
\end{quote}
A \BibTeX-entry is available at:
\url{https://www.brucker.ch/bibliography/abstract/brucker.ea-isabelledof-2019}.
\<close>
subsubsection\<open>Availability\<close>
text\<open>
The implementation of the framework is available at
\url{\dofurl}. The website also provides links to the latest releases. \isadof is licensed
\url{\dofurl}. The website also provides links to the latest releases. \<^isadof> is licensed
under a 2-clause BSD license (SPDX-License-Identifier: BSD-2-Clause).
\<close>

View File

@ -1,3 +1,16 @@
(*************************************************************************
* Copyright (C)
* 2019-2022 The University of Exeter
* 2018-2022 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
(*<*)
theory "02_Background"
imports "01_Introduction"
@ -13,7 +26,7 @@ figure*[architecture::figure,relative_width="95",src="''figures/isabelle-archite
the IDE (right-hand side). \<close>
text*[bg::introduction]\<open>
While Isabelle @{cite "nipkow.ea:isabelle:2002"} is widely perceived as an interactive theorem
While Isabelle is widely perceived as an interactive theorem
prover for HOL (Higher-order Logic)~@{cite "nipkow.ea:isabelle:2002"}, we would like to emphasize
the view that Isabelle is far more than that: it is the \<^emph>\<open>Eclipse of Formal Methods Tools\<close>. This
refers to the ``\<^emph>\<open>generic system framework of Isabelle/Isar underlying recent versions of Isabelle.
@ -24,29 +37,31 @@ with explicit infrastructure for building derivative systems.\<close>''~@{cite "
The current system framework offers moreover the following features:
\<^item> a build management grouping components into to pre-compiled sessions,
\<^item> a prover IDE (PIDE) framework~@{cite "wenzel:asynchronous:2014"} with various front-ends
\<^item> a prover IDE (PIDE) framework~@{cite "wenzel:asynchronous:2014"} with various front-ends,
\<^item> documentation-generation,
\<^item> code generators for various target languages,
\<^item> an extensible front-end language Isabelle/Isar, and,
\<^item> last but not least, an LCF style, generic theorem prover kernel as
the most prominent and deeply integrated system component.
The Isabelle system architecture shown in @{docitem_ref \<open>architecture\<close>} comes with many layers,
\<close>
text\<open>
The Isabelle system architecture shown in @{docitem \<open>architecture\<close>} comes with many layers,
with Standard ML (SML) at the bottom layer as implementation language. The architecture actually
foresees a \<^emph>\<open>Nano-Kernel\<close> (our terminology) which resides in the SML structure \inlinesml{Context}.
foresees a \<^emph>\<open>Nano-Kernel\<close> (our terminology) which resides in the SML structure \<^boxed_sml>\<open>Context\<close>.
This structure provides a kind of container called \<^emph>\<open>context\<close> providing an identity, an
ancestor-list as well as typed, user-defined state for components (plugins) such as \isadof.
On top of the latter, the LCF-Kernel, tactics, automated proof procedures as well as specific
ancestor-list as well as typed, user-defined state for components (plugins) such as \<^isadof>.
On top of the latter, the LCF-Kernel, tactics, automated proof procedures as well as specific
support for higher specification constructs were built.\<close>
section*[dof::introduction]\<open>The Document Model Required by \dof\<close>
section*[dof::introduction]\<open>The Document Model Required by \<^dof>\<close>
text\<open>
In this section, we explain the assumed document model underlying our Document Ontology Framework
(\dof) in general. In particular we discuss the concepts \<^emph>\<open>integrated document\<close>, \<^emph>\<open>sub-document\<close>,
\<^emph>\<open>text-element\<close> and \<^emph>\<open>semantic macros\<close> occurring inside text-elements. Furthermore, we assume two
different levels of parsers (for \<^emph>\<open>outer\<close> and \<^emph>\<open>inner syntax\<close>) where the inner-syntax is basically
a typed \inlineisar|\<lambda>|-calculus and some Higher-order Logic (HOL).
(\<^dof>) in general. In particular we discuss the concepts
\<^emph>\<open>integrated document\<close>\<^bindex>\<open>integrated document\<close>, \<^emph>\<open>sub-document\<close>\<^bindex>\<open>sub-document\<close>,
\<^emph>\<open>text-element\<close>\<^bindex>\<open>text-element\<close>, and \<^emph>\<open>semantic macros\<close>\<^bindex>\<open>semantic macros\<close> occurring
inside text-elements. Furthermore, we assume two different levels of parsers
(for \<^emph>\<open>outer\<close> and \<^emph>\<open>inner syntax\<close>) where the inner-syntax is basically a typed \<open>\<lambda>\<close>-calculus
and some Higher-order Logic (HOL)\<^bindex>\<open>HOL\<close>.
\<close>
(*<*)
@ -55,105 +70,136 @@ declare_reference*["fig:dependency"::text_section]
text\<open>
We assume a hierarchical document model\index{document model}, \ie, an \<^emph>\<open>integrated\<close> document
consist of a hierarchy \<^emph>\<open>sub-documents\<close> (files) that can depend acyclically on each other.
The Isabelle Framework is based on a \<^emph>\<open>document-centric view\<close>\<^bindex>\<open>document-centric view\<close> of
a document, treating the input in its integrality as set of (user-programmable) \<^emph>\<open>document element\<close>
that may mutually depend on and link to each other; A \<^emph>\<open>document\<close> in our sense is what is configured in a set of
\<^verbatim>\<open>ROOT\<close>- and \<^verbatim>\<open>ROOTS\<close>-files.
Isabelle assumes a hierarchical document model\<^index>\<open>document model\<close>, \<^ie>, an \<^emph>\<open>integrated\<close> document
consist of a hierarchy of \<^emph>\<open>sub-documents\<close> (files); dependencies are restricted to be
acyclic at this level.
Sub-documents can have different document types in order to capture documentations consisting of
documentation, models, proofs, code of various forms and other technical artifacts. We call the
main sub-document type, for historical reasons, \<^emph>\<open>theory\<close>-files. A theory file\bindex{theory!file}
consists of a \<^emph>\<open>header\<close>\bindex{header}, a \<^emph>\<open>context definition\<close>\index{context}, and a body
consisting of a sequence of \<^emph>\<open>command\<close>s (see @{figure (unchecked) "fig:dependency"}). Even the header consists
of a sequence of commands used for introductory text elements not depending on any context.
The context-definition contains an \inlineisar{import} and a
\inlineisar{keyword} section, for example:
\begin{isar}
" theory Example (* Name of the 'theory' *)
" imports (* Declaration of 'theory' dependencies *)
" Main (* Imports a library called 'Main' *)
" keywords (* Registration of keywords defined locally *)
" requirement (* A command for describing requirements *)
\end{isar}
where \inlineisar{Example} is the abstract name of the text-file,
\inlineisar{Main} refers to an imported theory (recall that the import
relation must be acyclic) and \inlineisar{keywords} are used to
separate commands from each other.
main sub-document type, for historical reasons, \<^emph>\<open>theory\<close>-files. A theory file\<^bindex>\<open>theory!file\<close>
consists of a \<^emph>\<open>header\<close>\<^bindex>\<open>header\<close>, a \<^emph>\<open>context definition\<close>\<^index>\<open>context\<close>, and a body
consisting of a sequence of document elements called
\<^emph>\<open>command\<close>s (see @{figure (unchecked) "fig:dependency"}). Even
the header consists of a sequence of commands used for introductory text elements not depending on
any context. The context-definition contains an \<^boxed_theory_text>\<open>import\<close> and a
\<^boxed_theory_text>\<open>keyword\<close> section, for example:
@{boxed_theory_text [display]\<open>
theory Example \<comment>\<open>Name of the 'theory'\<close>
imports \<comment>\<open>Declaration of 'theory' dependencies\<close>
Main \<comment>\<open>Imports a library called 'Main'\<close>
keywords \<comment>\<open>Registration of keywords defined locally\<close>
requirement \<comment>\<open>A command for describing requirements\<close> \<close>}
where \<^boxed_theory_text>\<open>Example\<close> is the abstract name of the text-file, \<^boxed_theory_text>\<open>Main\<close>
refers to an imported theory (recall that the import relation must be acyclic) and
\<^boxed_theory_text>\<open>keywords\<close> are used to separate commands from each other.
\<close>
We distinguish fundamentally two different syntactic levels:
\<^item> the \emph{outer-syntax}\bindex{syntax!outer}\index{outer syntax|see {syntax, outer}} (\ie, the
syntax for commands) is processed by a lexer-library and parser combinators built on top, and
\<^item> the \emph{inner-syntax}\bindex{syntax!inner}\index{inner syntax|see {syntax, inner}} (\ie, the
syntax for \inlineisar|\<lambda>|-terms in HOL) with its own parametric polymorphism type
checking.
text\<open> A text-element \<^index>\<open>text-element\<close> may look like this:
@{boxed_theory_text [display]\<open>
text\<open> According to the \<^emph>\<open>reflexivity\<close> axiom @{thm refl},
we obtain in \<Gamma> for @{term "fac 5"} the result @{value "fac 5"}.\<close>\<close>}
... so it is a command \<^theory_text>\<open>text\<close> followed by an argument (here in \<open>\<open> ... \<close>\<close> parenthesis) which
contains characters and a special notation for semantic macros \<^bindex>\<open>semantic macros\<close>
(here \<^theory_text>\<open>@{term "fac 5"}).\<close>
\<close>
text\<open>While we concentrate in this manual on \<^theory_text>\<open>text\<close>-document elements --- this is the main
use of \<^dof> in its current stage --- it is important to note that there are actually three
families of ``ontology aware'' document elements with analogous
syntax to standard ones. The difference is a bracket with meta-data of the form:
@{theory_text [display,indent=5, margin=70]
\<open>
text*[label::classid, attr\<^sub>1=E\<^sub>1, ... attr\<^sub>n=E\<^sub>n]\<open> some semi-formal text \<close>
ML*[label::classid, attr\<^sub>1=E\<^sub>1, ... attr\<^sub>n=E\<^sub>n]\<open> some SML code \<close>
value*[label::classid, attr\<^sub>1=E\<^sub>1, ... attr\<^sub>n=E\<^sub>n]\<open> some annotated \<lambda>-term \<close>
\<close>}
Depending on the family, we will speak about \<^emph>\<open>(formal) text-contexts\<close>,\<^index>\<open>formal text-contexts\<close>
\<^emph>\<open>(ML) code-contexts\<close>\<^index>\<open>code-contexts\<close> and \<^emph>\<open>term-contexts\<close>\<^index>\<open>term-contexts\<close> if we refer
to sub-elements inside the \<open>\<open>...\<close>\<close> cartouches of these command families. Note that the Isabelle
framework allows for nesting cartouches that permits to support switching into a different
context. In general, this has also the effect that the evaluation of antiquotations changes.
\<^footnote>\<open>In the literature, this concept has been referred to \<open>Cascade-Syntax\<close> and was used in the
Centaur-system and is existing in some limited form in some Emacs-implementations these days. \<close>
\<close>
text\<open>
On the semantic level, we assume a validation process for an integrated document, where the
semantics of a command is a transformation \inlineisar+\<theta> \<rightarrow> \<theta>+ for some system state
\inlineisar+\<theta>+. This document model can be instantiated with outer-syntax commands for common
text elements, \eg, \inlineisar+section{*...*}+ or \inlineisar+text{*...*}+. Thus, users can add
informal text to a sub-document using a text command:
\begin{isar}
text\<Open>This is a description.\<Close>
\end{isar}
semantics of a command is a transformation \<open>\<theta> \<rightarrow> \<theta>\<close> for some system state \<open>\<theta>\<close>.
This document model can be instantiated depending on the text-code-, or term-contexts.
For common text elements, \<^eg>, \<^theory_text>\<open>section\<open>...\<close>\<close> or \<^theory_text>\<open>text\<open>...\<close>\<close>,
users can add informal text to a sub-document using a text command:
@{boxed_theory_text [display] \<open>text\<open>This is a description.\<close>\<close> }
This will type-set the corresponding text in, for example, a PDF document. However, this
translation is not necessarily one-to-one: text elements can be enriched by formal, \ie,
machine-checked content via \emph{semantic macros}, called antiquotations\bindex{antiquotation}:
\begin{isar}
text\<Open>According to the reflexivity axiom <@>{thm refl}, we obtain in \<Gamma>
for <@>{term "fac 5"} the result <@>{value "fac 5"}.\<Close>
\end{isar}
which is represented in the final document (\eg, a PDF) by:
\begin{out}
According to the reflexivity axiom $\mathrm{x = x}$, we obtain in $\Gamma$ for $\operatorname{fac} \text{\textrm{5}}$ the result $\text{\textrm{120}}$.
\end{out}
Semantic macros are partial functions of type \inlineisar+\<theta> \<rightarrow> text+; since they can use the
translation is not necessarily one-to-one: text elements can be enriched by formal, \<^ie>,
machine-checked content via \<^emph>\<open>semantic macros\<close>, called antiquotations\<^bindex>\<open>antiquotation\<close>:
@{boxed_theory_text [display]
\<open>text\<open> According to the \<^emph>\<open>reflexivity\<close> axiom @{thm "refl"}, we obtain in \<Gamma>
for @{term \<open>fac 5\<close>} the result @{value \<open>fac 5\<close>}.\<close>\<close>
}
which is represented in the final document (\<^eg>, a PDF) by:
@{boxed_pdf [display]
\<open>According to the $\emph{reflexivity}$ axiom $\mathrm{x = x}$, we obtain in $\Gamma$
for $\operatorname{fac} \text{\textrm{5}}$ the result $\text{\textrm{120}}$.\<close>
}
Semantic macros are partial functions of type \<open>\<theta> \<rightarrow> text\<close>; since they can use the
system state, they can perform all sorts of specific checks or evaluations (type-checks,
executions of code-elements, references to text-elements or proven theorems such as
\inlineisar+refl+, which is the reference to the axiom of reflexivity).
\<open>refl\<close>, which is the reference to the axiom of reflexivity).
Semantic macros establish \<^emph>\<open>formal content\<close> inside informal content; they can be
type-checked before being displayed and can be used for calculations before being
typeset. They represent the device for linking the formal with the informal.
\<close>
figure*["fig:dependency"::figure,relative_width="70",src="''figures/document-hierarchy''"]
\<open>A Theory-Graph in the Document Model. \<close>
section*[bgrnd21::introduction]\<open>Implementability of the Required Document Model.\<close>
section*[bgrnd21::introduction]\<open>Implementability of the Document Model in other ITP's\<close>
text\<open>
Batch-mode checkers for \dof can be implemented in all systems of the LCF-style prover family,
\ie, systems with a type-checked \inlinesml{term}, and abstract \inlinesml{thm}-type for
theorems (protected by a kernel). This includes, \eg, ProofPower, HOL4, HOL-light, Isabelle, or
Coq and its derivatives. \dof is, however, designed for fast interaction in an IDE. If a user wants
Batch-mode checkers for \<^dof> can be implemented in all systems of the LCF-style prover family,
\<^ie>, systems with a type-checked \<open>term\<close>, and abstract \<open>thm\<close>-type for theorems
(protected by a kernel). This includes, \<^eg>, ProofPower, HOL4, HOL-light, Isabelle, or Coq
and its derivatives. \<^dof> is, however, designed for fast interaction in an IDE. If a user wants
to benefit from this experience, only Isabelle and Coq have the necessary infrastructure of
asynchronous proof-processing and support by a PIDE~@{cite "DBLP:conf/itp/Wenzel14" and
"DBLP:journals/corr/Wenzel14" and "DBLP:conf/mkm/BarrasGHRTWW13"
and "Faithfull:2018:COQ:3204179.3204223"} which in many features over-accomplishes the required
features of \dof. For example, current Isabelle versions offer cascade-syntaxes (different
syntaxes and even parser-technologies which can be nested along the
\inlineisar+\<Open> ... \<Close> + barriers, while \dof actually only requires a two-level
syntax model.
asynchronous proof-processing and support by a PIDE~@{cite "wenzel:asynchronous:2014" and
"wenzel:system:2014" and "barras.ea:pervasive:2013" and "faithfull.ea:coqoon:2018"} which
in many features over-accomplishes the required features of \<^dof>. For example, current Isabelle
versions offer cascade-syntaxes (different syntaxes and even parser-technologies which can be
nested along the \<open>\<open>...\<close>\<close> barriers), while \<^dof> actually only requires a two-level syntax model.
\<close>
figure*["fig:dof-ide"::figure,relative_width="95",src="''figures/cicm2018-combined''"]\<open>
The \isadof IDE (left) and the corresponding PDF (right), showing the first page
of~\cite{brucker.ea:isabelle-ontologies:2018}.\<close>
The \<^isadof> IDE (left) and the corresponding PDF (right), showing the first page
of~@{cite "brucker.ea:isabelle-ontologies:2018"}.\<close>
text\<open>
We call the present implementation of \dof on the Isabelle platform \isadof.
We call the present implementation of \<^dof> on the Isabelle platform \<^isadof> .
@{docitem "fig:dof-ide"} shows a screen-shot of an introductory paper on
\isadof~@{cite "brucker.ea:isabelle-ontologies:2018"}: the \isadof PIDE can be seen on the left,
\<^isadof>~@{cite "brucker.ea:isabelle-ontologies:2018"}: the \<^isadof> PIDE can be seen on the left,
while the generated presentation in PDF is shown on the right.
Isabelle provides, beyond the features required for \dof, a lot of additional benefits. For
example, it also allows the asynchronous evaluation and checking of the document
content~@{cite "DBLP:conf/itp/Wenzel14" and "DBLP:journals/corr/Wenzel14" and
"DBLP:conf/mkm/BarrasGHRTWW13"} and is dynamically extensible. Its PIDE provides a
\<^emph>\<open>continuous build, continuous check\<close> functionality, syntax highlighting, and auto-completion.
It also provides infrastructure for displaying meta-information (\eg, binding and type annotation)
as pop-ups, while hovering over sub-expressions. A fine-grained dependency analysis allows the
processing of individual parts of theory files asynchronously, allowing Isabelle to interactively
process large (hundreds of theory files) documents. Isabelle can group sub-documents into sessions,
\ie, sub-graphs of the document-structure that can be ``pre-compiled'' and loaded
instantaneously, \ie, without re-processing. \<close>
Isabelle provides, beyond the features required for \<^dof>, a lot of additional benefits.
Besides UTF8-support for characters used in text-elements, Isabelle offers built-in already a
mechanism for user-programmable antiquotations \<^index>\<open>antiquotations\<close> which we use to implement
semantic macros \<^index>\<open>semantic macros\<close> in \<^isadof> (We will actually use these two terms
as synonym in the context of \<^isadof>). Moreover, \<^isadof> allows for the asynchronous
evaluation and checking of the document content~@{cite "wenzel:asynchronous:2014" and
"wenzel:system:2014" and "barras.ea:pervasive:2013"} and is dynamically extensible. Its PIDE
provides a \<^emph>\<open>continuous build, continuous check\<close> functionality, syntax highlighting, and
auto-completion. It also provides infrastructure for displaying meta-information (\<^eg>, binding
and type annotation) as pop-ups, while hovering over sub-expressions. A fine-grained dependency
analysis allows the processing of individual parts of theory files asynchronously, allowing
Isabelle to interactively process large (hundreds of theory files) documents. Isabelle can group
sub-documents into sessions, \<^ie>, sub-graphs of the document-structure that can be ``pre-compiled''
and loaded instantaneously, \<^ie>, without re-processing, which is an important means to scale up. \<close>
(*<*)
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,16 @@
(*************************************************************************
* Copyright (C)
* 2019-2022 University of Exeter
* 2018-2022 University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
(*<*)
theory "05_Implementation"
imports "04_RefMan"
@ -5,22 +18,22 @@ begin
(*>*)
chapter*[isadof_developers::text_section]\<open>Extending \isadof\<close>
chapter*[isadof_developers::text_section]\<open>Extending \<^isadof>\<close>
text\<open>
In this chapter, we describe the basic implementation aspects of \isadof, which is based on
In this chapter, we describe the basic implementation aspects of \<^isadof>, which is based on
the following design-decisions:
\<^item> the entire \isadof is a ``pure add-on,'' \ie, we deliberately resign on the possibility to
modify Isabelle itself.
\<^item> we made a small exception to this rule: the \isadof package modifies in its installation
about 10 lines in the \LaTeX-generator (\path{src/patches/thy_output.ML}).
\<^item> the entire \<^isadof> is a ``pure add-on,'' \<^ie>, we deliberately resign the possibility to
modify Isabelle itself,
\<^item> we made a small exception to this rule: the \<^isadof> package modifies in its installation
about 10 lines in the \LaTeX-generator (\path{src/patches/thy_output.ML}),
\<^item> we decided to make the markup-generation by itself to adapt it as well as possible to the
needs of tracking the linking in documents.
\<^item> \isadof is deeply integrated into the Isabelle's IDE (PIDE) to give immediate feedback during
needs of tracking the linking in documents,
\<^item> \<^isadof> is deeply integrated into the Isabelle's IDE (PIDE) to give immediate feedback during
editing and other forms of document evolution.
\<close>
text\<open>
Semantic macros, as required by our document model, are called \<^emph>\<open>document antiquotations\<close>
in the Isabelle literature~@{cite "wenzel:isabelle-isar:2019"}. While Isabelle's code-antiquotations
in the Isabelle literature~@{cite "wenzel:isabelle-isar:2020"}. While Isabelle's code-antiquotations
are an old concept going back to Lisp and having found via SML and OCaml their ways into modern
proof systems, special annotation syntax inside documentation comments have their roots in
documentation generators such as Javadoc. Their use, however, as a mechanism to embed
@ -28,61 +41,57 @@ text\<open>
IDE support.
\<close>
section\<open>\isadof: A User-Defined Plugin in Isabelle/Isar\<close>
text\<open>
section\<open>\<^isadof>: A User-Defined Plugin in Isabelle/Isar\<close>
text\<open>
A plugin in Isabelle starts with defining the local data and registering it in the framework. As
mentioned before, contexts are structures with independent cells/compartments having three
primitives \inlinesml+init+, \inlinesml+extend+ and \inlinesml+merge+. Technically this is done by
instantiating a functor \inlinesml+Generic_Data+, and the following fairly typical code-fragment
is drawn from \isadof:
primitives \<^boxed_sml>\<open>init\<close>, \<^boxed_sml>\<open>extend\<close> and \<^boxed_sml>\<open>merge\<close>. Technically this is done by
instantiating a functor \<^boxed_sml>\<open>Generic_Data\<close>, and the following fairly typical code-fragment
is drawn from \<^isadof>:
\begin{sml}
structure Data = Generic_Data
@{boxed_sml [display]
\<open>structure Data = Generic_Data
( type T = docobj_tab * docclass_tab * ...
val empty = (initial_docobj_tab, initial_docclass_tab, ...)
val extend = I
fun merge((d1,c1,...),(d2,c2,...)) = (merge_docobj_tab (d1,d2,...),
merge_docclass_tab(c1,c2,...))
);
\end{sml}
where the table \inlinesml+docobj_tab+ manages document classes and \inlinesml+docclass_tab+ the
environment for class definitions (inducing the inheritance relation). Other tables capture, \eg,
);\<close>}
where the table \<^boxed_sml>\<open>docobj_tab\<close> manages document class instances
and \<^boxed_sml>\<open>docclass_tab\<close> the environment for class definitions
(inducing the inheritance relation). Other tables capture, \eg,
the class invariants, inner-syntax antiquotations. Operations follow the MVC-pattern, where
Isabelle/Isar provides the controller part. A typical model operation has the type:
\begin{sml}
val opn :: <args_type> -> Context.generic -> Context.generic
\end{sml}
@{boxed_sml [display]
\<open>val opn :: <args_type> -> Context.generic -> Context.generic\<close>}
representing a transformation on system contexts. For example, the operation of declaring a local
reference in the context is presented as follows:
\begin{sml}
fun declare_object_local oid ctxt =
@{boxed_sml [display]
\<open>fun declare_object_local oid ctxt =
let fun decl {tab,maxano} = {tab=Symtab.update_new(oid,NONE) tab,
maxano=maxano}
in (Data.map(apfst decl)(ctxt)
handle Symtab.DUP _ =>
error("multiple declaration of document reference"))
end
\end{sml}
where \inlineisar+Data.map+ is the update function resulting from the instantiation of the
functor \inlinesml|Generic_Data|. This code fragment uses operations from a library structure
\inlinesml+Symtab+ that were used to update the appropriate table for document objects in
end\<close>}
where \<^boxed_sml>\<open>Data.map\<close> is the update function resulting from the instantiation of the
functor \<^boxed_sml>\<open>Generic_Data\<close>. This code fragment uses operations from a library structure
\<^boxed_sml>\<open>Symtab\<close> that were used to update the appropriate table for document objects in
the plugin-local state. Possible exceptions to the update operation were mapped to a system-global
error reporting function.
Finally, the view-aspects were handled by an API for parsing-combinators. The library structure
\inlinesml+Scan+ provides the operators:
\<^boxed_sml>\<open>Scan\<close> provides the operators:
\begin{sml}
op || : ('a -> 'b) * ('a -> 'b) -> 'a -> 'b
@{boxed_sml [display]
\<open>op || : ('a -> 'b) * ('a -> 'b) -> 'a -> 'b
op -- : ('a -> 'b * 'c) * ('c -> 'd * 'e) -> 'a -> ('b * 'd) * 'e
op >> : ('a -> 'b * 'c) * ('b -> 'd) -> 'a -> 'd * 'c
op option : ('a -> 'b * 'a) -> 'a -> 'b option * 'a
op repeat : ('a -> 'b * 'a) -> 'a -> 'b list * 'a
\end{sml}
op repeat : ('a -> 'b * 'a) -> 'a -> 'b list * 'a \<close>}
for alternative, sequence, and piping, as well as combinators for option and repeat. Parsing
combinators have the advantage that they can be smoothlessly integrated into standard programs,
combinators have the advantage that they can be integrated into standard programs,
and they enable the dynamic extension of the grammar. There is a more high-level structure
\inlinesml{Parse} providing specific combinators for the command-language Isar:
@ -97,26 +106,25 @@ val attributes =(Parse.$$$ "[" |-- (reference
|--(Parse.enum ","attribute)))[]))--| Parse.$$$ "]"
\end{sml}
The ``model'' \inlineisar+declare_reference_opn+ and ``new'' \inlineisar+attributes+ parts were
The ``model'' \<^boxed_sml>\<open>declare_reference_opn\<close> and ``new'' \<^boxed_sml>\<open>attributes\<close> parts were
combined via the piping operator and registered in the Isar toplevel:
\begin{sml}
fun declare_reference_opn (((oid,_),_),_) =
@{boxed_sml [display]
\<open>fun declare_reference_opn (((oid,_),_),_) =
(Toplevel.theory (DOF_core.declare_object_global oid))
val _ = Outer_Syntax.command <@>{command_keyword "declare_reference"}
"declare document reference"
(attributes >> declare_reference_opn);
\end{sml}
(attributes >> declare_reference_opn);\<close>}
Altogether, this gives the extension of Isabelle/HOL with Isar syntax and semantics for the
new \emph{command}:
\begin{isar}
@{boxed_theory_text [display]\<open>
declare_reference [lal::requirement, alpha="main", beta=42]
\end{isar}
\<close>}
The construction also generates implicitly some markup information; for example, when hovering
over the \inlineisar|declare_reference| command in the IDE, a popup window with the text:
over the \<^boxed_theory_text>\<open>declare_reference\<close> command in the IDE, a popup window with the text:
``declare document reference'' will appear.
\<close>
@ -126,139 +134,116 @@ text\<open>
principle: based on a number of combinators, new user-defined antiquotation syntax and semantics
can be added to the system that works on the internal plugin-data freely. For example, in
\begin{sml}
val _ = Theory.setup(
@{boxed_sml [display]
\<open>val _ = Theory.setup(
Thy_Output.antiquotation <@>{binding docitem}
docitem_antiq_parser
(docitem_antiq_gen default_cid) #>
ML_Antiquotation.inline <@>{binding docitem_value}
ML_antiq_docitem_value)
\end{sml}
the text antiquotation \inlineisar+docitem+ is declared and bounded to a parser for the argument
ML_antiq_docitem_value)\<close>}
the text antiquotation \<^boxed_sml>\<open>docitem\<close> is declared and bounded to a parser for the argument
syntax and the overall semantics. This code defines a generic antiquotation to be used in text
elements such as
\begin{isar}
text\<Open>as defined in <@>{docitem \<Open>d1\<Close>} ...\<Close>
\end{isar}
@{boxed_theory_text [display]\<open>
text\<open>as defined in @{docitem \<open>d1\<close>} ...\<close>
\<close>}
The subsequent registration \inlineisar+docitem_value+ binds code to a ML-antiquotation usable
The subsequent registration \<^boxed_sml>\<open>docitem_value\<close> binds code to a ML-antiquotation usable
in an ML context for user-defined extensions; it permits the access to the current ``value''
of document element, \ie; a term with the entire update history.
of document element, \<^ie>, a term with the entire update history.
It is possible to generate antiquotations \emph{dynamically}, as a consequence of a class
definition in ODL. The processing of the ODL class \inlineisar+d$$efinition+ also \emph{generates}
a text antiquotation \inlineisar+<@>{definition \<Open>d1\<Close>}+, which works similar to
\inlineisar+<@>{docitem \<Open>d1\<Close>}+ except for an additional type-check that assures that
\inlineisar+d1+ is a reference to a definition. These type-checks support the subclass hierarchy.
definition in ODL. The processing of the ODL class \<^typ>\<open>definition\<close> also \emph{generates}
a text antiquotation \<^boxed_theory_text>\<open>@{"definition" \<open>d1\<close>}\<close>, which works similar to
\<^boxed_theory_text>\<open>@{docitem \<open>d1\<close>}\<close> except for an additional type-check that assures that
\<^boxed_theory_text>\<open>d1\<close> is a reference to a definition. These type-checks support the subclass hierarchy.
\<close>
section\<open>Implementing Second-level Type-Checking\<close>
text\<open>
On expressions for attribute values, for which we chose to use HOL syntax to avoid that users
need to learn another syntax, we implemented an own pass over type-checked terms. Stored in the
late-binding table \inlineisar+ISA_transformer_tab+, we register for each inner-syntax-annotation
late-binding table \<^boxed_sml>\<open>ISA_transformer_tab\<close>, we register for each inner-syntax-annotation
(ISA's), a function of type
\begin{sml}
theory -> term * typ * Position.T -> term option
\end{sml}
@{boxed_sml [display]
\<open> theory -> term * typ * Position.T -> term option\<close>}
Executed in a second pass of term parsing, ISA's may just return \inlineisar+None+. This is
adequate for ISA's just performing some checking in the logical context \inlineisar+theory+;
Executed in a second pass of term parsing, ISA's may just return \<^boxed_theory_text>\<open>None\<close>. This is
adequate for ISA's just performing some checking in the logical context \<^boxed_theory_text>\<open>theory\<close>;
ISA's of this kind report errors by exceptions. In contrast, \<^emph>\<open>transforming\<close> ISA's will
yield a term; this is adequate, for example, by replacing a string-reference to some term denoted
by it. This late-binding table is also used to generate standard inner-syntax-antiquotations from
a \inlineisar+doc_class+.
a \<^boxed_theory_text>\<open>doc_class\<close>.
\<close>
section\<open>Programming Class Invariants\<close>
text\<open>
For the moment, there is no high-level syntax for the definition of class invariants. A
formulation, in SML, of the first class-invariant in @{docref "sec:class_inv"} is straight-forward:
\begin{sml}
fun check_result_inv oid {is_monitor:bool} ctxt =
let val kind = compute_attr_access ctxt "kind" oid <@>{here} <@>{here}
val prop = compute_attr_access ctxt "property" oid <@>{here} <@>{here}
val tS = HOLogic.dest_list prop
in case kind_term of
<@>{term "proof"} => if not(null tS) then true
else error("class result invariant violation")
| _ => false
end
val _ = Theory.setup (DOF_core.update_class_invariant
"tiny_cert.result" check_result_inv)
\end{sml}
The \inlinesml{setup}-command (last line) registers the \inlineisar+check_result_inv+ function
into the \isadof kernel, which activates any creation or modification of an instance of
\inlineisar+result+. We cannot replace \inlineisar+compute_attr_access+ by the corresponding
antiquotation \inlineisar+<@>{docitem_value kind::oid}+, since \inlineisar+oid+ is
bound to a variable here and can therefore not be statically expanded.
See \<^technical>\<open>sec:low_level_inv\<close>.
\<close>
section\<open>Implementing Monitors\<close>
text\<open>
Since monitor-clauses have a regular expression syntax, it is natural to implement them as
deterministic automata. These are stored in the \inlineisar+docobj_tab+ for monitor-objects
in the \isadof component. We implemented the functions:
deterministic automata. These are stored in the \<^boxed_sml>\<open>docobj_tab\<close> for monitor-objects
in the \<^isadof> component. We implemented the functions:
\begin{sml}
val enabled : automaton -> env -> cid list
val next : automaton -> env -> cid -> automaton
\end{sml}
where \inlineisar+env+ is basically a map between internal automaton states and class-id's
(\inlineisar+cid+'s). An automaton is said to be \<^emph>\<open>enabled\<close> for a class-id,
iff it either occurs in its accept-set or its reject-set (see @{docref "sec:monitors"}). During
@{boxed_sml [display]
\<open> val enabled : automaton -> env -> cid list
val next : automaton -> env -> cid -> automaton\<close>}
where \<^boxed_sml>\<open>env\<close> is basically a map between internal automaton states and class-id's
(\<^boxed_sml>\<open>cid\<close>'s). An automaton is said to be \<^emph>\<open>enabled\<close> for a class-id,
iff it either occurs in its accept-set or its reject-set (see @{docitem "sec:monitors"}). During
top-down document validation, whenever a text-element is encountered, it is checked if a monitor
is \emph{enabled} for this class; in this case, the \inlineisar+next+-operation is executed. The
transformed automaton recognizing the rest-language is stored in \inlineisar+docobj_tab+ if
possible; otherwise, if \inlineisar+next+ fails, an error is reported. The automata implementation
is, in large parts, generated from a formalization of functional automata~\cite{Functional-Automata-AFP}.
is \emph{enabled} for this class; in this case, the \<^boxed_sml>\<open>next\<close>-operation is executed. The
transformed automaton recognizing the rest-language is stored in \<^boxed_sml>\<open>docobj_tab\<close> if
possible;
% TODO: clarify the notion of rest-language
otherwise, if \<^boxed_sml>\<open>next\<close> fails, an error is reported. The automata implementation
is, in large parts, generated from a formalization of functional automata~\cite{nipkow.ea:functional-Automata-afp:2004}.
\<close>
section\<open>The \LaTeX-Core of \isadof\<close>
section\<open>The \<^LaTeX>-Core of \<^isadof>\<close>
text\<open>
The \LaTeX-implementation of \isadof heavily relies on the
``keycommand''~@{cite "chervet:keycommand:2010"} package. In fact, the core \isadof \LaTeX-commands
The \<^LaTeX>-implementation of \<^isadof> heavily relies on the
``keycommand''~@{cite "chervet:keycommand:2010"} package. In fact, the core \<^isadof> \<^LaTeX>-commands
are just wrappers for the corresponding commands from the keycommand package:
\begin{ltx}
\newcommand\newisadof[1]{%
@{boxed_latex [display]
\<open>\newcommand\newisadof[1]{%
\expandafter\newkeycommand\csname isaDof.#1\endcsname}%
\newcommand\renewisadof[1]{%
\expandafter\renewkeycommand\csname isaDof.#1\endcsname}%
\newcommand\provideisadof[1]{%
\expandafter\providekeycommand\csname isaDof.#1\endcsname}%
\end{ltx}
\expandafter\providekeycommand\csname isaDof.#1\endcsname}%\<close>}
The \LaTeX-generator of \isadof maps each \inlineisar{doc_item} to an \LaTeX-environment (recall
@{docref "text-elements"}). As generic \inlineisar{doc_item} are derived from the text element,
the enviornment \inlineltx|{isamarkuptext*}| builds the core of \isadof's \LaTeX{} implementation.
For example, the @{docref "ass123"} from page \pageref{ass123} is mapped to
The \<^LaTeX>-generator of \<^isadof> maps each \<^boxed_theory_text>\<open>doc_item\<close> to an \<^LaTeX>-environment (recall
@{docitem "text-elements"}). As generic \<^boxed_theory_text>\<open>doc_item\<close>s are derived from the text element,
the environment \inlineltx|isamarkuptext*| builds the core of \<^isadof>'s \<^LaTeX> implementation.
For example, the @{docitem "ass123"} from page \pageref{ass123} is mapped to
\begin{ltx}
\begin{isamarkuptext*}%
@{boxed_latex [display]
\<open>\begin{isamarkuptext*}%
[label = {ass122},type = {CENELEC_50128.SRAC},
args={label = {ass122}, type = {CENELEC_50128.SRAC},
CENELEC_50128.EC.assumption_kind = {formal}}
] The overall sampling frequence of the odometer subsystem is therefore
14 khz, which includes sampling, computing and result communication
times ...
\end{isamarkuptext*}
\end{ltx}
\end{isamarkuptext*}\<close>}
This environment is mapped to a plain \LaTeX command via (again, recall @{docref "text-elements"}):
\begin{ltx}
\NewEnviron{isamarkuptext*}[1][]{\isaDof[env={text},#1]{\BODY}}
\end{ltx}
This environment is mapped to a plain \<^LaTeX> command via (again, recall @{docitem "text-elements"}):
@{boxed_latex [display]
\<open> \NewEnviron{isamarkuptext*}[1][]{\isaDof[env={text},#1]{\BODY}} \<close>}
For the command-based setup, \isadof provides a dispatcher that selects the most specific
implementation for a given \inlineisar|doc_class|:
For the command-based setup, \<^isadof> provides a dispatcher that selects the most specific
implementation for a given \<^boxed_theory_text>\<open>doc_class\<close>:
\begin{ltx}
%% The Isabelle/DOF dispatcher:
@{boxed_latex [display]
\<open>%% The Isabelle/DOF dispatcher:
\newkeycommand+[\|]\isaDof[env={UNKNOWN},label=,type={dummyT},args={}][1]{%
\ifcsname isaDof.\commandkey{type}\endcsname%
\csname isaDof.\commandkey{type}\endcsname%
@ -279,8 +264,7 @@ implementation for a given \inlineisar|doc_class|:
definition for "\commandkey{env}" available either.}%
\fi%
\fi%
}
\end{ltx}
}\<close>}
\<close>
(*<*)

View File

@ -1,11 +1,28 @@
(*************************************************************************
* Copyright (C)
* 2019 The University of Exeter
* 2018-2019 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
(*<*)
theory "Isabelle_DOF-Manual"
imports "05_Implementation"
begin
use_template "scrreprt-modern"
use_ontology "technical_report" and "CENELEC_50128"
close_monitor*[this]
check_doc_global
text\<open>Resulting trace in doc\_item ''this'': \<close>
text\<open>Resulting trace in \<^verbatim>\<open>doc_item\<close> ''this'': \<close>
ML\<open>@{trace_attribute this}\<close>
end
(*>*)

View File

@ -1,14 +1,12 @@
session "Isabelle_DOF-Manual" = "Isabelle_DOF" +
options [document = pdf, document_output = "output", quick_and_dirty = true]
options [document = pdf, document_output = "output", document_build = dof, quick_and_dirty = true]
theories
"Isabelle_DOF-Manual"
document_files
"isadof.cfg"
"root.bib"
"root.mst"
"preamble.tex"
"build"
"lstisadof-manual.sty"
"lstisadof-manual.sty"
"figures/antiquotations-PIDE.png"
"figures/cicm2018-combined.png"
"figures/cicm2018-dof.png"
@ -21,13 +19,15 @@ session "Isabelle_DOF-Manual" = "Isabelle_DOF" +
"figures/Dogfood-Intro.png"
"figures/Dogfood-IV-jumpInDocCLass.png"
"figures/Dogfood-V-attribute.png"
"figures/IsaArchGlobal.png"
"figures/IsaArchInteract.png"
"figures/IsaArch.odp"
"figures/Dogfood-VI-linkappl.png"
"figures/isabelle-architecture.pdf"
"figures/isabelle-architecture.svg"
"figures/isadof.png"
"figures/PIDE-interaction.pdf"
"figures/srac-as-es-application.png"
"figures/srac-definition.png"
"figures/Isabelle_DOF-logo.pdf"
"figures/header_CSP_pdf.png"
"figures/header_CSP_source.png"
"figures/definition-use-CSP-pdf.png"
"figures/definition-use-CSP.png"
"figures/MyCommentedIsabelle.png"

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2019 The University of Sheffield. All rights reserved.
# 2018 The University of Paris-Saclay. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
set -e
if [ ! -f $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh ]; then
echo ""
echo "Error: Isabelle/DOF not installed"
echo "====="
echo "This is a Isabelle/DOF project. The document preparation requires"
echo "the Isabelle/DOF framework. Please obtain the framework by cloning"
echo "the Isabelle/DOF git repository, i.e.: "
echo " git clone https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF"
echo "You can install the framework as follows:"
echo " cd Isabelle_DOF/document-generator"
echo " ./install"
echo ""
exit 1
fi
cp $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh .
source build_lib.sh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,4 +0,0 @@
Template: scrreprt-modern
Ontology: technical_report
Ontology: cenelec_50128

View File

@ -1,3 +1,16 @@
%% Copyright (C) 2018 The University of Sheffield
%% 2018-2021 The University of Paris-Saclay
%% 2019-2021 The University of Exeter
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\usepackage{listings}
\usepackage{listingsutf8}
\usepackage{tikz}
@ -67,116 +80,17 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% <isar>
\newcommand{\subscr}[1]{\ensuremath{_{\text{#1}}}}
\newcommand{\supscr}[1]{\ensuremath{^{\text{#1}}}}
\lstdefinestyle{isar}{%
language=%
,basicstyle=\ttfamily%
,showspaces=false%
,showlines=false%
,columns=flexible%
,keepspaces
,morecomment=[s]{(*}{*)}%
% ,moredelim=*[s][\rmfamily]{\{*}{*\}}%
,moredelim = **[is][\beginlstdelim{\{*}{*\}}{black}]{\{*}{*\}}
,showstringspaces=false%
,moredelim=*[is][\supscr]{<bsup>}{<esup>}%
,moredelim=*[is][\subscr]{<bsub>}{<esub>}%
,literate={%
{...}{\,\ldots\,}3%
{<Open>}{\ensuremath{\isacartoucheopen}}1%
{<open>}{\ensuremath{\isacartoucheopen}}1%
%{<@>}{@}1%
{"}{}0%
{é}{\'e}1%
{~}{\ }1%
{::}{:\!:}1%
{<Close>}{\ensuremath{\isacartoucheclose}}1%
{<close>}{\ensuremath{\isacartoucheclose}}1%
{\\<Gamma>}{\ensuremath{\Gamma}}1%
{\\<theta>}{\ensuremath{\theta}}1%
{\\<times>}{\ensuremath{\times}}1%
{\\<equiv>}{\ensuremath{\equiv}}1%
{\\<sigma>}{\ensuremath{\sigma}}1%
{\\<geq>}{\ensuremath{\geq}}1%
{level0}{level\textsubscript{0}}6%
{\\<Rightarrow>}{\ensuremath{\Rightarrow}}1%
{\\<rightarrow>}{\ensuremath{\rightarrow}}1%
{\\<longrightarrow>}{\ensuremath{\rightarrow}}1%
{\\<and>}{\ensuremath{\land}}1%
{\\<or>}{\ensuremath{\lor}}1%
{\\<lfloor>}{\ensuremath{\lfloor}}1%
{\\<rfloor>}{\ensuremath{\rfloor}}1%
%{\\<lparr>}{\ensuremath{\lparr}}1%
%{\\<rparr>}{\ensuremath{\rparr}}1%
{\\<le>}{\ensuremath{\le}}1%
{\\<delta>}{\ensuremath{\delta}}1%
{\\<lambda>}{\ensuremath{\lambda}}1%
{\\<bar>}{\ensuremath{\vert}}1%
{\<sigma>}{\ensuremath{\sigma}}1%
{\\<lparr>}{\ensuremath{\isasymlparr}}1%
{\\<rparr>}{\ensuremath{\isasymrparr}}1%
{\\<leftrightarrow>}{\ensuremath{\leftrightarrow}}1%
{\{*}{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}1%
{*\}}{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}1%
{\\<open>}{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}1%
{\\<Open>}{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}1%
{\\<close>}{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}1%
{\\<Close>}{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}1%
{\\<forall>}{\ensuremath{\forall}}1%
{\\<exists>}{\ensuremath{\exists}}1%
{\\<in>}{\ensuremath{\in}}1%
{\\<delta>}{\ensuremath{\delta}}1%
{\\<real>}{\ensuremath{\mathbb{R}}}1%
{\\<noteq>}{\ensuremath{\neq}}1%
{\\<exists>}{\ensuremath{\exists}}1%
{\\<Forall>}{\ensuremath{\bigwedge\,}}1%
{<string>}{<\ensuremath{\text{\textit{string}}}>}9%
{\\<lbrakk>}{\ensuremath{\mathopen{\lbrack\mkern-3mu\lbrack}}}1%
{\\<lbrace>}{\ensuremath{\mathopen{\lbrace\mkern-4.5mu\mid}}}1%
{\\<rbrakk>}{\ensuremath{\mathclose{\rbrack\mkern-3mu\rbrack}}}1%
{\\<rbrace>}{\ensuremath{\mathclose{\mid\mkern-4.5mu\rbrace}}}1%
}%
% % Defining "tags" (text-antiquotations) based on 1-keywords
,tag=**[s]{@\{}{\}}%
,tagstyle=\color{CornflowerBlue}%
,markfirstintag=true%
,keywordstyle=\bfseries%
,keywords={}
% Defining 2-keywords
,keywordstyle=[2]{\color{Blue!60}\bfseries}%
,alsoletter={*,-}
,morekeywords=[2]{case, then, show, theory, begin, end, ML,section,subsection,paragraph,chapter,text}%
%,moredelim=[s][\textit]{<}{>}
% Defining 3-keywords
,keywordstyle=[3]{\color{OliveGreen!60}\bfseries}%
,morekeywords=[3]{doc_class,declare_reference,update_instance*,
open_monitor*, close_monitor*, declare_reference*,section*,text*,title*,abstract*}%
% Defining 4-keywords
,keywordstyle=[4]{\color{black!60}\bfseries}%
,morekeywords=[4]{where, imports, keywords}%
% Defining 5-keywords
,keywordstyle=[5]{\color{BrickRed!70}\bfseries}%
,morekeywords=[5]{datatype, by, fun, Definition*, definition,
type_synonym, typedecl,
consts, assumes, and, shows, proof, next, qed, lemma, theorem}%
% Defining 6-keywords
,keywordstyle=[6]{\itshape}%
,morekeywords=[6]{meta-args, ref, expr, class_id}%
%
}%
%%
\providecolor{isar}{named}{blue}
\def\inlineisar{\lstinline[style=isar,breaklines=true,mathescape,breakatwhitespace=true]}
\newtcblisting{isar}[1][]{%
listing only%
\renewcommand{\isacommand}[1]{\textcolor{OliveGreen!60}{\ttfamily\bfseries #1}}
\newcommand{\inlineisarbox}[1]{#1}
\NewTColorBox[]{isarbox}{}{
,boxrule=0pt
,boxsep=0pt
,colback=white!90!isar
,enhanced jigsaw
,borderline west={2pt}{0pt}{isar!60!black}
,sharp corners
,before skip balanced=0.5\baselineskip plus 2pt
% ,before skip=10pt
% ,after skip=10pt
,enlarge top by=0mm
@ -184,13 +98,7 @@
,overlay={\node[draw,fill=isar!60!black,xshift=0pt,anchor=north
east,font=\bfseries\footnotesize\color{white}]
at (frame.north east) {Isar};}
,listing options={
style=isar
,basicstyle=\small\ttfamily
,mathescape
,#1
}
}%
}
%% </isar>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -276,6 +184,7 @@
\lstdefinestyle{lltx}{language=[AlLaTeX]TeX,
,basicstyle=\ttfamily%
,showspaces=false%
,escapechar=ë
,showlines=false%
,morekeywords={newisadof}
% ,keywordstyle=\bfseries%

View File

@ -6,23 +6,22 @@
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
%% This is a placeholder for user-specific configuration and packages.
\usepackage{etex}
\reserveinserts{28}
\ifdef{\reserveinserts}{\reserveinserts{28}}{}
\usepackage{dirtree}
\renewcommand*\DTstylecomment{\ttfamily\itshape}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{lstisadof-manual}
\usepackage{xspace}
\usepackage{dtk-logos}
\IfFileExists{hvlogos.sty}{\usepackage{hvlogos}}{\newcommand{\TeXLive}{\TeX Live}\newcommand{\BibTeX}{Bib\TeX}}
\usepackage{railsetup}
\setcounter{secnumdepth}{2}
\usepackage{index}
@ -30,20 +29,20 @@
%\makeindex
%\AtEndDocument{\printindex}
\newcommand{\ie}{i.e.}
\newcommand{\eg}{e.g.}
\newcommand{\dof}{DOF\xspace}
\newcommand{\isactrlemph}{*}
\newcommand{\path}[1]{\texttt{\nolinkurl{#1}}}
\title{<TITLE>}
\author{<AUTHOR>}
\newcommand{\dof}{DOF\xspace}
\renewcommand{\listofSRACs}{\relax}
\renewcommand{\listofECs}{\relax}
\pagestyle{headings}
\uppertitleback{
Copyright \copyright{} 2019\phantom{--2019} University of Exeter, UK\\
\phantom{Copyright \copyright{}} 2018--2019 Universit\'e Paris-Saclay, France\\
Copyright \copyright{} 2019--2022 University of Exeter, UK\\
\phantom{Copyright \copyright{}} 2018--2022 Universit\'e Paris-Saclay, France\\
\phantom{Copyright \copyright{}} 2018--2019 The University of Sheffield, UK\\
\smallskip
@ -77,13 +76,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
\lowertitleback{%
This manual describes \isadof version \isadofversion.
The latest development version as well as previous releases are available at
This manual describes \isadof version \isadofversion. The latest official
release is \isadoflatestversion{} (\href{https://doi.org/\isadoflatestdoi}{doi:\isadoflatestdoi}).
The DOI \href{https://doi.org/\isadofgenericdoi}{\isadofgenericdoi} will allways point to the latest
release. The latest development version as well as official releases are available at
\url{\dofurl}.
\paragraph*{Contributors.} We would like to thank the following contributors to \isadof
(in alphabetical order): Idir Ait-Sadoune, Paolo Crisafulli, and Chantal Keller.
(in alphabetical order): Idir Ait-Sadoune, Paolo Crisafulli, and Nicolas M{\'e}ric.
\paragraph*{Acknowledgments.} This work has been partially supported by IRT SystemX, Paris-Saclay,
France, and therefore granted with public funds of the Program ``Investissements d'Avenir.''
@ -109,7 +109,7 @@ France, and therefore granted with public funds of the Program ``Investissements
\hfill
\begin{minipage}{8cm}
\raggedleft\normalsize
Laboratoire en Recherche en Informatique (LRI)\\
Laboratoire des Methodes Formelles (LMF)\\
Universit\'e Paris-Saclay\\
91405 Orsay Cedex\\
France
@ -118,4 +118,3 @@ France, and therefore granted with public funds of the Program ``Investissements
}
\AtBeginDocument{\isabellestyle{literal}\newcommand{\lstnumberautorefname}{Line}}
\renewcommand{\isacommand}[1]{\textcolor{OliveGreen!60}{\ttfamily\bfseries #1}}

View File

@ -3,33 +3,27 @@
@STRING{s-lncs = "LNCS" }
@Misc{ w3c:ontologies:2015,
author = {W3C},
author = {W3C},
title = {Ontologies},
organisation = {W3c},
url = {https://www.w3.org/standards/semanticweb/ontology},
year = 2015
}
@Misc{ doors,
author = {IBM},
@Misc{ ibm:doors:2019,
author = {IBM},
title = {{IBM} Engineering Requirements Management {DOORS} Family},
note = {\url{https://www.ibm.com/us-en/marketplace/requirements-management}},
year = 2019
}
@Manual{ wenzel:isabelle-isar:2019,
title = {The Isabelle/Isar Reference Manual},
author = {Makarius Wenzel},
OPTorganization = {},
OPTaddress = {},
OPTedition = {},
OPTmonth = {},
year = {2019},
note = {Part of the Isabelle distribution.},
OPTannote = {}
@Manual{ wenzel:isabelle-isar:2020,
title = {The Isabelle/Isar Reference Manual},
author = {Makarius Wenzel},
year = 2020,
note = {Part of the Isabelle distribution.}
}
@InCollection{ brucker.ea:isabelledof:2019,
abstract = {DOF is a novel framework for defining ontologies and
enforcing them during document development and evolution. A
@ -47,7 +41,7 @@
ontological feedback during the editing of a document.
In this paper, we give an in-depth presentation of the
design concepts of DOF{\^a}s Ontology Definition Language
design concepts of DOF's Ontology Definition Language
(ODL) and key aspects of the technology of its
implementation. Isabelle/DOF is the first ontology language
supporting machine-checked links between the formal and
@ -66,14 +60,16 @@
publisher = {Springer-Verlag},
address = {Heidelberg},
series = {Lecture Notes in Computer Science},
number = {11724},
isbn = {3-540-25109-X},
editor = {Peter {\"O}lveczky and Gwen Sala{\"u}n},
doi = {10.1007/978-3-030-30446-1_15},
editor = {Peter C. {\"O}lveczky and Gwen Sala{\"u}n},
pdf = {https://www.brucker.ch/bibliography/download/2019/brucker.ea-isabelledof-2019.pdf},
title = {{Isabelle/DOF}: Design and Implementation},
classification= {conference},
areas = {formal methods, software},
categories = {isadof},
year = 2019,
year = {2019},
public = {yes}
}
@ -107,7 +103,7 @@
publisher = {Springer-Verlag},
address = {Heidelberg},
series = {Lecture Notes in Computer Science},
number = 11006,
number = {11006},
url = {https://www.brucker.ch/bibliography/abstract/brucker.ea-isabelle-ontologies-2018},
title = {Using the {Isabelle} Ontology Framework: Linking the
Formal with the Informal},
@ -115,16 +111,35 @@
areas = {formal methods, software},
categories = {isadof},
public = {yes},
year = 2018,
year = {2018},
doi = {10.1007/978-3-319-96812-4_3},
pdf = {https://www.brucker.ch/bibliography/download/2018/brucker.ea-isabelle-ontologies-2018.pdf}
}
@InCollection{ taha.ea:philosophers:2020,
keywords = {CSP, Isabelle/HOL, Process-Algebra,Formal Verification, Refinement},
author = {Safouan Taha and Burkhart Wolff and Lina Ye},
booktitle = {International Conference on Integrated Formal Methods (IFM)},
language = {USenglish},
publisher = {Springer-Verlag},
address = {Heidelberg},
series = {Lecture Notes in Computer Science},
number = {to appear},
title = {Philosophers may dine --- definitively!},
classification= {conference},
areas = {formal methods, software},
public = {yes},
year = {2020}
}
@Book{ boulanger:cenelec-50128:2015,
author = {Boulanger, Jean-Louis},
title = {{CENELEC} 50128 and {IEC} 62279 Standards},
publisher = {Wiley-ISTE},
year = 2015,
address = {Boston},
address = {Boston}
}
@Booklet{ cc:cc-part3:2006,
@ -184,7 +199,7 @@
timestap = {2008-05-26}
}
@InProceedings{ wenzel:asynchronous:2014,
@InProceedings{wenzel:asynchronous:2014,
author = {Makarius Wenzel},
title = {Asynchronous User Interaction and Tool Integration in
{Isabelle}/{PIDE}},
@ -242,7 +257,7 @@
volume = 8558,
publisher = pub-springer,
year = 2014,
doi = {10.1007/978-3-319-08970-6},
doi = {10.1007/978-3-319-08970-6}
}
@InProceedings{ bezzecchi.ea:making:2018,
@ -284,39 +299,37 @@
location = {Toulouse}
}
@InCollection{ wenzel.ea:building:2007,
abstract = {We present the generic system framework of
Isabelle/Isarunderlying recent versions of Isabelle. Among
other things, Isar provides an infrastructure for Isabelle
plug-ins, comprising extensible state components and
extensible syntax that can be bound to tactical ML
programs. Thus the Isabelle/Isar architecture may be
understood as an extension and refinement of the
traditional LCF approach, with explicit infrastructure for
building derivative systems. To demonstrate the technical
potential of the framework, we apply it to a concrete
formalmethods tool: the HOL-Z 3.0 environment, which is
geared towards the analysis of Z specifications and formal
proof of forward-refinements.},
author = {Makarius Wenzel and Burkhart Wolff},
booktitle = {TPHOLs 2007},
editor = {Klaus Schneider and Jens Brandt},
language = {USenglish},
@InCollection{ wenzel.ea:building:2007,
abstract = {We present the generic system framework of
Isabelle/Isarunderlying recent versions of Isabelle. Among
other things, Isar provides an infrastructure for Isabelle
plug-ins, comprising extensible state components and
extensible syntax that can be bound to tactical ML
programs. Thus the Isabelle/Isar architecture may be
understood as an extension and refinement of the
traditional LCF approach, with explicit infrastructure for
building derivative systems. To demonstrate the technical
potential of the framework, we apply it to a concrete
formalmethods tool: the HOL-Z 3.0 environment, which is
geared towards the analysis of Z specifications and formal
proof of forward-refinements.},
author = {Makarius Wenzel and Burkhart Wolff},
booktitle = {TPHOLs 2007},
editor = {Klaus Schneider and Jens Brandt},
language = {USenglish},
acknowledgement={none},
pages = {352--367},
publisher = pub-springer,
address = pub-springer:adr,
number = 4732,
series = s-lncs,
title = {Building Formal Method Tools in the {Isabelle}/{Isar}
Framework},
doi = {10.1007/978-3-540-74591-4_26},
year = 2007
pages = {352--367},
publisher = pub-springer,
address = pub-springer:adr,
number = 4732,
series = s-lncs,
title = {Building Formal Method Tools in the {Isabelle}/{Isar}
Framework},
doi = {10.1007/978-3-540-74591-4_26},
year = 2007
}
%%%%%%%%%%%%%%%%%%%%%%
@Misc{ datarefman19,
@Misc{ biendarra.ea:defining:2019,
title = {Defining (Co)datatypes and Primitively (Co)recursive
Functions in Isabelle/HOL},
author = {Julian Biendarra and Jasmin Christian Blanchette and
@ -326,43 +339,30 @@
year = 2019
}
@Misc{ functions19,
@Misc{ kraus:defining:2020,
title = {Defining Recursive Functions in Isabelle/HOL},
author = {Alexander Kraus},
note = {\url{https://isabelle.in.tum.de/doc/functions.pdf}},
year = 2019
year = 2020
}
@Misc{ nipkowMain19,
@Misc{ nipkow:whats:2020,
title = {What's in Main},
author = {Tobias Nipkow},
note = {\url{https://isabelle.in.tum.de/doc/main.pdf}},
year = 2019
year = 2020
}
@InProceedings{ DBLP:conf/itp/Wenzel14,
author = {Makarius Wenzel},
title = {Asynchronous User Interaction and Tool Integration in
Isabelle/PIDE},
booktitle = {Interactive Theorem Proving (ITP)},
pages = {515--530},
year = 2014,
doi = {10.1007/978-3-319-08970-6_33},
timestamp = {Sun, 21 May 2017 00:18:59 +0200},
biburl = {https://dblp.org/rec/bib/conf/itp/Wenzel14},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@InProceedings{ DBLP:journals/corr/Wenzel14,
@InProceedings{ wenzel:system:2014,
author = {Makarius Wenzel},
title = {System description: Isabelle/{jEdit} in 2014},
booktitle = {UITP},
pages = {84--94},
year = 2014,
doi = {10.4204/EPTCS.167.10},
doi = {10.4204/EPTCS.167.10}
}
@InProceedings{ DBLP:conf/mkm/BarrasGHRTWW13,
@InProceedings{ barras.ea:pervasive:2013,
author = {Bruno Barras and Lourdes Del Carmen
Gonz{\'{a}}lez{-}Huesca and Hugo Herbelin and Yann
R{\'{e}}gis{-}Gianas and Enrico Tassi and Makarius Wenzel
@ -372,10 +372,10 @@
booktitle = {MKM},
pages = {359--363},
year = 2013,
doi = {10.1007/978-3-642-39320-4_29},
doi = {10.1007/978-3-642-39320-4_29}
}
@Article{ Faithfull:2018:COQ:3204179.3204223,
@Article{ faithfull.ea:coqoon:2018,
author = {Faithfull, Alexander and Bengtson, Jesper and Tassi,
Enrico and Tankink, Carst},
title = {Coqoon},
@ -388,55 +388,12 @@
issn = {1433-2779},
pages = {125--137},
numpages = 13,
url = {https://doi.org/10.1007/s10009-017-0457-2},
doi = {10.1007/s10009-017-0457-2},
acmid = 3204223,
publisher = {Springer-Verlag},
address = {Berlin, Heidelberg}
}
@InCollection{ brucker.wolff19:isadof-design-impl:2019,
abstract = {DOF is a novel framework for \emph{defining} ontologies
and \emph{enforcing} them during document development and
document evolution. A major goal of DOF is the integrated
development of formal certification documents (\eg, for
Common Criteria or CENELEC 50128) that require consistency
across both formal and informal arguments.
To support a consistent development of formal and informal
parts of a document, we provide Isabelle/DOF, an
implementation of DOF on top of Isabelle/HOL. \isadof is
integrated into Isabelle's IDE, which allows for smooth
ontology development as well as immediate ontological
feedback during the editing of a document.
In this paper, we give an in-depth presentation of the
design concepts of DOF's Ontology Definition Language (ODL)
and key aspects of the technology of its implementation.
\isadof is the first ontology language supporting
machine-checked links between the formal and informal parts
in an LCF-style interactive theorem proving environment.
Sufficiently annotated, large documents can easily be
developed collaboratively, while \emph{ensuring their
consistency}, and the impact of changes (in the formal and
the semi-formal content) is tracked automatically.},
address = {Heidelberg},
author = {Achim D. Brucker and Burkhart Wolff},
booktitle = {International Conference on Software Engineering and
Formal Methods (SEFM)},
doi = {10.1007/978-3-319-96812-4_3},
keywords = {Isabelle, HOL, Ontologies, Certification},
language = {USenglish},
location = {Oslo, Norway},
number = {TO APPEAR},
pdf = {https://www.lri.fr/~wolff/papers/conf/2019-sefm-isa_dof-framework.pdf},
publisher = {Springer-Verlag},
series = {Lecture Notes in Computer Science},
title = {{I}sabelle/{DOF}: {D}esign and {I}mplementation},
year = 2019
}
@InProceedings{ abrial:steam-boiler:1996,
author = {Abrial, Jean-Raymond},
title = {Steam-Boiler Control Specification Problem},
@ -488,25 +445,24 @@
the development, deployment and maintenanceactivities.}
}
@Article{ Regular-Sets-AFP,
@Article{ kraus.ea:regular-sets-afp:2010,
author = {Alexander Krauss and Tobias Nipkow},
title = {Regular Sets and Expressions},
journal = {Archive of Formal Proofs},
month = may,
year = 2010,
note = {\url{http://isa-afp.org/entries/Regular-Sets.html}, Formal
note = {\url{https://isa-afp.org/entries/Regular-Sets.html}, Formal
proof development},
issn = {2150-914x}
}
@Article{ Functional-Automata-AFP,
@Article{ nipkow.ea:functional-Automata-afp:2004,
author = {Tobias Nipkow},
title = {Functional Automata},
journal = {Archive of Formal Proofs},
month = mar,
year = 2004,
note = {\url{http://isa-afp.org/entries/Functional-Automata.html},
note = {\url{https://isa-afp.org/entries/Functional-Automata.html},
Formal proof development},
issn = {2150-914x}
}
@ -517,11 +473,11 @@
year = 2019
}
@Booklet{ wenzel:system-manual:2019,
@Booklet{ wenzel:system-manual:2020,
author = {Makarius Wenzel},
title = {The {Isabelle} System Manual},
year = 2019,
note = {Part of the Isabelle distribution.}
year = 2020,
note = {Part of the Isabelle distribution.}
}
@Booklet{ chervet:keycommand:2010,
@ -552,5 +508,6 @@
@Book{ eijkhout:latex-cs:2012,
author = {Victor Eijkhout},
title = {The Computer Science of TeX and LaTeX},
year = 2012,
publisher = {Texas Advanced Computing Center},
year = 2012
}

View File

@ -1,18 +1,17 @@
session "TR_MyCommentedIsabelle" = "Isabelle_DOF" +
options [document = pdf, document_output = "output",quick_and_dirty = true]
options [document = pdf, document_output = "output", document_build = dof, quick_and_dirty = true]
theories
"TR_MyCommentedIsabelle"
document_files
"root.bib"
"isadof.cfg"
"preamble.tex"
"prooftree.sty"
"build"
"figures/markup-demo.png"
"figures/text-element.pdf"
"figures/isabelle-architecture.pdf"
"figures/pure-inferences-I.pdf"
"figures/pure-inferences-II.pdf"
"figures/document-model.pdf"
"figures/MyCommentedIsabelle.png"

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2019 The University of Sheffield. All rights reserved.
# 2018 The University of Paris-Saclay. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
set -e
if [ ! -f $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh ]; then
echo ""
echo "Error: Isabelle/DOF not installed"
echo "====="
echo "This is a Isabelle/DOF project. The document preparation requires"
echo "the Isabelle/DOF framework. Please obtain the framework by cloning"
echo "the Isabelle/DOF git repository, i.e.: "
echo " git clone https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF"
echo "You can install the framework as follows:"
echo " cd Isabelle_DOF/document-generator"
echo " ./install"
echo ""
exit 1
fi
cp $ISABELLE_HOME_USER/DOF/document-template/build_lib.sh .
source build_lib.sh

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View File

@ -1,2 +0,0 @@
Template: scrreprt
Ontology: technical_report

View File

@ -5,16 +5,16 @@
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
%% This is a placeholder for user-specific configuration and packages.
\renewcommand{\isasymtheta}{\texorpdfstring{\isamath{\vartheta}}{ϑ}}
\usepackage{prooftree}
\title{<TITLE>}
\author{<AUTHOR>}
\newcommand{\eg}{e.\,g.}
\newcommand{\ie}{i.\,e.}

284
install
View File

@ -1,284 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2019 The University of Sheffield.
# 2019-2019 The University of Exeter.
# 2018-2019 The University of Paris-Saclay.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
#set -e
shopt -s nocasematch
# get global configuration
source .config
print_help()
{
echo "Usage: install [OPTION] "
echo ""
echo "Run ..."
echo ""
echo " --help, -h display this help message"
echo " --isabelle, -i isabelle isabelle command used for installation"
echo " (default: $ISABELLE)"
echo " --skip-patch-and-afp, -s skip installation of Isabelle/DOF patch for"
echo " Isabelle and required AFP entries. "
echo " USE AT YOUR OWN RISK (default: $SKIP)"
}
exit_error() {
echo ""
echo " *** Isabelle/DOF installation FAILED, please check the README.md for help ***"
echo ""
exit 1
}
check_isabelle_version() {
echo "* Checking Isabelle version:"
if [ "$ISABELLE_VERSION" != "$ACTUAL_ISABELLE_VERSION" ]; then
echo " WARNING:"
echo " The version of Isabelle (i.e., $ACTUAL_ISABELLE_VERSION) you are using"
echo " IS NOT SUPPORTED"
echo " by the current version of Isabelle/DOF. Please install a supported"
echo " version of Isabelle and rerun the install script, providing the"
echo " the \"isabelle\" command as argument."
echo " Isabelle ($ISABELLE_VERSION) can be obtained from:"
echo " $ISABELLE_URL"
echo
read -p " Still continue (y/N)? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
echo " Continuing installation on your OWN risk."
else
exit_error
fi
else
echo " Success: found supported Isabelle version ($ISABELLE_VERSION)"
fi
}
check_pdftex() {
echo "* Checking (La)TeX installation:"
OLDDIR=`pwd`
DIR=`mktemp -d`
cd $DIR;
pdftex -interaction=nonstopmode \\expanded{Success}\\end > /dev/null
if [ $? -eq 0 ]; then
echo " Success: pdftex supports \\expanded{} primitive."
else
cd $OLDDIR
echo " WARNING:"
echo " The version of pdf(La)TeX you are using is outdated (and does"
echo " not support the \\expanded primitive). It is not supported by the"
echo " current version of Isabelle/DOF. Please install a supported TeX"
echo " distribution (e.g., TeXLive 2019 or later)."
echo
read -p " Still continue (y/N)? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
echo " Continuing installation on your OWN risk."
else
exit_error
fi
fi
cd $OLDDIR
}
check_afp_entries() {
echo "* Checking availability of AFP entries:"
missing=""
required="Regular-Sets Functional-Automata"
for afp in $required; do
res=`$ISABELLE build -n $afp 2>/dev/null || true`
if [ "$res" != "" ]; then
echo " Success: found APF entry $afp."
else
echo " Warning: could not find AFP entry $afp."
missing="$missing $afp"
fi
done
if [ "$missing" != "" ]; then
echo " Trying to install AFP (this might take a few *minutes*) ...."
extract=""
for e in $missing; do
extract="$extract $AFP_DATE/thys/$e"
done
mkdir -p .afp
if curl -s -L $AFP_URL | tar zxf - -C .afp $extract; then
for e in $missing; do
echo " Registering $e in $ISABELLE_HOME_USER/ROOTS"
touch $ISABELLE_HOME_USER/ROOTS
grep -q $PWD/.afp/$AFP_DATE/thys/$e $ISABELLE_HOME_USER/ROOTS || echo "$PWD/.afp/$AFP_DATE/thys/$e" >> $ISABELLE_HOME_USER/ROOTS
done
echo " AFP installation successful."
else
echo " FAILURE: could not find AFP entries: $missing."
echo " Please obtain the AFP from"
echo " $AFP_URL"
echo " and follow the following instructions:"
echo " https://www.isa-afp.org/using.html"
exit_error
fi
fi
}
check_isa_dof_patch() {
echo "* Check availability of Isabelle/DOF patch:"
src="src/patches/thy_output.ML"
dst="$ISABELLE_HOME/src/Pure/Thy/thy_output.ML"
if command -v cmp > /dev/null 2>&1 && cmp -s "$src" "$dst" ; then
echo " Success: latest Isabelle/DOF patch already applied"
if isabelle process -e 'Thy_Output.set_meta_args_parser' &> /dev/null ; then
true
else
echo " Warning: Isabelle/HOL needs to be rebuild to activate patch."
fi
else
command -v cmp >/dev/null 2>&1 || echo " Warning: cmp not available, cannot check if patch is already applied."
echo " Warning: Isabelle/DOF patch is not available or outdated."
echo " Trying to patch system ...."
if [ ! -f "$dst.backup-by-isadof-installer" ]; then
cp -f "$dst" "$dst.backup-by-isadof-installer" || true;
fi
if (cp -f $src $dst) &> /dev/null; then
echo " Applied patch successfully, Isabelle/HOL will be rebuilt during"
echo " the next start of Isabelle."
else
echo " FAILURE: Could not apply Isabelle/DOF patch."
echo " Please copy $src to $dst, e.g.:"
echo " cp -f $src $dst"
echo " and rebuild Isabelle/HOL."
exit_error
fi
fi
}
check_old_installation(){
echo "* Searching for existing installation:"
if [[ -d "$ISABELLE_HOME_USER/DOF" ]]; then
echo " Found old installation, moving it to $ISABELLE_HOME_USER/DOF.bak."
rm -rf "$ISABELLE_HOME_USER/DOF.bak"
mv "$ISABELLE_HOME_USER/DOF" "$ISABELLE_HOME_USER/DOF.bak"
else
echo " No old installation found."
fi
}
install_and_register(){
echo "* Installing Isabelle/DOF"
DIR="$ISABELLE_HOME_USER/DOF/Tools"
echo " - Installing Tools in $DIR"
mkdir -p "$DIR"
cp $GEN_DIR/Tools/* "$DIR"
chmod 755 "$DIR"/*
DIR="$ISABELLE_HOME_USER/DOF/document-template"
echo " - Installing document templates in $DIR"
mkdir -p "$DIR"
cp $GEN_DIR/scripts/* "$DIR"
cp $GEN_DIR/document-templates/* "$DIR"
cp $GEN_DIR/DOF/*/*.sty "$DIR"
ISABELLE_SHORT_VERSION=`echo $ISABELLE_VERSION | sed -e 's/:.*$//'`
sed -i -e "s|%%% CONFIG %%%| \
\\\\renewcommand{\\\\dof@isabelleversion}{$ISABELLE_SHORT_VERSION} \
\\\\renewcommand{\\\\isabellefullversion}{$ISABELLE_VERSION\\\\xspace} \
\\\\renewcommand{\\\\dof@version}{$DOF_VERSION} \
\\\\renewcommand{\\\\isabelleurl}{$ISABELLE_URL} \
\\\\renewcommand{\\\\dofurl}{$DOF_URL} \
\\\\renewcommand{\\\\dof@artifacturl}{https://$DOF_ARTIFACT_HOST/$DOF_ARTIFACT_DIR}|" \
"$DIR/DOF-core.sty"
DIR="$ISABELLE_HOME_USER/DOF/latex"
echo " - Installing LaTeX styles in $DIR"
mkdir -p "$DIR"
cp $GEN_DIR/ontologies/*/*.sty "$DIR"
DIR="$ISABELLE_HOME_USER/etc"
echo " - Registering Isabelle/DOF"
mkdir -p "$DIR"
if [[ $ISABELLE_TOOLS = *DOF* ]]; then
echo " * Tools already registered in $DIR/settings"
else
echo " * Registering tools in $DIR/settings"
echo 'ISABELLE_TOOLS=$ISABELLE_TOOLS:$ISABELLE_HOME_USER/DOF/Tools' \
>> "$DIR/settings"
fi
sed -i -e "s|<isadofurl>|$DOF_URL|" $ISABELLE_HOME_USER/DOF/*/*
grep -q $PWD\$ $ISABELLE_HOME_USER/ROOTS || echo "$PWD" >> $ISABELLE_HOME_USER/ROOTS
}
ISABELLE=`which isabelle`
SKIP="false"
while [ $# -gt 0 ]
do
case "$1" in
--isabelle|-i)
ISABELLE="$2";
shift;;
--skip-patch-and-afp|-s)
SKIP="true";;
--help|-h)
print_help
exit 0;;
*) print_help
exit 1;;
esac
shift
done
ACTUAL_ISABELLE_VERSION=`$ISABELLE version`
GEN_DIR=src
PROG=`echo $0 | sed 's|.*/||'`;
VARS=`$ISABELLE getenv ISABELLE_HOME_USER ISABELLE_HOME ISABELLE_TOOLS`
for i in $VARS; do
export "$i"
done
echo ""
echo "Isabelle/DOF Installer"
echo "======================"
check_isabelle_version
check_pdftex
if [ "$SKIP" = "true" ]; then
echo "* Warning: skipping installation of Isabelle patch and AFP entries."
else
check_isa_dof_patch
check_afp_entries
fi
check_old_installation
install_and_register
echo "* Installation successful. Enjoy Isabelle/DOF, you can build the session"
echo " Isabelle_DOF and all example documents by executing:"
echo " $ISABELLE build -D ."
exit 0

179
install-afp Executable file
View File

@ -0,0 +1,179 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2019 The University of Sheffield.
# 2019-2020 The University of Exeter.
# 2018-2020 The University of Paris-Saclay.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
#set -e
shopt -s nocasematch
print_help()
{
echo "Usage: isabelle env ./install-afp [OPTION] "
echo ""
echo "Warning: This tools is deprecated."
echo ""
echo "Run ..."
echo ""
echo " --help, -h display this help message"
}
exit_error() {
echo ""
echo " *** Local AFP installation FAILED, please check the README.md for help ***"
echo ""
exit 1
}
confirm_usage() {
echo "* From Isabelle2021-1 on, the recommended method for making the whole AFP "
echo " available to Isabelle is the isabelle components -u command."
echo " For doing so, please follow the instructions at: "
echo " https://www.isa-afp.org/help/"
echo ""
echo " Alternatively, you can continue, on your own risk, to install only"
echo " the AFP entries required to run Isabelle/DOF."
echo ""
read -p " Still continue (y/N)? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
echo " Continuing installation on your OWN risk."
else
exit_error
fi
}
check_isabelle_version() {
echo "* Checking Isabelle version:"
if [ "$ISABELLE_VERSION" != "$ACTUAL_ISABELLE_VERSION" ]; then
echo " WARNING:"
echo " The version of Isabelle (i.e., $ACTUAL_ISABELLE_VERSION) you are using"
echo " IS NOT SUPPORTED"
echo " by the current version of Isabelle/DOF. Please install a supported"
echo " version of Isabelle and rerun the install script, providing the"
echo " the \"isabelle\" command as argument."
echo " Isabelle ($ISABELLE_VERSION) can be obtained from:"
echo " https://isabelle.in.tum.de/website-$ISABELLE_VERSION/"
echo ""
read -p " Still continue (y/N)? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]];
then
echo " Continuing installation on your OWN risk."
else
exit_error
fi
else
echo " Success: found supported Isabelle version ($ISABELLE_VERSION)"
fi
}
check_afp_entries() {
echo "* Checking availability of AFP entries:"
missing=""
required="Regular-Sets Functional-Automata Physical_Quantities"
for afp in $required; do
res=`$ISABELLE_TOOL build -n $afp 2>/dev/null || true`
if [ "$res" != "" ]; then
echo " Success: found APF entry $afp."
else
echo " Warning: could not find AFP entry $afp."
missing="$missing $afp"
fi
done
if [ "$missing" != "" ]; then
echo " Trying to install AFP (this might take a few *minutes*) ...."
extract=""
for e in $missing; do
extract="$extract $AFP_DATE/thys/$e"
done
mkdir -p .afp
if curl -s -L $AFP_URL | tar zxf - -C .afp $extract; then
for e in $missing; do
echo " Registering $e"
$ISABELLE_TOOL components -u "$PWD/.afp/$AFP_DATE/thys/$e"
done
echo " AFP installation successful."
else
echo " FAILURE: could not find AFP entries: $missing."
echo " Please obtain the AFP from"
echo " $AFP_URL"
echo " and follow the following instructions:"
echo " https://www.isa-afp.org/using.html"
exit_error
fi
fi
}
while [ $# -gt 0 ]
do
case "$1" in
--help|-h)
print_help
exit 0;;
*) print_help
exit 1;;
esac
shift
done
if [ -z ${ISABELLE_TOOL+x} ];
then
print_help
exit 1
fi
ACTUAL_ISABELLE_VERSION=`$ISABELLE_TOOL version`
ISABELLE_VERSION="Isabelle$($ISABELLE_TOOL dof_param -b isabelle_version)"
if [ ${ISABELLE_VERSION} = "Isabelle" ];
then
echo "Error: cannot find Isabelle/DOF configuration, please check that you"
echo " registered Isabelle/DOF as an Isabelle component, e.g., using"
echo " isabelle components -u ."
exit 1
fi
AFP_DATE="$($ISABELLE_TOOL dof_param -b afp_version)"
AFP_URL="https://www.isa-afp.org/release/"$AFP_DATE".tar.gz"
echo ""
echo "Isabelle/DOF AFP Installation Utility"
echo "====================================="
confirm_usage
check_isabelle_version
check_afp_entries
echo "* AFP Installation successful."
echo " You should now be able to enjoy Isabelle/DOF by building its session"
echo " and all example documents by executing:"
echo " $ISABELLE_TOOL build -D ."
exit 0

View File

@ -1,69 +0,0 @@
section \<open> Little theory implementing the an assertion command in Isabelle/HOL. \<close>
text\<open>This command is useful for certification documents allowing to validate
corner-cases of (executable) definitions. \<close>
theory Assert
imports Main
keywords "assert" ::thy_decl
begin
subsection\<open>Core\<close>
ML\<open>
local
(* Reimplementation needed because not exported from ML structure Value_Command *)
fun value_maybe_select some_name =
case some_name
of NONE => Value_Command.value
| SOME name => Value_Command.value_select name;
in
(* Reimplementation needed because not exported from ML structure Value_Command *)
val opt_modes =
Scan.optional (@{keyword "("} |-- Parse.!!! (Scan.repeat1 Parse.name --| @{keyword ")"})) [];
(* Reimplementation needed because not exported from ML structure Value_Command *)
val opt_evaluator =
Scan.option (@{keyword "["} |-- Parse.name --| @{keyword "]"})
(* Reimplementation structure Value_Command due to tiny modification of value_cmd. *)
fun assert_cmd some_name modes raw_t ctxt (* state*) =
let
(* val ctxt = Toplevel.context_of state; *)
val t = Syntax.read_term ctxt raw_t;
val t' = value_maybe_select some_name ctxt t;
val ty' = Term.type_of t';
val ty' = case ty' of @{typ "bool"} => ty' | _ => error "Assertion expressions must be boolean.";
val t' = case t' of @{term "True"} => t' | _ => error "Assertion failed.";
val ctxt' = Variable.auto_fixes t' ctxt;
val p = Print_Mode.with_modes modes (fn () =>
Pretty.block [Pretty.quote (Syntax.pretty_term ctxt' t'), Pretty.fbrk,
Pretty.str "::", Pretty.brk 1, Pretty.quote (Syntax.pretty_typ ctxt' ty')]) ();
in Pretty.writeln p end;
val _ =
Outer_Syntax.command @{command_keyword assert} "evaluate and print term"
(opt_evaluator -- opt_modes -- Parse.term
>> (fn ((some_name, modes), t) =>
Toplevel.keep ( (assert_cmd some_name modes t) o Toplevel.context_of) ));
end
\<close>
subsection\<open> Test: \<close>
(*
assert ""
assert "3 = 4"
assert "False"
assert "5 * 5 = 25"
*)
subsection\<open>Example\<close>
assert "True \<and> True "
assert "(5::int) * 5 = 25 "
end

View File

@ -1,57 +0,0 @@
theory AssertLong
imports Main
keywords "assert" ::thy_decl
begin
ML\<open>
fun value_maybe_select some_name =
case some_name
of NONE => Value_Command.value
| SOME name => Value_Command.value_select name;
val TT = Unsynchronized.ref (HOLogic.boolT);
fun value_cmd2 some_name modes raw_t state =
let
val ctxt = Toplevel.context_of state;
val t = Syntax.read_term ctxt raw_t;
val t' = value_maybe_select some_name ctxt t;
val ty' = Term.type_of t';
val t' = case ty' of @{typ "bool"} => t' | _ => error "Assertion expressions must be boolean.";
val t' = case t' of @{term "True"} => t' | _ => error "Assertion failed.";
val ctxt' = Variable.auto_fixes t' ctxt;
val p = Print_Mode.with_modes modes (fn () =>
Pretty.block [Pretty.quote (Syntax.pretty_term ctxt' t'), Pretty.fbrk,
Pretty.str "::", Pretty.brk 1, Pretty.quote (Syntax.pretty_typ ctxt' ty')]) ();
in Pretty.writeln p end;
\<close>
ML\<open>value_cmd2\<close>
definition ASSERT :: "bool \<Rightarrow> bool" where "ASSERT p == (p=True)"
ML\<open>val x = @{code "ASSERT"}\<close>
ML\<open>
val opt_modes =
Scan.optional (@{keyword "("} |-- Parse.!!! (Scan.repeat1 Parse.name --| @{keyword ")"})) [];
val opt_evaluator =
Scan.option (@{keyword "["} |-- Parse.name --| @{keyword "]"})
val _ =
Outer_Syntax.command @{command_keyword assert} "evaluate and print term"
(opt_evaluator -- opt_modes -- Parse.term
>> (fn ((some_name, modes), t) =>
let val _ = writeln t in
(* Toplevel.keep (Value_Command.value_cmd some_name modes (enclose "ASSERT(" ")" t)) *)
Toplevel.keep (value_cmd2 some_name modes t)
end));
\<close>
assert "True"
assert "True \<and> True "
ML\<open>!TT ;
@{term "True"}\<close>

View File

@ -1,56 +1,37 @@
(*************************************************************************
* Copyright (C)
* 2019 The University of Exeter
* 2018-2019 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
chapter \<open>The Document Ontology Common Library for the Isabelle Ontology Framework\<close>
text\<open> Offering
\<^item> ...
\<^item>
\<^item> LaTeX support. \<close>
text\<open> Building a fundamental infrastructure for common document elements such as
Structuring Text-Elements (the top classes), Figures, (Tables yet todo)
The COL provides a number of ontological "macros" like "section*" which
automatically set a number of class-attributes in particular ways without
user-interference.
\<close>
theory Isa_COL
imports Isa_DOF
keywords "title*" "subtitle*"
"chapter*" "section*"
"subsection*" "subsubsection*"
"paragraph*" "subparagraph*"
"figure*" "side_by_side_figure*" :: document_body
begin
section\<open> Library of Standard Text Ontology \<close>
datatype placement = pl_h | (*here*)
pl_t | (*top*)
pl_b | (*bottom*)
pl_ht | (*here -> top*)
pl_hb (*here -> bottom*)
doc_class figure =
relative_width :: "int" (* percent of textwidth *)
src :: "string"
placement :: placement
spawn_columns :: bool <= True
doc_class side_by_side_figure = figure +
anchor :: "string"
caption :: "string"
relative_width2 :: "int" (* percent of textwidth *)
src2 :: "string"
anchor2 :: "string"
caption2 :: "string"
doc_class figure_group =
(* trace :: "doc_class rexp list" <= "[]" automatically generated since monitor clause *)
caption :: "string"
rejects figure_group (* this forbids recursive figure-groups not supported
by the current LaTeX style-file. *)
accepts "\<lbrace>figure\<rbrace>\<^sup>+"
(* dito the future table *)
(* dito the future monitor: table - block *)
section\<open>Basic Text and Text-Structuring Elements\<close>
text\<open> The attribute @{term "level"} in the subsequent enables doc-notation support section* etc.
we follow LaTeX terminology on levels
@ -61,43 +42,606 @@ we follow LaTeX terminology on levels
\<^enum> subsubsection = Some 3
\<^enum> ...
for scholarly paper: invariant level > 0 \<close>
for scholarly paper: invariant level > 0. \<close>
doc_class text_element =
doc_class text_element =
level :: "int option" <= "None"
referentiable :: bool <= "False"
variants :: "String.literal set" <= "{STR ''outline'', STR ''document''}"
section\<open>Some attempt to model standardized links to Standard Isabelle Formal Content\<close>
doc_class assertions =
properties :: "term list"
doc_class "thms" =
properties :: "thm list"
doc_class formal_item =
item :: "(assertions + thms)"
doc_class definitions =
requires :: "formal_item list"
establishes :: "thms list"
doc_class formal_content =
style :: "string option"
accepts "\<lbrace>formal_item\<rbrace>\<^sup>+"
doc_class "chapter" = text_element +
level :: "int option" <= "Some 0"
doc_class "section" = text_element +
level :: "int option" <= "Some 1"
doc_class "subsection" = text_element +
level :: "int option" <= "Some 2"
doc_class "subsubsection" = text_element +
level :: "int option" <= "Some 3"
doc_class concept =
tag :: "string" <= "''''"
properties :: "thm list" <= "[]"
subsection\<open>Ontological Macros\<close>
section\<open>Tests\<close>
ML\<open>
ML\<open>@{term "side_by_side_figure"};
@{typ "doc_class rexp"};
DOF_core.SPY;
structure Onto_Macros =
struct
local open ODL_Meta_Args_Parser in
(* *********************************************************************** *)
(* Ontological Macro Command Support *)
(* *********************************************************************** *)
(* {markdown = true} sets the parsing process such that in the text-core markdown elements are
accepted. *)
fun enriched_text_element_cmd level =
let fun transform doc_attrs = case level of
NONE => doc_attrs
| SOME(NONE) => (("level",@{here}),"None")::doc_attrs
| SOME(SOME x) => (("level",@{here}),"Some("^ Int.toString x ^"::int)")::doc_attrs
in Monitor_Command_Parser.gen_enriched_document_cmd {inline=true} I transform end;
(*
val enriched_document_command_macro =
let fun transform_cid X = (writeln (@{make_string} X); X)
in gen_enriched_document_command {inline=true} transform_cid I end;
*)
local
fun transform_cid thy NONE X = X
|transform_cid thy (SOME ncid) NONE = (SOME(ncid,@{here}))
|transform_cid thy (SOME cid) (SOME (sub_cid,pos)) =
let val cid_long = DOF_core.read_cid_global thy cid
val sub_cid_long = DOF_core.read_cid_global thy sub_cid
in if DOF_core.is_subclass_global thy sub_cid_long cid_long
then (SOME (sub_cid,pos))
else (* (SOME (sub_cid,pos)) *)
(* BUG : check reveals problem of Definition* misuse. *)
error("class "^sub_cid_long^
" must be sub-class of "^cid_long)
end
in
fun enriched_formal_statement_command ncid (S: (string * string) list) =
let fun transform_attr doc_attrs = (map (fn(cat,tag) => ((cat,@{here}),tag)) S) @
(("formal_results",@{here}),"([]::thm list)")::doc_attrs
in fn margs => fn thy =>
Monitor_Command_Parser.gen_enriched_document_cmd {inline=true}
(transform_cid thy ncid) transform_attr margs thy
end;
fun enriched_document_cmd_exp ncid (S: (string * string) list) =
(* expands ncid into supertype-check. *)
let fun transform_attr attrs = (map (fn(cat,tag) => ((cat,@{here}),tag)) S) @ attrs
in fn margs => fn thy =>
Monitor_Command_Parser.gen_enriched_document_cmd {inline=true} (transform_cid thy ncid)
transform_attr margs thy
end;
end (* local *)
fun heading_command (name, pos) descr level =
Monitor_Command_Parser.document_command (name, pos) descr
{markdown = false, body = true} (enriched_text_element_cmd level);
val _ = heading_command \<^command_keyword>\<open>title*\<close> "section heading" NONE;
val _ = heading_command \<^command_keyword>\<open>subtitle*\<close> "section heading" NONE;
val _ = heading_command \<^command_keyword>\<open>chapter*\<close> "section heading" (SOME (SOME 0));
val _ = heading_command \<^command_keyword>\<open>section*\<close> "section heading" (SOME (SOME 1));
val _ = heading_command \<^command_keyword>\<open>subsection*\<close> "subsection heading" (SOME (SOME 2));
val _ = heading_command \<^command_keyword>\<open>subsubsection*\<close> "subsubsection heading" (SOME (SOME 3));
val _ = heading_command \<^command_keyword>\<open>paragraph*\<close> "paragraph heading" (SOME (SOME 4));
val _ = heading_command \<^command_keyword>\<open>subparagraph*\<close> "subparagraph heading" (SOME (SOME 5));
end
end
\<close>
section\<open> Library of Standard Text Ontology \<close>
datatype placement = pl_h | (*here*)
pl_t | (*top*)
pl_b | (*bottom*)
pl_ht | (*here -> top*)
pl_hb (*here -> bottom*)
ML\<open>(Symtab.defined (#docclass_tab(DOF_core.get_data_global @{theory}))) "side_by_side_figure"\<close>
print_doc_classes
doc_class figure =
relative_width :: "int" (* percent of textwidth *)
src :: "string"
placement :: placement
spawn_columns :: bool <= True
doc_class figure2 = figure +
caption :: string
doc_class side_by_side_figure = figure +
anchor :: "string"
caption :: "string"
relative_width2 :: "int" (* percent of textwidth *)
src2 :: "string"
anchor2 :: "string"
caption2 :: "string"
print_doc_classes
doc_class figure_group =
(* trace :: "doc_class rexp list" <= "[]" automatically generated since monitor clause *)
caption :: "string"
rejects figure_group (* this forbids recursive figure-groups not supported
by the current LaTeX style-file. *)
accepts "\<lbrace>figure\<rbrace>\<^sup>+"
print_doc_classes
section\<open>Layout Trimming Commands (with syntactic checks)\<close>
ML\<open>
local
val scan_cm = Scan.ahead (Basic_Symbol_Pos.$$$ "c" |-- Basic_Symbol_Pos.$$$ "m" ) ;
val scan_pt = Scan.ahead (Basic_Symbol_Pos.$$$ "p" |-- Basic_Symbol_Pos.$$$ "t" ) ;
val scan_blank = Scan.repeat ( Basic_Symbol_Pos.$$$ " "
|| Basic_Symbol_Pos.$$$ "\t"
|| Basic_Symbol_Pos.$$$ "\n");
in
val scan_latex_measure = (scan_blank
|-- Scan.option (Basic_Symbol_Pos.$$$ "-")
|-- Symbol_Pos.scan_nat
|-- (Scan.option ((Basic_Symbol_Pos.$$$ ".") |-- Symbol_Pos.scan_nat))
|-- scan_blank
|-- (scan_cm || scan_pt)
|-- scan_blank
) ;
fun check_latex_measure _ src =
let val _ = ((Scan.catch scan_latex_measure (Symbol_Pos.explode(Input.source_content src)))
handle Fail _ => error ("syntax error in LaTeX measure") )
in () end
val parse_latex_measure = Parse.embedded_input >> (fn src => (check_latex_measure () (* dummy arg *) src;
(fst o Input.source_content) src ) )
end\<close>
setup\<open> DOF_lib.define_macro \<^binding>\<open>vs\<close> "\\vspace{" "}" (check_latex_measure) \<close>
setup\<open> DOF_lib.define_macro \<^binding>\<open>hs\<close> "\\hspace{" "}" (check_latex_measure) \<close>
(*<*)
text\<open>Tests: \<^vs>\<open>-0.14cm\<close>\<close>
ML\<open> check_latex_measure @{context} (Input.string "-0.14 cm") \<close>
define_macro* vs2 \<rightleftharpoons> \<open>\vspace{\<close> _ \<open>}\<close> (check_latex_measure) (* checkers NYI on Isar-level *)
define_macro* hs2 \<rightleftharpoons> \<open>\hspace{\<close> _ \<open>}\<close> (* works fine without checker.*)
(*>*)
subsection\<open>Figures\<close>
ML\<open>open Args\<close>
ML\<open>
(* *********************************************************************** *)
(* Ontological Macro Command Support *)
(* *********************************************************************** *)
val _ = Onto_Macros.heading_command \<^command_keyword>\<open>figure*\<close> "figure" NONE;
val _ = Onto_Macros.heading_command \<^command_keyword>\<open>side_by_side_figure*\<close> "multiple figures" NONE;
\<close>
(*<*)
(*
ML\<open>ML_Context.expression\<close>
fun setup source =
ML_Context.expression (Input.pos_of source)
(ML_Lex.read "Theory.setup (" @ ML_Lex.read_source source @ ML_Lex.read ")")
|> Context.theory_map;
setup\<open>\<close>
*)
(*>*)
subsubsection\<open>Figure Content\<close>
text\<open>The intermediate development goal is to separate the ontological, top-level construct
\<open>figure*\<close>, which will remain a referentiable, ontological document unit, from the more versatile
\<^emph>\<open>import\<close> of a figure. The hope is that this opens the way for more orthogonality and
abstraction from the LaTeX engine.
\<close>
ML\<open>
type fig_content = {relative_width : int, (* percent of textwidth, default 100 *)
scale : int, (* percent, default 100 *)
caption : Input.source (* default empty *)}
val mt_fig_content = {relative_width = 100,
scale = 100,
caption = Input.empty }: fig_content
(* doof wie 100 m feldweg. *)
fun upd_relative_width key {relative_width,scale,caption } : fig_content =
{relative_width = key,scale = scale,caption = caption}: fig_content
fun upd_scale key {relative_width,scale,caption } : fig_content =
{relative_width = relative_width,scale = key,caption = caption}: fig_content
fun upd_caption key {relative_width,scale,caption} : fig_content =
{relative_width = relative_width,scale = scale,caption= key}: fig_content
val widthN = "width"
val scaleN = "scale"
val captionN = "caption";
fun fig_content_modes (ctxt, toks) =
let val (y, toks') = ((((Scan.optional
(Args.parens
(Parse.list1
( (Args.$$$ widthN |-- Args.$$$ "=" -- Parse.int
>> (fn (_, k) => upd_relative_width k))
|| (Args.$$$ scaleN |-- Args.$$$ "=" -- Parse.int
>> (fn (_, k) => upd_scale k))
|| (Args.$$$ captionN |-- Args.$$$ "=" -- Parse.document_source
>> (fn (_, k) => upd_caption k))
))) [K mt_fig_content])
: (fig_content -> fig_content) list parser)
>> (foldl1 (op #>)))
: (fig_content -> fig_content) parser)
(toks)
in (y, (ctxt, toks')) end
fun document_antiq (check: Proof.context -> Path.T option -> Input.source -> Path.T) =
Args.context -- Scan.lift Parse.path_input >> (fn (ctxt, source) =>
(check ctxt NONE source;
Latex.string (Latex.output_ascii_breakable "/" (Input.string_of source))
|> Latex.macro "isatt"));
fun fig_content_antiquotation name scan =
(Document_Output.antiquotation_raw_embedded name
(scan : ((fig_content -> fig_content) * Input.source) context_parser)
(fn ctxt =>
(fn (cfg_trans,file:Input.source) =>
let val {relative_width,scale,caption} = cfg_trans mt_fig_content
val _ = if relative_width < 0 orelse scale<0 then error("negative parameter.")
else ()
val wdth_s = if relative_width = 100 then ""
else "width="^Real.toString((Real.fromInt relative_width)
/ (Real.fromInt 100))^"\textwidth"
val scale_s= if scale = 100 then ""
else "scale="^Real.toString((Real.fromInt scale) / (Real.fromInt 100))
val arg = enclose "[" "]" (commas [wdth_s,scale_s])
val lab = Document_Output.output_document ctxt {markdown = false} caption
val path = Resources.check_file ctxt NONE file
val _ = writeln("file "^Path.file_name path)
(* ToDo: must be declared source of type png or jpeg or pdf, ... *)
in file
|> (Latex.string o Input.string_of)
|> (XML.enclose ("\\includegraphics"^arg^"{") "}")
|> (fn X => X @ Latex.macro "capture" lab)
end
)
));
val _ = fig_content_antiquotation
: binding
-> ((fig_content -> fig_content) * Input.source) context_parser
-> theory -> theory
val _ = Theory.setup
( fig_content_antiquotation \<^binding>\<open>fig_content\<close>
(fig_content_modes -- Scan.lift(Parse.path_input)))
\<close>
subsection\<open>Tables\<close>
(* TODO ! ! ! *)
(* dito the future monitor: table - block *)
(* some studies *)
text\<open>Tables are (sub) document-elements represented inside the documentation antiquotation
language. The used technology is similar to the existing railroad-diagram support
(cf. \<^url>\<open>https://isabelle.in.tum.de/doc/isar-ref.pdf\<close>, Sec. 4.5).
However, tables are not directly based on the idiosyncrasies of Knuth-based language design ---
However, tables come with a more abstract structure model than conventional typesetting in the
LaTeX tradition. It is based of the following principles:
\<^item> The core unit of a table is a \<^emph>\<open>cell\<close> having a \<^emph>\<open>configuration\<close>, i.e. a
number of attributes specifying its width, height, borderline, etc.
A cell may be \<^emph>\<open>elementary\<close>, i.e. containing structured text or \<^emph>\<open>compound\<close>,
i.e. containing a sub-table.
\<^item> A \<^emph>\<open>table\<close> contains either a list of \<^emph>\<open>rows\<close> or a list of \<^emph>\<open>columns\<close>, which are both
lists of cells.
\<^item> The tables, rows and columns posses own configurations.
\<^item> Concerning the layout, \<^emph>\<open>propagation\<close> laws of configurations control that
information flows top-down from tables to rows or columns, from rows/columns to cells,
from left to right within rows and from top to bottom in columns; propagation produces
the desired presentation effect of tables that cells appear somewhat uniform in it.
\<^item> Since rows are lists of cells, configurations are also a list of attributes.
Attributes of the same kind may appear repeatedly. If the sub-list of attributes
of the same kind is shorter than the list of cells it is referring to, than
the last element in this sub-list is duplicated as many times as necessary. This feature
of configuration propagation is called \<^emph>\<open>filling\<close>.
\<^item> Lists of rows and lists of cells consists of the same number of cells.
\<^item> Since propagation and filling induce a congruence relation on table trees, a normalisation
process is a necessary pre-requisite for the compilation to LaTeX.
\<close>
ML\<open>
local
fun mk_line st1 st2 [a] = [a @ Latex.string st2]
|mk_line st1 st2 (a::S) = [a @ Latex.string st1] @ mk_line st1 st2 S;
(* tab attributes for global setup *)
type cell_config = {cell_placing : string list,
cell_height : string list,
cell_width : string list,
cell_bgnd_color : string list,
cell_line_color : string list,
cell_line_width : string list}
val mt_cell_config = {cell_placing = [],
cell_height = [],
cell_width = [],
cell_bgnd_color= [],
cell_line_color= [],
cell_line_width= [] }: cell_config
(* doof wie 100 m feldweg. *)
fun upd_cell_placing key
{cell_placing,cell_height,cell_width, cell_bgnd_color,
cell_line_color,cell_line_width} : cell_config =
{cell_placing = cell_placing @ [key], cell_height = cell_height,
cell_width = cell_width, cell_bgnd_color= cell_bgnd_color,
cell_line_color= cell_line_color, cell_line_width= cell_line_width }
: cell_config
fun upd_cell_height num
{cell_placing,cell_height,cell_width, cell_bgnd_color,
cell_line_color,cell_line_width} : cell_config =
{cell_placing = cell_placing , cell_height = cell_height @ [num],
cell_width = cell_width, cell_bgnd_color= cell_bgnd_color,
cell_line_color= cell_line_color,cell_line_width= cell_line_width }
: cell_config
fun upd_cell_width num
{cell_placing,cell_height,cell_width, cell_bgnd_color,
cell_line_color,cell_line_width} : cell_config =
{cell_placing = cell_placing , cell_height = cell_height,
cell_width = cell_width@[num],cell_bgnd_color= cell_bgnd_color,
cell_line_color= cell_line_color, cell_line_width= cell_line_width }
: cell_config
fun upd_cell_bgnd_color str
{cell_placing,cell_height,cell_width, cell_bgnd_color,
cell_line_color,cell_line_width} : cell_config =
{cell_placing = cell_placing , cell_height = cell_height,
cell_width = cell_width, cell_bgnd_color= cell_bgnd_color@[str],
cell_line_color= cell_line_color, cell_line_width= cell_line_width }
: cell_config
fun upd_cell_line_color str
{cell_placing,cell_height,cell_width, cell_bgnd_color,
cell_line_color,cell_line_width} : cell_config =
{cell_placing = cell_placing , cell_height = cell_height,
cell_width = cell_width, cell_bgnd_color= cell_bgnd_color,
cell_line_color= cell_line_color@[str], cell_line_width= cell_line_width }
: cell_config
fun upd_cell_line_width num
{cell_placing,cell_height,cell_width, cell_bgnd_color,
cell_line_color,cell_line_width} : cell_config =
{cell_placing = cell_placing , cell_height = cell_height,
cell_width = cell_width, cell_bgnd_color = cell_bgnd_color,
cell_line_color = cell_line_color, cell_line_width = cell_line_width@[num] }
: cell_config
(*global default configs *)
val (tab_cell_placing, tab_cell_placing_setup)
= Attrib.config_string \<^binding>\<open>tab_cell_placing\<close> (K "center");
val (tab_cell_height, tab_cell_height_setup)
= Attrib.config_string \<^binding>\<open>tab_cell_height\<close> (K "0.0cm");
val (tab_cell_width, tab_cell_width_setup)
= Attrib.config_string \<^binding>\<open>tab_cell_width\<close> (K "0.0cm");
val (tab_cell_bgnd_color, tab_cell_bgnd_color_setup)
= Attrib.config_string \<^binding>\<open>tab_cell_bgnd_height\<close> (K "white");
val (tab_cell_line_color, tab_cell_line_color_setup)
= Attrib.config_string \<^binding>\<open>tab_cell_line_color\<close> (K "black");
val (tab_cell_line_width, tab_cell_line_width_setup)
= Attrib.config_string \<^binding>\<open>tab_cell_line_height\<close> (K "0.0cm");
fun default_cell_config ctxt = {cell_placing = [Config.get ctxt tab_cell_placing],
cell_height = [Config.get ctxt tab_cell_height],
cell_width = [Config.get ctxt tab_cell_width],
cell_bgnd_color = [Config.get ctxt tab_cell_bgnd_color],
cell_line_color = [Config.get ctxt tab_cell_line_color],
cell_line_width = [Config.get ctxt tab_cell_line_width]}
: cell_config
val _ = Theory.setup( tab_cell_placing_setup
#> tab_cell_height_setup
#> tab_cell_width_setup
#> tab_cell_bgnd_color_setup
#> tab_cell_line_color_setup
#> tab_cell_line_width_setup
)
(*syntax for local tab specifier *)
val cell_placingN = "cell_placing"
val cell_heightN = "cell_height"
val cell_widthN = "cell_width"
val cell_bgnd_colorN = "cell_bgnd_color"
val cell_line_colorN = "cell_line_color"
val cell_line_widthN = "cell_line_width"
val placing_scan = Args.$$$ "left" || Args.$$$ "center" || Args.$$$ "right"
val color_scan = Args.$$$ "none" || Args.$$$ "red" || Args.$$$ "green"
|| Args.$$$ "blue" || Args.$$$ "black"
(*
val _ = Scan.lift
fun lift scan (st, xs) =
let val (y, xs') = scan xs
in (y, (st, xs')) end;
*)
fun tabitem_modes (ctxt, toks) =
let val (y, toks') = ((((Scan.optional
(Args.parens
(Parse.list1
( (Args.$$$ cell_placingN |-- Args.$$$ "=" -- placing_scan
>> (fn (_, k) => upd_cell_placing k))
|| (Args.$$$ cell_heightN |-- Args.$$$ "=" -- parse_latex_measure
>> (fn (_, k) => upd_cell_height k))
|| (Args.$$$ cell_widthN |-- Args.$$$ "=" -- parse_latex_measure
>> (fn (_, k) => upd_cell_width k))
|| (Args.$$$ cell_bgnd_colorN |-- Args.$$$ "=" -- color_scan
>> (fn (_, k) => upd_cell_bgnd_color k))
|| (Args.$$$ cell_line_colorN |-- Args.$$$ "=" -- color_scan
>> (fn (_, k) => upd_cell_line_color k))
|| (Args.$$$ cell_line_widthN |-- Args.$$$ "=" -- parse_latex_measure
>> (fn (_, k) => upd_cell_line_width k))
))) [K (default_cell_config (Context.the_proof ctxt))])
: (cell_config -> cell_config) list parser)
>> (foldl1 (op #>)))
: (cell_config -> cell_config) parser)
(toks)
in (y, (ctxt, toks')) end
datatype table_tree = mk_tab of cell_config * cell_group
| mk_cell of cell_config * Input.source
and cell_group = mk_row of cell_config * table_tree list
| mk_column of cell_config * table_tree list
val tab_config_parser = tabitem_modes : ((cell_config -> cell_config) ) context_parser
val table_parser = tab_config_parser -- Scan.repeat1(Scan.repeat1(Scan.lift Args.cartouche_input))
fun table_antiquotation name scan =
Document_Output.antiquotation_raw_embedded name
scan
(fn ctxt =>
(fn (cfg_trans,content:Input.source list list) =>
let val cfg = cfg_trans mt_cell_config
val _ = writeln ("XXX"^ @{make_string} cfg)
fun check _ = () (* ToDo *)
val _ = check content
in content
|> (map(map (Document_Output.output_document ctxt {markdown = false})
#> mk_line "&" "\\\\"
#> List.concat )
#> List.concat)
|> XML.enclose "\\table[allerhandquatsch]{" "}"
end
)
);
fun cell_antiquotation name scan =
Document_Output.antiquotation_raw_embedded name
scan
(fn ctxt =>
(fn (cfg_trans,content:Input.source) =>
let val cfg = cfg_trans mt_cell_config
val _ = writeln ("XXX"^ @{make_string} cfg)
in content |> Document_Output.output_document ctxt {markdown = false}
end
)
)
fun row_antiquotation name scan =
Document_Output.antiquotation_raw_embedded name
scan
(fn ctxt =>
(fn (cfg_trans,content:Input.source list) =>
let val cfg = cfg_trans mt_cell_config
val _ = writeln ("XXX"^ @{make_string} cfg)
in content |> (map (Document_Output.output_document ctxt {markdown = false})
#> List.concat)
end
)
)
fun column_antiquotation name scan =
Document_Output.antiquotation_raw_embedded name
scan
(fn ctxt =>
(fn (cfg_trans,content:Input.source list) =>
let val cfg = cfg_trans mt_cell_config
val _ = writeln ("XXX"^ @{make_string} cfg)
in content |> (map (Document_Output.output_document ctxt {markdown = false})
#> List.concat)
end
)
)
in
val _ = Theory.setup
( table_antiquotation \<^binding>\<open>table_inline\<close>
table_parser
#> table_antiquotation \<^binding>\<open>subtab\<close> table_parser
#> cell_antiquotation \<^binding>\<open>cell\<close>
(tab_config_parser--Scan.lift Args.cartouche_input)
#> row_antiquotation \<^binding>\<open>row\<close>
(tab_config_parser--Scan.repeat1(Scan.lift Args.cartouche_input))
#> column_antiquotation \<^binding>\<open>column\<close>
(tab_config_parser--Scan.repeat1(Scan.lift Args.cartouche_input))
);
end
\<close>
text\<open> @{file "../ROOT"} \<close>
define_shortcut* clearpage \<rightleftharpoons> \<open>\clearpage{}\<close>
hf \<rightleftharpoons> \<open>\hfill\<close>
br \<rightleftharpoons> \<open>\break\<close>
declare[[tab_cell_placing="left",tab_cell_height="18.0cm"]]
section\<open>Tests\<close>
(*<*)
text\<open> @{fig_content [display] (scale = 80, width=80, caption=\<open>this is \<^term>\<open>\<sigma>\<^sub>i+2\<close> \<dots>\<close>)
\<open>../../examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/figures/isabelle-architecture.pdf\<close>}\<close>
text\<open> @{table_inline [display] (cell_placing = center,cell_height =\<open>12.0cm\<close>,
cell_height =\<open>13pt\<close>, cell_width = \<open>12.0cm\<close>,
cell_bgnd_color=black,cell_line_color=red,cell_line_width=\<open>12.0cm\<close>)
\<open>\<open>\<^cell>\<open>dfg\<close> \<^col>\<open>dfg\<close> \<^row>\<open>dfg\<close> @{cell (cell_height =\<open>12.0cm\<close>) \<open>abracadabra\<close>}\<close>
\<open>\<open>1\<close> \<open>2\<close> \<open>3\<sigma>\<close>\<close>
\<close>}
\<^cell>\<open>dfg\<close> @{row \<open>is technical\<close> \<open> \<open>\<sigma> * a\<^sub>4\<close> \<close>}\<close>
(*>*)
ML\<open>@{term "side_by_side_figure"};
@{typ "doc_class rexp"};
DOF_core.SPY;
\<close>
text\<open>@{term_ \<open>3 + 4::int\<close>} @{value_ \<open>3 + 4::int\<close>} \<close>
end

File diff suppressed because it is too large Load Diff

View File

@ -1,93 +0,0 @@
theory RegExp
imports "Functional-Automata.Execute"
begin
term Atom
value "Star (Times(Plus (Atom(CHR ''a'')) (Atom(CHR ''b''))) (Atom(CHR ''c'')))"
notation Star ("\<lbrace>(_)\<rbrace>\<^sup>*" [0]100)
notation Plus (infixr "||" 55)
notation Times (infixr "~~" 60)
notation Atom ("\<lfloor>_\<rfloor>" 65)
(*
datatype 'a rexp = Empty ("<>")
| Atom 'a ("\<lfloor>_\<rfloor>" 65)
| Alt "('a rexp)" "('a rexp)" (infixr "||" 55)
| Conc "('a rexp)" "('a rexp)" (infixr "~~" 60)
| Star "('a rexp)" ("\<lbrace>(_)\<rbrace>\<^sup>*" [0]100)
*)
definition rep1 :: "'a rexp \<Rightarrow> 'a rexp" ("\<lbrace>(_)\<rbrace>\<^sup>+")
where "\<lbrace>A\<rbrace>\<^sup>+ \<equiv> A ~~ \<lbrace>A\<rbrace>\<^sup>*"
definition opt :: "'a rexp \<Rightarrow> 'a rexp" ("\<lbrakk>(_)\<rbrakk>")
where "\<lbrakk>A\<rbrakk> \<equiv> A || One"
value "Star (Conc(Alt (Atom(CHR ''a'')) (Atom(CHR ''b''))) (Atom(CHR ''c'')))"
text\<open>or better equivalently:\<close>
value "\<lbrace>(\<lfloor>CHR ''a''\<rfloor> || \<lfloor>CHR ''b''\<rfloor>) ~~ \<lfloor>CHR ''c''\<rfloor>\<rbrace>\<^sup>*"
section\<open>Definition of a semantic function: the ``language'' of the regular expression\<close>
text\<open> This is just a reminder - already defined in @{theory Regular_Exp} as @{term lang}.\<close>
text\<open>In the following, we give a semantics for our regular expressions, which so far have
just been a term language (i.e. abstract syntax). The semantics is a ``denotational semantics'',
i.e. we give a direct meaning for regular expressions in some universe of ``denotations''.
This universe of denotations is in our concrete case:\<close>
definition enabled :: "('a,'\<sigma> set)da \<Rightarrow> '\<sigma> set \<Rightarrow> 'a list \<Rightarrow> 'a list"
where "enabled A \<sigma> = filter (\<lambda>x. next A x \<sigma> \<noteq> {}) "
text\<open>Now the denotational semantics for regular expression can be defined on a post-card:\<close>
fun L :: "'a rexp => 'a lang"
where L_Emp : "L Zero = {}"
|L_One: "L One = {[]}"
|L_Atom: "L (\<lfloor>a\<rfloor>) = {[a]}"
|L_Un: "L (el || er) = (L el) \<union> (L er)"
|L_Conc: "L (el ~~ er) = {xs@ys | xs ys. xs \<in> L el \<and> ys \<in> L er}"
|L_Star: "L (Star e) = Regular_Set.star(L e)"
text\<open>A more useful definition is the \<close>
fun L\<^sub>s\<^sub>u\<^sub>b :: "'a::order rexp => 'a lang"
where L\<^sub>s\<^sub>u\<^sub>b_Emp: "L\<^sub>s\<^sub>u\<^sub>b Zero = {}"
|L\<^sub>s\<^sub>u\<^sub>b_One: "L\<^sub>s\<^sub>u\<^sub>b One = {[]}"
|L\<^sub>s\<^sub>u\<^sub>b_Atom: "L\<^sub>s\<^sub>u\<^sub>b (\<lfloor>a\<rfloor>) = {z . \<forall>x. x \<le> a \<and> z=[x]}"
|L\<^sub>s\<^sub>u\<^sub>b_Un: "L\<^sub>s\<^sub>u\<^sub>b (el || er) = (L\<^sub>s\<^sub>u\<^sub>b el) \<union> (L\<^sub>s\<^sub>u\<^sub>b er)"
|L\<^sub>s\<^sub>u\<^sub>b_Conc: "L\<^sub>s\<^sub>u\<^sub>b (el ~~ er) = {xs@ys | xs ys. xs \<in> L\<^sub>s\<^sub>u\<^sub>b el \<and> ys \<in> L\<^sub>s\<^sub>u\<^sub>b er}"
|L\<^sub>s\<^sub>u\<^sub>b_Star: "L\<^sub>s\<^sub>u\<^sub>b (Star e) = Regular_Set.star(L\<^sub>s\<^sub>u\<^sub>b e)"
definition XX where "XX = (rexp2na example_expression)"
definition YY where "YY = na2da(rexp2na example_expression)"
(* reminder from execute *)
value "NA.accepts (rexp2na example_expression) [0,1,1,0,0,1]"
value "DA.accepts (na2da (rexp2na example_expression)) [0,1,1,0,0,1]"
definition zero where "zero = (0::nat)"
definition one where "one = (1::nat)"
typ "'a set"
export_code zero one Suc Int.nat nat_of_integer int_of_integer
Zero One Atom Plus Times Star
rexp2na na2da enabled
NA.accepts DA.accepts
example_expression
in SML
module_name RegExpChecker file "RegExpChecker.sml"
SML_file "RegExpChecker.sml"
no_notation Atom ("\<lfloor>_\<rfloor>")
end

View File

@ -1,348 +0,0 @@
structure RegExpChecker : sig
type 'a equal
type num
type int
datatype nat = Zero_nat | Suc of nat
type 'a set
datatype 'a rexp = Zero | Onea | Atom of 'a | Plus of 'a rexp * 'a rexp |
Times of 'a rexp * 'a rexp | Star of 'a rexp
val nat : int -> nat
val accepts : 'a * (('b -> 'a -> 'a) * ('a -> bool)) -> 'b list -> bool
val acceptsa :
'a equal -> 'a * (('b -> 'a -> 'a set) * ('a -> bool)) -> 'b list -> bool
val na2da :
'a equal ->
'a * (('b -> 'a -> 'a set) * ('a -> bool)) ->
'a set * (('b -> 'a set -> 'a set) * ('a set -> bool))
val rexp2na :
'a equal ->
'a rexp ->
bool list * (('a -> bool list -> (bool list) set) * (bool list -> bool))
val one : nat
val zero : nat
val enabled :
'a set * (('b -> 'a set -> 'a set) * ('a set -> bool)) ->
'a set -> 'b list -> 'b list
val example_expression : nat rexp
val nat_of_integer : IntInf.int -> nat
val int_of_integer : IntInf.int -> int
end = struct
fun equal_boola p true = p
| equal_boola p false = not p
| equal_boola true p = p
| equal_boola false p = not p;
type 'a equal = {equal : 'a -> 'a -> bool};
val equal = #equal : 'a equal -> 'a -> 'a -> bool;
val equal_bool = {equal = equal_boola} : bool equal;
fun eq A_ a b = equal A_ a b;
fun equal_lista A_ [] (x21 :: x22) = false
| equal_lista A_ (x21 :: x22) [] = false
| equal_lista A_ (x21 :: x22) (y21 :: y22) =
eq A_ x21 y21 andalso equal_lista A_ x22 y22
| equal_lista A_ [] [] = true;
fun equal_list A_ = {equal = equal_lista A_} : ('a list) equal;
datatype num = One | Bit0 of num | Bit1 of num;
datatype int = Zero_int | Pos of num | Neg of num;
datatype nat = Zero_nat | Suc of nat;
datatype 'a set = Set of 'a list | Coset of 'a list;
datatype 'a rexp = Zero | Onea | Atom of 'a | Plus of 'a rexp * 'a rexp |
Times of 'a rexp * 'a rexp | Star of 'a rexp;
fun dup (Neg n) = Neg (Bit0 n)
| dup (Pos n) = Pos (Bit0 n)
| dup Zero_int = Zero_int;
fun plus_nat (Suc m) n = plus_nat m (Suc n)
| plus_nat Zero_nat n = n;
val one_nat : nat = Suc Zero_nat;
fun nat_of_num (Bit1 n) = let
val m = nat_of_num n;
in
Suc (plus_nat m m)
end
| nat_of_num (Bit0 n) = let
val m = nat_of_num n;
in
plus_nat m m
end
| nat_of_num One = one_nat;
fun nat (Pos k) = nat_of_num k
| nat Zero_int = Zero_nat
| nat (Neg k) = Zero_nat;
fun uminus_int (Neg m) = Pos m
| uminus_int (Pos m) = Neg m
| uminus_int Zero_int = Zero_int;
fun plus_num (Bit1 m) (Bit1 n) = Bit0 (plus_num (plus_num m n) One)
| plus_num (Bit1 m) (Bit0 n) = Bit1 (plus_num m n)
| plus_num (Bit1 m) One = Bit0 (plus_num m One)
| plus_num (Bit0 m) (Bit1 n) = Bit1 (plus_num m n)
| plus_num (Bit0 m) (Bit0 n) = Bit0 (plus_num m n)
| plus_num (Bit0 m) One = Bit1 m
| plus_num One (Bit1 n) = Bit0 (plus_num n One)
| plus_num One (Bit0 n) = Bit1 n
| plus_num One One = Bit0 One;
val one_int : int = Pos One;
fun bitM One = One
| bitM (Bit0 n) = Bit1 (bitM n)
| bitM (Bit1 n) = Bit1 (Bit0 n);
fun sub (Bit0 m) (Bit1 n) = minus_int (dup (sub m n)) one_int
| sub (Bit1 m) (Bit0 n) = plus_int (dup (sub m n)) one_int
| sub (Bit1 m) (Bit1 n) = dup (sub m n)
| sub (Bit0 m) (Bit0 n) = dup (sub m n)
| sub One (Bit1 n) = Neg (Bit0 n)
| sub One (Bit0 n) = Neg (bitM n)
| sub (Bit1 m) One = Pos (Bit0 m)
| sub (Bit0 m) One = Pos (bitM m)
| sub One One = Zero_int
and plus_int (Neg m) (Neg n) = Neg (plus_num m n)
| plus_int (Neg m) (Pos n) = sub n m
| plus_int (Pos m) (Neg n) = sub m n
| plus_int (Pos m) (Pos n) = Pos (plus_num m n)
| plus_int Zero_int l = l
| plus_int k Zero_int = k
and minus_int (Neg m) (Neg n) = sub n m
| minus_int (Neg m) (Pos n) = Neg (plus_num m n)
| minus_int (Pos m) (Neg n) = Pos (plus_num m n)
| minus_int (Pos m) (Pos n) = sub m n
| minus_int Zero_int l = uminus_int l
| minus_int k Zero_int = k;
fun list_ex p [] = false
| list_ex p (x :: xs) = p x orelse list_ex p xs;
fun bex (Set xs) p = list_ex p xs;
fun snd (x1, x2) = x2;
fun fst (x1, x2) = x1;
fun next a = fst (snd a);
fun foldl f a [] = a
| foldl f a (x :: xs) = foldl f (f a x) xs;
fun foldl2 f xs a = foldl (fn aa => fn b => f b aa) a xs;
fun delta a = foldl2 (next a);
fun filter p [] = []
| filter p (x :: xs) = (if p x then x :: filter p xs else filter p xs);
fun membera A_ [] y = false
| membera A_ (x :: xs) y = eq A_ x y orelse membera A_ xs y;
fun member A_ x (Coset xs) = not (membera A_ xs x)
| member A_ x (Set xs) = membera A_ xs x;
fun removeAll A_ x [] = []
| removeAll A_ x (y :: xs) =
(if eq A_ x y then removeAll A_ x xs else y :: removeAll A_ x xs);
fun inserta A_ x xs = (if membera A_ xs x then xs else x :: xs);
fun insert A_ x (Coset xs) = Coset (removeAll A_ x xs)
| insert A_ x (Set xs) = Set (inserta A_ x xs);
fun fold f (x :: xs) s = fold f xs (f x s)
| fold f [] s = s;
fun sup_set A_ (Coset xs) a = Coset (filter (fn x => not (member A_ x a)) xs)
| sup_set A_ (Set xs) a = fold (insert A_) xs a;
val bot_set : 'a set = Set [];
fun sup_seta A_ (Set xs) = fold (sup_set A_) xs bot_set;
fun map f [] = []
| map f (x21 :: x22) = f x21 :: map f x22;
fun image f (Set xs) = Set (map f xs);
fun deltaa A_ a [] p = insert A_ p bot_set
| deltaa A_ aa (a :: w) p =
sup_seta A_ (image (deltaa A_ aa w) (next aa a p));
fun null [] = true
| null (x :: xs) = false;
fun start a = fst a;
fun fin a = snd (snd a);
fun accepts a = (fn w => fin a (delta a w (start a)));
fun acceptsa A_ a w = bex (deltaa A_ a w (start a)) (fin a);
fun or x =
(fn (ql, (dl, fl)) => fn (qr, (dr, fr)) =>
([], ((fn a => fn b =>
(case b
of [] =>
sup_set (equal_list equal_bool)
(image (fn aa => true :: aa) (dl a ql))
(image (fn aa => false :: aa) (dr a qr))
| true :: s => image (fn aa => true :: aa) (dl a s)
| false :: s => image (fn aa => false :: aa) (dr a s))),
(fn a =>
(case a of [] => fl ql orelse fr qr | true :: s => fl s
| false :: s => fr s)))))
x;
fun is_empty (Set xs) = null xs;
fun na2da A_ a =
(insert A_ (start a) bot_set,
((fn aa => fn q => sup_seta A_ (image (next a aa) q)),
(fn q => bex q (fin a))));
fun atom A_ a =
([true],
((fn b => fn s =>
(if equal_lista equal_bool s [true] andalso eq A_ b a
then insert (equal_list equal_bool) [false] bot_set else bot_set)),
(fn s => equal_lista equal_bool s [false])));
fun conc x =
(fn (ql, (dl, fl)) => fn (qr, (dr, fr)) =>
(true :: ql,
((fn a => fn b =>
(case b of [] => bot_set
| true :: s =>
sup_set (equal_list equal_bool)
(image (fn aa => true :: aa) (dl a s))
(if fl s then image (fn aa => false :: aa) (dr a qr)
else bot_set)
| false :: s => image (fn aa => false :: aa) (dr a s))),
(fn a =>
(case a of [] => false
| left :: s =>
left andalso (fl s andalso fr qr) orelse
not left andalso fr s)))))
x;
fun plus x =
(fn (q, (d, f)) =>
(q, ((fn a => fn s =>
sup_set (equal_list equal_bool) (d a s)
(if f s then d a q else bot_set)),
f)))
x;
val epsilon :
bool list * (('a -> bool list -> (bool list) set) * (bool list -> bool))
= ([], ((fn _ => fn _ => bot_set), null));
fun star a = or epsilon (plus a);
fun rexp2na A_ Zero = ([], ((fn _ => fn _ => bot_set), (fn _ => false)))
| rexp2na A_ Onea = epsilon
| rexp2na A_ (Atom a) = atom A_ a
| rexp2na A_ (Plus (r, s)) = or (rexp2na A_ r) (rexp2na A_ s)
| rexp2na A_ (Times (r, s)) = conc (rexp2na A_ r) (rexp2na A_ s)
| rexp2na A_ (Star r) = star (rexp2na A_ r);
fun apsnd f (x, y) = (x, f y);
val one : nat = one_nat;
val zero : nat = Zero_nat;
fun enabled a sigma = filter (fn x => not (is_empty (next a x sigma)));
val example_expression : nat rexp =
let
val r0 = Atom Zero_nat;
val r1 = Atom one_nat;
in
Times (Star (Plus (Times (r1, r1), r0)), Star (Plus (Times (r0, r0), r1)))
end;
fun divmod_integer k l =
(if ((k : IntInf.int) = (0 : IntInf.int))
then ((0 : IntInf.int), (0 : IntInf.int))
else (if IntInf.< ((0 : IntInf.int), l)
then (if IntInf.< ((0 : IntInf.int), k)
then IntInf.divMod (IntInf.abs k, IntInf.abs l)
else let
val (r, s) =
IntInf.divMod (IntInf.abs k, IntInf.abs l);
in
(if ((s : IntInf.int) = (0 : IntInf.int))
then (IntInf.~ r, (0 : IntInf.int))
else (IntInf.- (IntInf.~ r, (1 : IntInf.int)),
IntInf.- (l, s)))
end)
else (if ((l : IntInf.int) = (0 : IntInf.int))
then ((0 : IntInf.int), k)
else apsnd IntInf.~
(if IntInf.< (k, (0 : IntInf.int))
then IntInf.divMod (IntInf.abs k, IntInf.abs l)
else let
val (r, s) =
IntInf.divMod (IntInf.abs k, IntInf.abs l);
in
(if ((s : IntInf.int) = (0 : IntInf.int))
then (IntInf.~ r, (0 : IntInf.int))
else (IntInf.- (IntInf.~
r, (1 : IntInf.int)),
IntInf.- (IntInf.~ l, s)))
end))));
fun nat_of_integer k =
(if IntInf.<= (k, (0 : IntInf.int)) then Zero_nat
else let
val (l, j) = divmod_integer k (2 : IntInf.int);
val la = nat_of_integer l;
val lb = plus_nat la la;
in
(if ((j : IntInf.int) = (0 : IntInf.int)) then lb
else plus_nat lb one_nat)
end);
fun times_num (Bit1 m) (Bit1 n) =
Bit1 (plus_num (plus_num m n) (Bit0 (times_num m n)))
| times_num (Bit1 m) (Bit0 n) = Bit0 (times_num (Bit1 m) n)
| times_num (Bit0 m) (Bit1 n) = Bit0 (times_num m (Bit1 n))
| times_num (Bit0 m) (Bit0 n) = Bit0 (Bit0 (times_num m n))
| times_num One n = n
| times_num m One = m;
fun times_int (Neg m) (Neg n) = Pos (times_num m n)
| times_int (Neg m) (Pos n) = Neg (times_num m n)
| times_int (Pos m) (Neg n) = Neg (times_num m n)
| times_int (Pos m) (Pos n) = Pos (times_num m n)
| times_int Zero_int l = Zero_int
| times_int k Zero_int = Zero_int;
fun int_of_integer k =
(if IntInf.< (k, (0 : IntInf.int))
then uminus_int (int_of_integer (IntInf.~ k))
else (if ((k : IntInf.int) = (0 : IntInf.int)) then Zero_int
else let
val (l, j) = divmod_integer k (2 : IntInf.int);
val la = times_int (Pos (Bit0 One)) (int_of_integer l);
in
(if ((j : IntInf.int) = (0 : IntInf.int)) then la
else plus_int la one_int)
end));
end; (*struct RegExpChecker*)

View File

@ -1,7 +1,23 @@
(*************************************************************************
* Copyright (C)
* 2019 The University of Exeter
* 2018-2019 The University of Paris-Saclay
* 2018 The University of Sheffield
*
* License:
* This program can be redistributed and/or modified under the terms
* of the 2-clause BSD-style license.
*
* SPDX-License-Identifier: BSD-2-Clause
*************************************************************************)
chapter\<open>The High-Level Interface to the Automata-Library\<close>
theory RegExpInterface
imports "Functional-Automata.Execute"
imports "Functional-Automata.Execute"
keywords
"reflect_ML_exports" :: thy_decl
begin
@ -52,13 +68,13 @@ This universe of denotations is in our concrete case:\<close>
text\<open>Now the denotational semantics for regular expression can be defined on a post-card:\<close>
fun L :: "'a rexp => 'a lang"
where L_Emp : "L Zero = {}"
|L_One: "L One = {[]}"
|L_Atom: "L (\<lfloor>a\<rfloor>) = {[a]}"
|L_Un: "L (el || er) = (L el) \<union> (L er)"
|L_Conc: "L (el ~~ er) = {xs@ys | xs ys. xs \<in> L el \<and> ys \<in> L er}"
|L_Star: "L (Star e) = Regular_Set.star(L e)"
fun Lang :: "'a rexp => 'a lang"
where L_Emp : "Lang Zero = {}"
|L_One: "Lang One = {[]}"
|L_Atom: "Lang (\<lfloor>a\<rfloor>) = {[a]}"
|L_Un: "Lang (el || er) = (Lang el) \<union> (Lang er)"
|L_Conc: "Lang (el ~~ er) = {xs@ys | xs ys. xs \<in> Lang el \<and> ys \<in> Lang er}"
|L_Star: "Lang (Star e) = Regular_Set.star(Lang e)"
text\<open>A more useful definition is the sub-language - definition\<close>
@ -77,7 +93,6 @@ definition YY where "YY = na2da(rexp2na example_expression)"
value "NA.accepts (rexp2na example_expression) [0,1,1,0,0,1]"
value "DA.accepts (na2da (rexp2na example_expression)) [0,1,1,0,0,1]"
section\<open>HOL - Adaptions and Export to SML\<close>
definition enabled :: "('a,'\<sigma> set)da \<Rightarrow> '\<sigma> set \<Rightarrow> 'a list \<Rightarrow> 'a list"
@ -87,29 +102,57 @@ definition enabled :: "('a,'\<sigma> set)da \<Rightarrow> '\<sigma> set \<Right
definition zero where "zero = (0::nat)"
definition one where "one = (1::nat)"
export_code zero one Suc Int.nat nat_of_integer int_of_integer (* for debugging *)
export_code zero one Suc Int.nat nat_of_integer int_of_integer (* for debugging *)
example_expression (* for debugging *)
Zero One Atom Plus Times Star (* regexp abstract syntax *)
rexp2na na2da enabled (* low-level automata interface *)
NA.accepts DA.accepts
in SML module_name RegExpChecker
subsection\<open>Infrastructure for Reflecting exported SML code\<close>
ML\<open>
fun reflect_local_ML_exports args trans = let
fun eval_ML_context ctxt = let
fun is_sml_file f = String.isSuffix ".ML" (Path.implode (#path f))
val files = (map (Generated_Files.check_files_in (Context.proof_of ctxt)) args)
val ml_files = filter is_sml_file (map #1 (maps Generated_Files.get_files_in files))
val ml_content = map (fn f => Syntax.read_input (Bytes.content (#content f))) ml_files
fun eval ml_content = fold (fn sml => (ML_Context.exec
(fn () => ML_Context.eval_source ML_Compiler.flags sml)))
ml_content
in
(eval ml_content #> Local_Theory.propagate_ml_env) ctxt
end
in
Toplevel.generic_theory eval_ML_context trans
end
val files_in_theory =
(Parse.underscore >> K [] || Scan.repeat1 Parse.path_binding) --
Scan.option (\<^keyword>\<open>(\<close> |-- Parse.!!! (\<^keyword>\<open>in\<close>
|-- Parse.theory_name --| \<^keyword>\<open>)\<close>));
val _ =
Outer_Syntax.command \<^command_keyword>\<open>reflect_ML_exports\<close>
"evaluate generated Standard ML files"
(Parse.and_list1 files_in_theory >> (fn args => reflect_local_ML_exports args));
\<close>
reflect_ML_exports _
in SML module_name RegExpChecker
file "RegExpChecker.sml" (* writing it to a file *)
(* potentially susceptible to race conditions ... *)
SML_file "RegExpChecker.sml" (* reads and eval generated file
into SML toplevel *)
SML_export \<open>structure RegExpChecker = RegExpChecker\<close> (* copies from SML toplevel into
Isabelle/ML toplevel *)
section\<open>The Abstract Interface For Monitor Expressions\<close>
text\<open>Here comes the hic : The reflection of the HOL-Automata module into an SML module
with an abstract interface hiding some generation artefacts like the internal states
of the deterministic automata ...\<close>
ML\<open>
structure RegExpInterface : sig
@ -135,7 +178,7 @@ local open RegExpChecker in
type automaton = state * ((Int.int -> state -> state) * (state -> bool))
val add_atom = fold_aterms (fn Const(c as(_,Type(@{type_name "rexp"},_)))=> insert (op=) c |_=>I);
val add_atom = fold_aterms (fn Const (c as (_, \<^Type>\<open>rexp _\<close>)) => insert (op=) c | _=> I);
fun alphabet termS = rev(map fst (fold add_atom termS []));
fun ext_alphabet env termS =
let val res = rev(map fst (fold add_atom termS [])) @ env;
@ -144,14 +187,14 @@ local open RegExpChecker in
else ()
in res end;
fun conv (Const(@{const_name "Regular_Exp.rexp.Zero"},_)) _ = Zero
|conv (Const(@{const_name "Regular_Exp.rexp.One"},_)) _ = Onea
|conv (Const(@{const_name "Regular_Exp.rexp.Times"},_) $ X $ Y) env = Times(conv X env, conv Y env)
|conv (Const(@{const_name "Regular_Exp.rexp.Plus"},_) $ X $ Y) env = Plus(conv X env, conv Y env)
|conv (Const(@{const_name "Regular_Exp.rexp.Star"},_) $ X) env = Star(conv X env)
|conv (Const(@{const_name "RegExpInterface.opt"},_) $ X) env = Plus(conv X env, Onea)
|conv (Const(@{const_name "RegExpInterface.rep1"},_) $ X) env = Times(conv X env, Star(conv X env))
|conv (Const (s, Type(@{type_name "rexp"},_))) env =
fun conv \<^Const_>\<open>Regular_Exp.rexp.Zero _\<close> _ = Zero
|conv \<^Const_>\<open>Regular_Exp.rexp.One _\<close> _ = Onea
|conv \<^Const_>\<open>Regular_Exp.rexp.Times _ for X Y\<close> env = Times(conv X env, conv Y env)
|conv \<^Const_>\<open>Regular_Exp.rexp.Plus _ for X Y\<close> env = Plus(conv X env, conv Y env)
|conv \<^Const_>\<open>Regular_Exp.rexp.Star _ for X\<close> env = Star(conv X env)
|conv \<^Const_>\<open>RegExpInterface.opt _ for X\<close> env = Plus(conv X env, Onea)
|conv \<^Const_>\<open>RegExpInterface.rep1 _ for X\<close> env = Times(conv X env, Star(conv X env))
|conv (Const (s, \<^Type>\<open>rexp _\<close>)) env =
let val n = find_index (fn x => x = s) env
val _ = if n<0 then error"conversion error of regexp." else ()
in Atom(n) end
@ -196,3 +239,4 @@ end (* struct *)
no_notation Atom ("\<lfloor>_\<rfloor>")
end

View File

@ -6,16 +6,15 @@
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\NeedsTeXFormat{LaTeX2e}\relax
\ProvidesPackage{DOF-COL}
[0000/00/00 Unreleased v0.0.0+%
Document-Type Support Framework for Isabelle.]
[00/00/0000 Document-Type Support Framework for Isabelle.]
\RequirePackage{DOF-core}
@ -55,6 +54,7 @@
\newisadof{side_by_side_figure.Isa_COL.side_by_side_figure}%
[label=,type=%
,Isa_COL.figure.relative_width=%
,Isa_COL.figure.placement=%
,Isa_COL.figure.src=%
,Isa_COL.side_by_side_figure.anchor=%
,Isa_COL.side_by_side_figure.caption=%

View File

@ -0,0 +1,25 @@
%% Copyright (C) 2021 University of Exeter
%% 2021 University of Paris-Saclay
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\NeedsTeXFormat{LaTeX2e}\relax
\ProvidesPackage{DOF-amssymb}
[00/00/0000 Document-Type Support Framework for Isabelle (amssymb wrapper for lualatex/pdflatex).]
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage{amssymb}
\else % if luatex or xetex
\usepackage{unicode-math}
\usepackage{latexsym}
\fi

View File

@ -6,36 +6,43 @@
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
\NeedsTeXFormat{LaTeX2e}\relax
\ProvidesPackage{DOF-core}
[0000/00/00 Unreleased v0.0.0+%
Document-Type Support Framework for Isabelle.]
[00/00/0000 Document-Type Support Framework for Isabelle.]
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,USenglish]{babel}
\RequirePackage{keycommand}
\RequirePackage{environ}
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{xspace}
\RequirePackage{etoolbox}
\RequirePackage{fp}
\usepackage{amsmath}
\usepackage{DOF-amssymb}
\newcommand{\isabelleurl}{UNDEFINED}
\newcommand{\dofurl}{UNDEFINED}
\newcommand{\dof@isabelleversion}{UNDEFINED}
\newcommand{\isabellefullversion}{UNDEFINED\xspace}
\newcommand{\dof@version}{UNDEFINED}
\newcommand{\dof@artifacturl}{UNDEFINED}
\usepackage{isabelle}
\usepackage{isabellesym}
%%% CONFIG %%%
\isabellestyle{it}
\RequirePackage{dof-config}
\newcommand{\isabelleversion}{\dof@isabelleversion\xspace}
\newcommand{\dofversion}{\dof@version\xspace}
\newcommand{\isadofversion}{\dofversion/\isabelleversion\xspace}
\newcommand{\isadofversion}{\dofversion/\isabelleversion}
\newcommand{\isadoflatestversion}{\doflatestversion/\isabellelatestversion}
\newcommand{\isadofdir}{Isabelle_DOF-\dof@version_\dof@isabelleversion}
\newcommand{\isadofdirn}{Isabelle\_DOF-\dof@version\_\dof@isabelleversion}
\newcommand{\isadofarchive}{\isadofdir.tar.xz}
@ -149,5 +156,12 @@
% begin: label and ref
\newisadof{label}[label=,type=][1]{\label{#1}}
\newisadof{ref}[label=,type=][1]{\autoref{#1}}
\newisadof{macroDef}[label=,type=][1]{MMM \label{#1}} %% place_holder
\newisadof{macroExp}[label=,type=][1]{MMM \autoref{#1}} %% place_holder
% end: label and ref
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{No Title Given}
\author{No Author Given}
\input{ontologies}
\IfFileExists{preamble.tex}{\input{preamble.tex}}{}%

View File

@ -1,16 +1,19 @@
session "Isabelle_DOF" = "Functional-Automata" +
options [document = pdf, document_output = "output"]
options [document = pdf, document_output = "output", document_build = dof]
sessions
"Regular-Sets"
directories
"DOF"
"ontologies"
"ontologies/CENELEC_50128"
"ontologies/Conceptual"
"ontologies/scholarly_paper"
"ontologies/small_math"
"ontologies/technical_report"
"ontologies/CC_v3_1_R5"
theories
"DOF/Isa_DOF"
"ontologies/ontologies"
export_classpath
session "Isabelle_DOF-tests" = "Isabelle_DOF" +
options [document = false]
theories
"tests/AssnsLemmaThmEtc"
"tests/Concept_ExampleInvariant"
"tests/Concept_Example"
"tests/InnerSyntaxAntiquotations"
"tests/Attributes"

1
src/ROOTS Normal file
View File

@ -0,0 +1 @@
tests

View File

@ -1,150 +0,0 @@
#/usr/bin/env bash
# Copyright (c) 2019 University of Exeter
# 2018-2019 University of Paris-Saclay
# 2018-2019 The University of Sheffield
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-2-Clause
#
# DESCRIPTION: prepare session root directory with DOF setup
## diagnostics
PRG="$(basename "$0")"
function usage()
{
echo
echo "Usage: isabelle $PRG [OPTIONS] [DIR]"
echo
echo " Options are:"
echo " -h print this help text and exit"
echo " -n NAME alternative session name (default: DIR base name)"
echo " -o ONTOLOGY (default: $DEFAULT_ONTOLOGY)"
echo " Available ontologies:"
for t in "$ISABELLE_HOME_USER/DOF/latex/"*.sty; do
if [[ $t =~ DOF-(.*).sty$ ]]; then
echo " * ${BASH_REMATCH[1]}"
fi
done
echo " -t TEMPLATE (default: $DEFAULT_TEMPLATE)"
echo " Available document templates:"
for t in "$ISABELLE_HOME_USER/DOF/document-template/"*.tex; do
if [[ $t =~ root-(.*).tex$ ]]; then
echo " * ${BASH_REMATCH[1]}"
fi
done
echo
echo " Prepare session root DIR (default: current directory)."
echo
exit 1
}
function fail()
{
echo "$1" >&2
exit 2
}
## process command line
# options
NAME=""
DEFAULT_TEMPLATE="scrartcl"
DEFAULT_ONTOLOGY="scholarly_paper"
TEMPLATE="$DEFAULT_TEMPLATE"
ONTOLOGY="$DEFAULT_ONTOLOGY"
while getopts "t:o:n:dh" OPT
do
case "$OPT" in
h)
usage
exit 1
;;
n)
NAME="$OPTARG"
;;
o)
if [ ! -f "$ISABELLE_HOME_USER/DOF/latex/DOF-$OPTARG.sty" ]; then
echo "ERROR: Ontology $OPTARG not available!"
exit 1
fi
ONTOLOGY="$ONTOLOGY $OPTARG"
;;
t)
TEMPLATE="$OPTARG"
if [ ! -f "$ISABELLE_HOME_USER/DOF/document-template/root-$TEMPLATE.tex" ]; then
echo "ERROR: Template $TEMPLATE not available!"
exit 1
fi
;;
\?)
usage
exit 0
;;
esac
done
shift $(($OPTIND - 1))
# args
if [ "$#" -eq 0 ]; then
DIR="."
elif [ "$#" -eq 1 ]; then
DIR="$1"
shift
else
usage
fi
if [ -z "$NAME" ]; then
NAME="$DIR"
fi
$ISABELLE_TOOL mkroot -n "$NAME" "$DIR"
echo " \"preamble.tex\"" >> "$DIR"/ROOT
echo " \"build\"" >> "$DIR"/ROOT
sed -i -e "s/root.tex/isadof.cfg/" "$DIR"/ROOT
sed -i -e "s/HOL/Isabelle_DOF/" "$DIR"/ROOT
rm -f "$DIR"/document/root.tex
# Creating isadof.cfg
echo "Template: $TEMPLATE" > "$DIR"/document/isadof.cfg
cp "$ISABELLE_HOME_USER/DOF/document-template/build" "$DIR"/document/
for o in $ONTOLOGY; do
echo "Ontology: $o" >> "$DIR"/document/isadof.cfg;
done
# Creating praemble.tex
TITLE=$(echo "$NAME" | tr _ - | tr -d '\\')
AUTHOR=$(echo "By $USER" | tr _ - | tr -d '\\')
echo "%% This is a placeholder for user-specific configuration and packages." >> "$DIR"/document/preamble.tex
echo "\\title{$TITLE}{}{}{}{}{}{}" >> "$DIR"/document/preamble.tex
echo "\\author{$AUTHOR}{}{}{}{}{}" >> "$DIR"/document/preamble.tex

View File

@ -1,16 +1,16 @@
%% Copyright (c) 2019 University of Exeter
%% 2018-2019 University of Paris-Saclay
%% Copyright (c) 2019-2022 University of Exeter
%% 2018-2022 University of Paris-Saclay
%% 2018-2019 The University of Sheffield
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
%% Warning: Do Not Edit!
%% =====================
@ -23,28 +23,11 @@
%% preamble.tex.
\documentclass[submission,copyright,creativecommons]{eptcs}
\bibliographystyle{eptcs}% the mandatory bibstyle
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[USenglish]{babel}
\usepackage{isabelle}
%\usepackage{underscore}
\usepackage{xcolor}
\usepackage{isabellesym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[numbers, sort&compress, sectionbib]{natbib}
\IfFileExists{DOF-core.sty}{}{%
\PackageError{DOF-core}{Isabelle/DOF not installed.
This is a Isabelle_DOF project. The document preparation requires
the Isabelle_DOF framework. Please obtain the framework by cloning
the Isabelle_DOF git repository, i.e.:
"git clone <isadofurl>"
You can install the framework as follows:
"cd Isabelle_DOF/document-generator && ./install"}{%
For further help, see <isadofurl>}
}
\usepackage{DOF-core}
\bibliographystyle{eptcs}% the mandatory bibstyle
\usepackage[numbers, sort&compress, sectionbib]{natbib}
\newcommand{\subtitle}[1]{%
\PackageError{DOF-eptcs-UNSUPPORTED}
{The LaTeX class eptcs does not support subtitles.}
@ -54,7 +37,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% provide an alternative definition of
% begin: scholarly_paper.author
\RequirePackage{DOF-core}
\newcommand{\dofeptcsinstitute}[1]{\mbox{}\\\protect\scriptsize%
\protect\begin{tabular}[t]{@{\protect\footnotesize}c@{}}%
#1%
@ -80,15 +62,15 @@
\makeatother
% end: scholarly_paper.author
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{ontologies}
\IfFileExists{preamble.tex}{\input{preamble.tex}}{}%
\begin{document}
\maketitle
\input{session}
% optional bibliography
\IfFileExists{root.bib}{{\bibliography{root}}}{}
\IfFileExists{root.bib}{%
\bibliography{root}
}{}
\end{document}
%%% Local Variables:

View File

@ -1,47 +1,33 @@
%% Copyright (c) 2019 University of Exeter
%% 2018-2019 University of Paris-Saclay
%% Copyright (c) 2019-2022 University of Exeter
%% 2018-2022 University of Paris-Saclay
%% 2018-2019 The University of Sheffield
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
%% Warning: Do Not Edit!
%% =====================
%% This is the root file for the Isabelle/DOF using the lipics class.
%% Note that lipics cannot be distributed as part of Isabelle/DOF; you need
%% to download lipics.cls from
%% Note that lipics cannot is *not* distributed as part of Isabelle/DOF;
%% you need to download lipics.cls from
%% https://www.dagstuhl.de/en/publications/lipics/instructions-for-authors/
%% and add it manually to the praemble.tex and the ROOT file.
%%
%% All customization and/or additional packages should be added to the file
%% preamble.tex.
\documentclass[a4paper,USenglish,cleveref, autoref]{lipics-v2019}
\documentclass[a4paper,UKenglish,cleveref, autoref,thm-restate]{lipics-v2021}
\bibliographystyle{plainurl}% the mandatory bibstyle
\usepackage{isabelle}
\usepackage{isabellesym}
% \usepackage{amsmath}
% \usepackage{amssymb}
\usepackage[numbers, sort&compress, sectionbib]{natbib}
\IfFileExists{DOF-core.sty}{}{%
\PackageError{DOF-core}{Isabelle/DOF not installed.
This is a Isabelle_DOF project. The document preparation requires
the Isabelle_DOF framework. Please obtain the framework by cloning
the Isabelle_DOF git repository, i.e.:
"git clone <isadofurl>"
You can install the framework as follows:
"cd Isabelle_DOF/document-generator && ./install"}{%
For further help, see <isadofurl>}
}
\usepackage{DOF-core}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% provide an alternative definition of
@ -67,24 +53,21 @@
\makeatother
% end: scholarly_paper.author
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{ontologies}
\renewcommand{\DOFauthor}{}
\renewcommand{\DOFinstitute}{}
\expandafter\newcommand\csname 2authand\endcsname{}
\expandafter\newcommand\csname 3authand\endcsname{}
\expandafter\newcommand\csname 4authand\endcsname{}
\IfFileExists{preamble.tex}{\input{preamble.tex}}{}%
\begin{document}
\maketitle
\input{session}
% optional bibliography
\IfFileExists{root.bib}{%
{\small
\small
\bibliography{root}
}}{}
}{}
\end{document}
%%% Local Variables:

View File

@ -1,52 +1,29 @@
%% Copyright (c) 2019 University of Exeter
%% 2018-2019 University of Paris-Saclay
%% Copyright (c) 2019-2022 University of Exeter
%% 2018-2022 University of Paris-Saclay
%% 2018-2019 The University of Sheffield
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1.0+ OR BSD-2-Clause
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
%% Warning: Do Not Edit!
%% =====================
%% This is the root file for the Isabelle/DOF using the lncs class.
%% Note that lncs cannot be distributed as part of Isabelle/DOF; you need
%% to download lncs.cls from
%% https://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines
%% and add it manually to the praemble.tex and the ROOT file.
%%
%% All customization and/or additional packages should be added to the file
%% preamble.tex.
\RequirePackage{ifvtex}
\documentclass{llncs}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[USenglish]{babel}
\usepackage{isabelle}
\usepackage{xcolor}
\usepackage{isabellesym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[numbers, sort&compress, sectionbib]{natbib}
\IfFileExists{DOF-core.sty}{}{%
\PackageError{DOF-core}{Isabelle/DOF not installed.
This is a Isabelle_DOF project. The document preparation requires
the Isabelle_DOF framework. Please obtain the framework by cloning
the Isabelle_DOF git repository, i.e.:
"git clone <isadofurl>"
You can install the framework as follows:
"cd Isabelle_DOF/document-generator && ./install"}{%
For further help, see <isadofurl>}
}
\input{ontologies}
\IfFileExists{preamble.tex}{\input{preamble.tex}}{}%
\usepackage{graphicx}
\usepackage{DOF-core}
\bibliographystyle{splncs04}
\usepackage{hyperref}
\setcounter{tocdepth}{3}
\hypersetup{%
@ -58,8 +35,7 @@
} % more detailed digital TOC (aka bookmarks)
\sloppy
\allowdisplaybreaks[4]
\urlstyle{rm}
\isabellestyle{it}
\usepackage[caption]{subfig}
\usepackage[size=footnotesize]{caption}
@ -74,17 +50,6 @@
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Overrides the (rightfully issued) warning by Koma Script that \rm
%%% etc. should not be used (they are deprecated since more than a
%%% decade)
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\selectlanguage{USenglish}%
\renewcommand{\bibname}{References}%
@ -100,17 +65,10 @@
\maketitle
\maketitle
\input{session}
% optional bibliography
\IfFileExists{root.bib}{%
{\small \renewcommand{\doi}[1]{}
\newcommand{\urlprefix}{}
\bibliographystyle{spmpscinat}
\bibliography{root}
}}{}
\IfFileExists{root.bib}{{\small\bibliography{root}}}{}
\end{document}
%%% Local Variables:

View File

@ -1,16 +1,16 @@
%% Copyright (c) 2019 University of Exeter
%% 2018-2019 University of Paris-Saclay
%% Copyright (c) 2019-2022 University of Exeter
%% 2018-2022 University of Paris-Saclay
%% 2018-2019 The University of Sheffield
%%
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% version 1.3c of the License, or (at your option) any later version.
%% OR
%% The 2-clause BSD-style license.
%%
%% SPDX-License-Identifier: LPPL-1
%%
%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause
%% Warning: Do Not Edit!
%% =====================
@ -20,31 +20,17 @@
%% preamble.tex.
\RequirePackage{ifvtex}
\documentclass[fontsize=11pt,DIV=12,paper=a4]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\documentclass[abstract=true,fontsize=11pt,DIV=12,paper=a4]{scrartcl}
\usepackage{DOF-core}
\usepackage{textcomp}
\bibliographystyle{abbrvnat}
\usepackage[english]{babel}
\RequirePackage[caption]{subfig}
\usepackage{isabelle}
\usepackage{isabellesym}
\IfFileExists{DOF-core.sty}{}{%
\PackageError{DOF-core}{Isabelle/DOF not installed.
This is a Isabelle_DOF project. The document preparation requires
the Isabelle_DOF framework. Please obtain the framework by cloning
the Isabelle_DOF git repository, i.e.:
"git clone <isadofurl>"
You can install the framework as follows:
"cd Isabelle_DOF/document-generator && ./install"}{%
For further help, see <isadofurl>}
}
\input{ontologies}
\IfFileExists{preamble.tex}{\input{preamble.tex}}{}%
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[numbers, sort&compress, sectionbib]{natbib}
\usepackage{graphicx}
\usepackage{hyperref}
\setcounter{tocdepth}{3}
\hypersetup{%
@ -56,30 +42,16 @@
} % more detailed digital TOC (aka bookmarks)
\sloppy
\allowdisplaybreaks[4]
\urlstyle{rm}
\isabellestyle{it}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Overrides the (rightfully issued) warning by Koma Script that \rm
%%% etc. should not be used (they are deprecated since more than a
%%% decade)
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{frontmatter}{}{}
\begin{document}
\begin{frontmatter}
\maketitle
\tableofcontents
\end{frontmatter}
\input{session}
% optional bibliography
\IfFileExists{root.bib}{%
\bibliography{root}
}{}
\IfFileExists{root.bib}{{\bibliography{root}}}{}
\end{document}
%%% Local Variables:

Some files were not shown because too many files have changed in this diff Show More