aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-08-24 13:52:23 +0000
committerdos-reis <gdr@axiomatics.org>2008-08-24 13:52:23 +0000
commit60a9e4cc014a5c2b9982121a7af4bee1f75ed1b4 (patch)
tree55aec1eecb99dd96dfb4f83af4086d38d2b6d3d9 /src/algebra
parent65ade1a218eb177b1e5d08f9929c8b73eaa914bd (diff)
downloadopen-axiom-60a9e4cc014a5c2b9982121a7af4bee1f75ed1b4.tar.gz
* algebra/net.spad.pamphlet: New.
* algebra/Makefile.pamphlet (axiom_algebra_layer_1): Include HOSTNAME and PORTNUM. * algebra/exposed.lsp.pamphlet: Export them. * algebra/data.spad.pamphlet (DataBuffer): New.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.in8
-rw-r--r--src/algebra/Makefile.pamphlet8
-rw-r--r--src/algebra/data.spad.pamphlet36
-rw-r--r--src/algebra/exposed.lsp.pamphlet3
-rw-r--r--src/algebra/net.spad.pamphlet102
5 files changed, 149 insertions, 8 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index d0169a63..e9fdae1c 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -376,7 +376,7 @@ axiom_algebra_layer_1 = \
PATAB PPCURVE PSCURVE REAL RESLATC RETRACT \
RETRACT- SEGCAT BINDING SYNTAX BMODULE LOGIC \
LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- BYTE \
- OSGROUP MAYBE
+ OSGROUP MAYBE DATABUF
axiom_algebra_layer_1_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_1))
@@ -548,9 +548,9 @@ axiom_algebra_layer_11_objects = \
$(addprefix $(OUT)/, \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_11)))
axiom_algebra_layer_12 = \
- DIOPS DIOPS- DIAGG DIAGG- BITS DIRPROD2 IMATRIX \
- IVECTOR LPOLY LSMP LSMP1 MATCAT2 PTCAT TRIMAT \
- FSAGG FSAGG- SYSTEM BYTEARY
+ DIOPS DIOPS- DIAGG DIAGG- BITS DIRPROD2 IMATRIX \
+ IVECTOR LPOLY LSMP LSMP1 MATCAT2 PTCAT TRIMAT \
+ FSAGG FSAGG- SYSTEM BYTEARY HOSTNAME PORTNUM
axiom_algebra_layer_12_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_12))
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 7170fa32..3be6b201 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -219,7 +219,7 @@ axiom_algebra_layer_1 = \
PATAB PPCURVE PSCURVE REAL RESLATC RETRACT \
RETRACT- SEGCAT BINDING SYNTAX BMODULE LOGIC \
LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- BYTE \
- OSGROUP MAYBE
+ OSGROUP MAYBE DATABUF
axiom_algebra_layer_1_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_1))
@@ -543,9 +543,9 @@ axiom_algebra_layer_11_objects = \
<<layer12>>=
axiom_algebra_layer_12 = \
- DIOPS DIOPS- DIAGG DIAGG- BITS DIRPROD2 IMATRIX \
- IVECTOR LPOLY LSMP LSMP1 MATCAT2 PTCAT TRIMAT \
- FSAGG FSAGG- SYSTEM BYTEARY
+ DIOPS DIOPS- DIAGG DIAGG- BITS DIRPROD2 IMATRIX \
+ IVECTOR LPOLY LSMP LSMP1 MATCAT2 PTCAT TRIMAT \
+ FSAGG FSAGG- SYSTEM BYTEARY HOSTNAME PORTNUM
axiom_algebra_layer_12_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_12))
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet
index 8e8d8ca2..9640d7ad 100644
--- a/src/algebra/data.spad.pamphlet
+++ b/src/algebra/data.spad.pamphlet
@@ -75,6 +75,42 @@ ByteArray() == PrimitiveArray Byte
@
+\section{The DataBuffer domain}
+
+<<domain DATABUF DataBuffer>>=
+)abbrev domain DATABUF DataBuffer
+++ Author: Gabriel Dos Reis
+++ Date Created: August 23, 2008
+++ Description:
+++ This domain provides for a fixed-sized homogeneous data buffer.
+DataBuffer(N: PositiveInteger, T: SetCategory): Public == Private where
+ Public == SetCategory with
+ new: () -> %
+ ++ new() returns a fresly allocated data buffer or length N.
+ elt: (%,NonNegativeInteger) -> T
+ ++ elt(b,i) returns the ith element in buffer `b'. Indexing
+ ++ is 0-based.
+ setelt: (%,NonNegativeInteger,T) -> T
+ ++ setelt(b,i,x) sets the ith entry of data buffer `b' to `x'.
+ ++ Indexing is 0-based.
+ Private == add
+ new() ==
+ makeSimpleArray(getVMType(T)$Lisp,N)$Lisp
+
+ elt(b,i) ==
+ getSimpleArrayEntry(b,i)$Lisp
+
+ setelt(b,i,x) ==
+ setSimpleArrayEntry(b,i,x)$Lisp
+
+ x = y ==
+ EQUAL(x,y)$Lisp
+
+ coerce(b: %): OutputForm ==
+ bracket([elt(b,i)::OutputForm for i in 0..(N-1)])
+@
+
+
\section{License}
<<license>>=
--Copyright (C) 2007-2008, Gabriel Dos Reis.
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index f9ba341c..d11a0bbd 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -98,6 +98,7 @@
(|CRApackage| . CRAPACK)
(|CycleIndicators| . CYCLES)
(|Database| . DBASE)
+ (|DataBuffer| . DATABUF)
(|DataList| . DLIST)
(|DecimalExpansion| . DECIMAL)
(|DenavitHartenbergMatrix| . DHMATRIX)
@@ -171,6 +172,7 @@
(|HeadAst| . HEADAST)
(|Heap| . HEAP)
(|HexadecimalExpansion| . HEXADEC)
+ (|Hostname| . HOSTNAME)
(|IndexCard| . ICARD)
(|IdealDecompositionPackage| . IDECOMP)
(|InfiniteProductCharacteristicZero| . INFPROD0)
@@ -298,6 +300,7 @@
(|PolynomialFunctions2| . POLY2)
(|PolynomialIdeals| . IDEAL)
(|PolynomialToUnivariatePolynomial| . POLY2UP)
+ (|PortNumber| . PORTNUM)
(|PositiveInteger| . PI)
(|PowerSeriesLimitPackage| . LIMITPS)
(|PrimeField| . PF)
diff --git a/src/algebra/net.spad.pamphlet b/src/algebra/net.spad.pamphlet
new file mode 100644
index 00000000..70130a5b
--- /dev/null
+++ b/src/algebra/net.spad.pamphlet
@@ -0,0 +1,102 @@
+\documentclass{article}
+\usepackage{axiom}
+
+\author{Gabriel Dos~Reis}
+
+\begin{document}
+
+\begin{abstract}
+\end{abstract}
+
+\tableofcontents
+\eject
+
+\section{The Hostname domain}
+
+<<domain HOSTNAME Hostname>>=
+)abbrev domain HOSTNAME Hostname
+++ Author: Gabriel Dos Reis
+++ Date Created: August 23, 2008
+++ Date Last Modified: August 23, 2008
+++ References: RFC 1034, RFC 1035
+++ Description:
+++ This domain represents hostnames on computer network.
+Hostname(): Public == Private where
+ Public == Join(SetCategory, CoercibleTo String) with
+ host: String -> %
+ ++ host(n) constructs a Hostname from the name `n'.
+ Private == add
+ Rep == String
+ host n == per n
+ x = y == rep x = rep y
+ coerce(x: %): String == rep x
+ coerce(x: %): OutputForm == rep(x)::OutputForm
+
+@
+
+\section{The PortNumber domain}
+<<domain PORTNUM PortNumber>>=
+)abbrev domain PORTNUM PortNumber
+++ Author: Gabriel Dos Reis
+++ Date Created: August 23, 2008
+++ Date Last Modified: August 23, 2008
+++ Description:
+++ This domain represents network port numbers (notable TCP and UDP).
+PortNumber(): Public == Private where
+ Public == Join(SetCategory,CoercibleTo SingleInteger) with
+ port: SingleInteger -> %
+ ++ port(n) constructs a PortNumber from the integer `n'.
+ Private == add
+ Rep == SingleInteger
+ port n == per n
+ x = y == rep x = rep y
+ coerce(x: %): SingleInteger == rep x
+ coerce(x: %): OutputForm == rep(x)::OutputForm
+
+@
+
+
+\section{License}
+
+<<license>>=
+-- Copyright (C) 2007-2008, Gabriel Dos Reis.
+-- All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions are
+-- met:
+--
+-- - Redistributions of source code must retain the above copyright
+-- notice, this list of conditions and the following disclaimer.
+--
+-- - Redistributions in binary form must reproduce the above copyright
+-- notice, this list of conditions and the following disclaimer in
+-- the documentation and/or other materials provided with the
+-- distribution.
+--
+-- - Neither the name of The Numerical Algorithms Group Ltd. nor the
+-- names of its contributors may be used to endorse or promote products
+-- derived from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@
+
+<<*>>=
+<<license>>
+<<domain HOSTNAME Hostname>>
+<<domain PORTNUM PortNumber>>
+
+@
+
+\end{document}