diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index 6224668..0799fb8 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -21352,6 +21352,204 @@ DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +DSTREE DesingTree +\section{domain DSTREE DesingTree} +<>= +)set break resume +)sys rm -f DesingTree.output +)spool DesingTree.output +)set message test on +)set message auto off +)clear all + +--S 1 of 1 +)show DesingTree +--R DesingTree S: SetCategory is a domain constructor +--R Abbreviation for DesingTree is DSTREE +--R This constructor is exposed in this frame. +--R Issue )edit bookvol10.3.pamphlet to see algebra source code for DSTREE +--R +--R------------------------------- Operations -------------------------------- +--R children : % -> List % copy : % -> % +--R cyclic? : % -> Boolean distance : (%,%) -> Integer +--R ?.value : (%,value) -> S empty : () -> % +--R empty? : % -> Boolean encode : % -> String +--R eq? : (%,%) -> Boolean fullOut : % -> OutputForm +--R fullOutput : () -> Boolean fullOutput : Boolean -> Boolean +--R leaf? : % -> Boolean leaves : % -> List S +--R map : ((S -> S),%) -> % nodes : % -> List % +--R sample : () -> % tree : List S -> % +--R tree : S -> % tree : (S,List %) -> % +--R value : % -> S +--R #? : % -> NonNegativeInteger if $ has finiteAggregate +--R ?=? : (%,%) -> Boolean if S has SETCAT +--R any? : ((S -> Boolean),%) -> Boolean if $ has finiteAggregate +--R child? : (%,%) -> Boolean if S has SETCAT +--R coerce : % -> OutputForm if S has SETCAT +--R count : (S,%) -> NonNegativeInteger if $ has finiteAggregate and S has SETCAT +--R count : ((S -> Boolean),%) -> NonNegativeInteger if $ has finiteAggregate +--R eval : (%,List S,List S) -> % if S has EVALAB S and S has SETCAT +--R eval : (%,S,S) -> % if S has EVALAB S and S has SETCAT +--R eval : (%,Equation S) -> % if S has EVALAB S and S has SETCAT +--R eval : (%,List Equation S) -> % if S has EVALAB S and S has SETCAT +--R every? : ((S -> Boolean),%) -> Boolean if $ has finiteAggregate +--R hash : % -> SingleInteger if S has SETCAT +--R latex : % -> String if S has SETCAT +--R less? : (%,NonNegativeInteger) -> Boolean +--R map! : ((S -> S),%) -> % if $ has shallowlyMutable +--R member? : (S,%) -> Boolean if $ has finiteAggregate and S has SETCAT +--R members : % -> List S if $ has finiteAggregate +--R more? : (%,NonNegativeInteger) -> Boolean +--R node? : (%,%) -> Boolean if S has SETCAT +--R parts : % -> List S if $ has finiteAggregate +--R setchildren! : (%,List %) -> % if $ has shallowlyMutable +--R setelt : (%,value,S) -> S if $ has shallowlyMutable +--R setvalue! : (%,S) -> S if $ has shallowlyMutable +--R size? : (%,NonNegativeInteger) -> Boolean +--R ?~=? : (%,%) -> Boolean if S has SETCAT +--R +--E 1 + +)spool +)lisp (bye) +@ +<>= +==================================================================== +DesingTree examples +==================================================================== + +See Also: +o )show DesingTree + +@ +\pagehead{DesingTree}{DSTREE} +\pagepic{ps/v103desingtree.eps}{DSTREE}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\cross{DSTREE}{\#{}?} & +\cross{DSTREE}{?.value} & +\cross{DSTREE}{?=?} & +\cross{DSTREE}{?\~{}=?} & +\cross{DSTREE}{any?} \\ +\cross{DSTREE}{child?} & +\cross{DSTREE}{children} & +\cross{DSTREE}{coerce} & +\cross{DSTREE}{copy} & +\cross{DSTREE}{count} \\ +\cross{DSTREE}{cyclic?} & +\cross{DSTREE}{distance} & +\cross{DSTREE}{empty} & +\cross{DSTREE}{empty?} & +\cross{DSTREE}{encode} \\ +\cross{DSTREE}{eq?} & +\cross{DSTREE}{eval} & +\cross{DSTREE}{every?} & +\cross{DSTREE}{fullOut} & +\cross{DSTREE}{fullOutput} \\ +\cross{DSTREE}{hash} & +\cross{DSTREE}{latex} & +\cross{DSTREE}{leaf?} & +\cross{DSTREE}{leaves} & +\cross{DSTREE}{less?} \\ +\cross{DSTREE}{map} & +\cross{DSTREE}{map!} & +\cross{DSTREE}{member?} & +\cross{DSTREE}{members} & +\cross{DSTREE}{more?} \\ +\cross{DSTREE}{node?} & +\cross{DSTREE}{nodes} & +\cross{DSTREE}{parts} & +\cross{DSTREE}{sample} & +\cross{DSTREE}{setchildren!} \\ +\cross{DSTREE}{setelt} & +\cross{DSTREE}{setvalue!} & +\cross{DSTREE}{size?} & +\cross{DSTREE}{tree} & +\cross{DSTREE}{value} +\end{tabular} + +<>= +)abbrev domain DSTREE DesingTree +++ Authors: Gaetan Hache +++ Date Created: jan 1998 +++ Date Last Updated: May 2010 by Tim Daly +++ Description: +++ This category is part of the PAFF package +DesingTree(S: SetCategory): T==C where + + T == DesingTreeCategory(S) with + + encode: % -> String + ++ encode(t) returns a string indicating the "shape" of the tree + + fullOut: % -> OutputForm + ++ fullOut(tr) yields a full output of tr (see function fullOutput). + + fullOutput: Boolean -> Boolean + ++ fullOutput(b) sets a flag such that when true, + ++ a coerce to OutputForm yields the full output of + ++ tr, otherwise encode(tr) is output (see encode function). + ++ The default is false. + + fullOutput: () -> Boolean + ++ fullOutput returns the value of the flag set by fullOutput(b). + + C == add + Rep ==> Record(value: S, args: List %) + + fullOut(t:%): OutputForm == + empty? children t => (value t) ::OutputForm + prefix((value t)::OutputForm, [fullOut(tr) for tr in children t]) + + fullOutputFlag:Boolean:=false() + + fullOutput(f)== fullOutputFlag:=f + + fullOutput == fullOutputFlag + + leaves(t)== + empty?(chdr:=children(t)) => list(value(t)) + concat([leaves(subt) for subt in chdr]) + + t1=t2 == value t1 = value t2 and children t1 = children t2 + + coerce(t:%):OutputForm== + ^fullOutput() => encode(t) :: OutputForm + fullOut(t) + + tree(s,ls) == ([s,ls]:Rep):% + + tree(s:S) == ([s,[]]:Rep):% + + tree(ls:List(S))== + empty?(ls) => + error "Cannot create a tree with an empty list" + f:=first(ls) + empty?(rs:=rest(ls)) => + tree(f) + tree(f,[tree(rs)]) + + value t == (t:Rep).value + + children t == ((t:Rep).args):List % + + setchildren_!(t,ls) == ((t:Rep).args:=ls;t pretend %) + + setvalue_!(t,s) == ((t:Rep).value:=s;s) + + encode(t)== + empty?(chtr:=children(t)) => empty()$String + concat([concat(["U",encode(arb),"."]) for arb in chtr]) + +@ +<>= +"DSTREE" [color="#88FF44",href="bookvol10.3.pdf#nameddest=DSTREE"]; +"DSTRCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=DSTRCAT"] +"DSTREE" -> "DSTRCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{domain DSMP DifferentialSparseMultivariatePolynomial} \pagehead{DifferentialSparseMultivariatePolynomial}{DSMP} \pagepic{ps/v103differentialsparsemultivariatepolynomial.ps}{DSMP}{1.00} diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 819d65e..1b69c4e 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -23884,6 +23884,7 @@ otherwise the new algebra won't be loaded by the interpreter when needed. (|DecimalExpansion| . DECIMAL) (|DenavitHartenbergMatrix| . DHMATRIX) (|Dequeue| . DEQUEUE) + (|DesingTree| . DSTREE) (|DiophantineSolutionPackage| . DIOSP) (|DirectProductFunctions2| . DIRPROD2) (|DisplayPackage| . DISPLAY) diff --git a/books/ps/v103desingtree.eps b/books/ps/v103desingtree.eps new file mode 100644 index 0000000..e959b00 --- /dev/null +++ b/books/ps/v103desingtree.eps @@ -0,0 +1,266 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Graphviz version 2.20.2 (Mon Mar 30 10:09:11 UTC 2009) +%%For: (root) root +%%Title: pic +%%Pages: 1 +%%BoundingBox: 36 36 126 152 +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 126 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 90 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +% DSTREE +gsave +[ /Rect [ 5 72 77 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=DSTREE) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 77 108 moveto +5 108 lineto +5 72 lineto +77 72 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 77 108 moveto +5 108 lineto +5 72 lineto +77 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14 /Times-Roman set_font +12.5 85.9 moveto 57 (DSTREE) alignedtext +grestore +% DSTRCAT +gsave +[ /Rect [ 0 0 82 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=DSTRCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 82 36 moveto +0 36 lineto +0 0 lineto +82 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 82 36 moveto +0 36 lineto +0 0 lineto +82 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14 /Times-Roman set_font +8 13.9 moveto 66 (DSTRCAT) alignedtext +grestore +% DSTREE->DSTRCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 41 72 moveto +41 64 41 55 41 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 44.5 46 moveto +41 36 lineto +37.5 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 44.5 46 moveto +41 36 lineto +37.5 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +end +restore +%%EOF diff --git a/changelog b/changelog index 57f98ab..cddc555 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +20100520 tpd src/axiom-website/patches.html 20100520.03.tpd.patch +20100520 tpd src/algebra/Makefile help and test for DesingTree +20100520 tpd books/bookvol5 expose DesingTree +20100520 tpd books/bookvol10.3 add DesingTree +20100520 tpd books/ps/v103desingtree.eps added 20100520 tpd src/axiom-website/patches.html 20100520.02.tpd.patch 20100520 tpd src/algebra/Makefile help and test for DesingTreeCategory 20100520 tpd books/bookvol5 expose DesingTreeCategory diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index bc1fe8c..0cf80bd 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -5317,6 +5317,7 @@ LAYER11=\ ${OUT}/CYCLOTOM.o ${OUT}/CYCLES.o ${OUT}/DDFACT.o ${OUT}/DECIMAL.o \ ${OUT}/DIOPS.o ${OUT}/DIOPS-.o ${OUT}/DIRPROD.o ${OUT}/DISPLAY.o \ ${OUT}/DMP.o ${OUT}/DPMO.o ${OUT}/DPOLCAT.o ${OUT}/DPOLCAT-.o \ + ${OUT}/DSTREE.o \ ${OUT}/D01AJFA.o ${OUT}/D01AKFA.o ${OUT}/D01ALFA.o ${OUT}/D01AMFA.o \ ${OUT}/D01APFA.o ${OUT}/D01AQFA.o ${OUT}/EMR.o ${OUT}/EQ.o \ ${OUT}/ERROR.o ${OUT}/EVALCYC.o ${OUT}/E04DGFA.o ${OUT}/E04FDFA.o \ @@ -5868,6 +5869,15 @@ LAYER11=\ /*"DPOLCAT-" -> {"SINT"; "INS"; "EUCDOM"; "PID"; "OINTDOM"}*/ /*"DPOLCAT-" -> {"ORDRING"; "OAGROUP"; "CFCAT"; "REAL"; "STEP"}*/ +"DSTREE" [color="#88FF44",href="bookvol10.3.pdf#nameddest=DSTREE"] +/*"DSTREE" -> {"RCAGG"; "HOAGG"; "AGG"; "TYPE"; "SETCAT"; "BASTYPE"}*/ +/*"DSTREE" -> {"KOERCE"; "EVALAB"; "IEVALAB"; "INT"; "LIST"; "ILIST"}*/ +/*"DSTREE" -> {"LSAGG-"; "STAGG-"; "ELAGG-"; "FLAGG-"; "URAGG-"; "LNAGG-"}*/ +/*"DSTREE" -> {"RCAGG-"; "IXAGG-"; "CLAGG-"; "HOAGG-"; "ORDSET-"; "AGG-"}*/ +/*"DSTREE" -> {"ELTAGG-"; "SETCAT-"; "BASTYPE-"; "BOOLEAN"}*/ +"DSTREE" -> "STRING" +/*"DSTREE" -> {"CHAR"; "SINT"; "OUTFORM"; "PRIMARR"; "A1AGG-"; "ISTRING"}*/ + "D01AJFA" [color="#88FF44",href="bookvol10.3.pdf#nameddest=D01AJFA"] /*"D01AJFA" -> {"NUMINT"; "SETCAT"; "BASTYPE"; "KOERCE"; "PI"; "NNI"; "INT"}*/ "D01AJFA" -> "STRING" @@ -16783,6 +16793,21 @@ ${MID}/INFCLSPS.nrlib/code.o: ${MID}/INFCLSPS.spad | ${INTERPSYS} >${TMP}/trace ; \ fi ) @ +<>= + +DSTREEDEPS = DSTRCAT + +${MID}/DSTREE.nrlib/code.o: ${MID}/DSTREE.spad + @echo P3 making ${MID}/DSTREE.nrlib/code.o from ${MID}/DSTREE.spad + @ (cd ${MID} ; \ + if [ -z "${NOISE}" ] ; then \ + echo -e ")lib ${DSTREEDEPS} \n )co DSTREE.spad" \ + | ${INTERPSYS} ; \ + else \ + echo -e ")lib ${DSTREEDEPS} \n )co DSTREE.spad" \ + | ${INTERPSYS} >${TMP}/trace ; \ + fi ) +@ \section{Broken Files} These files are Aldor files @@ -17517,6 +17542,7 @@ SPADHELP=\ ${HELP}/DeRhamComplex.help \ ${HELP}/DecimalExpansion.help \ ${HELP}/Dequeue.help \ + ${HELP}/DesingTree.help \ ${HELP}/DesingTreeCategory.help \ ${HELP}/DistributedMultivariatePolynomial.help \ ${HELP}/Divisor.help \ @@ -17714,6 +17740,7 @@ REGRESS= \ DeRhamComplex.regress \ DecimalExpansion.regress \ Dequeue.regress \ + DesingTree.regress \ DesingTreeCategory.regress \ DistributedMultivariatePolynomial.regress \ Divisor.regress \ @@ -18197,9 +18224,22 @@ ${HELP}/Dequeue.help: ${BOOKS}/bookvol10.3.pamphlet >${INPUT}/Dequeue.input @echo "Dequeue (DEQUEUE)" >>${HELPFILE} +${HELP}/DesingTree.help: \ + ${BOOKS}/bookvol10.3.pamphlet + @echo 7295 create DesingTree.help \ + from ${BOOKS}/bookvol10.3.pamphlet + @${TANGLE} -R"DesingTree.help" \ + ${BOOKS}/bookvol10.3.pamphlet \ + >${HELP}/DesingTree.help + @cp ${HELP}/DesingTree.help ${HELP}/DSTREE.help + @${TANGLE} -R"DesingTree.input" \ + ${BOOKS}/bookvol10.3.pamphlet \ + >${INPUT}/DesingTree.input + @echo "DesingTree (DSTREE)" >>${HELPFILE} + ${HELP}/DesingTreeCategory.help: \ ${BOOKS}/bookvol10.2.pamphlet - @echo 7295 create DesingTreeCategory.help \ + @echo 7296 create DesingTreeCategory.help \ from ${BOOKS}/bookvol10.2.pamphlet @${TANGLE} -R"DesingTreeCategory.help" \ ${BOOKS}/bookvol10.2.pamphlet \ diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index aea8b9e..46ecba8 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2767,5 +2767,7 @@ books/bookvol10.3 add InfClsPt
books/bookvol10.3 add PACEXT, INFCLSPS
20100520.02.tpd.patch books/bookvol10.2 add DesingTreeCategory
+20100520.03.tpd.patch +books/bookvol10.3 add DesingTree