aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-02-07 22:10:17 +0000
committerdos-reis <gdr@axiomatics.org>2009-02-07 22:10:17 +0000
commit2fbcd8bc4f97cc3e534e11414f5a12dbc08edf2d (patch)
tree25f9002df4057d8e967d22c6f66a2d84378b3bcd /src/algebra
parent85f1c4d3dc7dc34ae4436d3ef0ffe0b6c6039b5a (diff)
downloadopen-axiom-2fbcd8bc4f97cc3e534e11414f5a12dbc08edf2d.tar.gz
* algebra/system.spad.pamphlet (hostByteOrder$System): New.
* algebra/data.spad.pamphlet (ByteOrder): New. * algebra/Makefile.pamphlet (axiom_algebra_layer_1): Include BYTEORD.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.in4
-rw-r--r--src/algebra/Makefile.pamphlet4
-rw-r--r--src/algebra/data.spad.pamphlet25
-rw-r--r--src/algebra/system.spad.pamphlet27
4 files changed, 47 insertions, 13 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index b9543285..b42c5f9f 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -287,12 +287,14 @@ $(OUT)/PROPLOG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/RETRACT.$(FASLEXT) $(OUT)/RETRACT-.$(FASLEXT): $(OUT)/KRCFROM.$(FASLEXT)
$(OUT)/MAYBE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/RETRACT.$(FASLEXT)
+$(OUT)/BYTEORD.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
+
axiom_algebra_layer_1 = \
AGG AGG- IEVALAB IEVALAB- FORTCAT ITUPLE \
PATAB PPCURVE PSCURVE REAL RESLATC RETRACT \
RETRACT- SEGCAT BINDING BMODULE LOGIC \
LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- \
- OSGROUP MAYBE DATAARY PROPLOG HOMOTOP
+ OSGROUP MAYBE DATAARY PROPLOG HOMOTOP BYTEORD
axiom_algebra_layer_1_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_1))
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 94c3641c..85249ac1 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -259,12 +259,14 @@ $(OUT)/PROPLOG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/RETRACT.$(FASLEXT) $(OUT)/RETRACT-.$(FASLEXT): $(OUT)/KRCFROM.$(FASLEXT)
$(OUT)/MAYBE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/RETRACT.$(FASLEXT)
+$(OUT)/BYTEORD.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
+
axiom_algebra_layer_1 = \
AGG AGG- IEVALAB IEVALAB- FORTCAT ITUPLE \
PATAB PPCURVE PSCURVE REAL RESLATC RETRACT \
RETRACT- SEGCAT BINDING BMODULE LOGIC \
LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- \
- OSGROUP MAYBE DATAARY PROPLOG HOMOTOP
+ OSGROUP MAYBE DATAARY PROPLOG HOMOTOP BYTEORD
axiom_algebra_layer_1_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_1))
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet
index d52ee479..f40d8b1a 100644
--- a/src/algebra/data.spad.pamphlet
+++ b/src/algebra/data.spad.pamphlet
@@ -49,6 +49,31 @@ Byte(): Public == Private where
@
+<<domain BYTEORD ByteOrder>>=
+)abbrev domain BYTEORD ByteOrder
+++ Author: Gabriel Dos Reis
+++ Date Created: February 06, 2009
+++ Date Last Modified:
+++ Description:
+++ This datatype describes byte order of machine values stored memory.
+ByteOrder(): Public == Private where
+ Public == SetCategory with
+ littleEndian: % ++ \spad{littleEndian} describes little endian host
+ bigEndian: % ++ \spad{bigEndian} describes big endian host
+ unknownEndian: % ++ \spad{unknownEndian} for none of the above.
+ Private == add
+ unknownEndian == %unknownEndian$Lisp
+ littleEndian == %littleEndian$Lisp
+ bigEndian == %bigEndian$Lisp
+ x = y == EQ(x,y)$Lisp
+ coerce(x: %): OutputForm ==
+ outputForm
+ x = littleEndian => 'litteEndian
+ x = bigEndian => 'bigEndian
+ 'unknownEndian
+
+@
+
\section{Sized System Integer datatypes}
diff --git a/src/algebra/system.spad.pamphlet b/src/algebra/system.spad.pamphlet
index 57eb4eaa..70b31162 100644
--- a/src/algebra/system.spad.pamphlet
+++ b/src/algebra/system.spad.pamphlet
@@ -17,34 +17,39 @@
)abbrev package SYSTEM System
++ Author: Gabriel Dos Reis
++ Date Created: April 2, 2008.
+++ Date Last Modified: February 6, 2009.
++ Related Constructors:
++ Description:
++ The package \spadtype{System} provides information about
++ the runtime system and its characteristics.
System(): Public == Private where
- Public ==> with
+ Public == Type with
rootDirectory: () -> String
++ rootDirectory() returns the pathname of the root directory
++ for the running OpenAxiom system.
- hostPlatform: () -> String
- ++ hostPlatform() returns a string `triplet' description
+ hostPlatform: String
+ ++ \spad{hostPlatform} is a string `triplet' description
++ of the platform hosting the running OpenAxiom system.
- nativeModuleExtension: () -> String
- ++ nativeModuleExtension() returns a string representation
+ hostByteOrder: ByteOrder
+ ++ \sapd{hostByteOrder}
+ nativeModuleExtension: String
+ ++ \spad{nativeModuleExtension} is a string representation
++ of a filename extension for native modules.
loadNativeModule: String -> Void
++ loadNativeModule(path) loads the native modile designated
++ by \spadvar{path}.
- Private ==> add
+ Private == add
rootDirectory() ==
- systemRootDirectory()$Lisp : String
+ systemRootDirectory()$Lisp
- hostPlatform() ==
- _$hostPlatform$Lisp : String
+ hostPlatform ==
+ _$hostPlatform$Lisp
- nativeModuleExtension() ==
- _$NativeModuleExt$Lisp : String
+ hostByteOrder == %hostByteOrder$Lisp
+
+ nativeModuleExtension ==
+ _$NativeModuleExt$Lisp
loadNativeModule(path) ==
loadNativeModule(path)$Lisp