Commit Graph

27 Commits

Author SHA1 Message Date
Corey Lewis 821f9ed0c7 isabelle2022 c-parser: update CParser
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2022-11-09 11:45:46 +11:00
Gerwin Klein 3196054268 isabelle2021-1: remove extend from TheoryData
No longer required in Isabelle2021-1 for TheoryData and GenericData

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 9d7efd75e2 isabelle-2021: cparser+tests update
This includes a tweak to Word_Lib to simplify ucast(-1) which
is now a term that occurs more often.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Japheth Lim 7a99f89ae3 c-parser: don't delete original source files on Isabelle2019
Some code in the parser would incorrectly delete the source file
jiraver337.c, because the `Path` module now normalises the filename to
a different-looking name. This is fixed by adding a boolean flag for
whether the parsed file should be deleted or not.

Fixes Jira VER-1114.
2019-06-19 13:01:30 +10:00
Gerwin Klein 0e48f483bf c-parser: expand $USER_HOME in cpp path name; export cpp_path config 2019-06-13 16:22:33 +10:00
Gerwin Klein 512c134761 c-parser cleanup: remove warnings, avoid Local_Theory.reset 2019-06-13 16:22:33 +10:00
Matthew Brecknell dcbda6748e Isabelle2017: update c-parser for RC0
* Removed redundant parameter from Named_Target.init.

  * Adjusted ROOT file for session-qualified imports.
2017-10-30 12:23:26 +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
Thomas Sewell dffc8cf0df c-parser: improve tracing
Unify some tracing features that didn't go through the Feedback structure.

Add config to isar_install allowing Feedback to be traced to a file in real
time as well as to standard Isabelle output channels.
2017-05-18 15:23:09 +10:00
Matthew Brecknell 30122b5d80 Isabelle2016-1: update to new ML API
Update references to renamed ML constants; supply default arguments to
functions with additional parameters; etc.
2017-01-05 14:26:14 +11:00
Thomas Sewell 8e7c55c1a5 Handling of AsmStmt in c-parser, more tests.
The C-parser contains a full parser for __asm__ syntax but
up until now hasn't done anything with it. Instead we export
some semantics. It's unspecified exactly what these semantics
are but they are parametrised with the __asm__ semantics that
went in to them, so the translation validation has something
to reason about.

Tweak modifies proofs as a result, and add some more test files.
2016-12-01 17:07:54 +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
Gerwin Klein b3dba84255 C-Parser 2015 update 2015-05-02 21:43:17 +02: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
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 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 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 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 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
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
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
Lars Noschinski fe36a97b4d Port AutoCorres to Isabelle 2014-RC0 2014-08-08 17:29:54 +10: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