Commit Graph

14 Commits

Author SHA1 Message Date
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