History log of /seL4-l4v-master/HOL4/tools-poly/poly/poly-init2.ML
Revision Date Author Comments
# 2a2b3e74 23-Apr-2019 Michael Norrish <Michael.Norrish@nicta.com.au>

Apply the quotation filter to all input files

Previously, a has_dq (“has double quotes”) function was applied to
test files to see if they should be filtered. With Theorem syntax used
in files that didn't include any Unicode or backquotes, this analysis
was wrong. Nor is there any need for it. It's simpler to just apply
it to everything.


# 7d8566f5 12-Feb-2018 Michael Norrish <Michael.Norrish@nicta.com.au>

Provide facility to learn where a file was loaded from


# ffc6d5e6 30-Nov-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Tell load about more Basis modules that are already "loaded"

The emacs mode tries to load these modules when it sees them used, but
this prompts an error, because the load machinery doesn't know they're
built-in and then tries to find the source code for them and fails,
emitting an annoying warning.


# a97c5115 31-Aug-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Attempt to manage all heap interactions in one executable

System builds non-interactively, but the interactive REPL is broken,
as are selftest.exe files after hol.bare.


# c9d8e3ed 04-Jun-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Isolate a simple buffer in Holmake code and reuse in polyscripter

Fixes previous commit's failure to build polyscripter


# 99c47651 04-Jun-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Make Moscow ML dep. calculation unquote-free as well

This allows yet more pleasant refactoring (with the
FNameToUnquotedDeps module completely disappearing). Now there is a
generally useful QFRead module in tools/Holmake that allows the
quotation machinery to be applied to strings and files.

The quotation filter is still a "push" technology: it consumes
everything it can and outputs as it goes. (It does block if its input
stream blocks of course.) I think it would be nice to modify the
filter (now QuoteFilter in tools/Holmake) so that it was "pull", the
client getting to pull chunks of output a bit at a time.

Currently, the API supports "reader" operations of type unit -> char
option, and these look like pull operations, but these are pulls on a
buffer that has already been filled with as much output as possible.


# e70eeae7 12-Apr-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Write and read .uo/.ui files using the $(HOLDIR) variable

This should make HOL installations portable (once heaps are rebuilt).


# be267552 12-Apr-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Let .uo and .ui files have $(envvar) prefixes in their paths

This will let these files specify positions for source code that is
independent of an absolute position in the file-tree hierarchy, but is
relative to a fixed base. The first step is to allow $(HOLDIR) so that
HOL can have its own .uo files be easily relocatable.

Next step is to write .uo and .ui files using this facility.


# df4694a2 12-Jan-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Allow buildheap to create heap with timestamp in past

This is under control of an environment variable for the moment. This
is because I don't want to change Holmakefile command-lines, but do
want to be able to run buildheap in a context where heaps get rebuilt
in this way.


# a844c1d4 01-May-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Rework Poly/ML quotation use to do in-process lexing

This changes from having to use a separate unquote process as part of
Holmake, and may help resolve github issue #340

The drawback at the moment is that the whole file is sucked into memory
before Poly/ML gets to see it. The way the filter code works
could (should?) be changed to lex things in a demand-driven way.


# 7159b5d9 20-Apr-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Remove a race condition in the file system

The quse function may be called simultaneously in two different
processes on the same file, making them contend for the file
.HOLMK/originalname; this leads to errors. Now use tmpName (which is
not immune to racy problems), which is an improvement.


# f7299be7 26-Jul-2015 Michael Norrish <Michael.Norrish@nicta.com.au>

Let load work if current directory is unwritable


# 823cfb09 18-May-2015 Michael Norrish <Michael.Norrish@nicta.com.au>

Better errors when use can't make a .HOLMK dir


# ea019d45 27-Jan-2015 Michael Norrish <michael.norrish@nicta.com.au>

Get Poly/Holmake to apply the quotation filter to more files.

