Skip to content

Commit

Permalink
Initial import of AT&T Hancock code, version 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mqudsi committed Jul 4, 2013
0 parents commit 4b6950e
Show file tree
Hide file tree
Showing 677 changed files with 86,107 additions and 0 deletions.
217 changes: 217 additions & 0 deletions LICENSE.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

<HTML>

<HEAD>
<TITLE>Hancock Software Agreement</TITLE>
</HEAD>

<BODY>
<p align=3D"center"><b>Hancock Software Agreement</b>
<p align=3D"left">
This Software Agreement (the "Agreement") provides the terms and
conditions under which AT&T Corp. ("AT&T") is willing to grant the
person or entity identified below (the "Licensee") a non-exclusive,
limited right to use the computer software (the "Software") to be
downloaded by you and supplied with this Agreement. PLEASE READ THIS
AGREEMENT CAREFULLY. If Licensee agrees to only use the software in
accordance with the following terms and conditions and is willing to be
bound by this Agreement in its entirety, acknowledge such acceptance as
provided and continue with the down-load and installation of the
Software. IF LICENSEE DOES NOT AGREE WITH ANY OF THE FOLLOWING TERMS
AND CONDITIONS, DO NOT DOWNLOAD OR INSTALL THE SOFTWARE.
<br><br>
1. If Licensee is an entity, Licensee warrants and represents that the
person accepting this Agreement on behalf of Licensee is its legally
authorized representative, who is duly authorized to accept agreements
of this type on behalf of Licensee and obligate Licensee to the terms
and conditions herein. Any breach of this warranty and representation
is a material breach of this Agreement and, in such event, this
Agreement and the rights granted to Licensee shall terminate
automatically. Upon termination, Licensee shall destroy all copies of
the Software.
<br><br>
2. Subject to the terms and conditions of this Agreement, AT&T hereby
grants Licensee a royalty-free, non-exclusive, non-transferable right
to use the Software as follows solely for a Non-Commercial Purpose only
in those countries permitted by compliance with Paragraph 9 of this
Agreement: (a) Licensee may prepare derivative works (the "Derivative
Works") which are based on or incorporate all or part of the Software,
including, without limitation, works (the "Adaptations") which (i) are
translations of all or part of the Software into different programming
languages, or (ii) are revisions, improvements or corrections to all or
part of the Software, provided that, Licensee shall treat all
Derivative Works as Software under this Agreement; (b) Licensee may
make (i) a single archive copy of the Software, and (ii) such
additional copies of the Software as are necessary for Licensee's
development of the Derivative Works; and (iii) Licensee may distribute
copies of Derivative Works to a person or entity which has been granted
a right to use the Software by AT&T (a "Licensed User"), provided that,
such person or entity treats such Derivative Work as Software under
their agreement with AT&T.
<br><br>
3. All copies of the Software and Derivative Works shall contain the
same copyright notice and any proprietary markings appearing on the
original Software. If the Software contains any computer programs in
object code form, Licensee shall not de-compile, reverse engineer or
disassemble any computer programs included with the Software that are
in object code form.
<br><br>
4. Licensee understands and acknowledges that the Software is designed
to operate in conjunction with software owned by third parties ("Third
Party Software"), and that Licensee has sole responsibility for
obtaining the necessary licenses to use such Third Party Software in
conjunction with the Software furnished by AT&T.
<br><br>
5. As used in this Agreement, "Non-Commercial Purpose" means use of the
Software and Derivative Works solely for education or research.
"Non-Commercial Purpose" excludes, without limitation, (i) any use of
the Software or the Derivative Works as part of, or in any way in
connection with a product (including software) or service which is
sold, offered for sale, licensed, leased, loaned or rented or (ii) any
use of the Software or the Derivative Works for the creation and
distribution of materials among persons (including persons employed by
Licensee) on a private network or intranet. EXCEPT AS EXPRESSLY
AUTHORIZED UNDER THIS AGREEMENT, LICENSEE SHALL NOT USE, COPY,
DISTRIBUTE OR TRANSFER IN ANY FORM THE SOFTWARE OR THE DERIVATIVE
WORKS, AND NO LICENSES ARE GRANTED OR IMPLIED.
<br><br>
6. The Software is protected by copyright law and is the sole and
exclusive property of AT&T. No ownership interest in the Software (or
the copy of which is provided by AT&T pursuant to Paragraph 2) is
transferred to Licensee. This Agreement is personal between AT&T and
Licensee. Licensee may not assign, transfer or sublicense its rights
under this Agreement. If Licensee is an entity, no rights are granted
by this Agreement to any particular employee, faculty member and/or
student, as applicable, of Licensee and all work done by such persons
under this Agreement shall be deemed to be done on behalf of Licensee.
Licensee's interest in the Derivative Works is limited solely to
Licensee's additions and the Derivative Works are subject in their
entirety to AT&T's intellectual property rights. AT&T may assign or
transfer to any entity or person, or grant to any entity or person a
license or sublicense under, all or part of its interest in any rights
to the Software, this Agreement, or any license granted to AT&T
hereunder.
<br><br>
7. The Software and information therein (the "Information") is
proprietary and confidential to AT&T. Licensee shall hold the
Information in confidence, shall use the Information only for the
purpose of exercising the rights granted to Licensee under this
Agreement and shall use the Information only to the extent necessary
for such purpose. If Licensee is an entity, Licensee shall use
reasonable efforts to only disclose, distribute or make accessible
Information to those employees, faculty members and students, as
applicable, of Licensee engaged in the performance of work on behalf of
Licensee under this Agreement, and to advise each such person to whom
such disclosure is made, or access afforded, of this existence of this
Agreement, Licensee's obligations assumed hereunder and that the
furnished Information must be kept in confidence by such person. These
restrictions on the use or disclosure of Information shall not apply to
any particular Information, (a) which is independently known by
Licensee or lawfully received by Licensee free of restriction from
another source having the right to so furnish such Information, (b)
after it becomes generally available to the public without breach of
this Agreement by Licensee, (c) which, when furnished to Licensee, was
known to Licensee free of restrictions as evidenced by documentation in
Licensee's possession, or (d) which AT&T agrees in writing is free of
such restrictions. In any dispute as to whether the restrictions of
this paragraph apply to particular Information, Licensee shall bear the
burden of proof in establishing that such restrictions do not apply.
<br><br>
8. Licensee hereby grants AT&T a non-exclusive, royalty-free, fully
paid-up, worldwide, perpetual license to: (a) reproduce, prepare
derivative works based on and distribute all or part of the
Adaptations; and (b) make, have made, use, offer to sell, sell, license
or import any products (including software) or services under any
intellectual property rights owned or licensed by Licensee which relate
to (i) all or part of the Adaptations, or (ii) methods or concepts
embodied in, or implemented through the execution of the Adaptations.
If Licensee is an entity, Licensee warrants and represents that it will
take all reasonable steps necessary to secure from any of its
employees, faculty members or students, as applicable, who do work on
behalf of Licensee under this Agreement, the rights herein granted by
Licensee to AT&T. Licensee shall provide the contact person identified
in the documentation accompanying the Software with feedback concerning
Licensee's Adaptations and use of the Software and, if requested by,
provide such person with source code copies of Licensee's Adaptations.
AT&T from time to time may change the contact person upon written
notice to Licensee, which maybe given via e-mail
<br><br>
9. Licensee acknowledges that any products, software, and technical
information (including, but not limited to, services and training)
provided under this agreement are subject to U.S. export laws and
regulations and any use or transfer of such products, software, and
technical information must be authorized under those regulations.
Licensee agree that it will not use, distribute, transfer, or transmit
the products, software, or technical information (even if incorporated
into other products) except in compliance with U.S. export regulations.
If requested by AT&T, Licensee also agrees to sign written assurances
and other export-related documents as may be required comply with U.S.
export regulations. The obligations of this written assurance shall
survive the term of this or any other related agreement.=20
<br><br>
10. AT&T has no obligation to support or maintain the Software and
grants Licensee this right to use the Software "AS IS". LICENSEE
ASSUMES TOTAL RESPONSIBILITY AND RISK FOR LICENSEE'S USE OF THE
SOFTWARE AND THE DERIVATIVE WORKS. AT&T DOES NOT MAKE, AND EXPRESSLY
DISCLAIMS, ANY EXPRESS OR IMPLIED WARRANTIES, REPRESENTATIONS OR
ENDORSEMENTS OF ANY KIND WHATSOEVER, INCLUDING, WITHOUT LIMITATION, THE
IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE, AND THE WARRANTIES OF TITLE OR NON-INFRINGEMENT. IN NO EVENT
SHALL AT&T BE LIABLE FOR (i) ANY INCIDENTAL, CONSEQUENTIAL, OR INDIRECT
DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS,
BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR INFORMATION, AND THE LIKE)
ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE AND/OR THE
DERVIVATIVE WORKS, EVEN IF AT&T OR ANY OF ITS AUTHORIZED
REPRESENTATIVES HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES,
(ii) ANY CLAIM ATTRIBUTABLE TO ERRORS, OMISSIONS, OR OTHER INACCURACIES
IN THE SOFTWARE AND/OR THE DERIVATIVE WORKS, OR (iii) ANY CLAIM BY ANY
THIRD PARTY. LICENSEE AGREES THAT LICENSEE'S SOLE REMEDY AGAINST AT&T
FOR LOSS OR DAMAGE CAUSED BY ANY DEFECT OR FAILURE IN THE SOFTWARE
AND/OR THE DERIVATIVE WORKS REGARDLESS OF THE FORM OF ACTION, WHETHER
IN CONTRACT OR TORT, INCLUDING NEGLIGENCE, STRICT LIABILITY OR
OTHERWISE, SHALL BE THE REPLACEMENT OF THE SOFTWARE. As used in this
Paragraph 10, "AT&T" includes its affiliated companies and its and
their employees, directors, officers, agents, representatives,
subcontractors, service providers and suppliers.
<br>BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF
LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION
MAY NOT APPLY TO LICENSEE. IN SUCH STATES, AT&T'S LIABILITY IS LIMITED
TO THE GREATEST EXTENT PERMITTED BY LAW.
<br><br>
11. By downloading and installing the Software, Licensee agrees that
AT&T, or third parties on AT&T's behalf, may send unsolicited e-mail
messages or other unsolicited communications to Licensee, its employees
and representatives. Licensee shall not cause to be issued or released
for publication any articles, advertising or publicity mentioning or
implying AT&T (or its affiliated companies) in connection with the
subject matter of this Agreement, unless prior written consent is
granted by AT&T.
<br><br>
12. This Agreement and the rights granted to Licensee shall terminate
automatically if Licensee fails to comply with any of the terms and
conditions of this Agreement. Upon termination, Licensee shall destroy
all copies of the Software, including any and all portions of the
Software contained in a Derivative Work. Licensee's obligations under
this Agreement, including any rights granted to AT&T pursuant to
Paragraph 8, shall survive and continue after termination.
<br><br>
13. This Agreement shall be governed by and construed in accordance
with the laws of the State of New York, USA, applicable to agreements
made and to be performed wholly therein without regard to its conflicts
of law rules. Licensee agrees that any legal action or proceeding
between AT&T and Licensee for any purpose concerning this Agreement or
the obligations hereunder shall be brought exclusively in a federal or
state court of competent jurisdiction sitting in New York. Any cause
of action or claim Licensee may have with respect to the Software must
be brought within one (1) year after the claim or cause of action
arises or such claim or cause of action is barred. AT&T's failure to
insist upon or enforce strict performance of any provision of this
Agreement is not a waiver of any provision or right.
<br><br>

</BODY>

</HTML>


77 changes: 77 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
SUPPORTED PLATFORMS
-------------------
Linux on X86 machines
Mac OSX on X86 machines
Solaris on Sun machines

REQUIREMENTS
------------
Installing Hancock from source requires 3 things:
1. The Hancock tarball, hancock.2.0.2.tar.gz, available from the
Hancock web page: www.research.att.com/projects/hancock.

2. A C compiler.

3. The Standard ML of NJ compiler (sml), version 110.65

The sml compiler and directions on how to install it are
available from the SMLNJ home page:
http://www.smlnj.org/index.html.
It is a good idea to install the complete sml system rather
than trying to select a minimal subset.

INSTALLATION
------------
1. Download the Hancock tarball, hancock.2.0.tar.gz, from the Hancock web
site, www.research.att.com/projects/hancock.

2. Unzip and untar the file, to produce the directory hancock.

3. The installation process is parameterized by a machine description
file, templates for which are located in directory hancock/install.
The file install_form is generic, while files if.linux, if.macOSX,
and if.solaris have been customized for the indicated platforms. These
files may need to be further specialized depending on your
particular machine configuration. Comments in these files
indicate how to use them to describe your machine. Use the
appropriate one of these files to create a machine description file
for your machine, which we will call if.your_machine.

Note that the install forms used for the source code installation
and the binary code installations are different.

4. In the hancock directory, run the installation script, invoking it
with the path to the file describing your machine:

install/install.sh if.your_machine

5. The installation process finishes by running a regression suite and
using diff to compare its output to a sample output. If there are no
differences, then Hancock reports a successful installation.

6. After installation, the Hancock compiler can be found in bin/hcc.


FILE YOU NEED TO CREATE
-----------------------
if.my_machine, using one of the files
hancock/install/{install_form, if.linux, if.irix, if.solaris}
as a template.

DOCUMENTATION
-------------
The hancock directory contains a subdirectory manual, which
includes within postscript and pdf versions of the manual.
This document describes the Hancock language and compiler interface.

KNOWN BUGS
----------
Writes into directories, maps, and pickles declared as const will
affect their in-memory representation. The on-disk representation
will not be affected.


CONTACT INFORMATION
-------------------
Report bugs to hancock@research.att.com.

97 changes: 97 additions & 0 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
SHELL= /bin/sh
# Example Hancock programs from manual
#
#
###############################################################################
# Default environment variables.
###############################################################################

# flags to pass to C compiler
CXFLAGS=
# C compiler to use
CC=$(CC)

## root hancock directory.

## flags to always pass to the hancock compiler
HCC_FLAGS=

## location of hcc executable.
HCC=../bin/hcc

DDIR=data
CDIR=$(DDIR)/calls
EDIR=$(DDIR)/extended
TEMP_DATA= intlMap $(CDIR)/binary $(DDIR)/ip.tmp.out $(EDIR)/extended.tmp.out $(EDIR)/old_pers_data $(EDIR)/new_pers_data

TARGETS= intlCount intlCountCust intlMapView ip wireless wirelessGen
CLEAN= ip.c intlCount.c intlCountCust.c intlMapView.c worldNet.c test.c wirelessGen.c
###############################################################################
# Run programs
###############################################################################

all: intlCount.tst intlCountCust.tst ip.tst wireless.tst

clean:
rm -rf *.hp *.hpp *.ha *.exe *~ *.o
rm -rf $(TEMP_DATA)
rm -rf $(DDIR)/a2b
rm -rf $(CLEAN)

intlCount.exe: intlCount.hc
$(HCC) $(HCC_FLAGS) -o intlCount.exe intlCount.hc

intlCountCust.exe: intlCountCust.hc
$(HCC) $(HCC_FLAGS) -o intlCountCust.exe intlCountCust.hc

intlMapView.exe: intlMapView.hc
$(HCC) $(HCC_FLAGS) -o intlMapView.exe intlMapView.hc

ip.exe: ip.hc ipRec.hh ihash.c ihash.h
$(HCC) $(HCC_FLAGS) -o ip.exe ihash.c ip.hc

wirelessGen.exe: $(ALLDEPEND) pht.hc pht.hh wirelessGen.hc hash.o Makefile ctp.hc ctp.hh ctMap.hc ctMap.hh ctDir.hh
$(HCC) $(HCC_FLAGS) -o wirelessGen.exe wirelessGen.hc pht.hc hash.o wcd.hc ctMap.hc ctp.hc


wireless.exe: $(ALLDEPEND) pht.hc pht.hh wireless.hc hash.o Makefile wcd.hh wcd.hc ctp.hc ctp.hh ctMap.hc ctMap.hh ctDir.hh
$(HCC) $(HCC_FLAGS) -o wireless.exe wireless.hc pht.hc hash.o wcd.hc ctMap.hc ctp.hc


intlCount.tst: intlCount.exe calls10
./intlCount.exe -c $(CDIR)/binary/calls10

intlMapView.tst: intlMapView.exe calls10
./intlMapView.exe -c $(CDIR)/binary/calls10

intlCountCust.tst : intlCountCust.exe intlMapView.exe calls10
rm -f intlMap
./intlCountCust.exe -c $(CDIR)/binary/calls10 -I intlMap
./intlMapView.exe -I intlMap

ip.tst: ip.exe
rm -f ip.tmp.out
./ip.exe -l $(DDIR)/ipAddrs -p $(DDIR)/packets >$(DDIR)/ip.tmp.out
diff $(DDIR)/ip.tmp.out $(DDIR)/ip.sample.out

wireless.tst: wireless.exe wirelessGen.exe
rm -rf $(EDIR)/old_pers_data
rm -rf $(EDIR)/new_pers_data
./wirelessGen.exe -d $(EDIR)/old_pers_data
./wireless.exe -d $(EDIR)/old_pers_data -D $(EDIR)/new_pers_data -c $(EDIR)/wcd >$(EDIR)/extended.tmp.out
diff $(EDIR)/extended.tmp.out $(EDIR)/extended.sample.out

calls10: $(DDIR)/a2b
rm -rf $(CDIR)/binary
mkdir $(CDIR)/binary
$(DDIR)/a2b < $(CDIR)/ascii/calls10.a > $(CDIR)/binary/calls10

a2b: $(DDIR)/a2b.c
cc -o $(DDIR)/a2b $(DDIR)/a2b.c

%.o: %.c
$(CC) $(CXFLAGS) -c -o $(<:.c=.o) $<

%.exe: %.hc $(ALLDEPEND)
$(HCC) $(HCC_FLAGS) -o $(<:.hc=.exe) $<

Loading

0 comments on commit 4b6950e

Please sign in to comment.