History log of /seL4-l4v-10.1.1/HOL4/src/parse/Preterm.sig
Revision Date Author Comments
# 8d3d8c0a 25-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Move Preterm datatype definition to separate file.

As was done with Absyn in 019a332d49, this reduces redundancy and helps
with Poly/ML's pretty-printing


# d45d52a0 25-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Add entry-points to let parsing to return >1 parse

This is possible in the presence of overloading.

Also some minor tidy-ups in the body of Preterm.sml (more still to be
done in this vein).


# 0432ab57 22-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Get Defn to compile; also report ambiguous overloads

Set comprehensions will be the next task


# c0d5e065 21-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Get BasicProvers to compile


# 872e20e7 21-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Switch type-checking to errormonad everywhere

The optionmonad doesn't hold any advantage, and flipping back and forth
between them was just annoying.


# 580d1ea2 21-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Get basic kernel working

Interactive behaviour in terms of error messages and the like may still
be broken.


# 37c730f2 20-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Make progress with functional pretype

The change to pretty-printing raises an exception, but parsing simple
cases seems to work.


# 66762f3b 20-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Get Preterm to compile


# 32bf1e49 02-Feb-2015 Piotr Trojanek <piotr.trojanek@gmail.com>

extra semicolons removed from (some) .sig files


# 09843cd3 21-Feb-2013 Michael Norrish <Michael.Norrish@nicta.com.au>

Make Preterm’s public API a bit richer.


# 4761143b 10-Aug-2009 Tjark Weber <Tjark.Weber@cl.cam.ac.uk>

Removed trailing whitespace from all .sml and .sig files.

This affects over 900 files and was done using emacs's delete-trailing-whitespace
function in batch mode. Building the system with Poly/ML and Moscow ML seems to
work, so I'm hoping these changes don't break anything. Please complain if
they do!


# 3b2b7c12 11-Nov-2008 Michael Norrish <Michael.Norrish@nicta.com.au>

Modifications to support overloading to a pattern. For example, one
can now do
overload_on ("<>", ``\x y. ~(x = y)``)
The parser does the right thing. The pretty-printer remains
blissfully ignorant for the moment. I don't think Unicode aliasing
will work quite yet either. Backwards compatible in that all the
functions in Parse behave the same if given inputs that were
previously acceptable.

"The parser does the right thing" means the following

- set_fixity "<>" (Infix(NONASSOC, 100));
> val it = () : unit

- ``$<>``;
<<HOL message: inventing new type variable names: 'a>>
> val it = ``\x y. ~(x = y)`` : term

- ``$<> p``;
<<HOL message: inventing new type variable names: 'a>>
> val it = ``\y. ~(p = y)`` : term

- ``p <> q``;
<<HOL message: inventing new type variable names: 'a>>
> val it = ``~(p = q)`` : term

When the pretty-printer is working correctly, the output will probably
be

``\x y. x <> y``

``\y. p <> y``

``p <> q``

In the first two cases, fixing what would appear to the user to be an
odd eta-expansion may be too difficult.


# 349e4895 01-Oct-2008 Michael Norrish <Michael.Norrish@nicta.com.au>

* Remove use of Raise from Parse.sml, as most sub-modules are printing
messages anyway, and if they're not, they should (at least under the
control of a trace variable)
* Also add location information to the 'last error' information in Preterm.


# cba2618e 10-Sep-2008 Michael Norrish <Michael.Norrish@nicta.com.au>

Put the reporting of type-checking errors under the control of a trace
variable, put the message into the exception raised, and also record
the cause of the error in a special reference. This should allow
better programmatic handling of the parser when it might fail.


# 84052801 19-Mar-2007 Anthony Fox <anthony.fox@cl.cam.ac.uk>

Added a hook for a "post processing" phase to the term parser.

Parse.post_process_term : (term -> term) ref

By default this does nothing.


# 512123cb 22-Apr-2005 Konrad Slind <konrad.slind@gmail.com>

Adapting to new Basis (and SML/NJ).


# 164e7a23 25-Sep-2002 Keith Wansbrough <keith@lochan.org>

Add a Locn field to each constructor of Preterm.preterm, in
preparation for located type error messages etc.

* Thanks to Joe Hurd for helping locate a bug in an earlier version:
Preterm, while still an equality type, is no longer safe to compare
for equality. Instead, Preterm.eq must be used; this ignores the
locations. (The symptom was a parse_in_context failing to notice
that the binder variables were the same as the bound occurrences,
leading to weird failure in Q.PAT_ASSUM).

* Constrained and Antiq now take records, to accommodate the Locn field.

* Lots of small changes, mainly adding ",...", to code using preterms.

* Pass locations down into the preterm constructor functions.


# 3fb415aa 13-Jun-2002 Michael Norrish <Michael.Norrish@nicta.com.au>

Fixed a bug reported by Anthony. Gist of it was that the parse in
context function (used extensively by the Q library) wasn't calling the
special code to deal with case expressions.


# 03b97a87 08-May-2001 Michael Norrish <Michael.Norrish@nicta.com.au>

Modifications to implement parsing and printing of case expressions.


# 3eb0895b 04-May-2001 Michael Norrish <Michael.Norrish@nicta.com.au>

Case expressions now parse and convert appropriately. Still to print them.


# d8fd568c 03-May-2001 Michael Norrish <Michael.Norrish@nicta.com.au>

Interface by which TypeBase can augment preterm conversion with case
information.


# 67cbea0e 10-Feb-2001 Konrad Slind <konrad.slind@gmail.com>

Support for new representation of strings.Minor changes.


# a2511ab7 02-Nov-2000 Michael Norrish <Michael.Norrish@nicta.com.au>

Changes to bring about Kananaskis parser. Known bug exists in
treatment of qualified identifiers.


# 0b3e5d44 21-Oct-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Reorganised the interface to Preterm; with sensible names for functions,
and all of the useful ones exported.


# 3bed8d45 19-Aug-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Big raft of changes allowing a simple form of overloading to be supported.


# 076b63b7 13-Aug-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Implementation of type checking is now entirely above the level of the
kernel. New TCPretype module (type-checking pretype) implements much
of the required functionality, including type unification.
Parse_type generalised to target any type providing the appropriate
constructor functions.


# accadd48 12-Jul-1999 Konrad Slind <konrad.slind@gmail.com>

Change to antiquote processing. Now free variables in the antiquotation
will affect type inference in the surrounding term. This is the
way it was done in HOL88, but not HOL90.

Also, some now outdated code has been removed.


# 0058df84 28-Jun-1999 Michael Norrish <Michael.Norrish@nicta.com.au>

Fixed to bring it up to date with Taupo release 0.
(Changes have come across from parse_branch development.)


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

Initial revision