Commit Graph

308 Commits

Author SHA1 Message Date
Michael Norrish 6b5d1b5e5d Allow empty top-level declarations, consisting of bare semi 2016-09-09 14:14:32 +10:00
Matthew Brecknell 28c0c2ed1e merge master into c-parser multi_arch_refactor 2016-09-02 23:40:44 +10:00
Matthew Brecknell 034232a704 trivial: remove debug tracing code 2016-09-02 23:38:40 +10:00
Matthew Brecknell 945ee811c3 CParser multi_arch_refactor: build standalone parser in dir named after arch
Architecture names follow L4V_ARCH-style naming conventions ('ARM', 'FAKE64').
However, the standalone parser does not make use of the L4V_ARCH environment
variable.

The standalone-parser Makefile builds all architectures at once, producing
binaries at 'ARM/c-parser', 'FAKE64/c-parser', and similarly for the tokenizer.

There are also wrapper scripts 'c-parser' and 'tokenizer' in the
standalone-parser directory, which take an architecture on the command line.

The make_munge.sh script calls the appropriate binary parser directly.
2016-09-02 23:38:40 +10:00
Thomas Sewell 2515f8c2e0 Allow use of previous enum values in enums.
This is apparently valid C:
enum {
  One,
  Two = One + 1,
};

It's easy to support this by using the partially modified enum
environment in evaluation of the following right hand sides.
2016-09-02 13:58:57 +10:00
Matthew Brecknell 886fe0ef12 CParser multi_arch_refactor: fix tokenizer build 2016-09-01 12:35:33 +10:00
Matthew Brecknell 5f501b09a9 CParser multi_arch_refactor: add license headers to new files 2016-08-31 16:25:46 +10:00
Matthew Brecknell 86e8cd4a33 CParser multi_arch_refactor: fix broken factorial test
Another case requiring simplification with ucast_id.
2016-08-31 16:24:28 +10:00
Michael Norrish 4062decf79 Merge branch 'sort-munge-output' into multi_arch_refactor 2016-08-17 10:42:38 +10:00
Michael Norrish af1c77243b c-parser: fix list sorting to use Isabelle code
This makes the licensing situation clearer than with the code coming
from Moscow ML (which might conceivably be GPL).
2016-08-17 10:38:21 +10:00
Michael Norrish 936caa2e4f c-parser: multi_arch_refactor: merge with master
factorial regression test does not succeed.
2016-08-15 11:30:24 +10:00
Michael Norrish 7da160d23b Create standalone parser per architecture
Also include a wrapper that calls any of them in a completely
straightforward way.
2016-08-13 17:24:49 +10:00
Michael Norrish e321cae1b3 c-parser: sort munge output 2016-08-12 09:41:16 +10:00
Alejandro Gomez-Londono 7c13256d89 license-tool: .licenseignore update + some fixes [VER-551] 2016-07-20 18:01:35 +10:00
Alejandro Gomez-Londono 7724dff916 test_munge.sh updated to print diff of symbols and kernel [VER-584] 2016-07-14 16:34:55 +10:00
Alejandro Gomez-Londono 93adccc141 license-tool: missing license headers + .licenseignore [VER-551] 2016-07-14 16:34:31 +10:00
Alejandro Gomez-Londono 6991fab7e8 c-parser: allow_underscore_idents flag added + examples [VER-619][NO_PROOF] 2016-07-12 12:07:53 +10:00
Alejandro Gomez-Londono 89b64646ec test_munge.sh and make_munge.sh updated to support
the new --ast flag in c-parser [VER-584][VER-512][NO_PROOF]
2016-07-06 16:59:37 +10:00
Thomas Sewell 50ab074d71 Tweak serial code, don't reference print.
The function print isn't in scope in the Isabelle environment.
2016-07-05 17:37:14 +10:00
Thomas Sewell 20c50e46b0 Finish serialisation code for AST. 2016-07-05 17:37:14 +10:00
Thomas Sewell 0490bcba6a Start of AST-dump analysis for c-parser.
Give the standalone c-parser the facility to dump out its internal AST. Only
half finished, I got bored writing serialisers for the many syntax datatypes.

