Commit Graph

105 Commits

Author SHA1 Message Date
Corey Lewis 5120e351b3 lib: improve wp tracing
When tracing wp can now print the instantiated version of the rules being used.
It also says which set each used rule is from.
2020-01-29 09:26:18 +11:00
Corey Lewis dd48e0d899 proof: update for wp changes
Updated 'wp_once' to 'wp (once)' and removed several stray uses of 'wp_trace'.
2019-10-14 17:12:18 +11:00
Japheth Lim de97108f14 autocorres: exhaustive testsuite for arithmetic op word abstraction 2019-07-24 10:48:13 +10:00
Japheth Lim 50e79b0fdb autocorres: exhaustive testsuite for bitwise op word abstraction 2019-07-24 10:48:13 +10:00
Japheth Lim 5685af2bcb autocorres: word abs for bitwise operators
This adds translation rules for bitwise operators, along with suitable
guards. Note that the guard for signed `shiftl` follows the C standard,
rather than the incorrect c-parser guard (see VER-509).

There was no standard instance of `nat :: bit_operations` for unsigned
abstraction, so we also add one. It should be merged with the
(incomplete) HaskellLib instance later.

Closes Jira VER-1122.
2019-07-24 10:41:55 +10:00
Japheth Lim ec74efcb9e autocorres: fix bug between heap abs and signed word abs
Jira VER-1112
2019-07-10 13:59:53 +10:00
Gerwin Klein ea831ceb5c autocorres tests: port to Isabelle2019 2019-06-13 16:22:33 +10:00
Gerwin Klein b812c74c00 autocorres SchorrWaite example: clean up and update to Isabelle2019 2019-06-13 16:22:33 +10:00
Gerwin Klein 1cbefe0eb7 autocorres: update cartouches for Isabelle2019 2019-06-13 16:22:33 +10:00
Japheth Lim 1b4c3d06cf autocorres: fix external_file declaration 2018-09-26 17:08:34 +10:00
Gerwin Klein 1383f4ceee Isabelle2018 autocorres: declare external files 2018-08-20 09:06:37 +10:00
Gerwin Klein d4738b079f Isabelle2018: AutoCorresTest 2018-08-20 09:06:36 +10:00
Gerwin Klein 6b9d9d24dd Isabelle2018: new "op x" syntax; now is "(x)"
(result of "isabelle update_op -m <dir>")
2018-08-20 09:06:35 +10:00
Gerwin Klein 011e08458e Isabelle2018: new comment syntax
(result of "isabelle update_comments <dirs>")
2018-08-20 09:06:35 +10:00
Gerwin Klein b5cdf4703f globally use session-qualified imports; add Lib session
Session-qualified imports will be required for Isabelle2018 and help clarify
the structure of sessions in the build tree.

This commit mainly adds a new set of sessions for lib/, including a Lib
session that includes most theories in lib/ and a few separate sessions for
parts that have dependencies beyond CParser or are separate AFP sessions.
The group "lib" collects all lib/ sessions.

As a consequence, other theories should use lib/ theories by session name,
not by path, which in turns means spec and proof sessions should also refer
to each other by session name, not path, to avoid duplicate theory errors in
theory merges later.
2018-08-20 09:06:34 +10:00
Thomas Sewell b0f2217af4 lib/wp: Remove old wp combinator rules.
These combinator rules do something like what wp_pre does now.

They were helpful in the ancient past, but now that wp_pre exists it is
much better to just use automation.
2018-03-16 14:51:31 +11:00
Matthew Brecknell 5267e6f178 Isabelle2017: update AutoCorresTest for RC0 2017-10-30 12:23:26 +11:00
Pang Luo 6b9912c47a manually adjust non-obvious cases of tab to space replacement 2017-10-20 14:22:36 +11:00
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
Matthew Brecknell 238e8b307e x64: merge master 2017-07-21 11:27:12 +10:00
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10:00
Matthew Brecknell 2f4b822da9 x64: configure arch-specific array types 2017-06-22 17:24:53 +10:00
Matthew Brecknell 58efe0804f autocorres: support 64-bit platforms
* Consistently use the c-parser 'addr' type alias for pointer values.
* Include word abstraction and polish for 64-bit integral types.
* Include all current c-parser platforms in release packaging scripts.

More work is required to properly abstract AutoCorres tests across
architectures. The tests currently pass for both ARM and X64.  However,
in a number of tests, we exploit the coincidences that 'int' is the same
size on both platforms (32 bits), and that 'long' is the same as the
pointer size on each platform (32 bits and 64 bits, respectively).
2017-04-03 14:46:53 +10:00
Gerwin Klein 47119bf43e wp_cleanup: update proofs for new wp behaviour
The things that usually go wrong:
  - wp fall through: add +, e.g.
      apply (wp select_wp) -> apply (wp select_wp)+

  - precondition: you can remove most hoare_pre, but wpc still needs it, and
    sometimes the wp instance relies on being able to fit a rule to the
    current non-schematic precondition. In that case, use "including no_pre"
    to switch off the automatic hoare_pre application.

  - very rarely there is a schematic postcondition that interferes with the
    new trivial cleanup rules, because the rest of the script assumes some
    specific state afterwards (shouldn't happen in a reasonable proof, but
    not all proofs are reasonable..). In that case, (wp_once ...)+ should
    emulate the old behaviour precisely.
