pax_global_header 0000666 0000000 0000000 00000000064 12341637066 0014522 g ustar 00root root 0000000 0000000 52 comment=ed2d093641c59a851399b751d13961055869fc19
.gitignore 0000664 0000000 0000000 00000000221 12341637066 0013051 0 ustar 00root root 0000000 0000000 *.elc
*.a
*.cm?*
*.o
*.opt
*.omc
*.run
*~
.DS_Store
.build
.omake*
release
bin
version.ml
*.native
_build
*.byte
*.d.native
*.p.byte
beli
beluga
AUTHORS 0000664 0000000 0000000 00000000327 12341637066 0012140 0 ustar 00root root 0000000 0000000 Main contributors:
Brigitte Pientka, Mathieu Boespflug, Joshua Dunfield (past contributor),
Costing Badescu, Olivier Savary Belanger, Marie-Andree B.Langlois
(past contributor),
Francisco Ferreira, Stefan Monnier
COPYRIGHT 0000664 0000000 0000000 00000001206 12341637066 0012360 0 ustar 00root root 0000000 0000000 Copyright © 2012 Brigitte Pientka
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
INSTALL 0000664 0000000 0000000 00000012153 12341637066 0012121 0 ustar 00root root 0000000 0000000 ========================================================================
Beluga Installation & Configuration Guide
========================================================================
Table of contents:
1. Installation
1.1 Generic prerequisites
1.1.1 Debian/Ubuntu
1.1.2 Windows
1.2 Building
1.2.1 Compilation options
1.3 Troubleshooting
2. Configuration
2.1 Running Ruby script to convert to new syntax
2.2 Beluga-mode for Emacs
=========================
1. Installation
=========================
1.1 Generic Prerequisites
=========================
The following packages must be installed to use Beluga:
ocaml 3.12.2+: http://caml.inria.fr/download.en.html
extlib: http://code.google.com/p/ocaml-extlib/downloads/list
ulex: http://www.cduce.org/download.html#side
Users not running Windows may wish to build using omake:
omake: http://omake.metaprl.org/index.html
Optional dependencies (for improved interactive mode):
rlwrap: http://utopia.knoware.nl/~hlub/uck/rlwrap/
1.1.1 Debian/Ubuntu
-------------------
Under Debian Linux, all the necessary prerequisites can be installed
with just the following command:
# apt-get install ocaml ocaml-findlib libextlib-ocaml-dev ocaml-ulex
The interactive mode is greatly improved if you have rlwrap installed,
so you might also want to consider:
# apt-get install rlwrap
These commands may work under other distributions.
1.1.2 Windows
-------------
Beluga can be executed on Windows through Cygwin. The necessary prerequisites can be installed
using an OCalm package manager called WODI.
1. Download WODI's graphical installer wodi32/64.exe
http://wodi.forge.ocamlcore.org/download.html
2. Run wodi32/64.exe and step through the installation wizard
Note: if you don't already have Cygwin installed, it will be installed for you. The installation directory you select will be the root directory within the WODI Cygwin terminal.
3. From the start menu, select Wodi32/64 Package Manager. Don't be alarmed if WODI cannot read all PATH entries.
4. Search for each of the prerequisite packages: extlib, ulex, ounit, findlib. Check the box beside each of the packages and click "Apply". The checkbox will be greyed out if the package has already been installed.
More inforamtion about WODI: http://wodi.forge.ocamlcore.org/
More information about Cygwin: http://www.cygwin.com/
1.2 Building
============
Compile by running "make" from the Beluga directory.
./beluga
# make
You can now run Beluga programs with the newly
"beluga" executable in the "bin" directory
./beluga
# ./bin/beluga path/to/program.bel
1.2.1 Compilation options
-------------------------
Setting the following environment variables for "make" enables the
following compilation option:
BYTE: sets byte-code compilation instead of native
DEBUG: enables the -g option of ocamlc
PROFILE: enables the -p option of ocamlc
WARN_PATTERN: enables warning for non-exhaustive patterns
VERBOSE: sets verbosity level of ocamlbuild
PARALLEL: sets max number of parallel processes
For instance, to enable byte-code compilation, run:
make BYTE=true
Running `make clean' will clean the directory of compilation results
1.3 Troubleshooting
===================
Attempting to build Beluga before installing the prequisites may cause
libraries to be only partially updated. You may recieve a new error message
once you've set up the prereq packages.
Error: The files [path/to/file]
and [path/to/file]
make inconsistent assumptions over interface [library name]
Try cleaning the Beluga directory.
./beluga
# ./make clean all
=========================
2. Configuration
=========================
2.1 Running Ruby script to convert to new syntax
================================================
You will need Ruby 1.9 for running the script.
For MAC OS:
The default version of ruby installed on Mac OS is usually not Ruby 1.9, but
Ruby 1.8. To install the newest version of Ruby, we recommend installing first
RVM, the “Ruby Version Manager. This will make installing Ruby 1.9 easy. In your
home directory, you can say:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
rvm is then installed in .rvm/bin.
Then you can say:
.rvm/bin/rvm install 1.9.3
Note, you will want to add .rvm/bin to your .bashrc directory, so you will be able to
find rvm without giving the full path.
2.2 Beluga-mode for GNU Emacs
=============================
Beluga includes a major mode for programming in Emacs. The elisp file is locationed in the
./beluga/tools directory. To configure Beluga-mode:
1. Update your ~/.emacs configuration file with the lines written below. XEmacs users must
update ~/.xemacs and ~/.xema.cs/init.el with the same text. Create any of these files if
they do not exist already.
(add-to-list 'load-path "/home/bpientka/complogic/beluga/tools/")
(load "beluga-mode.el")
NOTE: Feel free to move ther beluga-mode.el file to another directory so long as you
ensure its location is included in the Emacs load-path.
2. Restart Emacs.
.
Emacs will now launch in Beluga-mode automatically when you open a Beluga program.
LICENSE 0000664 0000000 0000000 00000104513 12341637066 0012077 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
Makefile 0000664 0000000 0000000 00000001135 12341637066 0012526 0 ustar 00root root 0000000 0000000 DEBUG = true
#PROFILE = true
#WARN_PATTERN = true
#VERBOSE = 0
#BYTE = true
PARALLEL = 4
EXT = $(if $(BYTE),byte,native)
OCAMLBUILD = ocamlbuild -use-ocamlfind \
$(if $(PARALLEL),-j $(PARALLEL),) \
$(if $(PROFILE),-tag profile,) \
$(if $(DEBUG),-tag debug,) \
$(if $(VERBOSE),-verbose $(VERBOSE),) \
$(if $(WARN_PATTERN),-tag warn\(P\) -tag warn-error\(p\),)
.PHONY: all clean
all: bin/beluga bin/beli
bin/beluga: src/beluga/main.$(EXT)
mkdir -p bin
cp _build/$< $@
bin/beli: src/beli/main.$(EXT)
mkdir -p bin
cp _build/$< $@
clean:
$(OCAMLBUILD) -clean
rm -rf bin
%:
$(OCAMLBUILD) $@
OMakefile 0000664 0000000 0000000 00000003373 12341637066 0012653 0 ustar 00root root 0000000 0000000 # Use ocamlfind to manage library linking
USE_OCAMLFIND = true
# Set up the ocamlfind flags
OCAMLFINDFLAGS = -syntax camlp4o
# The ocamlfind packages we use
OCAMLPACKS[] =
camlp4
extlib
ulex
dynlink
unix
# Compile with debugging options? This enables:
#
# 1. Pattern match failure warnings
# 2. Profiling information in compiled code (-p)
# DEBUG = true
OCAMLFLAGS += $(if $(DEBUG), -w Ae-44 -warn-error Ap-37 \
, -w Aep-44 -warn-error A-37)
OCAMLFLAGS += $(if $(RELEASE), -warn-error a)
# 3. Debugging information in byte-compiled code (-g) (It is never useful to turn this off. -jd)
OCAMLFLAGS += -g
# Flags to pass to the native-code compiler
# Explanation:
# -noassert (turn off assertions)
# -inline 100 (aggressive inlining)
OCAMLOPTFLAGS = -noassert -inline 100
OCAMLOPTFLAGS += $(if $(DEBUG), -p)
# Declare a phony clean target
.PHONY: clean beluga beli
# Map the src dir onto the build dir
vmount(-l, src, .build)
mkdir -p .build/core
mkdir -p .build/beluga
mkdir -p .build/beli
if $(not $(RELEASE))
vmount(-l, sasybel/src, .build/sasybel)
mkdir -p .build/sasybel
export
# Include the fake .build subdirectory
.SUBDIRS: .build $(if $(not $(RELEASE)), .build/sasybel)
.DEFAULT: .PHONY/src/.DEFAULT :effects: build
mkdir -p bin
ln-or-cp .build/beluga/beluga.$(if $(NATIVE_ENABLED), opt, run) bin/beluga
ln-or-cp .build/beli/beli.$(if $(NATIVE_ENABLED), opt, run) bin/beli
if $(not $(RELEASE))
ln-or-cp .build/sasybel/sasybel.$(if $(NATIVE_ENABLED), opt, run) bin/sasybel
export
clean: .PHONY/src/clean
rm $(filter-proper-targets $(ls R, .))
rm $(filter %.omc, $(ls R, .))
rm -rf bin
OMakeroot 0000664 0000000 0000000 00000000630 12341637066 0012710 0 ustar 00root root 0000000 0000000 #
# Include the standard configuration for OCaml applications
#
open build/OCaml
# Default values, which can be overridden by the command line:
DEBUG = false
BYTE_ENABLED = true
NATIVE_ENABLED = false
RELEASE = false
#
# Process the command-line variables are defined *after* the standard
# configuration has been loaded.
#
DefineCommandVars()
#
# Include the OMakefile in this directory.
#
.SUBDIRS: .
RELEASE 0000775 0000000 0000000 00000005142 12341637066 0012076 0 ustar 00root root 0000000 0000000 #!/bin/sh
set -e
bailout=NO
git status --porcelain | grep "" && bailout=YES
if [ $bailout = YES ]; then
echo
echo 'git status reports a working tree that is not pristine.'
echo 'Please run this release script in a clean directory, such as after'
echo
echo '$ git clone'
exit 1
fi
echo 'Version number is:'
echo
cat VERSION || ( echo "VERSION file doesn't exist; aborting release" ; exit 1 )
echo
release=./beluga-`cat VERSION`
echo 'Release directory name is:'
echo
echo ' '$release
echo
echo 'Building (bytecode) in-tree first, for testing ...'
make clean
make BYTE=1 || ( echo 'make failed; aborting release.' ; exit 1 )
echo 'Running TEST (bytecode) ...'
./TEST --examples || ( echo 'TEST failed; aborting release.' ; exit 1 )
echo 'Building (native) in-tree first, for testing ...'
make clean
make || ( echo 'native make failed; aborting release.' ; exit 1 )
echo 'Running TEST (native) ...'
./TEST --examples || ( echo 'TEST failed; aborting release.' ; exit 1 )
if [ -e $release ]; then
echo Release directory "$release" already exists.
exit 1
fi
mkdir $release
echo 'Copying files in root ...'
cp -a \
INSTALL \
OMakefile \
OMakeroot \
AUTHORS \
COPYRIGHT \
LICENSE \
VERSION \
myocamlbuild.ml \
Makefile \
_tags \
$release
mkdir $release/bin
# Set the RELEASE to true by default.
sed -i 's/RELEASE *= *false/RELEASE = true/' $release/OMakeroot
echo 'Copying src ...'
cp -a \
src \
$release
echo 'Copying tools ...'
cp -a \
tools \
$release
echo 'Copying examples ...'
cp -a \
examples \
$release
cd $release
echo Deleting useless files:
useless=$(find . -print | egrep '~|.DS_Store' || true)
echo rm -rf $useless
rm -rf $useless
# Remove examples not yet ready for public consumption
echo rm -rf examples/{notworking,cfg,beluga}
rm -rf examples/{notworking,cfg,beluga}
echo "Copying $release to $release-sandbox ..."
cd ..
if [ -e $release-sandbox ]; then
echo Release sandbox directory "$release-sandbox" already exists.
exit 1
fi
cp -a $release $release-sandbox
cd $release-sandbox
echo 'Building (bytecode) in release directory ...'
make BYTE=1 || ( echo 'omake failed; aborting release.' ; exit 1 )
echo 'Building (native) in release directory ...'
make clean
make || ( echo 'native omake failed; aborting release.' ; exit 1 )
cd ..
echo 'Leaving '$release-sandbox' around if you want to test further.'
echo 'Building archive' $release.tar.gz
tar zcf $release.tar.gz $release || ( echo 'tar failed.' ; exit 1 )
echo
ls -l $release.tar.gz
echo
echo "Release built. Don't forget to "'`'"git push' if needed."
STYLE 0000664 0000000 0000000 00000003055 12341637066 0011714 0 ustar 00root root 0000000 0000000 Coding style for Beluga
=======================
Naming conventions
------------------
- objects are prefixed with a t: tA, tK, tM, ...
- objects under a substitution are prefixed with a s: sA, sK, sM, ...
- contexts are prefixed with a c: cPsi, cPhi, ...
- function names follow the CamelCase convention
Lexical conventions
-------------------
- files end with a new line (Emacs: require-final-newline)
- tabulations are not used (Emacs: indent-tabs-mode)
- the code is written in ascii
- indentation follows Emacs's tuareg mode
- lines length should be limited to 80 characters
Syntactic conventions
---------------------
- "if" constructs are written with the "then" ending the test line
- code is written in a currified style, a space separating the function from
its arguments
- tuples are parenthesized even when not ambiguous
- sequential code is written in the OTBS (One True Brace Style), preferred to
using "let _"
- function declarations list all arguments and match on them explicitly
- function cases are separated by a blank line
- '->' are written at the end of lines
- spaces are inserted after commas and around arithmetic operators
Comments
--------
- each function must list its invariants
- catching of Ocaml errors must be explained by a comment
- leave revision comments to the revision control system
- whenever comment indentation is needed in multiline comment, prefix each line
with *
- for ease of navigation, comments denoting things that are to be done and
identifying problematic code use TODO and FIXME tags respectively
TEST 0000775 0000000 0000000 00000007274 12341637066 0011605 0 ustar 00root root 0000000 0000000 #!/usr/bin/env zsh
usage() {
echo "Usage: $0 [test-options] -- [beluga-options]"
echo
echo "Synopsis: test harness for Beluga."
echo
echo "Options:"
echo " -h,--help Display this usage information."
echo " -c,--color Force colorized output even when piped."
echo " --noexamples Do not also test $EXAMPLEDIR."
echo " --examples Only test $EXAMPLEDIR."
echo " --reset Replace all .out files with new output (use with caution!)."
echo
echo "Notes:"
echo " - If any .cfg files are found in a subdirectory, only them will be tested."
echo " - If no .cfg file is found, all .bel files in the subdirectory"
echo " will be tested."
echo " - To inhibit testing .bel files, put an empty test.cfg in that directory."
}
echo "Parameters for this run (override as necessary using environment variables):"
echo
# Path to the Beluga source distribution.
echo -e "\t" BELUGADIR: ${BELUGADIR:=$(dirname $0)}
# Set $EXE to the executable to test.
echo -e "\t" EXE: ${EXE:=$BELUGADIR/bin/beluga}
# Test cases.
echo -e "\t" TESTDIR: ${TESTDIR:=$BELUGADIR/t}
# Test cases.
echo -e "\t" EXAMPLEDIR: ${EXAMPLEDIR:=$BELUGADIR/examples}
# Time limit.
echo -e "\t" TIMEOUT: ${TIMEOUT:=10} seconds
echo
# Allow file globs to match nothing.
setopt null_glob
# Find test cases.
test_cases() {
for dir in $TESTDIR/**/ $EXAMPLEDIR/**/
do
cfgs=(${dir}*.cfg)
if (( ${#cfgs[@]} > 0 ))
then
print -C1 ${dir}*.cfg
else
print -C1 ${dir}*.bel
fi
done
}
sort_cases() {
cases=($(&1)
exit_code=$?
diff_result=$(echo "$result" | diff -u $i.out - 2>/dev/null)
# diff responds 0 if same, 1 if different, 2 if couldn't compare.
diff_code=$?
if [[ $exit_code -eq 152 ]]
then
echo -e "$C[timeout]TIMEOUT$CEND"
timeout=$((timeout+1))
elif [[ $diff_code -eq 0 || (exit_code -eq 0 && $diff_code -eq 2) ]]
then
echo -e "$C[done]DONE$CEND"
success=$((success+1))
else
echo -e "$C[fail]FAIL$CEND"
[[ -z "$diff_result" ]] && echo "$result" || (echo "$diff_result" | colorize_diff)
fail=$((fail+1))
fi
[[ -n $RESET && -f $i.out ]] && echo "$result" > $i.out
done
echo
echo Successes: $success
echo Failures: $fail
echo Timeouts: $timeout
echo Total: $n
echo
times
# If not all tests succeeded then exit with non-zero status.
[[ $success -eq $n ]] || exit 1
exit 0
}
typeset -A C
colorize_diff() {
sed "s/^+/${fg[green]}+/
s/^-/${fg[red]}-/
s/\$/$reset_color/"
}
set_colors() {
autoload colors
colors
C=(start ${fg[blue]} done ${fg_bold[green]} timeout ${fg_bold[magenta]} fail ${fg_bold[red]})
CEND=$reset_color
}
# By default, use colors only when connected to a terminal.
[[ -t 1 ]] && set_colors
while true
do
case "$1" in
-h|--help)
usage
exit 0
;;
-c|--colour|--color)
set_colors
shift
;;
--noexamples)
EXAMPLEDIR=/dev/null
shift
;;
--examples)
TESTDIR=/dev/null
shift
;;
--reset)
RESET=true
shift
;;
--)
shift
break
;;
"")
break
;;
*)
echo "Unrecognized option $1."
echo "Make sure to write -- before any argument that should be passed to Beluga."
exit 2
esac
done
do_testing $*
TEST-COVER 0000775 0000000 0000000 00000014701 12341637066 0012452 0 ustar 00root root 0000000 0000000 #!/bin/sh
# TEST-COVER: tests Beluga coverage (B. Pientka)
# Wed Mar 9 09:49:33 2011 -bp
# Usage: TEST-COVER [options]
#
# For timing, should be run with printing statements commented in the code
# so printing is supresed.
# [options], if given, are passed to Beluga.
# Example: TEST-COVER +d
# set $BELUGA to an absolute path to the toplevel .../beluga directory
#
pwd=`pwd`
BELUGA=`dirname $pwd/$0`
cd $BELUGA
BELUGA=`pwd`
# echo BELUGA: $BELUGA
# set $INTERPRETER to the executable
INTERPRETER=$BELUGA/bin/beluga
# set $X to the `beluga' examples directory
X=$BELUGA/examples
cd $X
# The following contain nonexhaustive cases with empty contexts
# Changed tapl/ch3+arith/sources.cfg \
# to new syntax; should be re-added
echo 'nonexhaustive cases: (empty contexts)'
# $INTERPRETER -noprint +t +warncover $* \
$INTERPRETER +t +warncover compile/debruijn/test.cfg
$INTERPRETER +t +warncover mini-ml/eval-sub.bel
$INTERPRETER +t +warncover mini-ml/eval-sub-explicit.bel
$INTERPRETER +t +warncover tapl/ch6/evaluator.bel
$INTERPRETER +t +warncover typed-eval/tpeval.bel # bug?
$INTERPRETER +t +warncover typed-eval/tpeval-explicit.bel # pattern match failure in coverage
$INTERPRETER +t +warncover typed-eval/tpeval2.bel
sleep 1
# The following contain exhaustive cases with empty contexts
echo 'covering cases: (empty contexts)'
# $INTERPRETER -noprint +t +coverage $* \
$INTERPRETER +t +coverage arith/arith.bel
$INTERPRETER +t +coverage compile/cls/test.cfg
$INTERPRETER +t +coverage compile/debruijn1/test.cfg
$INTERPRETER +t +coverage debruijn1/sources.cfg
$INTERPRETER +t +coverage fol/test.cfg
$INTERPRETER +t +coverage ../t/success/base/id-simple.bel
$INTERPRETER +t +coverage typed-eval/tpeval-val.bel
$INTERPRETER +t +coverage mini-ml/eval-sub-1.bel
$INTERPRETER +t +coverage mini-ml/eval-sub-1-explicit.bel
$INTERPRETER +t +coverage mini-ml/vsound.bel
$INTERPRETER +t +coverage mini-ml/vsound-explicit.bel
$INTERPRETER +t +coverage mini-ml/tps.bel
# $INTERPRETER +t +coverage coverage/arith.bel # gone ?
# $INTERPRETER +t +coverage coverage/list.bel # gone ?
$INTERPRETER +t +coverage small-step/lam.bel
$INTERPRETER +t +coverage small-step/system-f.bel
$INTERPRETER +t +coverage small-step/system-f-iso.bel
$INTERPRETER +t +coverage tapl/ch6/small-step.bel # missing from examples
$INTERPRETER +t +coverage tapl/ch14.bel
$INTERPRETER +t +coverage tapl/ch14-b.bel
$INTERPRETER +t +coverage unique/unique-eval.bel
sleep 1
# NOTE: tapl/ch6/small-step.bel
# has unresolved unification constraints, unless we prioritize splitting on
# dep. (explicit) argument first.
# The following contain cases with empty contexts and
# we prove that the resulting open coverage goals are
# trivially proven to be impossible
# All of these examples are currently only working in the new syntax
# tapl/ch3+arith/sources-corrected.cfg
# tapl/ch3+arith/big-small.cfg
# tapl/ch3+arith/det.cfg
echo 'covering cases with trivially proven open coverage goals (empty contexts): '
# $INTERPRETER -noprint +t +coverage $*
# $INTERPRETER +t +coverage $*
$INTERPRETER +t +coverage compile/cpm/test.cfg
$INTERPRETER +t +coverage tapl/ch3/sources.cfg
$INTERPRETER +t +coverage tapl/ch6/tps.bel
$INTERPRETER +t +coverage tapl/ch3+arith/sources-corrected.cfg
$INTERPRETER +t +coverage tapl/ch3+arith/big-small.cfg
$INTERPRETER +t +coverage tapl/ch3+arith/det.cfg
sleep 1
echo 'CASES WITH NON-EMPTY CONTEXT: '
# # The following contain exhaustive cases with empty contexts
echo 'nonexhaustive cases: (non-empty contexts)'
# # $INTERPRETER -noprint +t +warncover $* \
$INTERPRETER +t +warncover count-var/cntvar-crec.bel
$INTERPRETER +t +warncover count-var/cntvar-explicit.bel
$INTERPRETER +t +warncover count-var/cntvar-simple.bel
$INTERPRETER +t +warncover count-var/cntvar-simple-crec.bel
$INTERPRETER +t +warncover count-var/cntvar-2.bel
$INTERPRETER +t +warncover cut-elim.bel
$INTERPRETER +t +warncover cut-elim-crec.bel
$INTERPRETER +t +warncover freshML/term-crec.bel
# sleep 1
# echo 'covering cases with non-empty context: '
# # $INTERPRETER -noprint +t +coverage $* \
$INTERPRETER +t +coverage t/success/cov-unsound.bel
$INTERPRETER +t +coverage copy/copy.bel
$INTERPRETER +t +coverage copy/copy-crec.bel
$INTERPRETER +t +coverage copy/copy-explicit.bel
$INTERPRETER +t +coverage copy/copy-simple.bel
$INTERPRETER +t +coverage copy/copy-simple-crec.bel
$INTERPRETER +t +coverage copy/copy-simple-explicit.bel
# $INTERPRETER +t +coverage cut-elim-crec-cover.bel
$INTERPRETER +t +coverage church-rosser/test.cfg
$INTERPRETER +t +coverage church-rosser/test-crec.cfg
$INTERPRETER +t +coverage church-rosser/test-crec-cover.cfg
$INTERPRETER +t +coverage free-vars/fvnat-explicit.bel
$INTERPRETER +t +coverage free-vars/fvnat.bel
$INTERPRETER +t +coverage free-vars/fvnat-crec.bel
$INTERPRETER +t +coverage freshML/conv-untyped.bel
$INTERPRETER +t +coverage freshML/term.bel
$INTERPRETER +t +coverage freshML/cps.bel
$INTERPRETER +t +coverage freshML/cps-crec.bel
$INTERPRETER +t +coverage freshML/cps-popl-tutorial1.bel
$INTERPRETER +t +coverage freshML/cps-popl-tutorial1-crec.bel
$INTERPRETER +t +coverage freshML/cps-popl-tutorial2.bel
$INTERPRETER +t +coverage freshML/cps-popl-tutorial2-crec.bel
$INTERPRETER +t +coverage equal/eq-proof.bel
$INTERPRETER +t +coverage equal/eq-proof-full-crec.bel
$INTERPRETER +t +coverage lp-horn/test-crec.cfg
$INTERPRETER +t +coverage path/path.bel
$INTERPRETER +t +coverage path/path-typed.bel
$INTERPRETER +t +coverage ../t/success/base/case1.bel
$INTERPRETER +t +coverage ../t/success/base/case1-explicit.bel
$INTERPRETER +t +coverage ../t/success/base/case2.bel
$INTERPRETER +t +coverage ../t/success/base/case2-explicit.bel
$INTERPRETER +t +coverage ../t/success/base/simple-explicit.bel
$INTERPRETER +t +coverage ../t/success/base/simple.bel
$INTERPRETER +t +coverage ../t/success/base/sigma4.bel
$INTERPRETER +t +coverage ../t/success/base/sigma3.bel
$INTERPRETER +t +coverage ../t/success/base/alpha.bel
$INTERPRETER +t +coverage tpcert.bel
# sleep 1
# echo 'covering cases requiring context splits: '
# # $INTERPRETER -noprint +t +coverage $* \
$INTERPRETER +t +coverage ../t/success/base/ctxmatching.bel
$INTERPRETER +t +coverage ../t/success/base/depctxmatching.bel
$INTERPRETER +t +coverage freshML/debruijn-uniform.bel
$INTERPRETER +t +coverage freshML/debruijn-1a.bel
exit 0
TEST-LF 0000775 0000000 0000000 00000003160 12341637066 0012072 0 ustar 00root root 0000000 0000000 #!/bin/sh
# TEST: tests Beluga by calling it on various examples.
#
# Usage: TEST [options]
#
# [options], if given, are passed to bin/beluga.
# Example: TEST +d
#
# Note that a leading '@' in a filename means that the test should NOT succeed,
# because the file has a type error that should be caught.
# set $BELUGA to an absolute path to the toplevel .../beluga directory
#
pwd=`pwd`
BELUGA=`dirname $pwd/$0`
cd $BELUGA
BELUGA=`pwd`
# echo BELUGA: $BELUGA
# set $INTERPRETER to the executable
INTERPRETER=$BELUGA/bin/beluga
# set $X to the `beluga' examples directory
X=$BELUGA/examples
cd $X
# We use the following conventions:
#
# - Pure LF signatures (and original converted Twelf example) are in files sources.cfg
# - Proofs written in Beluga (or an original Twelf example) are in test.cfg
#
$INTERPRETER +t \
$* \
../examples-twelf/arith/sources.cfg \
../examples-twelf/alloc-sem/sources.cfg \
../examples-twelf/ccc/sources.cfg \
../examples-twelf/church-rosser/sources.cfg \
../examples-twelf/cpsocc/sources.cfg \
../examples-twelf/compile/cls/sources.cfg \
../examples-twelf/compile/cpm/sources.cfg \
../examples-twelf/compile/debruijn/sources.cfg \
../examples-twelf/compile/debruijn1/sources.cfg \
../examples-twelf/compile/cps/sources.cfg \
../examples-twelf/cut-elim/sources.cfg \
../examples-twelf/fol/sources.cfg \
../examples-twelf/handbook/sources.cfg \
../examples-twelf/kolm/sources.cfg \
../examples-twelf/lp/sources.cfg \
../examples-twelf/lp-horn/sources.cfg \
../examples-twelf/mini-ml/sources.cfg \
../examples-twelf/prop-calc/sources.cfg
TEST-NOTES 0000664 0000000 0000000 00000013460 12341637066 0012462 0 ustar 00root root 0000000 0000000 arith/arith.bel Beluga Example - empty contexts
church-rosser/test.cfg \ Beluga Example: with contexts and reconstruction for
church-rosser/test-crec.cfg \ meta-variables associated with projection-pattern
compile/cls/sources.cfg \ Twelf Example
compile/cls/test.cfg \ Beluga Example: completeness proof; advanced unification
illustrates that we cannot infer as many implicit argument
statically because patterns must be "closed" and we cannot
propagate information we learn later backwards.
compile/cpm/sources.cfg \ Twelf Example
compile/cpm/test.cfg \ Beluga Example:
completeness and soundness proof
compile/debruijn/sources.cfg \ Twelf Example
compile/debruijn/test.cfg \ Beluga example: Mapping evaluations to evaluations in env.
MISSING: other direction
compile/debruijn1/sources.cfg \ Twelf example
compile/debruijn1/test.cfg \ Beluga example: Both directions (mapping evaluations to
evaluations in environments and vice versa)
(the previous example in directory debruijn is contained here.
compile/cps/sources.cfg \ Twelf example (no proofs)
compile/cxm/sources.cfg \ Twelf example (no proofs)
count-var/cntvar.bel \ Beluga examples: simple use of contexts
count-var/cntvar-explicit.bel \
count-var/cntvar-2.bel \
copy/copy.bel \ Belgua examples: simple use of contexts
copy/copy-crec.bel \
copy/copy-explicit.bel \
copy/copy-simple.bel \
copy/copy-simple-crec.bel \
copy/copy-simple-explicit.bel \
cut-elim.bel \ Beluga examples: fairly straightfoward
cut-elim-crec.bel \ use of contexts
debruijn1/sources.cfg \ Beluga example: empty contexts
Proof that evaluations map to evaluations in env.
Version restricted to lambda-calculus (should be moved to
compile dir)
equal/eq-proof-tuple.bel \ Beluga examples: use of context subsumption,
equal/eq-proof.bel \ use of sophisticated pattern variable reconstruction in
equal/eq-proof-full-crec \ the presence of projections, use of context reconstruction
fol/sources.cfg \ Twelf example
fol/test.cfg \ Beluga examples: no recursion; mostly definitions.
free-vars/fvnat.bel \ Beluga examples: simple contexts, context reconstruction
free-vars/fvnat-crec.bel \
free-vars/fvnat-explicit.bel \
freshML/term.bel \ Beluga examples: uses context, context reconstruction
freshML/term-crec.bel \
freshML/cps.bel \
freshML/cps-crec.bel \
freshML/cps-popl-tutorial1.bel \
freshML/cps-popl-tutorial1-crec.bel \
freshML/cps-popl-tutorial2.bel \
freshML/cps-popl-tutorial2-crec.bel \
lp-horn/sources.cfg \ Beluga examples: uses contexts
lp-horn/test-crec.cfg \ Beluga examples: uses context reconstruction
mini-ml/eval-sub-1.bel \ Beluga examples: empty contexts
mini-ml/eval-sub-1-explicit.bel \
mini-ml/eval-sub.bel \
mini-ml/eval-sub-explicit.bel \
mini-ml/tps.bel \
mini-ml/vsound.bel \
mini-ml/vsound-explicit.bel \
path/path.bel \ Beluga example: cannot use context reconstruction
path/path-typed.bel \ because we induct on implicit arg.
small-step/lam.bel \ Beluga example: empty contexts
small-step/system-f.bel \
small-step/system-f-iso.bel \
subject-red.bel \ Beluga example: context reconstruction
subject-red-crec.bel \
test/backarrow.bel \
test/case1.bel \
test/case1-explicit.bel \
test/case2.bel \
test/case2-explicit.bel \
test/cross.bel \
test/dependency.bel \
test/id.bel \
test/id-simple.bel \
test/id-explicit.bel \
test/test.bel \
test/test-simple.bel \
test/test-simple-explicit.bel \
test/schema.bel \
tpcert.bel \ Beluga example: recursion over implicit arg.
hence no context reconstruction
typed-eval/tpeval.bel \ Beluga example: empty contexts
typed-eval/tpeval-explicit.bel \
typed-eval/tpeval2.bel \
unique/unique.bel \ Beluga example: context reconstruction for version
unique/unique-eval.bel \ where we induct on derivation instead of implicit arg.
LF/arith.lf \
LF/arith-rec1.lf \
LF/lambda.lf \
LF/lambda-rec.lf \
LF/simple-typing.lf \
LF/lam-tp-rec.lf \
LF/cut-elim.lf \
LF/kindtest.lf \
LF/mini-ml.lf \
LF/mini-ml-rec.lf \
LF/vsound.lf \
LF/vsound-rec.lf \
LF/tpeval.lf \
LF/tpeval-rec.lf \
LF/tpcert.lf \
LF/tps.lf \
../examples-twelf/arith/sources.cfg \
../examples-twelf/alloc-sem/sources.cfg \
../examples-twelf/ccc/sources.cfg \
../examples-twelf/church-rosser/sources.cfg \
../examples-twelf/church-rosser/test.cfg \
../examples-twelf/cpsocc/sources.cfg \
../examples-twelf/compile/cls/sources.cfg \
../examples-twelf/compile/cls/test.cfg \
../examples-twelf/compile/cpm/sources.cfg \
../examples-twelf/compile/cpm/test.cfg \
../examples-twelf/compile/debruijn/sources.cfg \
../examples-twelf/compile/debruijn1/sources.cfg \
../examples-twelf/compile/cps/sources.cfg \
../examples-twelf/cut-elim/sources.cfg \
../examples-twelf/fol/sources.cfg \
../examples-twelf/handbook/sources.cfg \
../examples-twelf/kolm/sources.cfg \
../examples-twelf/lp/sources.cfg \
../examples-twelf/lp-horn/sources.cfg \
../examples-twelf/mini-ml/sources.cfg \
../examples-twelf/mini-ml/test.cfg \
../examples-twelf/prop-calc/sources.cfg \
test/alpha.bel \
test/sigma1.bel \
test/sigma2.bel \
test/sigma3.bel \
test/sigma4.bel \
test/implicit-obj.bel \
TEST-TWELF 0000664 0000000 0000000 00000001223 12341637066 0012445 0 ustar 00root root 0000000 0000000 set chatter 1
Timers.reset
OS.chDir examples-twelf-orig/
reset
make arith/sources.cfg
reset
make alloc-sem/sources.cfg
reset
make ccc/sources.cfg
reset
make church-rosser/sources.cfg
reset
make cpsocc/sources.cfg
reset
make compile/cls/sources.cfg
reset
make compile/cpm/sources.cfg
reset
make compile/debruijn/sources.cfg
reset
make compile/debruijn1/sources.cfg
reset
make compile/cps/sources.cfg
reset
make cut-elim/sources.cfg
reset
make fol/sources.cfg
reset
make handbook/sources.cfg
reset
make kolm/sources.cfg
reset
make lp/sources.cfg
reset
make lp-horn/sources.cfg
reset
make mini-ml/sources.cfg
reset
make prop-calc/sources.cfg
Timers.show
reset
VERSION 0000664 0000000 0000000 00000000004 12341637066 0012130 0 ustar 00root root 0000000 0000000 0.5
_tags 0000664 0000000 0000000 00000000202 12341637066 0012100 0 ustar 00root root 0000000 0000000 true : annot, warn(Azep-44), warn-error(A-37)
"src/core" : include
<**/*.{byte,native}> : package(unix, extlib, ulex, camlp4.lib)
examples-twelf-orig/ 0000775 0000000 0000000 00000000000 12341637066 0014761 5 ustar 00root root 0000000 0000000 examples-twelf-orig/alloc-sem/ 0000775 0000000 0000000 00000000000 12341637066 0016635 5 ustar 00root root 0000000 0000000 examples-twelf-orig/alloc-sem/README 0000664 0000000 0000000 00000050124 12341637066 0017517 0 ustar 00root root 0000000 0000000 Simply Typed Lambda-Calculus with a small-step, allocation semantics.
Matthew Fluet (June 2005)
This is an attempt to get a feel for Twelf with a problem somewhere
between the trivial simply typed lambda-calculus with a large-step
semantics (a Twelf documentation example) and Karl Crary's TALT
formalization (which is too complex to be useful for a novice).
Ultimately, we'd like to have a formalization of URAL and it's
successors. While Greg has worked out a seemingly adequate encoding
of the core URAL type system, it remains unclear precisely how one
will invert the "resp_qual" predicate to reason about the use of
variables and values. This is compounded by the fact that the core
URAL dynamic semantics is agnostic with respect to the substructural
qualifiers; hence, the type safety proof need never appeal to the a
qualifier to justify a preservation or progress argument.
refURAL ameliorates this deficiency somewhat, since the dynamic
semantics will (obviously) get stuck trying to read/write/swap/free a
unique reference after it has been freed. Less obviously, the dynamic
semantics will also get stuck if a unique reference were to be
duplicated, strongly updated with one copy, and used at the old type
with the other copy. As pointed out by the ICFP reviewers (and
pending revision into the ICFP paper), one can further instrument the
heap and heap typing so that unreachable (and, hence, manifestly
unused) linear and relevant references are a typing error.
However, refURAL is a bit too far down at the deep end of the pool for
me to jump with when I can barely swim in Twelf. One can also
ameliorate the deciciency with core URAL's dynamic semantics by
adopting an allocation semantics that deallocates linear (and affine)
values at their uses in elimination forms. This is Walker's approach
in ATTAPL. Presumably, one can also instrument the store and store
typing so that unreachable linear (and relevant) values are a typing
error. Such an immutable (modulo deallocation) store has the
attractive property that it is essentially inductive, since new values
can only point to older values, and should be somewhat easier to
formalize than a mutable heap.
Still, the combination of a substructural type system and an
allocation semantics would put me in over my head. So, witness the
following, a type safety proof for the simply typed lambda calculus
(with unit and pairs), whose dynamic semantics is given by a
small-step, allocation semantics.
I've tried to keep the formalism as simple as possibly, but there are
a few aspects of the proof with which I am a little unhappy.
* Store Representation
As was noted on the POPLMark mailing list, modeling an abstract
machine with a store, considered as a partial map from (alpha-varying)
labels to values (which may have free occurences of those labels), is
very awkward to encode. Karl Crary reported that it is possible to
pursue an approach where all the binders (labels) are introduced
first, then lay out the store, using a dependent type to ensure that
the number of binders equals the number of entries in the heap.
However, he found it too annoyig and resorted to non-alpha-varying
labels.
With that in mind, I've adopted the second approach, cribbing a little
from what I saw in Karl's TALT formalization. Essentially, a store is
a list of (location, value) pairs, where locations are isomorphic to
the natural numbers:
st : type. %name st S. %% store.elf
nil_st : st.
cons_st : loc -> val -> st -> st.
A store typing is analagous: a list of (location, type) pairs.
One normally wishes to ensure that a store does not contain
duplicate entries for the same location. A simple means of
maintaining this invariant is to ensure that the locations in the
store are kept in sorted order, and to ensure that new locations are
greater than any current location. I capture this invariant with a
store well-formedness judgement:
st_wf : st -> type.
st_wf_nil : st_wf nil_st.
st_wf_cons_nil : st_wf (cons_st L V nil_st).
st_wf_cons_cons : st_wf (cons_st L' V' S') ->
loc_lt L' L
-> st_wf (cons_st L V (cons_st L' V' S')).
It occured to me that one could (almost) equally well take this as
_the_ definition of a store. And, for a time, I attempted to proceed
by always introducing a store with a proof of its well-formedness.
However, this became somewhat cumbersome, and there were relatively
few situations where I really needed the well-formedness requirement.
Also, note that induction on stores requires two cases, while
induction on store well-formedness proofs requires three cases; hence,
where it is possibly to get by with an arbitrary store, it is
expedient to do so.
Store allocation is represented by a relation:
st_alloc : st -> val -> st -> loc -> type.
%mode st_alloc +S1 +V -S2 -L.
where, for convenience, the freshly chosen location is an output,
along with the extended store. Location 0 is allocated when the input
store is empty; otherwise, location N+1 is allocated when the head of
the input store is location N. A (proved) lemma is that store
allocation preserves store well-formedness ("st!alloc_preserves_wf").
* Machine Representation (or, lack thereof)
I would have liked to define a machine as a (store, expression) pair.
mach : type. %name mach M.
; : st -> exp -> mach. %infix right 20 ;.
This would have led to an elegant definition of the small-step,
allocation semantics:
==> : mach -> mach -> type. %infix right 10 ==>.
%mode ==> +M1 -M2.
lam_alloc_step : st_alloc S (lam_v F) S' L'
-> (S ; (lam_e F)) ==> (S' ; (loc_e L')).
app_ctxt1_step : (S ; E1) ==> (S' ; E1')
-> (S ; (app_e E1 E2)) ==> (S' ; (app_e E1' E2)).
app_ctxt2_step : (S ; E2) ==> (S' ; E2')
-> (S ; (app_e (loc_e L1) E2)) ==> (S' ; (app_e (loc_e L1) E2')).
app_beta_step : st_lookup S L1 (lam_v F1')
-> (S ; (app_e (loc_e L1) (loc_e L2))) ==> (S' ; (F1' (loc_e L2))).
...
A natural property to expect and to check is the termination of "==>"
as logic program from input machines to output machines. Intuitively,
termination (of the single step relation) holds because the expression
in the machine is smaller at each recursive call. However, if I
present Twelf with the termination declaration:
%terminates M (==> M _).
it responds with the error:
Termination violation:
---> (S ; E1) < (S ; app E1 E2)
I understand that (S ; E1) is not a strict subterm of (S ; app E1 E2),
but it does seem that (S ; E1) is smaller than (S ; app E1 E2). I was
unable to find any way to convey my intuition to Twelf.
There is an obvious way to avoid this: declare a four-place relation:
step : st -> exp -> st -> exp -> type.
%mode step +S1 +E1 -S2 -E2.
...
%terminates E1 (step _ E1 _ _).
While I think of a machine as a distinct, if degenerate, syntactic
object, and would like to reflect that into the formalism in Twelf, it
is certainly not required. I note that in TAPL's chapter on
references, Pierce does not define a typing judgement for machines of
the form |- (S, E) : (ST, T) or |- (S, E) (where the store typing and
expression type are left existentially bound). Trying to prove
progress by induction on judgements of the form |- (S, E) runs afoul
of the same issue as above, where one wants to take |- (S, E1) as
smaller than, though not strictly a subterm of, |- (S, app_e E1 E2).
* Lambdas
I had a hard time settling on a definition of lambda expressions and
the typing judgement for lambda expressions. I finally settled upon
the following:
exp : type. %name exp E. %% exp.elf
lam_e : (exp -> exp) -> exp.
|-var : exp -> tp -> type.
%block |-var_block : some {T:tp} block {x:exp} {_:|-var x T}.
%worlds (|-var_block) (|-var _ _).
|-exp : sttp -> exp -> tp -> type.
|-exp_var : |-var E T
-> |-exp ST E T.
|-exp_lam : ({x} |-var x T1 -> |-exp ST (F x) T2)
-> |-exp ST (lam_e F) (fn_t T1 T2).
%worlds (|-var_block) (|-exp _ _ _).
I originally tried to make headway with lambda expressions defined by:
lam_e : (loc -> exp) -> exp.
|-loc : sttp -> loc -> tp -> type.
%block |-loc_block : some {ST:sttp} {T:tp} block {l:loc} {_:|-loc ST l T}.
|-loc_ : sttp_lookup ST L T
-> |-loc ST L T.
%worlds (|-loc_block) (|-loc _ _ _).
|-exp_lam : ({l} |-loc ST l T1 -> |-exp ST (F x) T2)
-> |-exp ST (lam_e F) (fn_t T1 T2).
%worlds (|-loc_block) (|-exp _ _ _).
which I had a vague hope would make it manifest that the argument to a
function must be evaluated to an allocated location before being
substituted. Unfortunately, I seemed to be required to propagate
"|-loc_block" worlds through more relations than necessary. I also
think that this approach would have run into problems similar to the
one described in the next few paragraphs.
Having revised the definition of lambda expressions to
lam_e : (exp -> exp) -> exp.
I attempted to define the typing judgement for lamba expressions as
the following:
|-exp : sttp -> exp -> tp -> type.
%block |-exp_block : some {ST:sttp} {T:tp} block {x:exp} {_:|-exp ST x T}.
|-exp_lam : ({x} |-exp ST x T1 -> |-exp ST (F x) T2)
-> |-exp ST (lam_e F) (fn_t T1 T2).
%worlds (|-exp_block) (|-exp _ _ _).
This worked quite well for a time, but I ultimately ran afoul of the
'Worlds and Weakening' problem described on the Twelf Wiki
(http://fp.logosphere.cs.cmu.edu/twelf/?n=Answers.WorldsAndWeakening).
I don't pretend to completely understand the issue, nor the solution.
Like Rob Simmons, the problem arose with coverage checking of the
weakening lemma ("sttp_weak_|-exp"). Adopting the solution given in
the wiki, I was led to introduce the "|-var" relation (with no
canonical elements) and the "|-var_block" declaration. Now that there
are no store typings in the hypothesis of the typing judgement of the
lambda expression, the weakening lemma goes through with no problem.
But, by the conservation of grief principle, another problem arises
with the Preservation Lemma. Specifically, the case for "app-beta"
requires the substitution of a location (expression) for the formal
argument of a lambda expression to preserve the type of the
application expression; i.e., to preserve the type of the body of the
lambda expression. Of course, one cannot simply apply the hypothesis
of the "|-exp_lam" judgement to the argument
("|-exp ST (loc_e L2) Tx"), since the hypothesis is phrased in terms
of "{x:exp} |-var x T". Following the discussion on the wiki, I
simply prove the lemma that asserts that such a substitution is type
preserving:
pres_var : ({z} |-var z Tz -> |-exp ST (F z) T) ->
|-exp ST E Tz
-> |-exp ST (F E) T -> type.
What is disappointing is that the statement and proof of the lemma has
precisely the feel of a substitution lemma, something that I thought
one avoided with higher-order abstract syntax.
In any case, the wiki also suggests that there may be limitations in
this approach, so I am curious how the solution alluded to by Susmit
Sarkar actually proceeds.
One final note about lambda expressions. Note that I have given the
lambda expressions in 'Curry-style', with no type annotation on the
'argument'. One would expect that adopting 'Church-style' would be a
simple syntactic change. However, one interesting situation arises.
Coverage checking of the Preservation Lemma fails, reporting the
following missing case (slightly editted for presentation):
{S1:st} {L1:loc} {L2:loc} {F1:exp -> exp} {ST1:sttp} {ST2:sttp}
{T1:tp} {T2:tp} {T3:tp}
{X1:st_lookup S1 L1 (lam_v T2 F1)}
{X2:st_wf S1}
{X3:sttp_wf ST1}
{DStTc1:|-st S1 ST1}
{X4:sttp_lookup ST1 L1 (fn_t T3 T1)}
{X5:sttp_lookup ST1 L2 T3}
{X6:sttp_extend ST1 ST2}
{DStTcWf1:|-stwf S1 ST2}
{DExpTc1:|-exp ST2 (F1 (loc_e L2)) T1}
|- pres (app_beta_step X1)
(|-stwf_ X2 X3 DStTc1)
(|-exp_app (|-exp_loc (|-loc_ X4)) (|-exp_loc (|-loc_ X5)))
X6
DStTcWf1
DExpTc1.
The interesting assumptions are "X1" and "X4". It appears that Twelf
is concerned about a situation where the lookup of a location in the
store yields a lambda value with argument type annotation T2, while
the lookup of the same location in the store typing yields a function
type with argument type T3. This situation should be ruled out by
assumption "DStTc1", namely, that the store is typed by the store
typing. Presumably an appropriate 'reductio ad absurdum' can be
applied, though I was somewhat suprised by how the missing case was
isolated to lambda expressions.
%% Follow-up. Randy Pollack recently asked on the Twelf-list about
this very situation. Karl Crary responded, noting that the solution
is to provide an inversion lemma for the "|-val_lam" rule:
http://www.twelf.org/pipermail/twelf-list/2005-May/000046.html
I've incorporated this solution into the proof.
* Inversion
One final item of note is that I ended up stating and proving two
lemmas related to the inversion of the store typing judgement. What I
found interesting is that the LF types of these lemmas are identical,
only their modes differ:
pres_|-st_inversion
: |-stwf S ST ->
sttp_lookup ST L T ->
st_lookup S L V
-> |-val ST V T -> type.
%mode pres_|-st_inversion +DStTcWf +SttpLookup +StLookup -DValTc.
prog_|-st_inversion
: |-stwf S ST ->
sttp_lookup ST L T
-> st_lookup S L V ->
|-val ST V T -> type.
%mode prog_|-st_inversion +DStTcWf +SttpLookup -StLookup -DValTc.
In the proof of Preservation, I already have the assumption that the
store lookup succeeds with a value, so inversion yields the fact that
the value has the type ascribed to that location in the store typing.
In the proof of Progress, I only have the assumption that the store
typing lookup suceeds with a type, so inversion yields the fact that
the store lookup will succeed with a value of the appropriate type.
Technically, the "prog_|-st_inversion" lemma could be obtained by
composing "pres_|-st_inversion" and a simpler lemma that yields the
store lookup from the store typing lookup. However, this 'simpler'
would have exactly the same structure as "prog_|-st_inversion", simply
discarding the value typing which is manifestly available.
The "pres_|-st_inversion" lemma is interesting as it is the one place
where I needed a 'reductio ad absurdum' argument, to rule out the
cases where the store typing lookup hits but the store lookup misses,
where the store typing lookup misses but the store lookup hits, and
where both the store typing lookup misses and the store lookup misses
but with different head locations. Ultimately, the contradiction
always reduces to an (absurd) assumption of the form "loc_lt L L".
Also, the store and store typing well-formedness judgements are used
in the inversion lemmas to prove that a non-empty store or store
typing is an extension of its tail.
* Adequacy
I've seen the definition of 'adequate representation' enough to have
an intuition about what it is trying to establish. But, like Twelf
proofs in general, I haven't found many examples in that are useful.
Most, like the simply typed lamdba calculus or natural deduction, are
so transparently adequate that they are ultimately useless.
While I am fairly confident that the encoding here is adequate, I
can't honestly say I know how to go about verifying that claim. That
said, there are a couple of things of which I am slightly suspicious;
at the very least, I would like to hear an explaination of why they
don't cause any problems.
One thing concerns the "|-var" relation above. I note that for the
'reductio ad absurdum' arguments in Twelf, one introduces an "absurd"
type with no canonical elements, lemmas that derive "absurd" from
contradictory assumptions, and lemmas that derive anything from an
"absurd" assumption. What is slightly troublesome is the fact that
the "|-var" relation has no canonical elements, and, hence, one might
consider it isomorphic to "absurd". Which makes the "|-exp_lam" rule
|-exp_lam : ({x} |-var x T1 -> |-exp ST (F x) T2)
-> |-exp ST (lam_e F) (fn_t T1 T2).
appear to introduce a false assumption in the hypothesis. Greg
suggests that the reason this is not problematic is the fact that the
"|-exp" relation is defined with a "|-var_block" world. Hence, we are
allowing "|-var" as an allowable assumption, even in the absence of
any canonical elements. But, I can't say that puts all my concerns to
rest.
Another related issue. The vacuousity of the "|-var" relation
'breaks' coverage checking of the "|-exp" relation, in the sense that
I can leave out a typing rule for an expression form and coverage
checking succeeds. Certainly I don't need coverage of "|-exp" to
establish the safety of the language, but it is something that I'm
naturally led to add to the declarations of the typing rules and it is
a bit disconcerting that it no longer means what I thought it meant.
* Minor Twelfisms
I don't know how often it comes up in practice, but one thing I found
annoying was the lack of any form of local term abbreviations. For
example, here is the definition for store allocation on a non-empty
store:
st_alloc_cons : st_alloc (cons_st (mkLoc N) V S)
V'
(cons_st (mkLoc (s_nat N)) V' (cons_st (mkLoc N) V S))
(mkLoc (s_nat N)).
I feel that there is a lot of repetition that obscures things. I was
looking for some sort of syntax like:
st_alloc_cons : let L = mkLoc N in
let S = cons_st L V _ in
let L' = mkLoc (s_nat N) in
let S' = cons_st L' V' S in
st_alloc S V' S' L'.
which I felt would make the definition clearer.
Another annoyance is the lack of actual functions, particularly on
types with a single canonical form. For example, in the
"st_alloc_cons" definition above, I need to unwrap a location,
exposing the natural, increment the natural, and wrap back to a
location. Whereas, knowing that "loc" has the single canonical
element
mkLoc : nat -> loc.
it seems clear that I could write function "inc_loc" with the same
behavior, which would further simplify the definition above. Perhaps
Carsten Schrmann's current work on Delphin is working in this
direction.
I know I could define "inc_loc" as a 'function moded' relation:
inc_loc : loc -> loc -> type.
%mode inc_loc +L1 -L2.
inc_loc_ : inc_loc (mkLoc N) (mkLoc (s_nat N)).
But then even my 'improved' "st_alloc_cons" definition would look
like:
st_alloc_cons : let S = cons_st L V _ in
let S' = cons_st L' V' S in
inc_loc L L'
-> st_alloc S V' S' L'.
which still seems overly complicated, as it introduces a hypothesis
which in turn has a single (total) cannonical element.
* Theorem Prover
I was pleasantly suprised to see that the theorem prover was able to
prove a number of lemmas that I had first proved by hand. The theorem
prover ultimately balked at the store typing weakening lemma for
"|-val". What is somewhat odd is that the thorem prover succeeds
without complaint on the corresponding lemma for "|-exp", and the hand
proof for "|-val" is a straightforward proof by cases. I suppose the
subtlety that foils the theorem prover is that the case for a lambda
value requires appealing to the weaking of "|-exp" under the lambda.
The disappointing aspect of the theorem prover is that it seems that
proven theorems are not available as relations for use in by hand
proofs. (This is a consequence of the fact that proofs are not
presently realized as logic programs?) It would be very nice to use
the theorem prover for trivial lemmas, but be able to appeal to those
lemmas in theorems that are not provable by the theorem prover.
* Conclusion
I'm interested in hearing anyones thoughts or opinions. I'm hoping to
add some more comments to the formalism, making it a good exemplar.
Also in that vein, I'd like to send it off to some Twelf experts for
some constructive criticism. I also want to read through the POPLMark
Challenge solution with the insights I've gained from this endeavor.
I'm certain that it will make more sense now, though at a first
reading, it was a bit deeper than I was comfortable swimming.
examples-twelf-orig/alloc-sem/absurdum.elf 0000664 0000000 0000000 00000000264 12341637066 0021151 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% absurdum.elf
absurd : type. % name absurd bot.
%freeze absurd.
examples-twelf-orig/alloc-sem/dynsem-lemmas.elf 0000664 0000000 0000000 00000005625 12341637066 0022110 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% dynsem-elf.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Dynamic Semantics Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dynsem_step_preserves_wf : st_wf S1 -> step S1 E1 S2 E2 -> st_wf S2 -> type.
%mode dynsem_step_preserves_wf +DSWf1 +DStep -DSWf2.
-lam_alloc : dynsem_step_preserves_wf DSWf (lam_alloc_step DStAlloc) DSWf'
<- st_alloc_preserves_wf DSWf DStAlloc DSWf'.
-app_ctxt1 : dynsem_step_preserves_wf DSWf (app_ctxt1_step DStep) DSWf'
<- dynsem_step_preserves_wf DSWf DStep DSWf'.
-app_ctxt2 : dynsem_step_preserves_wf DSWf (app_ctxt2_step DStep) DSWf'
<- dynsem_step_preserves_wf DSWf DStep DSWf'.
-app_beta : dynsem_step_preserves_wf DSWf (app_beta_step _) DSWf.
-unit_alloc : dynsem_step_preserves_wf DSWf (unit_alloc_step DStAlloc) DSWf'
<- st_alloc_preserves_wf DSWf DStAlloc DSWf'.
-letunit_ctxt : dynsem_step_preserves_wf DSWf (letunit_ctxt_step DStep) DSWf'
<- dynsem_step_preserves_wf DSWf DStep DSWf'.
-letunit_beta : dynsem_step_preserves_wf DSWf (letunit_beta_step _) DSWf.
-pair_ctxt1 : dynsem_step_preserves_wf DSWf (pair_ctxt1_step DStep) DSWf'
<- dynsem_step_preserves_wf DSWf DStep DSWf'.
-pair_ctxt2 : dynsem_step_preserves_wf DSWf (pair_ctxt2_step DStep) DSWf'
<- dynsem_step_preserves_wf DSWf DStep DSWf'.
-pair_alloc : dynsem_step_preserves_wf DSWf (pair_alloc_step DStAlloc) DSWf'
<- st_alloc_preserves_wf DSWf DStAlloc DSWf'.
-letpair_ctxt : dynsem_step_preserves_wf DSWf (letpair_ctxt_step DStep) DSWf'
<- dynsem_step_preserves_wf DSWf DStep DSWf'.
-letpair_beta : % {S:st_lookup S1 L1 (pair_v L3 L2)}
% {S:st_lookup _ _ _}
dynsem_step_preserves_wf DSWf (letpair_beta_step S) DSWf.
%terminates DStep (dynsem_step_preserves_wf _ DStep _).
%worlds () (dynsem_step_preserves_wf _ _ _).
%covers dynsem_step_preserves_wf +DSWf1 +DStep -DSWf2.
%total DStep (dynsem_step_preserves_wf _ DStep _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dynsem_mstep_preserves_wf : st_wf S1 -> mstep S1 E1 S2 E2 -> st_wf S2 -> type.
%mode dynsem_mstep_preserves_wf +DSWf1 +DSteps -DSWf2.
-refl : dynsem_mstep_preserves_wf DSWf (refl_mstep) DSWf.
-trans : dynsem_mstep_preserves_wf DSWf1 (trans_mstep DSteps23 DSteps12) DSWf3
<- dynsem_mstep_preserves_wf DSWf1 DSteps12 DSWf2
<- dynsem_mstep_preserves_wf DSWf2 DSteps23 DSWf3.
-step : dynsem_mstep_preserves_wf DSWf (step_mstep DStep) DSWf'
<- dynsem_step_preserves_wf DSWf DStep DSWf'.
%terminates DSteps (dynsem_mstep_preserves_wf _ DSteps _).
%worlds () (dynsem_mstep_preserves_wf _ _ _).
%covers dynsem_mstep_preserves_wf +DSWf1 +DSteps -DSWf2.
%total DSteps (dynsem_mstep_preserves_wf _ DSteps _).
examples-twelf-orig/alloc-sem/dynsem-lemmas.thm 0000664 0000000 0000000 00000001741 12341637066 0022125 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% dynsem-elf.thm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Dynamic Semantics Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
dynsem!step_preserves_wf_thm :
forall* {S1:st} {E1:exp} {S2:st} {E2:exp}
forall {DSWf1: st_wf S1}
{DStep: step S1 E1 S2 E2}
exists {DSWf2: st_wf S2}
true.
%prove 2 DStep (dynsem!step_preserves_wf_thm _ DStep _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
dynsem!step*_preserves_wf_thm :
forall* {S1:st} {E1:exp} {S2:st} {E2:exp}
forall {DSWf1: st_wf S1}
{DSteps: step* S1 E1 S2 E2}
exists {DSWf2: st_wf S2}
true.
%prove 2 DSteps (dynsem!step*_preserves_wf_thm _ DSteps _).
examples-twelf-orig/alloc-sem/dynsem.elf 0000664 0000000 0000000 00000004166 12341637066 0020633 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% dynsem.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Dynamic Semantics
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
step : st -> exp -> st -> exp -> type.
%name step DStep.
%mode step +S1 +E1 -S2 -E2.
lam_alloc_step : step S (lam_e Tx ([x] F x)) S' (loc_e L')
<- st_alloc S (lam_v Tx ([x] F x)) S' L'.
app_ctxt1_step : step S (app_e E1 E2) S' (app_e E1' E2)
<- step S E1 S' E1'.
app_ctxt2_step : step S (app_e (loc_e L1) E2) S' (app_e (loc_e L1) E2')
<- step S E2 S' E2'.
app_beta_step : step S (app_e (loc_e L1) (loc_e L2)) S (F1' (loc_e L2))
<- st_lookup S L1 (lam_v Tx ([x] F1' x)).
unit_alloc_step
: step S (unit_e) S' (loc_e L')
<- st_alloc S (unit_v) S' L'.
letunit_ctxt_step
: step S (letunit_e E1 E2) S' (letunit_e E1' E2)
<- step S E1 S' E1'.
letunit_beta_step
: step S (letunit_e (loc_e L1) E2) S E2
<- st_lookup S L1 (unit_v).
pair_ctxt1_step
: step S (pair_e E1 E2) S' (pair_e E1' E2)
<- step S E1 S' E1'.
pair_ctxt2_step
: step S (pair_e (loc_e L1) E2) S' (pair_e (loc_e L1) E2')
<- step S E2 S' E2'.
pair_alloc_step
: step S (pair_e (loc_e L1) (loc_e L2)) S' (loc_e L')
<- st_alloc S (pair_v L1 L2) S' L'.
letpair_ctxt_step
: step S (letpair_e E1 ([x][y] F2 x y)) S' (letpair_e E1' ([x] [y] F2 x y))
<- step S E1 S' E1'.
letpair_beta_step
: step S (letpair_e (loc_e L1) ([x] [y] F2 x y)) S (F2 (loc_e L11) (loc_e L12))
<- st_lookup S L1 (pair_v L11 L12).
%terminates E1 (step _ E1 _ _).
%worlds () (step _ _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mstep : st -> exp -> st -> exp -> type.
%name mstep DSteps.
refl_mstep : mstep S E S E.
trans_mstep : mstep S1 E1 S3 E3
<- mstep S1 E1 S2 E2
<- mstep S2 E2 S3 E3.
step_mstep : mstep S1 E1 S2 E2
<- step S1 E1 S2 E2.
examples-twelf-orig/alloc-sem/exp.elf 0000664 0000000 0000000 00000001344 12341637066 0020123 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% exp.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Expressions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc_e : loc -> exp.
lam_e : tp -> (exp -> exp) -> exp.
app_e : exp -> exp -> exp.
unit_e : exp.
letunit_e : exp -> exp -> exp.
pair_e : exp -> exp -> exp.
letpair_e : exp -> (exp -> exp -> exp) -> exp.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
exp_irred : exp -> type.
%mode exp_irred +E.
exp_irred_loc : exp_irred (loc_e _).
%terminates {} (exp_irred _).
%worlds () (exp_irred _).
examples-twelf-orig/alloc-sem/inversion-pres.elf 0000664 0000000 0000000 00000007575 12341637066 0022326 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% inversion-pres.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Inversion (Preservation)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pres_st_judg_inversion_aux
: sttp_wf ST -> st_wf S -> st_judg S ST ->
sttp_lookup ST L T ->
st_lookup S L V
-> val_judg ST V T -> type.
%mode pres_st_judg_inversion_aux +DSTWf +DSWf +DStTc +SttpLookup +StLookup -DValTc.
-hit_hit : pres_st_judg_inversion_aux DSTWf DSWf (st_judg_cons DValTc' _)
(sttp_lookup_hit)
(st_lookup_hit)
DValTc
<- sttp_wf_cons_implies_extend_cons DSTWf DSttpExtend
<- sttp_weak_val_judg DValTc' DSttpExtend DValTc.
-miss_hit_contra
: pres_st_judg_inversion_aux DSTWf DSWf (st_judg_cons DValTc' _)
(sttp_lookup_miss DSttpLookup' DLocLt)
(st_lookup_hit)
DValTc
<- loc_lt_contradict DLocLt Absurd
<- raa_val_judg Absurd DValTc.
-miss_miss : pres_st_judg_inversion_aux DSTWf DSWf (st_judg_cons _ DStTc')
(sttp_lookup_miss DSttpLookup' _)
(st_lookup_miss DStLookup' DLocLt)
DValTc
<- sttp_wf_tail DSTWf DSTWf'
<- st_wf_tail DSWf DSWf'
<- pres_st_judg_inversion_aux DSTWf' DSWf' DStTc'
DSttpLookup'
DStLookup'
DValTc'
<- sttp_wf_cons_implies_extend_cons DSTWf DSttpExtend'
<- sttp_weak_val_judg DValTc' DSttpExtend' DValTc.
-miss_miss_contra
: pres_st_judg_inversion_aux DSTWf DSWf (st_judg_cons DValTc' DStTc)
(sttp_lookup_miss DSttpLookup DLocLtB)
(st_lookup_miss _ DLocLtA)
DValTc
<- loc_lt_trans DLocLtA DLocLtB DLocLtC
<- loc_lt_contradict DLocLtC Absurd
<- raa_val_judg Absurd DValTc.
-hit_miss_contra
: pres_st_judg_inversion_aux DSTWf DSWf (st_judg_cons DValTc' _)
(sttp_lookup_hit)
(st_lookup_miss DStLookup' DLocLt)
DValTc
<- loc_lt_contradict DLocLt Absurd
<- raa_val_judg Absurd DValTc.
%terminates DSttpLookup (pres_st_judg_inversion_aux _ _ _ DSttpLookup _ _).
%worlds () (pres_st_judg_inversion_aux _ _ _ _ _ _).
%covers pres_st_judg_inversion_aux +DSTWf +DSWf +DStTc +SttpLookup +StLookup -DValTc.
%total DSttpLookup (pres_st_judg_inversion_aux _ _ _ DSttpLookup _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pres_st_judg_inversion
: stwf_judg S ST ->
sttp_lookup ST L T ->
st_lookup S L V
-> val_judg ST V T -> type.
%mode pres_st_judg_inversion +DStTcWf +SttpLookup +StLookup -DValTc.
- : pres_st_judg_inversion (stwf_judg_ DSTWf DSWf DStTc)
DSttpLookup
DStLookup
DValTc
<- pres_st_judg_inversion_aux DSTWf DSWf DStTc
DSttpLookup
DStLookup
DValTc.
%terminates {} (pres_st_judg_inversion _ _ _ _).
%worlds () (pres_st_judg_inversion _ _ _ _).
%covers pres_st_judg_inversion +DStTcWf +SttpLookup +StLookup -DValTc.
%total {} (pres_st_judg_inversion _ _ _ _).
examples-twelf-orig/alloc-sem/inversion-prog.elf 0000664 0000000 0000000 00000005454 12341637066 0022316 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% inversion-prog.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Inversion (Progress)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
prog_st_judg_inversion_aux
: sttp_wf ST -> st_wf S -> st_judg S ST ->
sttp_lookup ST L T
-> st_lookup S L V ->
val_judg ST V T -> type.
%mode prog_st_judg_inversion_aux +DSTWf +DSWf +DStTcWf +SttpLookup -StLookup -DValTc.
-hit : prog_st_judg_inversion_aux DSTWf DSWf (st_judg_cons DValTc' _)
(sttp_lookup_hit)
(st_lookup_hit)
DValTc
<- sttp_wf_cons_implies_extend_cons DSTWf DSttpExtend
<- sttp_weak_val_judg DValTc' DSttpExtend DValTc.
-miss : prog_st_judg_inversion_aux DSTWf DSWf (st_judg_cons _ DStTc')
(sttp_lookup_miss DSttpLookup' DLocLt)
(st_lookup_miss DStLookup' DLocLt)
DValTc
<- sttp_wf_tail DSTWf DSTWf'
<- st_wf_tail DSWf DSWf'
<- prog_st_judg_inversion_aux DSTWf' DSWf' DStTc'
DSttpLookup'
DStLookup'
DValTc'
<- sttp_wf_cons_implies_extend_cons DSTWf DSttpExtend'
<- sttp_weak_val_judg DValTc' DSttpExtend' DValTc.
%terminates DSttpLookup (prog_st_judg_inversion_aux _ _ _ DSttpLookup _ _).
%worlds () (prog_st_judg_inversion_aux _ _ _ _ _ _).
%covers prog_st_judg_inversion_aux +DSTWf +DSWf +DStTc -SttpLookup +StLookup -DValTc.
%total DSttpLookup (prog_st_judg_inversion_aux _ _ _ DSttpLookup _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
prog_st_judg_inversion
: stwf_judg S ST ->
sttp_lookup ST L T
-> st_lookup S L V ->
val_judg ST V T -> type.
%mode prog_st_judg_inversion +DStTcWf +SttpLookup -StLookup -DValTc.
- : prog_st_judg_inversion (stwf_judg_ DSTWf DSWf DStTc)
DSttpLookup
DStLookup
DValTc
<- prog_st_judg_inversion_aux DSTWf DSWf DStTc
DSttpLookup
DStLookup
DValTc.
%terminates {} (prog_st_judg_inversion _ _ _ _).
%worlds () (prog_st_judg_inversion _ _ _ _).
%covers prog_st_judg_inversion +DStTcWf +SttpLookup -StLookup -DValTc.
%total {} (prog_st_judg_inversion _ _ _ _).
examples-twelf-orig/alloc-sem/loc-lemmas.elf 0000664 0000000 0000000 00000001711 12341637066 0021356 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% loc-lemmas.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Loc Less-than Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc_lt_trans : loc_lt L1 L2 -> loc_lt L2 L3 -> loc_lt L1 L3 -> type.
%mode loc_lt_trans +DLocLt12 +DLocLt23 -DLocLt13.
- : loc_lt_trans (loc_lt_ DNatLt12)
(loc_lt_ DNatLt23)
(loc_lt_ DNatLt13)
<- nat_lt_trans DNatLt12 DNatLt23 DNatLt13.
%worlds () (loc_lt_trans _ _ _).
%total DLocLt12 (loc_lt_trans DLocLt12 _ _).
loc_lt_contradict
: loc_lt L L -> absurd -> type.
%mode loc_lt_contradict +DLocLt -Absurd.
- : loc_lt_contradict (loc_lt_ DNatLt) Absurd
<- nat_lt_contradict DNatLt Absurd.
%worlds () (loc_lt_contradict _ _).
%total DLocLt (loc_lt_contradict DLocLt _).
examples-twelf-orig/alloc-sem/loc-lemmas.thm 0000664 0000000 0000000 00000001333 12341637066 0021400 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% loc-lemmas.thm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Loc Less-than Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
loc!lt_trans_thm :
forall* {L1:loc} {L2:loc} {L3:loc}
forall {DLocLt12: loc_lt L1 L2}
{DLocLt23: loc_lt L2 L3}
exists {DLocLt13: loc_lt L1 L3}
true.
%prove 3 {} (loc!lt_trans_thm _ _ _).
%theorem
loc!lt_contradict_thm :
forall* {L:loc}
forall {DLocLt: loc_lt L L}
exists {Absurd: absurd}
true.
%prove 2 {} (loc!lt_contradict_thm _ _).
examples-twelf-orig/alloc-sem/loc.elf 0000664 0000000 0000000 00000001172 12341637066 0020103 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% loc.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Locations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mkLoc : nat -> loc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Loc Less-than
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc_lt : loc -> loc -> type.
%mode loc_lt +L1 +L2.
loc_lt_ : loc_lt (mkLoc N1) (mkLoc N2)
<- nat_lt N1 N2.
%terminates {} (loc_lt _ _).
%worlds () (loc_lt _ _).
examples-twelf-orig/alloc-sem/machine.elf 0000664 0000000 0000000 00000001364 12341637066 0020735 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% machine.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Machines
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ; : st -> exp -> mach. %infix right 20 ;.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Machine Ok
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mach_ok : st -> exp -> type.
%name mach_ok DMachOk.
%mode mach_ok +S +E.
mach_ok_irred : exp_irred E
-> mach_ok S E.
mach_ok_step : step S E S' E'
-> mach_ok S E.
%terminates {} (mach_ok _ _).
%worlds () (mach_ok _ _).
%covers mach_ok +S +E.
examples-twelf-orig/alloc-sem/nat-lemmas.elf 0000664 0000000 0000000 00000002520 12341637066 0021362 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% nat-lemmas.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Nat Less-than Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nat_N_lt_sN : {N:nat} nat_lt N (s_nat N) -> type.
%mode nat_N_lt_sN +N -DNatLt.
-z : nat_N_lt_sN z_nat (nat_lt_z).
-s : nat_N_lt_sN (s_nat N) (nat_lt_s DNatLt)
<- nat_N_lt_sN N DNatLt.
%terminates N (nat_N_lt_sN N _).
%worlds () (nat_N_lt_sN _ _).
%covers nat_N_lt_sN +N -DNatt.
%total N (nat_N_lt_sN N _).
nat_lt_trans : nat_lt N1 N2 -> nat_lt N2 N3 -> nat_lt N1 N3 -> type.
%mode nat_lt_trans +DNatLt12 +DNatLt23 -DNatLt13.
-z : nat_lt_trans nat_lt_z _ nat_lt_z.
-s : nat_lt_trans (nat_lt_s DNatLt12)
(nat_lt_s DNatLt23)
(nat_lt_s DNatLt13)
<- nat_lt_trans DNatLt12 DNatLt23 DNatLt13.
%worlds () (nat_lt_trans _ _ _).
%total DNatLt12 (nat_lt_trans DNatLt12 _ _).
nat_lt_contradict
: nat_lt N N -> absurd -> type.
%mode nat_lt_contradict +DNatLt -Absurd.
-s : nat_lt_contradict (nat_lt_s DNatLt) Absurd
<- nat_lt_contradict DNatLt Absurd.
%worlds () (nat_lt_contradict _ _).
%total DNatLt (nat_lt_contradict DNatLt _).
examples-twelf-orig/alloc-sem/nat-lemmas.thm 0000664 0000000 0000000 00000001606 12341637066 0021410 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% nat-lemmas.thm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Nat Less-than Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
nat!N_lt_sN_thm :
forall {N:nat}
exists {DNatLt: nat_lt N (s_nat N)}
true.
%prove 2 N (nat!N_lt_sN_thm N _).
%theorem
nat!lt_trans_thm :
forall* {N1:nat} {N2:nat} {N3:nat}
forall {DNatLt12: nat_lt N1 N2}
{DNatLt23: nat_lt N2 N3}
exists {DNatLt13: nat_lt N1 N3}
true.
%prove 2 DNatLt12 (nat!lt_trans_thm DNatLt12 _ _).
%theorem
nat!lt_contradict_thm :
forall* {N:nat}
forall {DNatLt: nat_lt N N}
exists {Absurd: absurd}
true.
%prove 2 DNatLt (nat!lt_contradict_thm DNatLt _).
examples-twelf-orig/alloc-sem/nat.elf 0000664 0000000 0000000 00000001333 12341637066 0020107 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% nat.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Naturals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nat : type. %name nat N.
z_nat : nat.
s_nat : nat -> nat.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Nat Less-than
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nat_lt : nat -> nat -> type.
%mode nat_lt +N1 +N2.
nat_lt_z : nat_lt z_nat (s_nat _).
nat_lt_s : nat_lt (s_nat N1) (s_nat N2)
<- nat_lt N1 N2.
%terminates N1 (nat_lt N1 _).
%worlds () (nat_lt _ _).
examples-twelf-orig/alloc-sem/preservation-lemmas.elf 0000664 0000000 0000000 00000012537 12341637066 0023332 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% preservation-lemmas.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Preservation Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Allocation Preserves
pres_alloc : stwf_judg S ST ->
val_judg ST V T ->
st_alloc S V S' L'
-> sttp_extend ST ST' ->
stwf_judg S' ST' ->
exp_judg ST' (loc_e L') T -> type.
%mode pres_alloc +DStTcWf +DValTc +DStAlloc -DSttpExtend -DStTcWf' -DExpTcL.
-nil : pres_alloc (stwf_judg_ DSTWf DSWf
st_judg_nil)
DValTc %% (DValTc : val_judg _ _ T)
(st_alloc_nil)
DSttpExtend
(stwf_judg_ DSTWf' DSWf'
(st_judg_cons DValTc (st_judg_nil)))
(exp_judg_loc (loc_judg_ sttp_lookup_hit))
<- sttp_alloc_implies_extend (sttp_alloc_nil) DSttpExtend
<- sttp_alloc_preserves_wf DSTWf (sttp_alloc_nil) DSTWf'
<- st_alloc_preserves_wf DSWf (st_alloc_nil) DSWf'.
-cons : pres_alloc (stwf_judg_ DSTWf DSWf
(st_judg_cons DValTcX DStTc))
DValTc % (DValTc : val_judg _ _ T)
(st_alloc_cons)
DSttpExtend
(stwf_judg_ DSTWf' DSWf'
(st_judg_cons DValTc (st_judg_cons DValTcX DStTc)))
(exp_judg_loc (loc_judg_ sttp_lookup_hit))
<- sttp_alloc_implies_extend (sttp_alloc_cons) DSttpExtend
<- st_alloc_preserves_wf DSWf (st_alloc_cons) DSWf'
<- sttp_alloc_preserves_wf DSTWf (sttp_alloc_cons) DSTWf'.
%terminates DStTcWf (pres_alloc DStTcWf _ _ _ _ _).
%worlds () (pres_alloc _ _ _ _ _ _).
%covers pres_alloc +DStTcWf +DValTc +DStAlloc -DSttpExtend -DStTcWf' -DExpTcL.
%total DStTcWf (pres_alloc DStTcWf _ _ _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Substitution Preserves
pres_var : ({z:exp} var_judg z Tz -> exp_judg ST (F z) T) ->
exp_judg ST E Tz
-> exp_judg ST (F E) T -> type.
%mode pres_var +DExpTcF +DExpTcZ -DExpTcFZ.
-refl : pres_var ([z][dvar] T ) DExpTc1 T.
-var : pres_var ([z][dvar] (exp_judg_var dvar)) DExpTcZ DExpTcZ.
-loc : pres_var ([z][dvar] (exp_judg_loc DLocTc)) _ (exp_judg_loc DLocTc).
-lam : pres_var ([z][dvar] (exp_judg_lam ([x] [d] DExpTcF z dvar x d)))
DExpTcZ
(exp_judg_lam ([x] [d] DExpTcF' x d))
<- ({x:exp}{dvar': var_judg x Tx}
pres_var ([z][dvar] (DExpTcF z dvar x dvar'))
DExpTcZ
(DExpTcF' x dvar')).
-app : pres_var ([z][dvar] (exp_judg_app (DExpTcE2 z dvar)
(DExpTcE1 z dvar)))
DExpTcZ
(exp_judg_app DExpTcE2' DExpTcE1')
<- pres_var ([z][dvar] DExpTcE1 z dvar) DExpTcZ DExpTcE1'
<- pres_var ([z][dvar] DExpTcE2 z dvar) DExpTcZ DExpTcE2'.
-unit : pres_var ([z][dvar] (exp_judg_unit)) _ (exp_judg_unit).
-letunit : pres_var ([z][dvar] (exp_judg_letunit (DExpTcE2 z dvar)
(DExpTcE1 z dvar)))
DExpTcZ
(exp_judg_letunit DExpTcE2' DExpTcE1')
<- pres_var ([z][dvar] DExpTcE1 z dvar) DExpTcZ DExpTcE1'
<- pres_var ([z][dvar] DExpTcE2 z dvar) DExpTcZ DExpTcE2'.
-pair : pres_var ([z][dvar] (exp_judg_pair (DExpTcE2 z dvar)
(DExpTcE1 z dvar)))
DExpTcZ
(exp_judg_pair DExpTcE2' DExpTcE1')
<- pres_var ([z][dvar] DExpTcE1 z dvar) DExpTcZ DExpTcE1'
<- pres_var ([z][dvar] DExpTcE2 z dvar) DExpTcZ DExpTcE2'.
-letpair : pres_var ([z][dvar] (exp_judg_letpair ([x][d][y][d'] DExpTcF2 z dvar x d y d')
(DExpTcE1 z dvar)))
DExpTcZ
(exp_judg_letpair ([x][d][y][d'] DExpTcF2' x d y d') DExpTcE1')
<- pres_var ([z][dvar] DExpTcE1 z dvar) DExpTcZ DExpTcE1'
<- ({x:exp}{dVar_x: var_judg x Tx}
{y:exp}{dVar_y: var_judg y Ty}
pres_var ([z][dvar] (DExpTcF2 z dvar x dVar_x y dVar_y))
DExpTcZ
(DExpTcF2' x dVar_x y dVar_y)).
%terminates DExpTcF (pres_var DExpTcF _ _).
%worlds (var_judg_block) (pres_var _ _ _).
%covers pres_var +DExpTcF +DExpTcZ -DExpTcFZ.
%total DExpTcF (pres_var DExpTcF _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pres_val_judg_lam_inversion
: val_judg ST (lam_v Tx' ([x]F x)) (fn_t Tx T)
-> ({x:exp} var_judg x Tx -> exp_judg ST (F x) T) -> type.
%mode pres_val_judg_lam_inversion +DValTcLam -DExpTcF.
- : pres_val_judg_lam_inversion (val_judg_lam ([x] [d] DExpTcF x d)) ([x] [d] DExpTcF x d).
%terminates {} (pres_val_judg_lam_inversion _ _).
%worlds () (pres_val_judg_lam_inversion _ _).
%covers pres_val_judg_lam_inversion +DValTcLam -DExpTcF.
%total {} (pres_val_judg_lam_inversion _ _).
examples-twelf-orig/alloc-sem/preservation.elf 0000664 0000000 0000000 00000022446 12341637066 0022056 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% preservation.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Preservation: If M1 ==> M2 and |- M1, then |- M2.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pres : step S1 E1 S2 E2 ->
stwf_judg S1 ST1 ->
exp_judg ST1 E1 T
-> sttp_extend ST1 ST2 ->
stwf_judg S2 ST2 ->
exp_judg ST2 E2 T -> type.
%mode pres +DStep +DStTcWf1 +DExpTc1 -DStExtend -DStTcWf2 -DExpTc2.
-lam_alloc : pres (lam_alloc_step DStAlloc)
DStTcWf
(exp_judg_lam ([x][u] DExpTcF x u))
DSttpExtend
DStTcWf'
DExpTcL
<- pres_alloc DStTcWf
(val_judg_lam ([x] [u] DExpTcF x u))
DStAlloc
DSttpExtend
DStTcWf'
DExpTcL.
-app_ctxt1 : pres (app_ctxt1_step DStep)
DStTcWf
(exp_judg_app DExpTcE2 DExpTcE1)
DSttpExtend
DStTcWf'
(exp_judg_app DExpTcE2' DExpTcE1')
<- pres DStep
DStTcWf
DExpTcE1
DSttpExtend
DStTcWf'
DExpTcE1'
<- sttp_weak_exp_judg DExpTcE2 DSttpExtend DExpTcE2'.
-app_ctxt2 : pres (app_ctxt2_step DStep)
DStTcWf
(exp_judg_app DExpTcE2 DExpTcE1)
DSttpExtend
DStTcWf'
(exp_judg_app DExpTcE2' DExpTcE1')
<- pres DStep
DStTcWf
DExpTcE2
DSttpExtend
DStTcWf'
DExpTcE2'
<- sttp_weak_exp_judg DExpTcE1 DSttpExtend DExpTcE1'.
%% Church-style
-app_beta : pres (app_beta_step DStLookupL1) DStTcWf
(exp_judg_app DExpTcL2 (exp_judg_loc (loc_judg_ DSttpLookupL1)))
DSttpExtend
DStTcWf
DExpTcF1'L2
<- sttp_extend_refl _ DSttpExtend
<- pres_st_judg_inversion DStTcWf
DSttpLookupL1
DStLookupL1
DExpTcLam
<- pres_val_judg_lam_inversion DExpTcLam ([x] [v] DExpTcF1' x v)
<- pres_var ([z][vd] DExpTcF1' z vd) DExpTcL2 DExpTcF1'L2.
%% Curry-style
% -app_beta : pres (app_beta_step DStLookupL1)
% DStTcWf
% (exp_judg_app DExpTcL2
% (exp_judg_loc (loc_judg_ DSttpLookupL1)))
% DSttpExtend
% DStTcWf
% DExpTcF1'L2
% <- sttp_extend_refl _ DSttpExtend
% <- pres_st_judg_inversion DStTcWf
% DSttpLookupL1
% DStLookupL1
% (val_judg_lam DExpTcF1'*)
% <- pres_var DExpTcF1'* DExpTcL2 DExpTcF1'L2.
-unit_alloc : pres (unit_alloc_step DStAlloc)
DStTcWf
(exp_judg_unit)
DSttpExtend
DStTcWf'
DExpTcL
<- pres_alloc DStTcWf
(val_judg_unit)
DStAlloc
DSttpExtend
DStTcWf'
DExpTcL.
-letunit_ctxt : pres (letunit_ctxt_step DStep)
DStTcWf
(exp_judg_letunit DExpTcE2 DExpTcE1)
DSttpExtend
DStTcWf'
(exp_judg_letunit DExpTcE2' DExpTcE1')
<- pres DStep
DStTcWf
DExpTcE1
DSttpExtend
DStTcWf'
DExpTcE1'
<- sttp_weak_exp_judg DExpTcE2 DSttpExtend DExpTcE2'.
-letunit_beta : pres (letunit_beta_step _)
DStTcWf
(exp_judg_letunit DExpTcE2 DExpTcE1)
DSttpExtend
DStTcWf
DExpTcE2
<- sttp_extend_refl _ DSttpExtend.
-pair_ctxt1 : pres (pair_ctxt1_step DStep)
DStTcWf
(exp_judg_pair DExpTcE2 DExpTcE1)
DSttpExtend
DStTcWf'
(exp_judg_pair DExpTcE2' DExpTcE1')
<- pres DStep
DStTcWf
DExpTcE1
DSttpExtend
DStTcWf'
DExpTcE1'
<- sttp_weak_exp_judg DExpTcE2 DSttpExtend DExpTcE2'.
-pair_ctxt2 : pres (pair_ctxt2_step DStep)
DStTcWf
(exp_judg_pair DExpTcE2 DExpTcE1)
DSttpExtend
DStTcWf'
(exp_judg_pair DExpTcE2' DExpTcE1')
<- pres DStep
DStTcWf
DExpTcE2
DSttpExtend
DStTcWf'
DExpTcE2'
<- sttp_weak_exp_judg DExpTcE1 DSttpExtend DExpTcE1'.
-pair_alloc : pres (pair_alloc_step DStAlloc)
DStTcWf
(exp_judg_pair (exp_judg_loc DLocTcL2) (exp_judg_loc DLocTcL1))
DSttpExtend
DStTcWf'
DExpTcL
<- pres_alloc DStTcWf
(val_judg_pair DLocTcL2 DLocTcL1)
DStAlloc
DSttpExtend
DStTcWf'
DExpTcL.
-letpair_ctxt : pres (letpair_ctxt_step DStep)
DStTcWf
(exp_judg_letpair ([x][dx] [y][dy] DExpTcF2 x dx y dy) DExpTcE1)
DSttpExtend
DStTcWf'
(exp_judg_letpair ([x][dx] [y][dy]DExpTcF2' x dx y dy) DExpTcE1')
<- pres DStep
DStTcWf
DExpTcE1
DSttpExtend
DStTcWf'
DExpTcE1'
<- ({x:exp}{dVarTcX: var_judg x Tx}
{y:exp}{dVarTcY: var_judg y Ty}
sttp_weak_exp_judg (DExpTcF2 x dVarTcX y dVarTcY)
DSttpExtend
(DExpTcF2' x dVarTcX y dVarTcY)).
-letpair_beta : pres (letpair_beta_step DStLookup)
DStTcWf
(exp_judg_letpair ([x] [dx] [y][dy] DExpTcF2'' x dx y dy)
(exp_judg_loc (loc_judg_ DSttpLookup)))
DSttpExtend
DStTcWf
DExpTcF2LxLy
<- sttp_extend_refl _ DSttpExtend
<- pres_st_judg_inversion DStTcWf
DSttpLookup
DStLookup
(val_judg_pair DLocTcLy DLocTcLx)
<- ({x:exp}{dVarTcX: var_judg x Tx}
pres_var ([z] [dz] DExpTcF2'' x dVarTcX z dz)
(exp_judg_loc DLocTcLy)
(DExpTcF2-Ly x dVarTcX))
<- pres_var ([x][d] DExpTcF2-Ly x d) (exp_judg_loc DLocTcLx) DExpTcF2LxLy.
%terminates DStep (pres DStep _ _ _ _ _).
%worlds () (pres _ _ _ _ _ _).
%covers pres +DStep +DSt1TcWf +DE1Tc -DStEx -DSt2TcWf -DE2Tc.
%total DStep (pres DStep _ _ _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Preservation: If M1 ==>* M2 and |- M1, then |- M2.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pres_mstep : mstep S1 E1 S2 E2 ->
stwf_judg S1 ST1 ->
exp_judg ST1 E1 T
-> sttp_extend ST1 ST2 ->
stwf_judg S2 ST2 ->
exp_judg ST2 E2 T -> type.
%mode pres_mstep +DSteps +DStTcWf1 +DExpTc1 -DStExtend -DStTcWf2 -DExpTc2.
-refl : pres_mstep (refl_mstep)
DStTcWf
DExpTc
DSttpExtend
DStTcWf
DExpTc
<- sttp_extend_refl _ DSttpExtend.
-trans : pres_mstep (trans_mstep DSteps23 DSteps12)
DStTcWf1
DExpTc1
DSttpExtend13
DStTcWf3
DExpTc3
<- pres_mstep DSteps12 DStTcWf1 DExpTc1 DSttpExtend12 DStTcWf2 DExpTc2
<- pres_mstep DSteps23 DStTcWf2 DExpTc2 DSttpExtend23 DStTcWf3 DExpTc3
<- sttp_extend_trans DSttpExtend12 DSttpExtend23 DSttpExtend13.
-step : pres_mstep (step_mstep DStep)
DStTcWf
DExpTc
DSttpExtend'
DStTcWf'
DExpTc'
<- pres DStep DStTcWf DExpTc DSttpExtend' DStTcWf' DExpTc'.
%terminates DSteps (pres_mstep DSteps _ _ _ _ _).
%worlds () (pres_mstep _ _ _ _ _ _).
%covers pres_mstep +DSteps +DSt1TcWf +DE1Tc -DStEx -DSt2TcWf -DE2Tc.
%total DSteps (pres_mstep DSteps _ _ _ _ _).
examples-twelf-orig/alloc-sem/progress-lemmas.elf 0000664 0000000 0000000 00000013337 12341637066 0022454 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% progress-lemmas.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Progress Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Allocation Progresses
prog_st_alloc : {V:val}
stwf_judg S ST
-> st_alloc S V S' L' -> type.
%mode prog_st_alloc +V +DStTcWf -DStAlloc.
-nil : prog_st_alloc _
(stwf_judg_ _ _ (st_judg_nil))
st_alloc_nil.
-cons : prog_st_alloc _
(stwf_judg_ _ _ (st_judg_cons _ _))
(st_alloc_cons).
%terminates {} (prog_st_alloc _ _ _).
%worlds () (prog_st_alloc _ _ _).
%covers prog_st_alloc +V +DStTcWf -DStAlloc.
%total {} (prog_st_alloc _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% app ctxt
prog_app_aux : {E1:exp} {E2:exp}
stwf_judg S ST ->
exp_judg ST E1 (fn_t Tx T) ->
mach_ok S E1 ->
mach_ok S E2
-> mach_ok S (app_e E1 E2) -> type.
%mode prog_app_aux +E1 +E2 +DStTcWf +DExpTcE1 +DMachOk1 +DMachOk2 -DMachOk.
-ctxt1 : prog_app_aux _ _
_
_
(mach_ok_step DStep)
_
(mach_ok_step (app_ctxt1_step DStep)).
-ctxt2 : prog_app_aux _ _
_
_
(mach_ok_irred _)
(mach_ok_step DStep)
(mach_ok_step (app_ctxt2_step DStep)).
-beta : prog_app_aux _ _
DStTcWf
(exp_judg_loc (loc_judg_ DSttpLookup))
(mach_ok_irred _)
(mach_ok_irred _)
(mach_ok_step (app_beta_step DStLookup))
<- prog_st_judg_inversion DStTcWf DSttpLookup DStLookup DValTc.
%terminates {} (prog_app_aux _ _ _ _ _ _ _).
%worlds () (prog_app_aux _ _ _ _ _ _ _).
%covers prog_app_aux +E1 +E2 +DStTcWf +DExpTcE1 +DMachOk1 +DMachOk2 -DMachOk.
%total {} (prog_app_aux _ _ _ _ _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% letunit ctxt
prog_letunit_aux
: {E1:exp} {E2: exp}
stwf_judg S ST ->
exp_judg ST E1 unit_t ->
mach_ok S E1
-> mach_ok S (letunit_e E1 E2) -> type.
%mode prog_letunit_aux +E1 +E2 +DStTcWf +DExpTc +DMachOk1 -DMachOk.
-ctxt : prog_letunit_aux _ _
_
_
(mach_ok_step DStep)
(mach_ok_step (letunit_ctxt_step DStep)).
-beta : prog_letunit_aux _ _
DStTcWf
(exp_judg_loc (loc_judg_ DSttpLookup))
(mach_ok_irred _)
(mach_ok_step (letunit_beta_step DStLookup))
<- prog_st_judg_inversion DStTcWf DSttpLookup DStLookup DValTc.
%terminates {} (prog_letunit_aux _ _ _ _ _ _).
%worlds () (prog_letunit_aux _ _ _ _ _ _).
%covers prog_letunit_aux +E1 +E2 +DStTcWf +DExpTc +DMachOk1 -DMachOk.
%total {} (prog_letunit_aux _ _ _ _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% pair ctxt
prog_pair_aux : {E1:exp} {E2:exp}
stwf_judg S ST ->
mach_ok S E1 ->
mach_ok S E2
-> mach_ok S (pair_e E1 E2) -> type.
%mode prog_pair_aux +E1 +E2 +DStTcWf +DMachOk1 +DMachOk2 -DMachOk.
-ctxt1 : prog_pair_aux _ _
_
(mach_ok_step DStep)
_
(mach_ok_step (pair_ctxt1_step DStep)).
-ctxt2 : prog_pair_aux _ _
_
(mach_ok_irred _)
(mach_ok_step DStep)
(mach_ok_step (pair_ctxt2_step DStep)).
-alloc : prog_pair_aux _ _
DStTcWf
(mach_ok_irred _)
(mach_ok_irred _)
(mach_ok_step (pair_alloc_step DStAlloc))
<- prog_st_alloc _ DStTcWf DStAlloc.
%terminates {} (prog_pair_aux _ _ _ _ _ _).
%worlds () (prog_pair_aux _ _ _ _ _ _).
%covers prog_pair_aux +E1 +E2 +DStTcWf +DMachOk1 +DMachOk2 -DMachOk.
%total {} (prog_pair_aux _ _ _ _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% letpair ctxt
prog_letpair_aux
: {E1:exp} {F2: exp -> exp -> exp}
stwf_judg S ST ->
exp_judg ST E1 (pair_t Tx Ty) ->
mach_ok S E1
-> mach_ok S (letpair_e E1 ([x][y] F2 x y)) -> type.
%mode prog_letpair_aux +E1 +E2 +DStTcWf +DExpTc +DMachOk1 -DMachOk.
-ctxt : prog_letpair_aux _ ([x][y] F2 x y)
_
_
(mach_ok_step DStep)
(mach_ok_step (letpair_ctxt_step DStep)).
-beta : prog_letpair_aux _ ([x][y] F2 x y)
DStTcWf
(exp_judg_loc (loc_judg_ DSttpLookup))
(mach_ok_irred _)
(mach_ok_step (letpair_beta_step DStLookup))
<- prog_st_judg_inversion DStTcWf DSttpLookup DStLookup DValTc.
%terminates {} (prog_letpair_aux _ _ _ _ _ _).
%worlds () (prog_letpair_aux _ _ _ _ _ _).
%covers prog_letpair_aux +E1 +E2 +DStTcWf +DExpTc +DMachOk1 -DMachOk.
%total {} (prog_letpair_aux _ _ _ _ _ _).
examples-twelf-orig/alloc-sem/progress.elf 0000664 0000000 0000000 00000003756 12341637066 0021204 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% progress.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Progress: If |- M, then M ok (i.e., M irred or M ==> M').
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
prog : stwf_judg S ST ->
exp_judg ST E T
-> mach_ok S E -> type.
%mode prog +DSTcWf +DExpTc -DMachOk.
-loc : prog DStTcWf
(exp_judg_loc _)
(mach_ok_irred exp_irred_loc).
-lam : prog DStTcWf
(exp_judg_lam ([x] [dv] E x dv))
(mach_ok_step (lam_alloc_step DStAlloc))
<- prog_st_alloc _ DStTcWf DStAlloc.
-app : prog DStTcWf
(exp_judg_app DExpTcE2 DExpTcE1)
DMachOk
<- prog DStTcWf DExpTcE1 DMachOk1
<- prog DStTcWf DExpTcE2 DMachOk2
<- prog_app_aux _ _ DStTcWf DExpTcE1 DMachOk1 DMachOk2 DMachOk.
-unit : prog DStTcWf
(exp_judg_unit)
(mach_ok_step (unit_alloc_step DStAlloc))
<- prog_st_alloc _ DStTcWf DStAlloc.
-letunit : prog DStTcWf
(exp_judg_letunit DExpTcE2 DExpTcE1)
DMachOk
<- prog DStTcWf DExpTcE1 DMachOk1
<- prog_letunit_aux _ _ DStTcWf DExpTcE1 DMachOk1 DMachOk.
-pair : prog DStTcWf
(exp_judg_pair DExpTcE2 DExpTcE1)
DMachOk
<- prog DStTcWf DExpTcE1 DMachOk1
<- prog DStTcWf DExpTcE2 DMachOk2
<- prog_pair_aux _ _ DStTcWf DMachOk1 DMachOk2 DMachOk.
-letpair : prog DStTcWf
(exp_judg_letpair ([x][dx][y][dy] DExpTcF2 x dx y dy) DExpTcE1)
DMachOk
<- prog DStTcWf DExpTcE1 DMachOk1
<- prog_letpair_aux _ ([x][y] E x y) DStTcWf DExpTcE1 DMachOk1 DMachOk.
%terminates DExpTc (prog _ DExpTc _).
%worlds () (prog _ _ _).
%covers prog +DSTcWf +DExpTc -DMachOk.
%total DExpTc (prog _ DExpTc _).
examples-twelf-orig/alloc-sem/safety.elf 0000664 0000000 0000000 00000002467 12341637066 0020631 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% safety.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Safety: If |- M1 and M1 ==>* M2, then M2 ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
safety : stwf_judg S ST ->
exp_judg ST E T ->
mstep S E S' E'
-> mach_ok S' E' -> type.
%mode safety +DStTcWf +DExpTc +DSteps -DMachOk.
-refl : safety DStTcWf
DExpTc
(refl_mstep)
DMachOk
<- prog DStTcWf DExpTc DMachOk.
-trans : safety DStTcWf
DExpTc
(trans_mstep DSteps23 DSteps12)
DMachOk3
<- pres_mstep DSteps12 DStTcWf DExpTc _ DStTcWf2 DExpTc2
<- safety DStTcWf2 DExpTc2 DSteps23 DMachOk3.
-step : safety DStTcWf
DExpTc
(step_mstep DStep)
DMachOk'
<- pres DStep DStTcWf DExpTc DSttpExtend DStTcWf' DExpTc'
<- prog DStTcWf' DExpTc' DMachOk'.
%terminates DSteps (safety _ _ DSteps _).
%worlds () (safety _ _ _ _).
%covers safety +DStTcWf +DExpTc +DSteps -DMachOk.
%total DSteps (safety _ _ DSteps _).
examples-twelf-orig/alloc-sem/sources-thm.cfg 0000664 0000000 0000000 00000000527 12341637066 0021573 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% sources-thm.elf
absurdum.elf
nat.elf
nat-lemmas.thm
syntax.elf
loc.elf
loc-lemmas.thm
exp.elf
val.elf
store.elf
store-lemmas.thm
dynsem.elf
dynsem-lemmas.thm
machine.elf
tp.elf
storetp.elf
storetp-lemmas.thm
statsem.elf
weaken.thm
examples-twelf-orig/alloc-sem/sources.cfg 0000664 0000000 0000000 00000000522 12341637066 0021000 0 ustar 00root root 0000000 0000000 absurdum.elf
nat.elf
nat-lemmas.elf
syntax.elf
loc.elf
loc-lemmas.elf
exp.elf
val.elf
store.elf
store-lemmas.elf
dynsem.elf
dynsem-lemmas.elf
machine.elf
tp.elf
storetp.elf
storetp-lemmas.elf
statsem.elf
weaken.elf
inversion-pres.elf
preservation-lemmas.elf
preservation.elf
inversion-prog.elf
progress-lemmas.elf
progress.elf
safety.elf
examples-twelf-orig/alloc-sem/statsem.elf 0000664 0000000 0000000 00000010237 12341637066 0021010 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% statsem.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Static Semantics
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% loc_judg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc_judg : sttp -> loc -> tp -> type.
%name loc_judg DLocTc.
%mode loc_judg +ST +L -T.
loc_judg_ : loc_judg ST L T
<- sttp_lookup ST L T.
%terminates {} (loc_judg _ _ _).
%worlds () (loc_judg _ _ _).
%covers loc_judg +ST +E -T.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% var_judg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
var_judg : exp -> tp -> type.
%name var_judg DVarTc.
%mode var_judg +E -T. % Church-style
%% %mode var_judg +E *T. % Curry-style
%block var_judg_block : some {T:tp} block {x:exp} {_:var_judg x T}.
%terminates {} (var_judg _ _).
%worlds (var_judg_block) (var_judg _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% exp_judg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
exp_judg : sttp -> exp -> tp -> type.
%name exp_judg DExpTc.
%mode exp_judg +ST +E -T. % Church-style
%% %mode exp_judg +ST +E *T. % Curry-style
exp_judg_var : exp_judg ST E T
<- var_judg E T.
exp_judg_loc : exp_judg ST (loc_e L) T
<- loc_judg ST L T.
exp_judg_lam : exp_judg ST (lam_e Tx ([x] F x)) (fn_t Tx T)
<- ({x:exp} var_judg x Tx -> exp_judg ST (F x) T).
exp_judg_app : exp_judg ST (app_e E1 E2) T
<- exp_judg ST E1 (fn_t Tx T)
<- exp_judg ST E2 Tx.
exp_judg_unit : exp_judg ST (unit_e) (unit_t).
exp_judg_letunit : exp_judg ST (letunit_e E1 E2) T
<- exp_judg ST E1 (unit_t)
<- exp_judg ST E2 T.
exp_judg_pair : exp_judg ST (pair_e E1 E2) (pair_t T1 T2)
<- exp_judg ST E1 T1
<- exp_judg ST E2 T2.
exp_judg_letpair : exp_judg ST (letpair_e E1 ([x] [y] F2 x y)) T
<- exp_judg ST E1 (pair_t Tx Ty)
<- ({x:exp} var_judg x Tx ->
{y:exp} var_judg y Ty
-> exp_judg ST (F2 x y) T).
%terminates E (exp_judg _ E _).
%worlds (var_judg_block) (exp_judg _ _ _).
%covers exp_judg +ST +E -T.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% val_judg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
val_judg : sttp -> val -> tp -> type.
%name val_judg DValTc.
%mode val_judg +ST +V -T. % Church-style
%% %mode val_judg +ST +V *T. % Curry-style
val_judg_lam : val_judg ST (lam_v Tx ([x] F x)) (fn_t Tx T)
<- ({x:exp} var_judg x Tx -> exp_judg ST (F x) T).
val_judg_unit : val_judg ST unit_v unit_t.
val_judg_pair : val_judg ST (pair_v L1 L2) (pair_t T1 T2)
<- loc_judg ST L1 T1
<- loc_judg ST L2 T2.
%terminates V (val_judg _ V _).
%worlds (var_judg_block) (val_judg _ _ _).
%covers val_judg +ST +V -T.
raa_val_judg : absurd -> val_judg ST V T -> type.
%mode +{ST:sttp} +{V:val} +{T:tp} +{Absurd:absurd} -{DValTc: val_judg ST V T} (raa_val_judg Absurd DValTc).
%worlds () (raa_val_judg _ _).
%total {} (raa_val_judg _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% st_judg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
st_judg : st -> sttp -> type.
%name st_judg DStTc.
%mode st_judg +S -ST. % Church-style
%% %mode st_judg +S +ST. % Curry-style
st_judg_nil : st_judg nil_st nil_sttp.
st_judg_cons : st_judg (cons_st L V S') (cons_sttp L T ST')
<- st_judg S' ST'
<- val_judg ST' V T.
%terminates S (st_judg S _).
%worlds () (st_judg _ _).
%covers st_judg +S -ST.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% stwf_judg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
stwf_judg : st -> sttp -> type.
%name stwf_judg DStTcWf.
%mode stwf_judg +S -ST. % Church-style
%% %mode stwf_judg +S +ST. % Curry-style
stwf_judg_ : stwf_judg S ST
<- st_judg S ST
<- st_wf S
<- sttp_wf ST.
%terminates S (stwf_judg S _).
%worlds () (stwf_judg _ _).
%covers st_judg +S -ST.
examples-twelf-orig/alloc-sem/store-lemmas.elf 0000664 0000000 0000000 00000002736 12341637066 0021745 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% store-lemmas.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store WF Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
st_wf_tail : st_wf (cons_st L V S') -> st_wf S' -> type.
%mode st_wf_tail +DSWf -DSWf'.
-cons_nil : st_wf_tail (st_wf_cons_nil) st_wf_nil.
-cons_cons : st_wf_tail (st_wf_cons_cons DSWf' _) DSWf'.
%terminates {} (st_wf_tail _ _).
%worlds () (st_wf_tail _ _).
%covers st_wf_tail +DSWf -DSWf'.
%total {} (st_wf_tail _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Alloc Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
st_alloc_preserves_wf
: st_wf S1 -> st_alloc S1 V S2 L -> st_wf S2 -> type.
%mode st_alloc_preserves_wf +DSWf1 +DStAlloc -DSWf2.
-nil : st_alloc_preserves_wf (st_wf_nil)
(st_alloc_nil)
(st_wf_cons_nil).
-cons : st_alloc_preserves_wf DSWf
(st_alloc_cons)
(st_wf_cons_cons DSWf (loc_lt_ DNatLt))
<- nat_N_lt_sN _ DNatLt.
%terminates DStAlloc (st_alloc_preserves_wf _ DStAlloc _).
%worlds () (st_alloc_preserves_wf _ _ _).
%covers st_alloc_preserves_wf +DSWf1 +DStAlloc -DStWf2.
%total DStAlloc (st_alloc_preserves_wf _ DStAlloc _).
examples-twelf-orig/alloc-sem/store-lemmas.thm 0000664 0000000 0000000 00000001641 12341637066 0021761 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% store-lemmas.thm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store WF Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
st!wf_tail_thm :
forall* {L:loc} {V:val} {S':st}
forall {DSWf: st_wf (cons_st L V S')}
exists {DSWf': st_wf S'}
true.
%prove 2 {} (st!wf_tail_thm _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Alloc Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
st!alloc_preserves_wf_thm :
forall* {S1:st} {V:val} {S2:st} {L:loc}
forall {DSWf1: st_wf S1}
{DStAlloc: st_alloc S1 V S2 L}
exists {DSWf2: st_wf S2}
true.
%prove 4 DStAlloc (st!alloc_preserves_wf_thm _ DStAlloc _).
examples-twelf-orig/alloc-sem/store.elf 0000664 0000000 0000000 00000003551 12341637066 0020465 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% store.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Stores
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nil_st : st.
cons_st : loc -> val -> st -> st.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store WF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
st_wf : st -> type.
%mode st_wf +S.
st_wf_nil : st_wf nil_st.
st_wf_cons_nil : st_wf (cons_st L V nil_st).
st_wf_cons_cons
: st_wf (cons_st L' V' S') ->
loc_lt L' L
-> st_wf (cons_st L V (cons_st L' V' S')).
%terminates S (st_wf S).
%worlds () (st_wf _).
%covers st_wf +S.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Lookup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
st_lookup : st -> loc -> val -> type.
%mode st_lookup +S +L -V.
st_lookup_hit : st_lookup (cons_st L V S) L V.
st_lookup_miss : st_lookup S' L V ->
loc_lt L L'
-> st_lookup (cons_st L' V' S') L V.
%terminates S (st_lookup S _ _).
%worlds () (st_lookup _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Alloc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
st_alloc : st -> val -> st -> loc -> type.
%mode st_alloc +S1 +V -S2 -L.
st_alloc_nil : st_alloc nil_st
V''
(cons_st (mkLoc z_nat) V'' nil_st)
(mkLoc z_nat).
st_alloc_cons : st_alloc (cons_st (mkLoc N') V' S)
V''
(cons_st (mkLoc (s_nat N')) V'' (cons_st (mkLoc N') V' S))
(mkLoc (s_nat N')).
%terminates S (st_alloc S _ _ _).
%worlds () (st_alloc _ _ _ _).
%covers st_alloc +S1 +V -S2 -L.
%total S (st_alloc S _ _ _).
examples-twelf-orig/alloc-sem/storetp-lemmas.elf 0000664 0000000 0000000 00000014046 12341637066 0022306 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% storetp-lemmas.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing WF Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sttp_wf_tail : sttp_wf (cons_sttp L T ST') -> sttp_wf ST' -> type.
%mode sttp_wf_tail +DSTWf -DSTWf'.
-cons_nil : sttp_wf_tail (sttp_wf_cons_nil) sttp_wf_nil.
-cons_cons : sttp_wf_tail (sttp_wf_cons_cons DSTWf' _) DSTWf'.
%terminates {} (sttp_wf_tail _ _).
%worlds () (sttp_wf_tail _ _).
%covers sttp_wf_tail +DSTWf -DSTWf'.
%total {} (sttp_wf_tail _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Alloc Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sttp_alloc_preserves_wf
: sttp_wf ST1 -> sttp_alloc ST1 T ST2 L -> sttp_wf ST2 -> type.
%mode sttp_alloc_preserves_wf +DSTWf1 +DSttpAlloc -DSTWf2.
-nil : sttp_alloc_preserves_wf (sttp_wf_nil)
(sttp_alloc_nil)
(sttp_wf_cons_nil).
-cons : sttp_alloc_preserves_wf DSTWf
(sttp_alloc_cons)
(sttp_wf_cons_cons DSTWf (loc_lt_ DNatLt))
<- nat_N_lt_sN _ DNatLt.
%terminates DSttpAlloc (sttp_alloc_preserves_wf _ DSttpAlloc _).
%worlds () (sttp_alloc_preserves_wf _ _ _).
%covers sttp_alloc_preserves_wf +DSTWf1 +DSttpAlloc -DSttpWf2.
%total DSttpAlloc (sttp_alloc_preserves_wf _ DSttpAlloc _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Extend Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sttp_extend_refl
: {ST:sttp} sttp_extend ST ST -> type.
%mode sttp_extend_refl +ST -DSttpExtend.
-nil : sttp_extend_refl nil_sttp
(sttp_extend_nil).
-cons : sttp_extend_refl (cons_sttp L T ST')
(sttp_extend_cons_hit DSttpExtend')
<- sttp_extend_refl ST' DSttpExtend'.
%terminates ST (sttp_extend_refl ST _).
%worlds () (sttp_extend_refl _ _).
%covers sttp_extend_refl +ST -DSttpExtend.
%total ST (sttp_extend_refl ST _).
sttp_extend_trans
: sttp_extend ST1 ST2 ->
sttp_extend ST2 ST3
-> sttp_extend ST1 ST3 -> type.
%mode sttp_extend_trans +DSttpExtend12 +DSttpExtend23 -DSttpExtend13.
-nil__ : sttp_extend_trans (sttp_extend_nil)
_
(sttp_extend_nil).
-cons_hit__cons_hit
: sttp_extend_trans (sttp_extend_cons_hit DSttpExtend1'2')
(sttp_extend_cons_hit DSttpExtend2'3')
(sttp_extend_cons_hit DSttpExtend1'3')
<- sttp_extend_trans DSttpExtend1'2' DSttpExtend2'3' DSttpExtend1'3'.
-cons_miss__cons_hit
: sttp_extend_trans (sttp_extend_cons_miss DSttpExtend12' DLocLt)
(sttp_extend_cons_hit DSttpExtend2'3')
(sttp_extend_cons_miss DSttpExtend13' DLocLt)
<- sttp_extend_trans DSttpExtend12' DSttpExtend2'3' DSttpExtend13'.
-cons_hit__cons_miss
: sttp_extend_trans (sttp_extend_cons_hit DSttpExtend1'2')
(sttp_extend_cons_miss DSttpExtend23' DLocLt)
(sttp_extend_cons_miss DSttpExtend13' DLocLt)
<- sttp_extend_trans (sttp_extend_cons_hit DSttpExtend1'2')
DSttpExtend23'
DSttpExtend13'.
-cons_miss__cons_miss
: sttp_extend_trans (sttp_extend_cons_miss DSttpExtend12' DLocLt)
(sttp_extend_cons_miss DSttpExtend23' DLocLt')
(sttp_extend_cons_miss DSttpExtend13' DLocLt'')
<- sttp_extend_trans (sttp_extend_cons_miss DSttpExtend12' DLocLt)
DSttpExtend23'
DSttpExtend13'
<- loc_lt_trans DLocLt DLocLt' DLocLt''.
%terminates DSttpExtend23 (sttp_extend_trans _ DSttpExtend23 _).
%worlds () (sttp_extend_trans _ _ _).
%covers sttp_extend_trans +DSttpExtend12 +DSttpExtend23 -DSttpExtend13.
%total DSttpExtend23 (sttp_extend_trans _ DSttpExtend23 _).
%%% Store typing allocation yields an extension of the original store typing.
sttp_alloc_implies_extend
: sttp_alloc ST T ST' _
-> sttp_extend ST ST' -> type.
%mode sttp_alloc_implies_extend +DStAlloc -DSttpExtend.
-nil : sttp_alloc_implies_extend (sttp_alloc_nil)
(sttp_extend_nil).
-cons : sttp_alloc_implies_extend (sttp_alloc_cons)
(sttp_extend_cons_miss DSttpExtend
(loc_lt_ DNatLt))
<- sttp_extend_refl _ DSttpExtend
<- nat_N_lt_sN _ DNatLt.
%terminates DStAlloc (sttp_alloc_implies_extend DStAlloc _).
%worlds () (sttp_alloc_implies_extend _ _).
%covers sttp_alloc_implies_extend +DStAlloc -DStExtend.
%total DStAlloc (sttp_alloc_implies_extend DStAlloc _).
%%% A well-formed, non-empty store typing is an extension of its tail.
sttp_wf_cons_implies_extend_cons
: sttp_wf (cons_sttp L T ST')
-> sttp_extend ST' (cons_sttp L T ST') -> type.
%mode sttp_wf_cons_implies_extend_cons +DSTWf -DSttpExtend.
-nil : sttp_wf_cons_implies_extend_cons (sttp_wf_cons_nil)
(sttp_extend_nil).
-cons : sttp_wf_cons_implies_extend_cons (sttp_wf_cons_cons _ DLocLt)
(sttp_extend_cons_miss DSttpExtend
DLocLt)
<- sttp_extend_refl _ DSttpExtend.
%terminates {} (sttp_wf_cons_implies_extend_cons _ _).
%worlds () (sttp_wf_cons_implies_extend_cons _ _).
%covers sttp_wf_cons_implies_extend_cons +DSTWf -DSttpExtend.
%total {} (sttp_wf_cons_implies_extend_cons _ _).
examples-twelf-orig/alloc-sem/storetp-lemmas.thm 0000664 0000000 0000000 00000004474 12341637066 0022334 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% storetp-lemmas.thm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing WF Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
sttp!wf_tail_thm :
forall* {L:loc} {T:tp} {ST':sttp}
forall {DSTWf: sttp_wf (cons_sttp L T ST')}
exists {DSTWf': sttp_wf ST'}
true.
%prove 2 {} (sttp!wf_tail_thm _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Alloc Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
sttp!alloc_preserves_wf_thm :
forall* {ST1:sttp} {T:tp} {ST2:sttp} {L:loc}
forall {DSTWf1: sttp_wf ST1}
{DSttpAlloc: sttp_alloc ST1 T ST2 L}
exists {DSTWf2: sttp_wf ST2}
true.
%prove 4 DSttpAlloc (sttp!alloc_preserves_wf_thm _ DSttpAlloc _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Extend Lemmas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%theorem
sttp!extend_refl_thm :
forall {ST:sttp}
exists {DSttpExtend: sttp_extend ST ST}
true.
%prove 2 ST (sttp!extend_refl_thm ST _).
%theorem
sttp!extend_trans_thm :
forall* {ST1:sttp} {ST2:sttp} {ST3:sttp}
forall {DSttpExtend12: sttp_extend ST1 ST2}
{DSttpExtend23: sttp_extend ST2 ST3}
exists {DSttpExtend13: sttp_extend ST1 ST3}
true.
%prove 4 DSttpExtend23 (sttp!extend_trans_thm _ DSttpExtend23 _).
%%% Store typing allocation yields an extension of the original store typing.
%theorem
sttp!alloc_implies_extend_thm :
forall* {ST:sttp} {T:tp} {ST':sttp} {L:loc}
forall {DStAlloc: sttp_alloc ST T ST' L}
exists {DSttpExtend: sttp_extend ST ST'}
true.
%prove 4 DStAlloc (sttp!alloc_implies_extend_thm DStAlloc _).
%%% A well-formed, non-empty store typing is an extension of its tail.
%theorem
sttp!wf_cons_implies_extend_cons_thm :
forall* {L:loc} {T:tp} {ST':sttp}
forall {DSTWf: sttp_wf (cons_sttp L T ST')}
exists {DSttpExtend: sttp_extend ST' (cons_sttp L T ST')}
true.
%prove 2 {} (sttp!wf_cons_implies_extend_cons_thm _ _).
examples-twelf-orig/alloc-sem/storetp.elf 0000664 0000000 0000000 00000005360 12341637066 0021031 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% storetp.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nil_sttp : sttp.
cons_sttp : loc -> tp -> sttp -> sttp.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typings WF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sttp_wf : sttp -> type.
%mode sttp_wf +ST.
sttp_wf_nil : sttp_wf nil_sttp.
sttp_wf_cons_nil
: sttp_wf (cons_sttp L T nil_sttp).
sttp_wf_cons_cons
: sttp_wf (cons_sttp L' T' ST'') ->
loc_lt L' L
-> sttp_wf (cons_sttp L T (cons_sttp L' T' ST'')).
%terminates ST (sttp_wf ST).
%worlds () (sttp_wf _).
%covers sttp_wf +ST.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Lookup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sttp_lookup : sttp -> loc -> tp -> type.
%mode sttp_lookup +ST +L -T.
sttp_lookup_hit
: sttp_lookup (cons_sttp L T ST) L T.
sttp_lookup_miss
: sttp_lookup ST' L T ->
loc_lt L L'
-> sttp_lookup (cons_sttp L' T' ST') L T.
%terminates ST (sttp_lookup ST _ _).
%worlds () (sttp_lookup _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Alloc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sttp_alloc : sttp -> tp -> sttp -> loc -> type.
%mode sttp_alloc +ST1 +V -ST2 -L.
sttp_alloc_nil : sttp_alloc nil_sttp
T''
(cons_sttp (mkLoc z_nat) T'' nil_sttp)
(mkLoc z_nat).
sttp_alloc_cons
: sttp_alloc (cons_sttp (mkLoc N) T ST)
T''
(cons_sttp (mkLoc (s_nat N)) T'' (cons_sttp (mkLoc N) T ST))
(mkLoc (s_nat N)).
%terminates ST (sttp_alloc ST _ _ _).
%worlds () (sttp_alloc _ _ _ _).
%covers sttp_alloc +ST1 +V -ST2 -L.
%total ST (sttp_alloc ST _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Store Typing Extend
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sttp_extend : sttp -> sttp -> type.
%mode sttp_extend +ST1 +ST2.
sttp_extend_nil
: sttp_extend nil_sttp ST2.
sttp_extend_cons_hit
: sttp_extend ST1' ST2'
-> sttp_extend (cons_sttp L T ST1')
(cons_sttp L T ST2').
sttp_extend_cons_miss
: sttp_extend (cons_sttp L1 T1 ST1') ST2' ->
loc_lt L1 L2
-> sttp_extend (cons_sttp L1 T1 ST1')
(cons_sttp L2 T2 ST2').
%terminates ST2 (sttp_extend _ ST2).
%worlds () (sttp_extend _ _).
examples-twelf-orig/alloc-sem/syntax.elf 0000664 0000000 0000000 00000001140 12341637066 0020647 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% syntax.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Syntax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc : type. %name loc L. %% loc.elf
exp : type. %name exp E. %% exp.elf
val : type. %name val V. %% val.elf
st : type. %name st S. %% store.elf
tp : type. %name tp T. %% tp.elf
sttp : type. %name sttp ST. %% storetp.elf
%% machine.elf
mach : type. %name mach M.
examples-twelf-orig/alloc-sem/tp.elf 0000664 0000000 0000000 00000000540 12341637066 0017747 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% tp.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Types
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fn_t : tp -> tp -> tp.
unit_t : tp.
pair_t : tp -> tp -> tp.
examples-twelf-orig/alloc-sem/val.elf 0000664 0000000 0000000 00000000561 12341637066 0020111 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% val.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Values
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
lam_v : tp -> (exp -> exp) -> val.
unit_v : val.
pair_v : loc -> loc -> val.
examples-twelf-orig/alloc-sem/weaken.elf 0000664 0000000 0000000 00000015265 12341637066 0020610 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% weaken.elf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Weaken Store Typing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% sttp_lookup
sttp_weak_sttp_lookup
: sttp_lookup ST1 L T ->
sttp_extend ST1 ST2
-> sttp_lookup ST2 L T -> type.
%mode sttp_weak_sttp_lookup +DSttpLookup1 +DSttpExtend -DSttpLookup2.
-hit_hit : sttp_weak_sttp_lookup (sttp_lookup_hit)
(sttp_extend_cons_hit DSttpExtend')
(sttp_lookup_hit).
-miss_hit : sttp_weak_sttp_lookup (sttp_lookup_miss DSttpLookup DLocLt)
(sttp_extend_cons_hit DSttpExtend')
(sttp_lookup_miss DSttpLookup'' DLocLt)
<- sttp_weak_sttp_lookup DSttpLookup
DSttpExtend'
DSttpLookup''.
-hit_miss : sttp_weak_sttp_lookup (sttp_lookup_hit)
(sttp_extend_cons_miss DSttpExtend' DLocLt')
(sttp_lookup_miss DSttpLookup'' DLocLt')
<- sttp_weak_sttp_lookup (sttp_lookup_hit)
DSttpExtend'
DSttpLookup''.
-miss_miss : sttp_weak_sttp_lookup (sttp_lookup_miss DSttpLookup DLocLt)
(sttp_extend_cons_miss DSttpExtend' DLocLt')
(sttp_lookup_miss DSttpLookup'' DLocLt'')
<- sttp_weak_sttp_lookup (sttp_lookup_miss DSttpLookup DLocLt)
DSttpExtend'
DSttpLookup''
<- loc_lt_trans DLocLt DLocLt' DLocLt''.
%terminates DSttpExtend (sttp_weak_sttp_lookup _ DSttpExtend _).
%worlds () (sttp_weak_sttp_lookup _ _ _).
%covers sttp_weak_sttp_lookup +DSttpLookup1 +DSttpExtend -DSttpLookup2.
%total DSttpExtend (sttp_weak_sttp_lookup _ DSttpExtend _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% loc_judg
sttp_weak_loc_judg : loc_judg ST1 L T -> sttp_extend ST1 ST2
-> loc_judg ST2 L T -> type.
%mode sttp_weak_loc_judg +DLocTc +DSttpExtend -DLocTc'.
sttp_weak_loc_judg_
: sttp_weak_loc_judg (loc_judg_ DSttpLookup) DSttpExtend (loc_judg_ DSttpLookup')
<- sttp_weak_sttp_lookup DSttpLookup DSttpExtend DSttpLookup'.
%terminates {} (sttp_weak_loc_judg _ _ _).
%worlds () (sttp_weak_loc_judg _ _ _).
%covers sttp_weak_loc_judg +DLocTc +DSttpExtend -DLocTc'.
%total {} (sttp_weak_loc_judg _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% exp_judg
sttp_weak_exp_judg
: exp_judg ST1 E T ->
sttp_extend ST1 ST2
-> exp_judg ST2 E T -> type.
%mode sttp_weak_exp_judg +DExpTc1 +DSttpExtend -DExpTc2.
-var : sttp_weak_exp_judg (exp_judg_var DVarTc)
DSttpExtend
(exp_judg_var DVarTc).
-loc : sttp_weak_exp_judg (exp_judg_loc DLocTc)
DSttpExtend
(exp_judg_loc DLocTc')
<- sttp_weak_loc_judg DLocTc DSttpExtend DLocTc'.
-lam : sttp_weak_exp_judg (exp_judg_lam ([x] [d] DExpTcF x d))
DSttpExtend
(exp_judg_lam ([x] [d] DExpTcF' x d))
<- ({x : exp} {dVarTcX : var_judg x Tx }
sttp_weak_exp_judg (DExpTcF x dVarTcX) DSttpExtend (DExpTcF' x dVarTcX)).
-app : sttp_weak_exp_judg (exp_judg_app DExpTcE2 DExpTcE1 )
DSttpExtend
(exp_judg_app DExpTcE2' DExpTcE1')
<- sttp_weak_exp_judg DExpTcE1 DSttpExtend DExpTcE1'
<- sttp_weak_exp_judg DExpTcE2 DSttpExtend DExpTcE2'.
-unit : sttp_weak_exp_judg (exp_judg_unit)
DSttpExtend
(exp_judg_unit).
-letunit : sttp_weak_exp_judg (exp_judg_letunit DExpTcE2 DExpTcE1)
DSttpExtend
(exp_judg_letunit DExpTcE2' DExpTcE1')
<- sttp_weak_exp_judg DExpTcE1 DSttpExtend DExpTcE1'
<- sttp_weak_exp_judg DExpTcE2 DSttpExtend DExpTcE2'.
-pair : sttp_weak_exp_judg (exp_judg_pair DExpTcE2 DExpTcE1)
DSttpExtend
(exp_judg_pair DExpTcE2' DExpTcE1')
<- sttp_weak_exp_judg DExpTcE1 DSttpExtend DExpTcE1'
<- sttp_weak_exp_judg DExpTcE2 DSttpExtend DExpTcE2'.
-letpair : sttp_weak_exp_judg (exp_judg_letpair ([x] [d1] [y] [d2] DExpTcF2 x d1 y d2) DExpTcE1)
DSttpExtend
(exp_judg_letpair ([x] [d1] [y] [d2] DExpTcF2' x d1 y d2) DExpTcE1')
<- sttp_weak_exp_judg DExpTcE1 DSttpExtend DExpTcE1'
<- ({x:exp}{dVarTcX : var_judg x Tx}
{y:exp}{dVarTcY : var_judg y Ty}
sttp_weak_exp_judg (DExpTcF2 x dVarTcX y dVarTcY)
DSttpExtend
(DExpTcF2' x dVarTcX y dVarTcY)).
%terminates DExpTc (sttp_weak_exp_judg DExpTc _ _).
%worlds (var_judg_block) (sttp_weak_exp_judg _ _ _).
%covers sttp_weak_exp_judg +DExpTc +DSttpExtend -DExpTc'.
%total DExpTc (sttp_weak_exp_judg DExpTc _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% val_judg
sttp_weak_val_judg
: val_judg ST1 V T ->
sttp_extend ST1 ST2
-> val_judg ST2 V T -> type.
%mode sttp_weak_val_judg +DValTc1 +DSttpExtend -DValTc2.
-lam : sttp_weak_val_judg (val_judg_lam ([x] [d] DExpTcF x d))
DSttpExtend
(val_judg_lam ([x] [d] DExpTcF' x d))
<- ({x:exp}{dVarTcX : var_judg x Tx}
sttp_weak_exp_judg (DExpTcF x dVarTcX)
DSttpExtend
(DExpTcF' x dVarTcX)).
-unit : sttp_weak_val_judg (val_judg_unit)
DSttpExtend
(val_judg_unit).
-pair : sttp_weak_val_judg (val_judg_pair DLocTcL2 DLocTcL1)
DSttpExtend
(val_judg_pair DLocTcL2' DLocTcL1')
<- sttp_weak_loc_judg DLocTcL1 DSttpExtend DLocTcL1'
<- sttp_weak_loc_judg DLocTcL2 DSttpExtend DLocTcL2'.
%terminates {} (sttp_weak_val_judg _ _ _).
%worlds (var_judg_block) (sttp_weak_val_judg _ _ _).
%covers sttp_weak_val_judg +DValTc +DSttpExtend -DValTc'.
%total {} (sttp_weak_val_judg _ _ _).
examples-twelf-orig/alloc-sem/weaken.thm 0000664 0000000 0000000 00000003465 12341637066 0020631 0 ustar 00root root 0000000 0000000 %%% Simply Typed Lambda Calculus w/ small-step, allocation semantics
%%% Author: Matthew Fluet (June 2005)
%%% weaken.thm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Weaken Store Typing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% sttp_lookup
%theorem
sttp_weak_sttp_lookup_thm :
forall* {ST1:sttp} {L:loc} {T:tp} {ST2:sttp}
forall {DSttpLookup: sttp_lookup ST1 L T}
{DSttpExtend: sttp_extend ST1 ST2}
exists {DSttpLookup': sttp_lookup ST2 L T}
true.
%prove 4 DSttpExtend (sttp_weak_sttp_lookup_thm _ DSttpExtend _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% |-loc
%theorem
sttp_weak_|-loc_thm :
forall* {ST1:sttp} {L:loc} {T:tp} {ST2:sttp}
forall {DLocTc: |-loc ST1 L T}
{DSttpExtend: sttp_extend ST1 ST2}
exists {DLocTc': |-loc ST2 L T}
true.
%prove 3 {} (sttp_weak_|-loc_thm _ _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% |-exp
%theorem
sttp_weak_|-exp_thm :
forallG (some {T:tp} pi {x:exp} {DVarTcX: |-var x T})
forall* {ST1:sttp} {E:exp} {T:tp} {ST2:sttp}
forall {DExpTc: |-exp ST1 E T}
{DSttpExtend: sttp_extend ST1 ST2}
exists {DExpTc': |-exp ST2 E T}
true.
%prove 3 DExpTc (sttp_weak_|-exp_thm DExpTc _ _).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% |-val
%theorem
sttp_weak_|-val_thm :
forallG (some {T:tp} pi {x:exp} {DVarTcX: |-var x T})
forall* {ST1:sttp} {V:val} {T:tp} {ST2:sttp}
forall {DValTc: |-val ST1 V T}
{DSttpExtend: sttp_extend ST1 ST2}
exists {DValTc': |-val ST2 V T}
true.
%% %prove 4 {} (sttp_weak_|-val_thm _ _ _).
examples-twelf-orig/append/ 0000775 0000000 0000000 00000000000 12341637066 0016230 5 ustar 00root root 0000000 0000000 examples-twelf-orig/append/app.elf 0000664 0000000 0000000 00000140402 12341637066 0017501 0 ustar 00root root 0000000 0000000 elem : type.
nat : type.
z : nat.
s: nat -> nat.
a : elem.
b : elem.
c : elem.
list : type.
nil : list.
@ : elem -> list -> list.
% %infix right 10 @.
% app : list N -> list M -> list M' -> type.
% app : list N -> list M -> list (N + M) -> type.
app : list -> list -> list -> type.
appnil : app nil K K.
appcons : app (@ X L) K (@ X M)
<- app L K M.
%{
rec ex1 : (app (@ a (@ a (@ a nil))) (@ a (@ a nil)) (@ a (@ a (@ a (@ a (@ a nil))))))[ ] =
[ ] appcons (appcons (appcons appnil))
;
test: (app (@ a (@ a (@ a nil))) (@ a (@ a nil)) (@ a (@ a (@ a (@ a (@ a nil)))))) -> type.
ex1: test (appcons (appcons (appcons appnil))).
}%
%{
%query 1 * D : app (a @ a @ a @ nil) (b @ b @ nil) M.
%query 1 * D : app M (b @ b @ nil) (a @ a @ a @ b @ b @ nil).
%query 1 * D : app (a @ a @ a @ nil) M (a @ a @ a @ b @ b @ nil).
ex1 : app nil nil nil = appnil.
l100 = a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ nil.
l500 = a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ nil.
l1000 = a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ nil.
%%%%%
l1500 = a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ nil.
%%%% 2000
l2000 = a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ nil.
%%%%%
l3000 = a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ nil.
%%%% 4000
l4000 = a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @
a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ a @ nil.
}% examples-twelf-orig/append/ex100.elf 0000664 0000000 0000000 00000007617 12341637066 0017570 0 ustar 00root root 0000000 0000000
rec ex100 : (app (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
nil
(@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))[ ] =
[ ]
appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons (appcons (appcons (appcons (appcons appnil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) ;
examples-twelf-orig/append/ex200.elf 0000664 0000000 0000000 00000017461 12341637066 0017567 0 ustar 00root root 0000000 0000000 rec ex100 :
(app (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
nil
(@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
)[ ]
=
[ ] appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons (appcons (appcons (appcons (appcons appnil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
;
examples-twelf-orig/append/ex400.elf 0000664 0000000 0000000 00000037204 12341637066 0017566 0 ustar 00root root 0000000 0000000 rec ex400 :
(app (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
nil
(@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))[ ] =
[ ]
appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons (appcons (appcons (appcons (appcons appnil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
; examples-twelf-orig/append/sources.cfg 0000664 0000000 0000000 00000000023 12341637066 0020367 0 ustar 00root root 0000000 0000000 app.elf
test400.elf examples-twelf-orig/append/test.cfg 0000664 0000000 0000000 00000000022 12341637066 0017662 0 ustar 00root root 0000000 0000000 app.elf
ex400.elf
examples-twelf-orig/append/test100.elf 0000664 0000000 0000000 00000007626 12341637066 0020133 0 ustar 00root root 0000000 0000000
test: (app (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
nil
(@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) -> type.
t100: test
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons (appcons (appcons (appcons (appcons appnil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) ).
examples-twelf-orig/append/test200.elf 0000664 0000000 0000000 00000017470 12341637066 0020132 0 ustar 00root root 0000000 0000000 test:
(app (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
nil
(@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
) -> type.
t200: test
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons (appcons (appcons (appcons (appcons appnil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
).
examples-twelf-orig/append/test300.elf 0000664 0000000 0000000 00000027342 12341637066 0020132 0 ustar 00root root 0000000 0000000 test:
(app (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
nil
(@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
) -> type.
t200: test
(
appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons (appcons (appcons (appcons (appcons appnil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))). examples-twelf-orig/append/test400.elf 0000664 0000000 0000000 00000037213 12341637066 0020131 0 ustar 00root root 0000000 0000000 test :
(app (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
nil
(@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a (@ a nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) -> type.
t400: test (appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons
(appcons (appcons (appcons (appcons (appcons appnil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
). examples-twelf-orig/append/times.txt 0000664 0000000 0000000 00000000350 12341637066 0020110 0 ustar 00root root 0000000 0000000 Bongo: test400
Reconstruction: | 0.997731 | 0.816051 | 0.172011
Abstraction: | 2.976232 | 2.964185 | 0.008000
Check: | 0.439749 | 0.432027 | 0.008001
Bongo ex400:
examples-twelf-orig/arith/ 0000775 0000000 0000000 00000000000 12341637066 0016070 5 ustar 00root root 0000000 0000000 examples-twelf-orig/arith/README 0000664 0000000 0000000 00000000152 12341637066 0016746 0 ustar 00root root 0000000 0000000 Simple unary arithmetic to test inductive theorem prover.
Authors: Frank Pfenning and Carsten Schuermann
examples-twelf-orig/arith/arith.elf 0000664 0000000 0000000 00000001141 12341637066 0017664 0 ustar 00root root 0000000 0000000 nat : type. %name nat X.
z : nat.
s : nat -> nat.
nt : nat -> type. %name nt N.
nt_z : nt z.
nt_s : nt (s X) <- nt X.
plus : nat -> nat -> nat -> type. %name plus P.
p_z : plus z Y Y.
p_s : plus (s X) Y (s Z)
<- plus X Y Z.
acker : nat -> nat -> nat -> type.
%mode acker +X +Y -Z.
a_1 : acker z Y (s Y).
a_2 : acker (s X) z Z
<- acker X (s z) Z.
a_3 : acker (s X) (s Y) Z
<- acker (s X) Y Z'
<- acker X Z' Z.
% worlds () (acker _ _ _).
% compile acker.
%% arg1 = (s (s (s z))).
%% arg2 = (s (s (s (s (s z))))).
% query 1 1 (acker arg1 arg2 Z).
% fquery (acker arg1 arg2 Z).
examples-twelf-orig/arith/arith.thm 0000664 0000000 0000000 00000002164 12341637066 0017714 0 ustar 00root root 0000000 0000000 % Termination of Ackermann's function requires
% lexicographic termination ordering
% terminates [N M] (acker N M _). % causes termination error
%terminates {N M} (acker N M _).
%theorem assoc : forall* {X:nat} {Y:nat} {Z:nat} {X':nat} {Z':nat}
forall {P1:plus X Y X'} {P2:plus X' Z Z'}
exists {Y':nat} {Q1:plus Y Z Y'} {Q2:plus X Y' Z'}
true.
%prove 3 P1 (assoc P1 _ _ _ _).
%terminates P1 (assoc P1 _ _ _ _).
%theorem assoc' : forall* {X:nat} {Y:nat} {Z:nat} {X':nat} {Z':nat}
forall {P1:plus X Y X'} {P2:plus X' Z Z'}
exists {Y':nat} {Q1:plus Y Z Y'} {Q2:plus X Y' Z'}
true.
%terminates P2 (assoc' _ P2 _ _ _).
% %prove 3 P2 (assoc' _ P2 _ _ _). % fails
%theorem comm : forall* {X:nat} {Y:nat} {Z:nat}
forall {N:nt X} {M:nt Y} {P'': nt Z} {P0:plus X Y Z}
exists {Q:plus Y X Z}
true.
%theorem comm' : forall* {X:nat} {Y:nat} {Z:nat}
forall {M':nt X} {N':nt Y} {P'': nt Z} {P0:plus X Y Z}
exists {Q:plus Y X Z}
true.
%prove 6 [(N N') (M M')]
(comm N M _ _ _)
(comm' M' N' _ _ _).
%terminates [(N N') (M M')]
(comm N M _ _ _)
(comm' M' N' _ _ _).
examples-twelf-orig/arith/sources.cfg 0000664 0000000 0000000 00000000011 12341637066 0020224 0 ustar 00root root 0000000 0000000 arith.elf examples-twelf-orig/arith/test.cfg 0000664 0000000 0000000 00000000024 12341637066 0017524 0 ustar 00root root 0000000 0000000 arith.elf
arith.thm
examples-twelf-orig/ccc/ 0000775 0000000 0000000 00000000000 12341637066 0015511 5 ustar 00root root 0000000 0000000 examples-twelf-orig/ccc/README 0000664 0000000 0000000 00000001471 12341637066 0016374 0 ustar 00root root 0000000 0000000 Equivalence theorem for CCC's and simply-typed lambda-calculi.
pf.dvi : a "paper proof" of the theorem.
ccc.elf : (static) definition of cartesian closed categories
lambda.elf : (static) definition of simply-typed lambda-calculus
catlem.elf : a few categorical lemmas
cong.elf : general congruence lemma for lambda-terms
abs-env.elf : translation from lambda-terms to ccc combinators
subext.elf : the substitution extension lemma
eqpres1.elf : preservation of beta-eta-pairing equality
conc.elf : translation from ccc combinators to lambda-terms
eqpres2.elf : preservation of ccc equality
inv1.elf : translation lambda->ccc->lamda is identity
inv2.elf : translation ccc->lambda->ccc is identity
refl.elf : equality-reflection corollary (both ways)
examples.quy : sample queries
examples-twelf-orig/ccc/abs-env.elf 0000664 0000000 0000000 00000001463 12341637066 0017540 0 ustar 00root root 0000000 0000000 %% With explicit environments (as in Curien)
env : obj -> type. %name env G.
empty : env one.
addv : env P -> term A -> env (cross P A).
% look up variable
absv : env A -> term B -> mor A B -> type.
av_x : absv (addv G X) X snd.
av_y : absv (addv G Y) X (@ M fst)
<- absv G X M.
% translate term
abse : env A -> term B -> mor A B -> type.
avar : abse G X M <- absv G X M.
aunit : abse G lunit drop.
apair : abse G (lpair E1 E2) (pair F1 F2)
<- abse G E2 F2
<- abse G E1 F1.
afst : abse G (lfst E) (@ fst F)
<- abse G E F.
asnd : abse G (lsnd E) (@ snd F)
<- abse G E F.
alam : abse G (llam ([x] E x)) (cur F)
<- {x: term _} abse (addv G x) (E x) F.
aapp : abse G (lapp E1 E2) (@ app (pair F1 F2))
<- abse G E2 F2
<- abse G E1 F1.
examples-twelf-orig/ccc/catlem.elf 0000664 0000000 0000000 00000001330 12341637066 0017443 0 ustar 00root root 0000000 0000000 % Lemmas about CCC combinators
% o H =
distp : eq (@ (pair F G) H) (pair (@ F H) (@ G H)) -> type.
distp1 : distp (then (sym prod_u) (eq_pair (then ass (eq_o prod_l refl)) (then ass (eq_o prod_r refl)))).
% app o = F o
appl : eq (@ app (pair (@ (cur F) G) H)) (@ F (pair G H)) -> type.
appl1 : appl (then (eq_o refl (then (eq_pair (then (eq_o refl (sym prod_l)) ass) (sym prod_r)) (sym DP)))
(then ass (eq_o exp_e refl)))
<- distp DP.
% cur(F) o G = cur (F o )
distc : eq (@ (cur F) G) (cur (@ F (pair (@ G fst) snd))) -> type.
distc1 : distc (then (sym exp_u) (eq_cur (then (eq_o refl (eq_pair (sym ass) refl)) AP)))
<- appl AP.
examples-twelf-orig/ccc/ccc.elf 0000664 0000000 0000000 00000002277 12341637066 0016741 0 ustar 00root root 0000000 0000000 %%% Cartesian closed category
%% Categorical language
% objects
obj : type. %name obj A.
% morphisms
mor : obj -> obj -> type. %name mor F.
% morphism equality
eq : mor A B -> mor A B -> type. %name eq ME.
% morphisms
idc : mor A A.
@ : mor B C -> mor A B -> mor A C.
% equations
refl : eq F F.
then : eq F F' -> eq F' F'' -> eq F F''.
sym : eq F F' -> eq F' F.
eq_o : eq F F' -> eq G G' -> eq (@ F G) (@ F' G').
id_l : eq (@ idc F) F.
id_r : eq (@ F idc) F.
ass : eq (@ H (@ G F)) (@ (@ H G) F).
%% Products
% objects
one : obj.
cross : obj -> obj -> obj.
% morphisms
drop : mor A one.
fst : mor (cross A B) A.
snd : mor (cross A B) B.
pair : mor A B -> mor A C -> mor A (cross B C).
% equations
eq_pair : eq F F' -> eq G G' -> eq (pair F G) (pair F' G').
term_u : eq H drop.
prod_l : eq (@ fst (pair F G)) F.
prod_r : eq (@ snd (pair F G)) G.
prod_u : eq (pair (@ fst H) (@ snd H)) H.
%% Exponentials
% objects
arrow : obj -> obj -> obj.
% morphisms
app : mor (cross (arrow B C) B) C.
cur : mor (cross A B) C -> mor A (arrow B C).
% equations
eq_cur : eq F F' -> eq (cur F) (cur F').
exp_e : eq (@ app (pair (@ (cur F) fst) snd)) F.
exp_u : eq (cur (@ app (pair (@ G fst) snd))) G.
examples-twelf-orig/ccc/conc.bel 0000664 0000000 0000000 00000003457 12341637066 0017130 0 ustar 00root root 0000000 0000000 % Translation CCC combinators -> lambda-terms
% conc : mor A B -> (term A -> term B) -> type.
% % mode conc +D -E.
%
% cid : conc idc (\x . x).
%
% ccomp : conc (@ F G) (\x . (M (N x)))
% <- conc G (\x . N x)
% <- conc F (\x . M x).
%
% cunit : conc drop (\x . lunit).
%
% cpair : conc (pair F G) (\x . (lpair (M x) (N x)))
% <- conc G (\x . N x)
% <- conc F (\x . M x).
%
% cfst : conc fst (\x . (lfst x)).
%
% csnd : conc snd (\x . (lsnd x)).
%
% ccur : conc (cur F) (\a . llam (\b . M (lpair a b)))
% <- conc F (\x . M x).
%
% capp : conc app (\a . lapp (lfst a) (lsnd a)).
% worlds () (conc _ _).
rec conc : (mor A B)[] -> (term B)[u:term A] =
fn d => case d of
[] idc =>
[x] x
% FIXME reconstruct:elBranch expect an atomic type for the argument of the match
% here we are matching on argument of type (term A -> term B) ('let' gets transformed into a match)
% same problem for pair and cur below
%
% | [] (@ F G) =>
% let [x:term A] (M x) = conc ([] F) in
% let [x:term A] (N x) = conc ([] G) in
% [x] (M (N x))
| [] drop =>
[x] lunit
| [] (pair F G) : (mor A (cross B C))[ ] =>
let [y:term A] (M y) : (term B)[y:term A] = conc ([] F) in
let [x:term A] (N x) : (term C)[x:term A] = conc ([] G) in
[x] lpair (M x) (N x) % term (cross B C)[x:term A]
% FIXME problem in unification I do not really understand, same problem for snd and app below
%
% | [] fst =>
% [] (\x . (lfst x))
%
% | [] snd =>
% [] (\x . (lsnd x))
% | [] (cur F) =>
% let [] M = conc ([] F) in
% [] (\a . (llam (\b . (M (lpair a b)))))
% | [] app =>
% [] (\a . (lapp (lfst a) (lsnd a)))
;
examples-twelf-orig/ccc/conc.elf 0000664 0000000 0000000 00000001153 12341637066 0017123 0 ustar 00root root 0000000 0000000 % Translation CCC combinators -> lambda-terms
conc : mor A B -> (term A -> term B) -> type.
% % mode conc +D -E.
cid : conc idc ([x] x).
ccomp : conc (@ F G) ([x] (M (N x)))
<- conc G ([x] N x)
<- conc F ([x] M x).
cunit : conc drop ([x] lunit).
cpair : conc (pair F G) ([x] (lpair (M x) (N x)))
<- conc G ([x] N x)
<- conc F ([x] M x).
cfst : conc fst ([x] (lfst x)).
csnd : conc snd ([x] (lsnd x)).
ccur : conc (cur F) ([a] llam ([b] M (lpair a b)))
<- conc F ([x] M x).
capp : conc app ([a] lapp (lfst a) (lsnd a)).
% worlds () (conc _ _).
examples-twelf-orig/ccc/cong.bel 0000664 0000000 0000000 00000002423 12341637066 0017124 0 ustar 00root root 0000000 0000000 % % general congruence: if e <-> e' then e2[e/x] <-> e2[e'/x]
% cong : {M:term A -> term B} conv E E' -> conv (M E) (M E') -> type.
% cong_var : cong (\x . x) (\c . c).
% cong_unit : cong (\x . lunit) (\c . c_refl).
% cong_pair : cong (\x . lpair (E1 x) (E2 x)) (\c . c_pair (CP1 c) (CP2 c))
% <- cong (\x . E1 x) (\x . CP1 x)
% <- cong (\x . E2 x) (\x . CP2 x).
% cong_fst : cong (\x . lfst (E x)) (\c . c_fst (CP c))
% <- cong (\x . E x) (\x . CP x).
% cong_snd : cong (\x . lsnd (E x)) (\c . c_snd (CP c))
% <- cong (\x . E x) (\x . CP x).
% cong_lam : cong (\x . (llam (\y . E x y))) (\c . (c_lam (\y . (CP c y))))
% <- ({y: term _} cong (\x . y) (\c . c_refl) -> cong (\x . E x y) (\c . CP c y)).
% cong_app : cong (\x . lapp (E1 x) (E2 x)) (\c . c_app (CP1 c) (CP2 c))
% <- cong (\x . E1 x) (\x . CP1 x)
% <- cong (\x . E2 x) (\x . CP2 x).
schema termCtx = some [A:obj] block (term A) | some [A:obj][E:term A][E':term A] block conv E E'.
% for all M. conv E E' -> conv (M E) (M E')
%
rec cong : {g:termCtx}{M::(term B)[g, x:term A]} ((conv E E')[g] -> (conv (M E) (M E'))[g]) =
mlam M => case M of
[x:conv E E] x =>
[c] c
| [] (\x . lunit) =>
[] (\c . c_refl)
;
examples-twelf-orig/ccc/cong.elf 0000664 0000000 0000000 00000001571 12341637066 0017133 0 ustar 00root root 0000000 0000000 % general congruence: if e <-> e' then e2[e/x] <-> e2[e'/x]
cong : {M:term A -> term B} (conv E E' -> conv (M E) (M E')) -> type.
cong_var : cong ([x] x) ([c] c).
cong_unit : cong ([x] lunit) ([c] c_refl).
cong_pair : cong ([x] lpair (E1 x) (E2 x)) ([c] c_pair (CP1 c) (CP2 c))
<- cong ([x] E1 x) ([x] CP1 x)
<- cong ([x] E2 x) ([x] CP2 x).
cong_fst : cong ([x] lfst (E x)) ([c] c_fst (CP c))
<- cong ([x] E x) ([x] CP x).
cong_snd : cong ([x] lsnd (E x)) ([c] c_snd (CP c))
<- cong ([x] E x) ([x] CP x).
cong_lam : cong ([x] (llam ([y] E x y))) ([c] (c_lam ([y] (CP c y))))
<- ({y: term _} cong ([x] y) ([c] c_refl) -> cong ([x] E x y) ([c] CP c y)).
cong_app : cong ([x] lapp (E1 x) (E2 x)) ([c] c_app (CP1 c) (CP2 c))
<- cong ([x] E1 x) ([x] CP1 x)
<- cong ([x] E2 x) ([x] CP2 x).
examples-twelf-orig/ccc/eqpres1.elf 0000664 0000000 0000000 00000005234 12341637066 0017565 0 ustar 00root root 0000000 0000000 % Equality preservation for lambda-calc
ctoe : conv E E' -> abse G E F -> abse G E' F' -> eq F F' -> type.
ctoe_refl : ctoe c_refl AP AP refl.
ctoe_trans : ctoe (c_trans CP1 CP2) AP1 AP2 (then EP1 EP2)
<- ctoe CP1 AP1 AP3 EP1
<- ctoe CP2 AP3 AP2 EP2.
ctoe_sym : ctoe (c_sym CP) AP1 AP2 (sym EP)
<- ctoe CP AP2 AP1 EP.
ctoe_fst : ctoe (c_fst CP) (afst AP) (afst AP') (eq_o refl EP)
<- ctoe CP AP AP' EP.
ctoe_snd : ctoe (c_snd CP) (asnd AP) (asnd AP') (eq_o refl EP)
<- ctoe CP AP AP' EP.
ctoe_pair : ctoe (c_pair CP1 CP2) (apair AP1 AP2)
(apair AP1' AP2') (eq_pair EP1 EP2)
<- ctoe CP1 AP1 AP1' EP1
<- ctoe CP2 AP2 AP2' EP2.
ctoe_lam : ctoe (c_lam ([x] CP x)) (alam ([x] AP x))
(alam ([x] AP' x)) (eq_cur EP)
<- {x}ctoe (CP x) (AP x) (AP' x) EP.
ctoe_app : ctoe (c_app CP1 CP2) (aapp AP1 AP2)
(aapp AP1' AP2') (eq_o refl (eq_pair EP1 EP2))
<- ctoe CP1 AP1 AP1' EP1
<- ctoe CP2 AP2 AP2' EP2.
ctoe_unit : ctoe c_unit aunit AP (sym term_u).
ctoe_prl : ctoe c_prl (afst (apair AP1 AP2)) AP1 prod_l.
ctoe_prr : ctoe c_prr (asnd (apair AP1 AP2)) AP2 prod_r.
ctoe_surj : ctoe c_surj (apair (afst AP) (asnd AP)) AP prod_u.
ctoe_beta : ctoe c_beta (aapp (alam ([x] AP1 x)) AP2) AP
(then (then (eq_o refl (eq_pair (sym id_r) refl)) EE) EP)
<- subst AP2 AP1 AP EP
<- appl EE.
ctoe_eta : ctoe c_eta (alam ([x] aapp (AP x) (avar av_x))) AP'
(then (eq_cur (eq_o refl (eq_pair (sym EP) refl))) exp_u)
<- {x}weak AP' (AP x) EP.
%sigma[p1:{f}abse (addv empty f) (llam [x] lapp f x) M1] sigma [p2:{f}abse (addv empty f) f M2] {f} ctoe c_eta (p1 f) (p2 f) E.
%sigma[p1:abse empty (llam [x] lapp (llam[y]y) x) M1] sigma [p2:abse empty (llam[y]y) M2] ctoe c_eta p1 p2 E.
%sigma[p1:abse empty (llam [x] lapp (llam[f]llam[y]lapp f y) x) M1] sigma [p2:abse empty (llam[f]llam[y]lapp f y) M2] ctoe c_eta p1 p2 E.
%sigma[p1:abse empty (llam[y]y) M1] sigma [p2:{x}abse (addv empty x) (llam[y]y) M2] {x}weak p1 (p2 x) E.
%sigma[p1:abse empty (llam [x] lapp (llam[f]llam[y]lapp f y) x) M1] sigma [p2:abse empty (llam[x]llam[y]lapp x y) M2] ctoe (c_lam ([x]c_beta)) p1 p2 E.
%sigma[p1:abse empty (llam [x] lapp (llam[f]llam[y]lapp f y) x) M1] sigma [p2:abse empty (llam[x]x) M2] ctoe (c_lam ([x]c_trans c_beta c_eta)) p1 p2 E.
%sigma[p1:abse empty (llam [x] lapp (llam[f]llam[y]lapp f y) (llam[z]lapp z x)) M1] sigma [p2:abse empty (llam[x]llam[y]lapp y x) M2] ctoe (c_lam ([x]c_trans c_beta (c_lam [x] c_beta))) p1 p2 E. %(uses 28 meg, 60 sec)
examples-twelf-orig/ccc/eqpres2.elf 0000664 0000000 0000000 00000004322 12341637066 0017563 0 ustar 00root root 0000000 0000000 % equality preservation
etoc : eq F F' -> conc F ([x] M x) -> conc F' ([x] M' x) -> ({x: term _} conv (M x) (M' x)) -> type.
etoc_refl : etoc refl CF CF ([x] c_refl).
etoc_then : etoc (then EP1 EP2) CF CF' ([x] c_trans (CP1 x) (CP2 x))
<- etoc EP1 CF CF'' ([x] CP1 x)
<- etoc EP1 CF'' CF' ([x] CP2 x).
etoc_sym : etoc (sym EP) CF CF' ([x]c_sym (CP x))
<- etoc EP CF' CF ([x] CP x).
etoc_comp : {CG:conc _ ([e] M e)}
{CF':conc _ ([e] N' e)}
etoc (eq_o EPF EPG) (ccomp CF CG) (ccomp CF' CG') ([x] c_trans (CPF (M x)) (CVF' x (CPG x)))
<- etoc EPF CF CF' ([x] CPF x)
<- etoc EPG CG CG' ([x] CPG x)
<- ({x: term _} cong N' ([w] CVF' x w)).
etoc_pair : etoc (eq_pair EPF EPG) (cpair CF CG) (cpair CF' CG')
([x] c_pair (CPF x) (CPG x))
<- etoc EPF CF CF' ([x] CPF x)
<- etoc EPG CG CG' ([x] CPG x).
etoc_cur : etoc (eq_cur EPF) (ccur CF) (ccur CF') ([x] c_lam ([y] CPF (lpair x y)))
<- etoc EPF CF CF' ([x] CPF x).
etoc_idl : etoc id_l (ccomp cid CF) CF ([x] c_refl).
etoc_idr : etoc id_r (ccomp CF cid) CF ([x] c_refl).
etoc_ass : etoc ass (ccomp CF (ccomp CG CH)) (ccomp (ccomp CF CG) CH) ([x] c_refl).
etoc_termu : etoc term_u cunit CF ([x] c_unit).
etoc_prodl : etoc prod_l (ccomp cfst (cpair CF CG)) CF ([x] c_prl).
etoc_prodr : etoc prod_r (ccomp csnd (cpair CF CG)) CG ([x] c_prr).
etoc_produ : etoc prod_u (cpair (ccomp cfst CF) (ccomp csnd CF)) CF ([x] c_surj).
etoc_expe : {CF:conc F ([e] M e)}
etoc exp_e (ccomp capp (cpair (ccomp (ccur CF) cfst) csnd)) CF
([x] c_trans (c_app c_prl c_prr) (c_trans c_beta (CC x c_surj)))
<- {x: term _} cong M (CC x).
etoc_expu : {CF:conc F ([e] M e)}
etoc exp_u (ccur (ccomp capp (cpair (ccomp CF cfst) csnd))) CF
([x] c_trans (c_lam ([y] c_app (c_trans c_prl (CC x y c_prl)) (c_trans c_prr c_prr))) c_eta)
<- {x: term _}{y: term _} cong M (CC x y).
% sigma [p1:conc (@ app (pair (@ (cur fst) fst) snd)) M1] sigma [p2:conc fst M2]etoc exp_e p1 p2 C.
% sigma [p1:conc (cur (@ app (pair (@ idc fst) snd))) M1] sigma [p2:conc idc M2]etoc exp_u p1 p2 C.
examples-twelf-orig/ccc/examples.quy 0000664 0000000 0000000 00000003544 12341637066 0020075 0 ustar 00root root 0000000 0000000 % A few test examples
%% Translation from lambda-terms to categorical combinators
% [[ |- \x.x]]
%query 1 *
abse empty (llam [x] x) M.
% [[ x |- \y.(y,x) ]]
%query 1 *
{x}abse (addv empty x) (llam [y] lpair y x) M.
% [[ |- \x.\y.x y ]]
%query 1 *
abse empty (llam [x] llam [y] lapp x y) M.
%% Translation from categorical combinators to lambda-terms
% <| id @ snd |>
%query 1 *
conc (@ id snd) E.
% <| app @ |>
%query 1 *
conc (@ app (pair snd fst)) E.
% <| cur (app) @ snd |>
%query 1 *
conc (@ (cur app) snd) E.
%% Preservation of beta-eta equality by [[ ]] - translation
% % (\y.(\x.x) y) = \z.z (using beta, xi)
% sigma [ap1:abse empty (llam [y] lapp (llam [x] x) y) M1]
% sigma [ap2:abse empty (llam [z] z) M2]
% ctoe (c_lam [y] c_beta) ap1 ap2 EP.
%
% % (\y.(\x.x) y) = \z.z (using eta)
% sigma [ap1:abse empty (llam [y] lapp (llam [x] x) y) M1]
% sigma [ap2:abse empty (llam [z] z) M2]
% ctoe (c_eta) ap1 ap2 EP.
%% Preservation of CCC equality by <| |> - translation
% @ app (pair (@ (cur fst) fst) snd) = fst
% sigma [cp1:conc (@ app (pair (@ (cur fst) fst) snd)) E1]
% sigma [cp2: conc fst E2]
% etoc exp_e cp1 cp2 EP.
%query 1 *
etoc exp_e (ccomp capp (cpair (ccomp (ccur cfst) cfst) csnd)) (cfst) EP.
%% Translation lambda -> ccc -> lambda preserves equality
% translate \x.\y.(x,y) to ccc and back
% sigma [ap:abse empty (llam [x] llam [y] lpair x y) M]
% sigma [cp:conc M E]
% sigma [zp:exp empty Z] % a term-representaiton of the environment
% invca ap cp zp EP.
%
%query 1 *
invca
(alam ([x:term _A1] alam ([x1:term _A2] apair (avar (av_y av_x)) (avar av_x))))
(ccur (ccur (cpair (ccomp csnd cfst) csnd)))
(exp_empty)
EP.
%% Translation ccc -> lamda -> ccc preserves equality
% translate cur(app) @ fst to lambda-term and back
% sigma [cp:conc (@ (cur app) fst) E]
% sigma [ap: zabs E F]
% invac cp ap EP.
examples-twelf-orig/ccc/inv1.elf 0000664 0000000 0000000 00000003674 12341637066 0017070 0 ustar 00root root 0000000 0000000 exp : env P -> term P -> type.
exp_empty : exp empty lunit.
exp_addv : exp (addv G X) (lpair N X)
<- exp G N.
invcav : absv G X F -> conc F ([x] M x) -> exp G N -> conv (M N) X -> type.
invcav_x : invcav av_x csnd (exp_addv EP) c_prr.
invcav_y : {CP:conc _F1 ([e] M e)}
invcav (av_y AV) (ccomp CP cfst) (exp_addv EP) (c_trans (CC c_prl) CVP)
<- cong M ([x] CC x)
<- invcav AV CP EP CVP.
invca : abse G E F -> conc F ([x] M x) -> exp G N -> conv (M N) E -> type.
invca_var : invca (avar AV) CP EP CVP
<- invcav AV CP EP CVP.
invca_fst : invca (afst AP) (ccomp cfst CP) EP (c_fst CVP)
<- invca AP CP EP CVP.
invca_snd : invca (asnd AP) (ccomp csnd CP) EP (c_snd CVP)
<- invca AP CP EP CVP.
invca_pair: invca (apair AP1 AP2) (cpair CP1 CP2) EP (c_pair CVP1 CVP2)
<- invca AP1 CP1 EP CVP1
<- invca AP2 CP2 EP CVP2.
invca_lam : invca (alam ([x] AP x)) (ccur CP) EP (c_lam ([x] CVP x))
<- {x: term _} invca (AP x) CP (exp_addv EP) (CVP x).
invca_app : invca (aapp AP1 AP2) (ccomp capp (cpair CP1 CP2)) EP
(c_app (c_trans c_prl CVP1) (c_trans c_prr CVP2))
<- invca AP1 CP1 EP CVP1
<- invca AP2 CP2 EP CVP2.
% sigma[p1:{x}{y}abse (addv (addv empty x) y) x F] sigma [p2:conc F M] sigma [p3:{x}{y}exp (addv (addv empty x) y) (N x y)] {x}{y}invca (p1 x y) p2 (p3 x y) (R x y).
% sigma[p1:{x}abse (addv empty x) (llam [y] lpair y x) F] sigma [p2:conc F M] sigma [p3:{x}exp (addv empty x) (N x)] {x}invca (p1 x) p2 (p3 x) (R x).
zconc : mor A B -> env A -> term B -> type.
zconc1 : zconc F G (M MG)
<- conc F ([x] M x)
<- exp G MG.
inv : abse G E F -> zconc F G E' -> conv E' E -> type.
inv1 : inv AP (zconc1 EXP CP) EE
<- invca AP CP EXP EE.
% sigma[p1:{x}abse (addv empty x) (llam [y] lpair y x) F] sigma [p2:{x}zconc F (addv empty x) (M x)] {x} inv (p1 x) (p2 x) (R x).
examples-twelf-orig/ccc/inv2.elf 0000664 0000000 0000000 00000003041 12341637066 0017055 0 ustar 00root root 0000000 0000000 %lemma:
inve : conc F M -> abse G E GE -> abse G (M E) GME -> eq GME (@ F GE) -> type.
inve_id : inve cid AP AP (sym id_l).
inve_comp : inve (ccomp CF CG) AP1 AP2
(then EPF (then (eq_o refl EPG) ass))
<- inve CG AP1 AP3 EPG
<- inve CF AP3 AP2 EPF.
inve_pair : inve (cpair CF CG) AP (apair APF APG)
(then (eq_pair EPF EPG) (sym DP))
<- distp DP
<- inve CF AP APF EPF
<- inve CG AP APG EPG.
inve_fst : inve cfst AP (afst AP) refl.
inve_snd : inve csnd AP (asnd AP) refl.
inve_cur : inve (ccur CF) AP (alam [x] AP2 x)
(then (eq_cur (then EE (eq_o refl (eq_pair (sym EW) refl))) (sym DC)))
<- distc DC
<- ({y}weak AP (AP' y) EW)
<- ({y}inve CF (apair (AP' y) (avar av_x)) (AP2 y) EE). %???
inve_app : inve capp AP (aapp (afst AP) (asnd AP)) (eq_o refl prod_u).
zabs : (term A -> term B) -> mor A B -> type.
zabs1 : zabs ([x]E x) (@ F (pair drop idc))
<- {x}abse (addv empty x) (E x) F.
invac : conc F M -> zabs M F' -> eq F' F -> type.
invac1 : invac C (zabs1 ([x] AP x)) (then (eq_o EE refl)
(then (sym ass)
(then (eq_o refl prod_r) id_r)))
<- {x}inve C (avar av_x) (AP x) EE.
%sigma [p1:conc idc M] sigma [p2:{x}abse (addv empty x) x Z] sigma [p3:{x}abse (addv empty x) (M x) Y] {x}inve p1 (p2 x) (p3 x) R.
%sigma [p1:conc (@ (cur app) fst) M] sigma [p2:zabs M F] invac p1 p2 E.
examples-twelf-orig/ccc/lambda.elf 0000664 0000000 0000000 00000002416 12341637066 0017424 0 ustar 00root root 0000000 0000000 %%% Simply-typed lambda-calculus
%% Lambda-calc language
% types are objects
% obj : type (from ccc.elf)
% simply-typed terms
term : obj -> type. %name term E.
% beta-eta convertibility
conv : term A -> term A -> type. %name conv LC.
% products
lpair : term A -> term B -> term (cross A B).
lfst : term (cross A B) -> term A.
lsnd : term (cross A B) -> term B.
% unit
lunit : term one.
% function space
llam : (term A -> term B) -> term (arrow A B).
lapp : term (arrow A B) -> term A -> term B.
%% Equations
% equivalence
c_refl : conv E E.
c_trans : conv E E' -> conv E' E'' -> conv E E''.
c_sym : conv E E' -> conv E' E.
% congruence
c_fst : conv E E' -> conv (lfst E) (lfst E').
c_snd : conv E E' -> conv (lsnd E) (lsnd E').
c_pair : conv E1 E1' -> conv E2 E2' -> conv (lpair E1 E2) (lpair E1' E2').
c_lam : ({x: term _} conv (E x) (E' x)) -> conv (llam E) (llam E').
c_app : conv E1 E1' -> conv E2 E2' -> conv (lapp E1 E2) (lapp E1' E2').
% proper equations
c_unit : conv lunit E. % not sure I understand that -rcog Mon Mar 23 23:59:51 EDT 2009
c_prl : conv (lfst (lpair E1 E2)) E1.
c_prr : conv (lsnd (lpair E1 E2)) E2.
c_surj : conv (lpair (lfst E) (lsnd E)) E.
c_beta : conv (lapp (llam ([x] E1 x)) E2) (E1 E2).
c_eta : conv (llam ([x] (lapp E x))) E.
examples-twelf-orig/ccc/pf.dvi 0000664 0000000 0000000 00000102720 12341637066 0016624 0 ustar 00root root 0000000 0000000 ; TeX output 1992.07.01:1617 nWn܍uK>K`y p
cmr10CCCsandtlyp }ed?b> p
cmmi10-calculi# QB4K`y ff
cmr10AndrzejFilinski. IDraftofJuly1,1992(16:17)&oR0N