There has been some discussion about how to check whether an seL4 change
impacts verification. My thought was that the obvious thing to check is the
C-parser's AST. If this is unchanged, then further analyses must be unchanged.
2016-07-05 17:37:14 +10:00
Alejandro Gomez-Londono 495665e3c9 Munge make/test scripts 2016-06-21 14:50:04 +10:00
Michael Norrish a344d156c6 c-parser: make munge_info available from standalone-parser
Specification of file to emit to is via command-line switch.  Take the
opportunity to make comand-line processing be done via GetOpt library.

JIRA VER-473
2016-06-14 12:39:03 +10:00
Japheth Lim 40570bc4fe regression: add test to check theory import paths
This commit also fixes all bad imports reported by the test script.
Jira issue VER-560
2016-05-27 16:17:13 +10:00
Joel Beeren 6a2692abc6 lib: fix theory includes for arch-splitted WordSetup 2016-05-20 12:31:10 +10:00
Gerwin Klein 322f1023f5 word_lib: adjust theory dependencies 2016-05-16 21:11:40 +10:00
Gerwin Klein f0faa90f8a lib/spec/proof/tools: fix word change fallout 2016-05-16 21:11:40 +10:00
Gerwin Klein 84b923a677 lib: start disentangling spaghetti word dependencies 2016-05-16 21:11:40 +10:00
Sophie Taylor a652ec7697 Adding regression test for c-parser JIRA bug VER-550 2016-05-16 14:59:47 +10:00
Michael Norrish 41f12cf570 Merge branch 'master' into multi_arch_refactor 2016-05-12 15:35:25 +10:00
Michael Norrish ecc1f03735 c-parser: fix broken regression tests
Something I've done seems to now require simplification with ucast_id to
make proofs go through in these old, old and disgusting tests.
2016-05-11 16:37:20 +10:00
Michael Norrish e86c60c698 c-parser: fix architecture refactor bugs arising
- the symbol table constant had a hard map to word32 instead of the addr
  alias
- when cast to integers, the parser believed pointers gave rise to 32
  bit values. This latter required the TargetNumbers signature to get a
  smidge wider, with a new ptr_t entry where the intptr type gets
  listed.
2016-05-10 15:59:00 +10:00
Michael Norrish a1be2aa9e8 c-parser: introduce a FAKE64 architecture
This ignores issues that would need getting right in a real x64
specification (signedness of char, endianness, perhaps others), but can
be used as a test vehicle.
2016-05-09 17:02:01 +10:00
Michael Norrish 345fd7ab20 c-parser: factor out more 32-bit dependencies in umm_heap
If one changes the occurrences of 32 in Addr_Type to 64, everything up
to CTranslation still builds successfully.

Work towards JIRA VER-487
2016-05-09 16:55:40 +10:00
Michael Norrish a3e6c6484e Refactor more of the UMM memory model to allow for 64bit arch
This is progress with JIRA VER-487
2016-05-09 14:15:15 +10:00
Matthew Brecknell 0c3a12771d arch_split: merge master 2016-04-28 14:36:43 +10:00
Matthew Brecknell 03b7ec7db0 arch_split: CParserTest checking 2016-04-26 09:52:02 +10:00
Japheth Lim 874e1998e5 Fix up c-parser and autocorres for AutoCorres 1.2 release. 2016-03-30 17:48:27 +11:00
Japheth Lim 3144c4d847 Remove time limits from Isabelle ROOT files. 2016-02-29 14:52:37 +11:00
Michael Norrish d25df29a03 c-parser: refactor proofs after address-size choice 2016-02-25 17:04:05 +11:00
Michael Norrish 27190472a3 c-parser: factor out endianness encoding of words 2016-02-25 16:59:37 +11:00
Michael Norrish ce493d2828 c-parser: move arch-specific nos. to L4V_ARCH dir 2016-02-22 17:53:41 +11:00
Matthew Brecknell 359efb81b1 Isabelle2016: merge master into 2016 2016-02-20 17:37:16 +11:00
Michael Norrish 1e131f27df c-parser: start refactoring for >1 architectures
The base file that needs to move is Vanilla32_typinfo, which is what
this commit does. Various descendants may need splitting into
architecture-specific and general parts.
2016-02-19 16:52:29 +11:00
Matthew Brecknell 84d2889d45 Isabelle2016: merge master into 2016 2016-02-19 16:17:26 +11:00
Michael Norrish 6b06652da3 Fix standalone parser in light of 344ed539 2016-02-17 09:00:32 +11:00
Matthew Brecknell c65e290a8b Isabelle2016: merge master into 2016 2016-02-16 12:52:24 +11:00
Michael Norrish 344ed539bd Export file containing varname munging info
Depends on configuration variable (as per example in
testfiles/jira473.thy), "munge_info_fname".  If this is not set, then no
export occurs.  File written is with respect to directory Isabelle is
started in, which may not be ideal.