2017-01-13 14:04:15 +01:00
Matthew Brecknell bd94f7907e Isabelle2016-1: fix miscellaneous proofs 2017-01-05 14:27:30 +11:00
Matthew Brecknell 511c6b2d3a Isabelle2016-1: rename free variables to avoid capture 2017-01-05 14:24:36 +11:00
Matthew Brecknell 7d0425dd3e Isabelle2016-1: fix proofs using lemmas now removed
Some lemmas that were specific instances of more general lemmas have
been removed from the library. In most cases, broken references could
simply be replaced with the more general fact.
2017-01-05 14:23:11 +11:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Matthew Brecknell 4905a589bf trivial: remove some uses of find_theorems 2016-12-13 22:10:31 +11:00
Alejandro Gomez-Londono 93adccc141 license-tool: missing license headers + .licenseignore [VER-551] 2016-07-14 16:34:31 +10:00
Japheth Lim 8b598d08a0 autocorres: add acceptance tests for corner cases in name handling 2016-06-30 15:20:41 +10:00
Japheth Lim 0afb748b1b autocorres: fix up remaining failures in test suite (all typo level) 2016-06-30 10:00:39 +10:00
Japheth Lim 162a2266a1 autocorres: revert debugging slag in testsuite 2016-06-30 10:00:39 +10:00
Japheth Lim 6b72212597 WIP: autocorres: make trace results available again
This changes the interface to access traces, making the underlying
symtabs explicit.
2016-06-30 10:00:39 +10:00
Japheth Lim b7c354f798 autocorres: actually check results of type strengthening demo 2016-06-30 10:00:39 +10:00
Japheth Lim a933c6b7b7 autocorres: update FunctionInfo demo theory 2016-06-30 10:00:39 +10:00
Japheth Lim 3a3a8b4983 WIP: autocorres: remove some debugging code 2016-06-30 10:00:39 +10:00
Japheth Lim b8a1743148 WIP: autocorres: more incremental translation fixes; update a testcase 2016-06-30 10:00:39 +10:00
Japheth Lim 1181b9bc1f WIP: autocorres: restore incremental translation behaviour
The incremental translation demo in crefine has not been updated yet.
2016-06-30 10:00:39 +10:00
Japheth Lim 8c7524405b WIP: autocorres: start merging new code back into autocorres.ML 2016-06-30 10:00:39 +10:00
Japheth Lim 6c35cf176a trivial: autocorres: refactor symtab_merge 2016-06-30 10:00:39 +10:00
Japheth Lim 6ce286e3b6 WIP: autocorres: refactor result sequence type 2016-06-30 10:00:39 +10:00
Japheth Lim a4e2a85397 WIP: autocorres: detect splitting of recursive groups; misc fixes
The topology of recursive function groups can change due to dead code
elimination. This used to be handled (buggily, after define stages) by
the old code. This commit attempts to handle it properly (between convert
and define stages), using a new variant of the Seq data structure.
(Still not done for TS, though.)

Also (literally) fixes many free variables that used to be unhygienic.

Also makes the L2,HL,WA dataflow more uniform (but not yet refactored).
2016-06-30 10:00:39 +10:00
Japheth Lim bbf889882e WIP: autocorres: VER-517 prototype for heap lifting
Heap lifting is annoying because we need to join all intermediate L2 results
before defining the lifted heap and proving heap lemmas.
This has been refactored into a new prepare_heap_lift stage that runs between
L2 conversion and HL proper.
2016-06-30 10:00:38 +10:00
Japheth Lim 08c3475a09 WIP: autocorres: crude VER-517 prototypes for WA and TS phases
HL is still pending; the new code also needs to be refactored itself.
2016-06-30 10:00:38 +10:00
Japheth Lim 84cb9deaf8 WIP: autocorres: split up function_info data structures
With this we move away from a global mutable fn_info; instead we will
use a table of persistent (lazy) entries for each phase.
Function call metadata is also now either stored locally or recomputed
on-demand for each stage (with a few TODOs).
2016-06-30 10:00:38 +10:00
Japheth Lim 2caf6520e5 WIP: autocorres: draft of more modular dependencies for L1, L2
Prototype for Jira VER-517.
2016-06-30 10:00:38 +10:00
Japheth Lim 3400debdc2 autocorres: add test case for Jira issue VER-591 2016-06-29 14:48:16 +10:00
Japheth Lim 21a420dfad autocorres: add example for N. Suzuki's proof challenge
This is basically a regression test for David G's claim that the
AutoCorres output can be verified by "auto". Fortunately still true.
2016-06-02 16:50:03 +10:00
Japheth Lim 55cb03af41 autocorres: demangle variable names better
Not perfect yet, but does fix issue VER-351.
2016-06-02 16:50:03 +10:00