Given the flurry of announcements about toolkits, I thought I'd send the
proper release announcement around for Abs IL 0.61 - my apologies for
not sending it to these lists a few weeks ago.
Cheers,
Don
Abstract IL SDK version 0.61
The Abstract IL SDK version 0.61 is now available from
http://research.microsoft.com/downloads. See the attached notes
for more details. Please report any problems directly to me.
General questions can be directed either to me, to the F# mailing
list or to one of the .NET developer lists above.
Abstract IL an SDK for manipulating .NET Framework files and binaries.
You can use it from any .NET programming language, including C# and F#,
or from OCaml (though presently it is easiest to use from F# and OCaml).
With it you can access the contents of .NET binaries at a high-level,
avoiding essentially all the details of the binary format. This release
includes support for binary readers/writers and for writing debug
information. Among other things Abstract IL has been used for a
compiler (F#), a static analysis tool analyzing code access security
and an aspect-oriented programming project.
The v.061 SDK includes the latest release of the F# compiler
(see fsharp.zip).
Best wishes,
Don Syme
Microsoft Research, Cambridge
http://research.microsoft.com/projects/ilx/absil.htm
AbsIL SDK version 0.6.1
AbsIL an SDK for manipulating .NET Common IL files and binaries. You
can use it from any .NET programming language, including C# and F#, or from
OCaml. With it you can access the contents of .NET binaries at a
high-level, avoiding essentially all the details of the binary format.
Among other things AbsIL has been used for a compiler (F#),
a static analysis tool looking analyzing code access security and an
aspect-oriented programming project.
This release has not yet been tested with Rotor (SSCLI) or Gyro.
Contact [EMAIL PROTECTED] if you have any problems
See also http://research.microsoft.com/projects/ilx (the AbsIL/ILX Website)
Requirements
------------
o The .NET Framework SDK or VisualStudio.NET
o Because there is now a binary reader and writer, you no longer need
"ilasm.exe" and "ildasm.exe" on your PATH. Also, to deploy
your programs you will simply need a copy of the .NET Runtime Redistributable,
which is a much smaller component than the .NET Framework SDK and which
is included with Windows XP Service Pack 1.
o If you wish to develop .NET programs that use the SDK then in theory
you can use any of the .NET programming languages to do so. However
it is probably best to use F#. A release of F# is included in fsharp.zip
in this distribution: unzip it and see README-fsharp.txt for more
information, and also see the "classcount" sample.
Installation
------------
Unzip the tarball, e.g. at C:\Program Files\Microsoft Research\AbsIL.
If you wish to use the Abstract IL libraries from managed code:
2a. Install the F# compiler (or at least the F# DLLs with the F# compiler).
Do this by unzipping the F# compiler tar ball (fsharp.zip). Overwrite
any files if prompted (they are identical).
2b. Then run 'install-absil-managed.bat' from your install directory.
Copyright & Conditions of Use
-----------------------------
See LICENCE.txt
Using the SDK for .NET Common IL manipulation and analysis
----------------------------------------------------------
If you want to perform .NET Common IL manipulations or analysis, see the
samples
samples/classclount
Using the SDK as a target for your functional language compiler
---------------------------------------------------------------
It is also an SDK for developing MS-ILX programs. MS-ILX is an
experimental implementation of a set of extensions to .NET Common IL for
functional programming languages. MS-ILX is a set of shared
backend compiler infrastructure services built on top of
the .NET Common Language Runtime platform.
If you want to use MS-ILX as a target for your compiler, see
samples/generics
samples/closures
samples/datatypes
The main program you will be using is "ILXC.EXE".
Try the samples, e.g.
cd samples\Closures
..\..\bin\ilxc add.ilx
-- Generates add.exe.
.\add.exe
-- Make sure you have installed the ILX runtime library (e.g.
install the Abstract IL Managed libraries)
Try "ilx2il --help" for command line options.
Not all options can be supported as only certain support files
are included in a binary release.
F# Compiler version 0.6.
Welcome to F#. F# is an ML compiler for .NET, and is essentially an implementation
of the core of the OCaml programming language (see http://caml.inria.fr) with
extensions
to access .NET libraries. An implementation of a small subset of the OCaml libraries
is also provided.
http://research.microsoft.com/projects/fsharp -- The F# website.
Please email me to register as a user and join the F# email list.
[EMAIL PROTECTED]
Requirements
------------
o An installation of one of:
- The .NET Framework SDK
- Some release of VisualStudio.NET
- The .NET Framework Redistributable Components
o An editor
o A sense of adventure and discovery
Installation
------------
0. Uninstall any old release of F#.
1. Unzip the tarball, e.g. at C:\Program Files\Microsoft Research\FSharp,
(or directly in combination with an installation of the Abstract IL SDK if
you are using that).
2. Run
install-fsharp.bat
from the F# directory. Please make sure you do this, particularly if there
was an old installation of F# on your machine.
Notes and Usage
---------------
This release contains a command line compiler and some samples. See the
F# home pages for the manual.
Some obvious tools are missing such as a dependency analyzer and Lex/Yacc.
This release is suitable for use with the Abstract IL SDK, a large body of
F#/OCaml code for reading, manipulating and creating .NET binaries.
See also
lib\*.mli -- The library modules supported in this release
bin\fsc.exe -- The F# compiler
samples\... -- Some small samples showing F# <-> C# interop
If you run from the "installer" (setup.exe) the installation process
installs the libraries in the Global Assembly Cache
on your machine so you can run the programs you compile from anywhere.
This file documents the approximate change history for the following:
1. The Abstract IL library (both OCaml and "Managed" versions)
2. The F# compiler
3. The OCaml version of the Abstract IL library
4. The .NET/F# "Managed" version of the Abstract IL library
Changes from v0.5 to v0.6
-------------------------
The new items and changes are roughly:
1. The Abstract IL library (both OCaml and "Managed" versions)
1a. The binary reader
Details: See "ilread.mli" and the "Ilread" module. This
reads a .NET module (.DLL or .EXE) directly into the Abstract IL data
structures. The reader is a high-performane lazy reader, i.e.
the Abstract IL data structure produced will only be realized on-demand.
1b. The binary writer
Details: See "ilwrite.mli" and the "Ilwrite" module. This
writes a .NET module (.DLL or .EXE) directly from the Abstract IL data
structures.
1c. The binary writer can now produce PDB debug files.
Details: This is only implemented for the OCaml Abstract IL library.
The "Ilwrite" module simply accepts an option indicating the
name of the PDB file to produce (if any).
1d. The binary writer can now strong-name sign assemblies.
Details: This is only implemented for the OCaml Abstract IL library.
The "Ilwrite" module simply accepts an option indicating the
strong signer to use (if any). See "ilwrite.mli" and the
"Ilwrite" module.
1f. Revised Abstract IL data structures
Details: The Abstract IL term algebra
has been revised based on changes
that were needed for the binary reader/writer, and on the
basis of feedback from an internal MSR review.
1g. Binding now in Ilbind, no longer returns "Outcome" calues
Details: The "binding" operations have been moved to the Ilbind
module. This module may eventually grow to be a much richer
representation of the "bound" (i.e. linked) object graph.
For the moment the logic is simplyan algebra of bound types in addition
to the old operations.
The old operations returned values of type "Outcome" instead of
raising exceptions. The new operations raise exceptions. The "Outcome"
module is still included if you have old ocde that uses these constructs.
1h. TypeRef, TypeSpec, MethodRef, MethodSpec, Callsig now all records
Details: Increasingly the Abstract IL library will be used from
C# rather than just from OCaml/F#. This poses problems, as we would
like to increase substantially the usability of the library from
C#. This may mean changing the "IL" data structures so that they
look more friendly to the C# programmer.
One particular change that I have already made is to
(more-or-less) stop using single constructor datatypes to
represent what are essentially records. While this is slightly
less convenient for the advanced F# programmer, it is much more
convenient from C#. Eventually one will be able to define
C#-style properties in F#, and also to specify more flexibly
how a library appears from C#. However since that functionality
is likely to be in flux for some time it is important take these
basic usability steps for this release.
1i. Minor bug fixes
- "unaligned" was not being parsed correctly
- Reading/writing unicode strings now fully supported via
the binary reader/writer
2. The F# compiler
2a. Vastly simplified import of .NET assemblies
Details: No more .cna files are required. You can just
reference a .NET assembly directly, e.g. by specifying "-r foo.dll".
Most of the .NET Framework assemblies are referenced
automatically. Referencing a .NET assembly requires little
or no overhead either at compile-time or runtime.
2b. Much improved debugging support
Details: Sequence points are now generally accurate, and code
ranges are also substantially better. Breakpointing also works
well. Data display is better as many temporary variables
are no longer shown. I recommend using "DbgClr.exe" from the
.NET Framework SDK or VisualStudio.NET itself.
If symbol files cannot be found when attaching to a process consider
setting _NT_SYMBOL_PATH globally on your machine to include a path
both to your own symbols and to the "bin" directory of your Abstract
IL installation.
2c. Debugging even on optimized code
Details: Debugging is supported even if F# and JIT optimizations
are enabled. Thus, for example, you can attach to an F# process
which has been compiled fully optimized and still largely use the
symbols produced during compilation to view data and add breakpoints.
2d. Multi-dimensional arrays
Details: The syntax int[,] gives two dimensional array. The
"Arr2" library gives the pseudo-parametric operations for these
types. These were added partly for interop with Microsoft Excel,
which for one sample makes use of multi-dimensional arrays.
2e. Generic code generation
Details: The compiler can now produce generic code for use with
Gyro and our internal versions of generics for the next version
of the .NET CLR. Furthermore the standard library comes compiled
in its generic flavours (see fslibg.dll, fslibptrg.dll and
fslibdelg.dll). This has not been widely tested.
2f. Full support for unverifiable flavour of code.
Details: It is still not decided if ILX closures will be
compiled to delegates or virtual functions. In addition, the
compilation to unverifiable code also has obvious uses. Thus
for the moment ILX and the F# compiler will both support
3 flavours of generated code.
The DLLs for the ILX and F# libraries follow a standard naming
convention to indicate the flavour. All the flavours are
provided with the release, and all are pre-compiled and installed.
ilxlib.dll, fslib.dll: virtual calls, non-generic
ilxlibptr.dll, fslibptr.dll: unverifiable calls, non-generic
ilxlibg.dll, fslibg.dll: virtual calls, generic
2g. Explicit initialization no longer needed from C#
Details: Previously F# code required some explicit initialization:
System.Console.WriteLine(fslib._init.ToString());
System.Console.WriteLine(absil._init.ToString());
This is no longer required. Initialization will happen when you
touch any of the top level bindings for an F# module that are
computations (but not those that define lambda function definitions).
The initialization code for that module then forces the initialization
of all F# modules on which the given F# module depends (There is always
a strict DAG of dependencies in F#: mutual recursion between F#
modules is not yet supported. It's on the "todo" list.)
However, if you want to force initialization for a particular
F# module you can still do so using "System.Runtime.CompilerServices.
RuntimeHelpers. RunClassConstructor" on a RuntimeTypeHandle for the
corresponding F# module (you can get the RunClassConstructor
via a method on System.Type).
2h. Imported F# assemblies no longer need to be mentioned when linking
Details: Previously the F# compiler required any F# assemblies to
be mentioned when linking an F# program. This is no longer required:
the appropriate initialization code is automatically inserted.
2i. Minor bug fixes
- Problem with multiple conflicting references to mscorlib now fixed.
- Array comparison was not correctly implemented and comparing arrays
was raising a InvalidCastException
- Added a better error message for the "dangling ;" condition
3. The OCaml version of the Abstract IL library
OCaml 3.06 is now required.
3a. Usage from OCaml is slightly different due to new features.
Details: The library now includes a little C code, so
when using the OCaml bytecode compiler you must arrange to have
a DLL on your PATH. The relevant flags are:
ocamlc ... -I absil/bin -I absil/lib -dllpath absil/bin il.cma
When using the OCaml native code compiler things are a little
harder. You will need the .NET Framework SDK or VS.NET and the
following flags, along with a "LIB" path which can find the
various libraries
-I lib il.cmxa -cclib -lil ole32.lib corguids.lib mscoree.lib
4. The .NET/F# version of the Abstract IL library
4a. Available for use from F#
Details: This is the first release where Abstract IL has
been available for use from F#. Clearly this is potentially
a powerful combination.
4b. Available for use from C# etc.
Details: The library is usable from C#, though aspects of this
may need to be further thought through. To use the library
simply apply the standard techniques for using F# libraries
from C#, i.e. reference the assembly and use the F# modules
as types containing various values. The fidelity is by
no means perfect, but it may be much, much better than writing
your own equivalent of an Abstract IL framework.
4c. Debugging now supported
You can now debug your Abstract IL programs which use the managed
abstract IL library. PDB files are included for the library and source
is included for both the F# library and the "il.ml" (IL) module of
Abstract IL. The full source for Abstract IL is not yet included
but may be in future releases, however the most critical source is that
given above.
If symbol files cannot be found when attaching to a process consider
setting _NT_SYMBOL_PATH globally on your machine to include a path
both to your own symbols and to the "bin" directory of your Abstract
IL installation.
4d. Code flavours
Details: The library is available in all flavours
of code mentioned above (though I recommend using
the "standard" flavour).