The Moscow ML implementation just applies it to everything (and
perhaps the Poly/ML implementation should do the same). The new
behaviour in the Poly/ML code is to apply the filter if the `
character is detected, or if any character with code > 127 appears in
the file to be consumed.

Curiously, the quotation filter is applied within Holmake under Moscow
ML, but within the load implementation in Poly/ML, and this lives in
tools-poly/poly/poly-init2.ML. Because it isn't used in
tools-poly/Holmake.sml, I can delete some redundant code in

The test-case exercises this because it uses only "new style"
quotations (enabled by 199f6f07d0).


# e21bc088 24-Feb-2013 Michael Norrish <Michael.Norrish@nicta.com.au>

Make interactive Poly sessions know that Listsort module is loaded.


# 24de53a0 14-Feb-2013 Michael Norrish <michael.norrish@nicta.com.au>

Stage the Poly/ML interactive system to know about built-in modules.

In particular, Binarymap is built-in from the very start, and PP (an
overloaded name for HOLPP) is available once the kernel is loaded.


# b6439dde 17-Jul-2012 Michael Norrish <michael.norrish@nicta.com.au>

Give temporary files used by Poly/ML nicer names.

This is done by creating the files (the outputs from the quotation
filter) in local .HOLMK directories but with the same name. Then error
messages are easier to relate back to original source files.

Closes #32.


# 7d7a664c 24-Oct-2011 Michael Norrish <Michael.Norrish@nicta.com.au>

Make Systeml.sig the same in Moscow ML and Poly builds.

This additional uniformity allows me to delete the
tools-poly/Holmake/Systeml.sig file. This then requires a bunch of
changes to compilation of the early tools which have to point at
tools/Holmake/Systeml.sig rather than the version in
tools-poly/Holmake.

This should fix the configuration errors on MoscowML introduced by
0a0988fc.


# f101fb0e 11-Oct-2010 Michael Norrish <Michael.Norrish@nicta.com.au>

Allow Moscow ML build to happen using (as yet unreleased) v2.10.

Basic strategy is to make adoption of basis 2002 even more
thorough. In particular, the Timer structure is now as per
the 2002 Basis.

It is possible to detect that one is working with Moscow ML 2.10 or
later by checking the Holmakefile variable $(HAVE_BASIS2002), which is
set (to value "1") when in 2.10 or later. It is unset elsewhere. See
an example of its use in help/src-sml/Holmakefile.


# c47ff08a 17-Aug-2010 Michael Norrish <Michael.Norrish@nicta.com.au>

Minor tidying in Poly implementation of load/use.


# bbe97273 30-Mar-2010 Michael Norrish <Michael.Norrish@nicta.com.au>

Fix startup problem for Poly/ML HOL (caused by recent Holmake refactoring).


# f4b51e0c 18-Dec-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

Moved a bunch of things from tools-poly/poly to portableML/poly.

Still to do: make Poly Arb{int,num} use Poly's built-in arbitrarily
large integer type. Also want to get rid of the last remaining
"redirect" in tools-poly/poly/poly-init2.ML.


# 2b3c955b 14-Dec-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

New "portable" subdirs per ML implementations in src/portableML.

Hope to do away with Poly/ML specific code in tools-poly eventually,
moving it into src/portableML/poly. tools/build-sequence now records
that the implementation-specific directories have to be included.


# bbac0e63 05-Nov-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

Make quse emit an error message on failing to find a file.

The exception that it otherwise raises can cause "invisible" failures
when doing a Holmake. I presume that the exception is occurring and
that this is aborting the Holmake and the build, but nothing gets
printed so it can be hard to know why the build has stopped.


# 0df98768 01-Oct-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

More changes to get basis2002 changes working properly in both poly + mosml.


# ea7bf382 01-Oct-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

Implement more of Basis2002 for Moscow ML (adding Vector, Array,
ArraySlice and VectorSlice), simplifying what Poly/ML has to emulate.
Haven't done full rebuild test, but have got as far as integerTheory
and Omega, which makes heavy uses of Vector etc.


# 3683cb2f 28-Aug-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

Move the pretty-printing facilities around a bit so that both SML
implementations use our own version of the PP structure. This
implementation is called HOLPP in src/portableML. After the kernel's
Overlay.sml is loaded, it is also available under the name PP. This
retains fairly good backwards incompatibility. The one deliberate
incompatibility is to make references to General.ppstream invalid.
This makes us better conform with Basis 2002.

The advantage of this manoeuvre is to allow me to better control what
our pretty-printers do at a low level.


# 57274260 19-Aug-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

Update us to use the Basis2002 version of Word8Vector. Seems to
affect only src/parse/CharSet.sml. (Changes to tools/configure.sml
make it better at detecting situations where basis2002.{uo,ui} need to
be transferred to sigobj.)


# 7154aa49 31-Jul-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

Start to implement the Basis 97 extensions that Moscow ML hasn't got
in order to force our codebase to get up-to-date. It should also
mean less bodging around for the Poly/ML code. I haven't checked that
my changes to tools-poly/poly/poly-init2.ML have done all that is
required yet. Feel free to fix problems arising there (I hope it will
just be a matter of deleting things).


# b8fdd515 28-Nov-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

OS.FileSys.tmpName () creates the temporary file on PolyML (as the basis spec
says it should), so do a better job of deleting them.


# 24d80305 31-Oct-2008 Michael Norrish <Michael.Norrish@nicta.com.au>

Set the emulated list of loaded structures to include Int, Real and
List. This should stop the system getting all twisted and bitter when
the Emacs mode asks the REPL to load these.


# 2025f560 17-Jun-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

Update to work on Poly/ML 5.2 (which breaks 5.1 compatibility).


# 9ad77770 29-Apr-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

The ARM examples now work on the Poly/ML version.


# 5298a275 24-Apr-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

A fix to load.


# 205a5c01 22-Apr-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

Set Globals.interactive properly under Poly/ML.


# 50ace1fa 21-Apr-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

More tweaks to the Poly stuff.


# 80382555 18-Apr-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

Misc fixes to Poly ML compatibility.


# 445073c5 17-Apr-2008 Scott Owens <Scott.Owens@cl.cam.ac.uk>

PolyML compatibility. See tools-poly/README.