History log of /seL4-l4v-10.1.1/HOL4/tools/Holmake/Holdep.sml
Revision Date Author Comments
# ffab9ebb 06-Mar-2018 Michael Norrish <Michael.Norrish@nicta.com.au>

Holmake: fix for reporting of unterminated strings and comments

Test cases and one for issue #518 as well (no CI integration yet)

Closes #452


# 4b27d2a3 06-Mar-2018 Michael Norrish <Michael.Norrish@nicta.com.au>

Holmake: Handle / occurring after an 'open' more gracefully

Closes #518


# 4ba33079 16-Jan-2018 Michael Norrish <Michael.Norrish@nicta.com.au>

Holmake improvements (bug in caching of dep. analysis; diag change)

Two intertwined patches (bad form I know):
1. Fix the bug in tests/indepchildren.
2. Revise the internal diag function to take a function generating a
string rather than a string; then the work of generating the string
only happens if diagnostics have been asked for.


# 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.


# 90c8f00f 03-Jun-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Refactor code to better isolate call to unquote in Holmake

The only use under Poly/ML is as part of dependency analysis and this
can be eliminated by providing a Poly/ML implementation of
FNameToUnquotedDeps.


# 37d61e33 06-Feb-2015 Michael Norrish <Michael.Norrish@nicta.com.au>

Implement (efficient) holdep lexing by hand.

Without using references (except in the side-effecting stream reading,
I suppose). In any case, performance in Poly/ML is much better (~4s
on my old Mac for holdeptool on the 30MB CakeML theory.sml file).

Includes some test-cases.


# d979b8fe 04-Feb-2015 Michael Norrish <michael.norrish@nicta.com.au>

Minor code cleanup in Holdep.sml


# c92c0fad 03-Feb-2015 Michael Norrish <michael.norrish@nicta.com.au>

Oops: inputN change needed to be made to Holdep.sml as well.


# 4522c28a 02-Feb-2015 Michael Norrish <michael.norrish@nicta.com.au>

runholdep function moves to Holmake_tools (Poly/ML Holmake affected)

In the latter module, it can be used in the Poly/ML implementation.
This is progress with github issue #77

The Poly/ML implementation now fails the regression test in

tools/Holmake/tests/depchain1/dir3

so comment out that test from the build sequence temporarily. I
believe there will be a Holmake failure in machine-code until the
behaviour is properly fixed. I hope selftest 2 will go through
correctly.

Holmake's output also changes slightly because I've been more
consistent about using the built-in 'info' function instead of print.


# b0bfd575 02-Feb-2015 Michael Norrish <michael.norrish@nicta.com.au>

Do away with use of mosmllex and mosmlyac in Holdep.

These tools are too Moscow ML specific, and unnecessary given that we
have mllex available for all SML implementations.


# 1e80cac7 02-Feb-2015 Michael Norrish <michael.norrish@nicta.com.au>

Isolate writing of Holdep info into file from calculation of info


# 106ba92a 01-Feb-2015 Michael Norrish <michael.norrish@nicta.com.au>

Remove reference values from Holdep (make things more functional)

Still to do:
* replace the mosmllex, mosmlyac technology
* change the API so that Holdep doesn't return the string that is to
be written into the .HOLMK file, but rather return the string list
of dependencies, which the caller can then put in the appropriate
place. This would be a better separation of concerns.


# 5b4f0510 28-Jan-2015 Michael Norrish <michael.norrish@nicta.com.au>

Start to rationalise Holdep's interface.

There were some strange holdovers still in there from the ancient days
when it was a separate command-line tool. Aim is to ultimately drop
Lexer.lex and Parser.grm and replace those with the Holdep_tokens
lexer. I'm also only doing this to the Moscow ML implementation for
the moment with the ultimate aim being to have the Poly and mosml
implementations using the same Holdep code.


# 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.


# a78cd306 26-Feb-2008 Michael Norrish <Michael.Norrish@nicta.com.au>

* Changed Systeml to make it more compatible with the Basis Library,
in particular, by using OS.Process rather than just Process, which
is a MoscowML invention dating back to the times when it couldn't do
nested structures
* This has knock-on effects in a surprising number of places because
Moscow ML doesn't know that OS.Process.status is the same type as
Process.status.
* Also invent a PreProcess structure just to store isSuccess which is
in the most recent Basis, but not Moscow ML.


# 4e14b951 01-Aug-2006 Michael Norrish <Michael.Norrish@nicta.com.au>

Mike's latest bug with string literals was caused by the automatic dependency
analysis in Holmake not understanding the new quotation syntax, and thinking
that a comment had ended when it hadn't. The fix for this is to run the
dependency analysis on a file that has already been pre-processed by
the quotation filter. (Also adjust the Lexer.lex file so that a
reasonable job will be done even in the absence of the filter.)


# f2630fbd 03-Mar-2004 Michael Norrish <Michael.Norrish@nicta.com.au>

Fix for the bug that saw file-names with spaces recorded in bogus fashion
in .HOLMK .d files. Now, spaces there are escaped with back-slashes.


# b878eadc 23-Apr-2002 Michael Norrish <Michael.Norrish@nicta.com.au>

Fixed a long-standing bug that would occasionally cause Holmake to try
to build a failing theory twice. It didn't entirely realise that a
failed attempt to build fooTheory.sig meant that an attempt to build
fooTheory.sml would also fail. Now this is treated by encoding an
explicit dependency of fooTheory.sig on fooTheory.sml. This makes the
algorithm try to build fooTheory.sig by first building fooTheory.sml, and
if this succeeds, it does nothing, because it's happy that having the latter
means having the former.
This scheme fixes the observed bug, but isn't quite right: if you delete
a Theory.sig file but keep the Theory.sml file in place, Holmake won't
rebuild them both. I'm thinking about how to fix this, but it doesn't
seem a likely error. Nor is it hard to work around: simply delete the
Theory.sml file.


# 9e91d5a7 11-Apr-2002 Michael Norrish <Michael.Norrish@nicta.com.au>

Fixes a bug in dependency analysis; Holdep would see a reference to
filter.foo, and not see any evidence that filter.sml existed, so would
drop it. (It has to do this because there may be any number of Basis
Libraries out there that it might depend on with the given name... maybe
Holdep could be given a complete list of the MoscowML library...??)
Anyway, now Holdep doesn't drop the possible dependency filter if the
information from the Holmakefile suggests that it knows how to produce
an appropriate filter.sml or filter.sig file.


# 041813f5 04-Jan-2000 Michael Norrish <Michael.Norrish@nicta.com.au>

It's possible for Holdep to get lexically confused. In particular,
unbalanced use of ``s can get it into a mess. Added some code to report
this and other errors.


# cd25492a 03-Nov-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Added my name as credit to comments on top of Holdep.sml. Not that I'm
just credit-grubbing, but there's a fix that's got to happen to Holmake
which I initially started putting into this file, and this change is
all that remains.


# f400b590 26-Oct-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Many changes. Bugs in dependency analysis should be fixed. Also
dispensed with separate entries for script executable files. Slight
alteration to way in which dependencies are used.


# 7d39e77b 22-Oct-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Updated to handle case where a dependency exists on a file in sigobj that
doesn't have a .sig file.


# 58841e67 29-Apr-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Initial revision