Format in the file is a series of lines:

  function_name::var_name -> munged_name

If the variable is global, then function_name is blank.

JIRA VER-473
2016-02-15 16:17:19 +11:00
Ramana Kumar 9ed7b8cb67 c-parser: CParser session now builds 2016-02-11 11:15:59 +11:00
Ramana Kumar 1c962bafa6 c-parser: update umm_heap/* for 2016 2016-02-11 11:15:59 +11:00
Gerwin Klein e3c4385af9 added README with link to original source 2016-02-11 11:15:59 +11:00
Gerwin Klein 0241208693 re-import Simp from AFP 2016-02-11 11:15:59 +11:00
Daniel Matichuk e4e4ee7705 arch_split: fix CParserTest 2016-01-29 10:57:24 +11:00
Thomas Sewell 4fd43512bb WIP on handling array assertions. Up to Retype_C.
This is quite a lot of work in the end. I've had to gut most of
Retype_C along the way. Nearly done there.
2015-12-02 09:06:06 +11:00
Thomas Sewell 6fa0909124 Partial progress on using array assertions. 2015-12-02 09:05:04 +11:00
Thomas Sewell 1fdbbe787e Theory of array assertions.
This is a way to use the UMM assertions to assert an array is
present without knowing its exact size.
2015-12-02 09:04:48 +11:00
Michael Norrish 2f39375ee4 Modifies proofs partially working
At the moment, if there is a specification and DONT_TRANSLATE, the
automatic proofs only work if the specification is that no globals are
modified.

Work on JIRA VER-464
2015-11-19 11:27:05 +11:00
Michael Norrish 27a12b871c Translate spec-only fns with new guarded_spec_body const
As per discussion in JIRA VER-464 issue.

Still to try to prove modifies theorems for such functions
automatically.
2015-11-19 09:58:36 +11:00
Michael Norrish 50ad3aba60 Delete trailing whitespace in jiraver464.thy 2015-11-12 16:40:04 +11:00
Michael Norrish 4e4bbc8267 Handle kernel's halt def/spec
Halt no longer gets an automatic modifies proof.
2015-11-12 16:40:04 +11:00
Michael Norrish dac491360f Allow some DONT_TRANSLATES to have modifies proofs
In particular, if the only specification attached is the MODIFIES line,
then the automatic machinery will cope with proving the modifies result.
So, now rule out those with DONT_TRANSLATE and at least one fnspec.
2015-11-12 10:43:50 +11:00
Michael Norrish 7bd543ad76 Modifies proofs never tried for DONT_TRANSLATES 2015-11-12 10:14:45 +11:00
Michael Norrish bbdf7c792c Deal with compiler warnings in isa_termstypes.ML
Removes a bunch of unused code.
2015-11-12 10:01:25 +11:00
Michael Norrish 6a5ae1f8e6 Delete trailing whitespace in mlyacc sources 2015-11-12 09:53:29 +11:00
Michael Norrish c126813667 Get clz definition to parse (JIRA VER-464).
It's added to the 464 regression test.
2015-11-12 09:51:57 +11:00
Michael Norrish efede274df Better RelSpec bodies for DONT_TRANSLATE functions
DONT_TRANSLATE functions must have MODIFIES clauses for this to work at
the moment.
2015-11-11 16:40:00 +11:00
Michael Norrish 7916a7751a Define RelSpec bodies for DONT_TRANSLATE functions.
Work for JIRA VER-464
2015-11-10 17:14:08 +11:00
Michael Norrish 6f4b0f3e37 Work on JIRA VER-464
Breaks existing dont_translate test-case.
2015-11-09 14:55:47 +11:00
Michael Norrish fe3045f798 Remove Isabelle warnings in ML 2015-11-09 14:55:47 +11:00
Rafal Kolanski 693d6f63e0 Revert 64af29ab33
Still don't know what went wrong, but works now.
2015-10-22 08:15:23 +11:00
Rafal Kolanski d51402a5a2 Merge remote-tracking branch 'verification/master' into priority-bitmap
(seL4_NBWait)
2015-10-21 16:23:01 +11:00
Joel Beeren d6f7579be7 poll: Added new syscall for polling async endpoints (non-blocking wait) 2015-10-21 14:24:49 +11:00
Rafal Kolanski 64af29ab33 c-parser: fix duplicate fact decl in testfiles/dc_20081211.thy
Why this is suddenly a problem now, when there hasn't been a change to
this file in years is completely unclear. Nonetheless, I need a green
build.

The error was:
*** Duplicate fact declaration "dc_20081211.dc_20081211.test_modifies"
vs. "dc_20081211.dc_20081211.test_modifies" (line 42 of
"~/repos/v/l4v/tools/c-parser/testfiles/dc_20081211.thy")
*** At command "lemma" (line 42 of
"~/repos/v/l4v/tools/c-parser/testfiles/dc_20081211.thy")
2015-10-21 12:00:15 +11:00
Rafal Kolanski c1eb235105 Merge 'verification/master' into priority-bitmap
Green build except for:
CParserTest (WTF Duplicate fact declaration "dc_20081211.dc_20081211.test_modifies")
AutoCorresSEL4 (waiting on result)

There is still a carefully managed sorry in Schedule_R, waiting on the C
parser FNSPEC+DONT_TRANSLATE fix.
2015-10-21 06:19:20 +11:00
Rafal Kolanski 71ff4d274a c-parser: add packed_type instance for 2D arrays
I finally got it down into a form that Isabelle accepts, and without
even having to add spurious axioms.
2015-10-20 23:52:14 +11:00
Michael Norrish 2f9f49df1a Propagate guards from compound literals
This fixes JIRA VER-456
2015-09-30 12:08:52 +10:00
Japheth Lim 0414cf15c6 c-parser: add new lib/ dependencies to mkrelease script. 2015-09-21 18:20:25 +10:00
Gerwin Klein 10bb7b39e3 remove NonDetMonad from C-Parser import chain
Including NonDetMonad too early introduces too many name clashes.
2015-07-09 14:47:25 +10:00
Gerwin Klein ca88de6611 Merge from master. 2015-05-26 07:47:54 +10:00
Gerwin Klein afd8493379 c-parser: allow isa_type_to_typ from other contexts
When isa_type_to_typ is called from a theory other than the one the type was
declared in, it would pick the wrong fully qualified name. Now the function
should be robust against a) yet undeclared types (for record decls), b)
existing types in same theory (normal case), and c) existing struct types
from other theories (e.g. from autocorres).
2015-05-24 22:15:45 +10:00
Gerwin Klein a979379e3a remove now obsolete delaration 2015-05-12 17:18:24 +02:00
Michael Norrish d29c6d1fb2 Fix for JIRA VER-443 (scalability of UMM tactic)
The tactic used to establish that a large struct is a umm type doesn't
cope with large number of fields (>= 108 in this case). The translation
used to create a struct containing fields corresponding to all of the
program's addressed globals, but this is actually unnecessary now that
the translation handles these via the locale parameter "symbol_table".

So, the fix is to simply not generate that struct and so not to attempt
to prove the umm-type property of it. Grepping for adglobs in the
verification proof reveals that it isn't used anywhere (as one would
hope), so I'm reasonably confident that this shouldn't cause any wider
regressions. (Fingers crossed.)
2015-05-08 14:03:34 +10:00
Gerwin Klein b2b88d8cf6 be less chatty 2015-05-05 21:49:03 -04:00
Gerwin Klein b3dba84255 C-Parser 2015 update 2015-05-02 21:43:17 +02:00
Gerwin Klein bdc72d3bdd convert to 2015 and Isar 2015-05-02 21:43:17 +02:00
Gerwin Klein 618bff3f5d update recursive record package to 2015; make less chatty 2015-05-02 21:43:11 +02:00
Gerwin Klein 2c2de8c17d better context management 2015-05-01 18:12:59 +02:00
Michael Norrish 2a24e22bca Standalone parser now handles large enum consts
Even if the value given to the constant inside the enum was "just"
2147483647, the loop that processed enumeration declarations would then
add 1 to that number, and in mlton, this would cause an Overflow
exception.  By using IntInf in this position, mlton does the right
thing, and Poly/ML's behaviour is completely unchanged.
2015-04-29 12:04:22 +10:00
Gerwin Klein 0f2193894b 2015 update progress 2015-04-22 16:42:21 +01:00
Gerwin Klein 4ebd10ee1b umm_heap updated to Isabelle2015 2015-04-22 15:44:58 +01:00
Gerwin Klein 327d651ffc clean up the cleanup 2015-04-21 21:48:36 +01:00
Gerwin Klein 0746d5ffcd Isabelle2015 update: recreate nested induct rules precisely 2015-04-21 21:38:41 +01:00
Gerwin Klein 6b26c4d15c removed obsolete file 2015-04-21 19:32:43 +01:00
Gerwin Klein c5fafd6aca proof cleanup 2015-04-21 19:32:34 +01:00
Gerwin Klein cd1d7e0356 update Padding.thy 2015-04-21 16:21:24 +01:00
Gerwin Klein 17826f9b49 more Isabelle2015 update; AInvs up to (excluding) Syscall_AI
also includes some global replacements
2015-04-18 21:51:26 +01:00
Gerwin Klein 190e7c38d6 start work on Isabelle 2015 update 2015-04-17 16:19:32 +01:00
Gerwin Klein 45065f6e5e re-import Simpl from AFP 2015-04-17 14:19:15 +01:00
Japheth Lim eb7734f705 c-parser: add regression test for aa162a0. 2015-04-17 13:44:19 +10:00
Japheth Lim aa162a06f6 c-parser: fix a bug introduced by 2f611a4. 2015-04-16 18:11:15 +10:00
Michael Norrish 9827e78177 Handle cpp in both standalone and Isabelle parsers
Japheth's recent change (6f7c660cb) to error-reporting for the latter
broke the former. Refactor code so that old and new code can coexist.
Would just use Japheth's code in the purely SML version too, but it uses
Isabelle/ML libraries that I can't be bothered to recreate in SML.
2015-04-10 14:51:36 +10:00
Michael Norrish d66755aa26 Also get tokenizer tool to build given cc996ca 2015-04-10 14:05:16 +10:00
Japheth Lim 6f7c660cb5 C-Parser: show cpp error messages if cpp fails. Also clean up output temp files. 2015-04-09 17:39:41 +10:00
Michael Norrish dfa5c16ecf Style change to squash Isabelle/ML warning message 2015-04-09 15:10:04 +10:00
Michael Norrish cc996ca9ca Properly fix JIRA VER-439
The handling of local static variables is now part of a general
improvement in the handling of all the "munging" that the parser does.

*Munging* is the process of renaming variables so that Isabelle can cope
with them.  There are at least three different forms of munging at the
moment:

- static locals get munged so that multiple static locals (which have to
  be treated as globals) can co-exist with the same source name.
- local variables of the same source name but different types have to be
  able to co-exist
- variables with legitimate C names but illegal Isabelle names have to
  be allowed

The new structure MString implements an opaque version of string
designed to make it clear to the typechecker that certain strings are
"munged".
2015-04-09 15:09:29 +10:00
Michael Norrish 29e525645f Handle local static variables properly.
They are now treated as globals with a specially munged name, derived
from the given name and the name of the function where they occur. The
function NameGeneration.mk_localstatic generates the "munged" name.

As with other globals, initialisation is not handled very well (i.e., at
the moment the initialisation is completely ignored).

Close JIRA VER-439
2015-03-26 16:13:56 +11:00
Michael Norrish e184eb69de Handle local extern declarations
Closes JIRA VER-440
2015-03-23 15:11:57 +11:00
Michael Norrish 94d8a918f2 Refactoring as a prelude to handling static/extern
This is work for both of JIRA VER-439 and VER-440.

Test-suite passes.
2015-03-17 16:42:46 +11:00
Michael Norrish 5c3f79ff3b Remove some unused code (fewer compiler warnings) 2015-03-17 15:43:55 +11:00
Michael Norrish 8de46c42fc Start a test-case for JIRA VER-440 (extern vars) 2015-03-17 09:26:24 +11:00
Michael Norrish ad9b216c63 Start a test-case for JIRA VER-439 (static vars) 2015-03-17 09:20:32 +11:00
Michael Norrish b452139b91 Handle typedefs of anonymous struct types.
Should have been done in 3cee38ff1.

JIRA VER-434
2015-02-09 14:21:40 +11:00
Michael Norrish 3cee38ff19 Handle anonymous structs better.
In particular, don't reveal the internal references used during
yacc-ing to the user-level.  Instead, add a referentially transparent
repair of the AST after its been parsed.

JIRA VER-432
2015-01-28 16:44:16 +11:00
Michael Norrish 9149fe41c7 New option to standalone parser to just test the C grammar.
Without even typechecking, none of the later phases of the analysis
get run.
2015-01-28 14:40:15 +11:00
Michael Norrish df8a34ae4a Compiler warning made me realise sizeof(_Bool) would fail. 2015-01-28 14:02:49 +11:00
Michael Norrish 8d2a981007 Ignore a file that might exist locally in tools/c-parser 2015-01-23 10:16:21 +11:00
Michael Norrish 07a8cac0e1 Fix regression test error caused by 72d54eeb 2015-01-23 09:02:32 +11:00
Michael Norrish 72d54eeb0b Allow user to control path to C preprocessor (or not use it entirely).
As per example, syntax is

    declare [[cpp_path="path to file"]]

If the empty string is used as the value, then no preprocessor will be
called.

The standalone parser has also been adjusted so that you can it with

    --cpp=path

or

    --nocpp

options.

Closes JIRA issue VER-337
2015-01-22 14:05:39 +11:00
Michael Norrish 2f611a405d Fix for struct-literal-initialisation with pointer-type fields.
JIRA VER-310
2014-11-24 14:57:43 +11:00
Michael Norrish 67935698ac Fix for JIRA VER-429 (with test-case)
The null-pointer value was not being given the right type when a
comparison was made with the zero literal.
2014-11-17 15:19:08 +11:00
Michael Norrish 992c1fb0f7 Implement C11's _Noreturn keyword.
JIRA VER-426
2014-11-14 16:39:00 +11:00
Michael Norrish 38831ead33 Check that install_C_file is given filename without bad characters
For the moment, it seems simplest just to check for the empty string and
for qualified IDs, both of which cause Isabelle pain.

JIRA VER-427
2014-11-14 15:48:48 +11:00
Gerwin Klein 939d98843c Isabelle 2013-2 -> 2014 in docs 2014-10-21 20:08:50 +11:00
David Greenaway 179aed639c c-parser: Run UMM proofs in parallel where possible.
Parallelise the low-hanging fruit.
2014-10-16 17:39:52 +11:00
David Greenaway f7814784de c-parser: Run "modifies" proofs in parallel.
This change means that we can't silently catch proof failures, which the
current code does. We theoretically know the outcome of the proof in
advance, so this should be safe...
2014-10-16 17:39:52 +11:00
David Greenaway 629073c255 c-parser: Avoid calculating modifies proofs in examples where it fails.
They eventually need to be fixed, but just avoid performing the proofs
for now.
2014-10-16 17:39:52 +11:00
David Greenaway 279db9ac37 c-parser: Add config option to avoid generating modifies proofs. 2014-10-16 17:39:52 +11:00
David Greenaway 20236ae30a c-parser: Generate vcg rule for "cchaos" constant.
Allows vcg_tag ("apply vcg") to process functions with "cchaos" in them.

This was an attempt to solve the problem that the C parser's modifies
proofs currently fail for functions containing "cchaos".

The problem, however, actually seems to be that the C parser fails to
realise that incorrectly owned _read_ variables (which are updated using
"cchaos" before being read) need to be in the "modifies" set of
a function. Currently, the C parser misses these modifications, and the
proof of the incorrect modifies set (rightly) fails.
2014-10-16 17:37:19 +11:00
David Greenaway dadffc6fa3 c-parser: trivial: Delete old umm_heap "ROOT.ML" files. 2014-10-16 17:09:12 +11:00
David Greenaway 0ecc0ad0db c-parser: trivial: Fix incorrect path to "gen_isabelle_root.py" in IsaMakefile.
Incorrect since the great repo shuffle of 2014.
2014-10-16 17:09:12 +11:00
David Greenaway 5b7204ee17 c-parser: mkrelease: Fix incorrect dirty-working-directory logic. 2014-10-15 11:27:31 +11:00
David Greenaway e4caa77169 c-parser: Add "mkrelease" file from previous version.
Additionally, change bits and pieces to work with our new directory
structure.
2014-10-15 11:11:20 +11:00
Thomas Sewell 8e427dcb3b Renovate StaticFun a bit.
The functor is gone, and instead StaticFun exports two more general
operators, one for defining a partial map by a tree, and one for
extracting the theorems from an existing partial map definition.

The extraction process uses simplification in a more conservative
manner than before, and is guaranteed to produce exactly the
expected theorems.
2014-09-23 14:40:31 +10:00
David Greenaway 0c004d2a93 Merge branch 'master' into 'isabelle-2014'.
Conflicts:
	proof/drefine/Arch_DR.thy
	proof/drefine/Finalise_DR.thy
	proof/drefine/StateTranslation_D.thy
	sys-init/DuplicateCaps_SI.thy
	sys-init/Proof_SI.thy
	tools/autocorres/tests/examples/SchorrWaite.thy
2014-09-23 14:31:33 +10:00
Michael Norrish c82069e4c6 Allow const to appear as a gcc __attribute__ (not just __const__)
Fixes JIRA VER-422.
2014-09-22 12:04:13 +10:00
David Greenaway cf0d1abce6 Merge 'master' into 'isabelle-2014'.
Conflicts:
	proof/crefine/Fastpath_C.thy
	proof/drefine/KHeap_DR.thy
	proof/infoflow/Noninterference.thy
	spec/design/version
	sys-init/DuplicateCaps_SI.thy
	sys-init/InitTCB_SI.thy
	sys-init/Proof_SI.thy
	tools/asmrefine/SimplExport.thy
	tools/autocorres/tests/examples/SchorrWaite.thy
2014-09-17 14:21:13 +10:00
Michael Norrish b83cb49655 Fix a proof about signed-word division in testfiles/signed_div.thy 2014-09-01 15:47:53 +10:00
Michael Norrish 654c81df67 Remove now redundant and broken proofs of "sint 1 = 1" in test-cases. 2014-09-01 15:34:41 +10:00
Michael Norrish e7ee11a015 Fix mildly broken proof in breakcontinue.thy test-case.
Just needed to remove an "apply simp" line.
2014-09-01 15:24:23 +10:00
Michael Norrish b3c6874aa2 Fix for errors in hoare_rule_tac (applying ProcRec1 in particular)
Change mimicking c09cd81cc1f1 in Mercurial history of AFP.
2014-09-01 15:17:52 +10:00
Michael Norrish c13ac6ac0f Fix bugs to do with stale/non-linear theory use.
Problem with hoare-package's vcg complaining

    could not find proper state space type (structure or record) in goal

still to be fixed.
2014-09-01 14:12:06 +10:00
Michael Norrish dfac35840c Illustrate true issue with stale non-linear theories in isa2014.thy
Basic problem is the addition of extra locales corresponding to modifies
or FNSPEC annotations.
2014-08-29 17:06:57 +10:00
Thomas Sewell caf0529c7f Move burden of 'halt' proof, use less modifies.
In detail:
  - add a general user-specified exception to c_exntype
    (for use in tools like Substitute)
  - wrap calls to 'halt' in Guard {}, making it clearer that
    halt is never called, simplifying asmrefine
  - repair halt changes in crefine
  - avoid use of some suspicious 'modifies' properties in crefine
    which were generated by the parser for functions where inline
    ASM blocks have been elided, and which may be inaccurate.
2014-08-29 13:57:28 +10:00
Michael Norrish 46c53883cf Add a .gitignore for the tools/c-parser directory. 2014-08-26 15:35:07 +10:00
Michael Norrish fe83b3aff6 Comment out some parsing code and remove bad linear theory complaint.
This suggests there are bad things happening in the hoare package's
code for parsing (as the commented out code is simply a lemma
statement followed by oops).
2014-08-26 14:06:06 +10:00
Michael Norrish d4dd98c3d1 Remove dodgy theory_of o Local_Theory.exit calls in hoare.ML 2014-08-26 14:05:25 +10:00
Michael Norrish a364e85874 Replace a clearly bad usage of Local_Theory.exit
See 8d2cfe7417 for more in this vein.
2014-08-26 14:03:11 +10:00
Gerwin Klein 8d2cfe7417 CParser and lib tweaks; AutoCorres builds
CParser not finished yet, though: getting errors in cparser_test about linear
theory updates at end of thy.

Found more instances where we should be using Local_Theory.exit_global, but
might be besides the point (didn't help). Also might be overshooting the goal.
2014-08-09 19:23:17 +10:00
Gerwin Klein 1af1d2b67b some of the global Isabelle2014 renames
option_case -> case_option
sum_case -> case_sum
prod_case -> case_prod
Option.set -> set_option
Option.map -> map_option
option_rel -> rel_option
list_all2_def -> list_all2_iff
map.simps -> list.map
tl.simps -> list.sel(2-3)
the.simps -> option.sel
2014-08-09 15:39:20 +10:00
Lars Noschinski fe36a97b4d Port AutoCorres to Isabelle 2014-RC0 2014-08-08 17:29:54 +10:00
Gerwin Klein ef7ba847c0 bump API version 2014-07-28 11:10:47 +02:00
David Greenaway 0fb7a8084d misc: Proofing and formatting of README.md files.
Attempt to improve readability of the files when viewed as plain ASCII;
proof-read and fix minor issues.
2014-07-28 13:15:48 +10:00
Gerwin Klein f126d8bf45 adjust isabelle paths for standalone `make` 2014-07-27 20:25:04 +02:00
Gerwin Klein cd6abfb096 added README.md 2014-07-27 20:24:24 +02:00
Gerwin Klein 007c5e49c9 make mlton the default for standalone tools
polyml has too many problems with 64bit dependencies
2014-07-27 20:02:24 +02:00
Gerwin Klein 50dda7708c comment cleanup 2014-07-22 18:10:20 +02:00
Gerwin Klein 84595f4233 release cleanup 2014-07-17 18:22:50 +02:00
Gerwin Klein 2a03e81df4 Import release snapshot. 2014-07-14 21:32:44 +02:00