login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

This is the first part of the code from mantepse.spad.pamphlet.

axiom
)lib RECOP FAMR2 FFFG FFFGF NEWTON
RecurrenceOperator is now explicitly exposed in frame initial RecurrenceOperator will be automatically loaded when needed from /var/zope2/var/LatexWiki/RECOP.NRLIB/code FiniteAbelianMonoidRingFunctions2 is now explicitly exposed in frame initial FiniteAbelianMonoidRingFunctions2 will be automatically loaded when needed from /var/zope2/var/LatexWiki/FAMR2.NRLIB/code FractionFreeFastGaussian is now explicitly exposed in frame initial FractionFreeFastGaussian will be automatically loaded when needed from /var/zope2/var/LatexWiki/FFFG.NRLIB/code FractionFreeFastGaussianFractions is now explicitly exposed in frame initial FractionFreeFastGaussianFractions will be automatically loaded when needed from /var/zope2/var/LatexWiki/FFFGF.NRLIB/code NewtonInterpolation is now explicitly exposed in frame initial NewtonInterpolation will be automatically loaded when needed from /var/zope2/var/LatexWiki/NEWTON.NRLIB/code

spad
-- Copyright (C) 2006 Martin Rubey <Martin.Rubey@univie.ac.at>
-- 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 2 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.
)abbrev domain UFPS UnivariateFormalPowerSeries UnivariateFormalPowerSeries(Coef: Ring) == UnivariateTaylorSeries(Coef, 'x, 0$Coef)
)abbrev package UFPS1 UnivariateFormalPowerSeriesFunctions UnivariateFormalPowerSeriesFunctions(Coef: Ring): Exports == Implementation where
UFPS ==> UnivariateFormalPowerSeries Coef
Exports == with
hadamard: (UFPS, UFPS) -> UFPS
Implementation == add
hadamard(f, g) == series map(#1*#2, coefficients f, coefficients g) $StreamFunctions3(Coef, Coef, Coef)
)abbrev domain GOPT GuessOption ++ Author: Martin Rubey ++ Description: GuessOption is a domain whose elements are various options used ++ by \spadtype{Guess}. GuessOption(): Exports == Implementation where
Exports == SetCategory with
maxDerivative: Integer -> % ++ maxDerivative(d) specifies the maximum derivative in an algebraic ++ differential equation. maxDerivative(-1) specifies that the maximum ++ derivative can be arbitrary. This option is expressed in the form ++ \spad{maxDerivative == d}.
maxShift: Integer -> % ++ maxShift(d) specifies the maximum shift in a recurrence ++ equation. maxShift(-1) specifies that the maximum shift can be ++ arbitrary. This option is expressed in the form \spad{maxShift == d}.
maxPower: Integer -> % ++ maxPower(d) specifies the maximum degree in an algebraic differential ++ equation. For example, the degree of (f'')^3 f' is 4. maxPower(-1) ++ specifies that the maximum exponent can be arbitrary. This option is ++ expressed in the form \spad{maxPower == d}.
homogeneous: Boolean -> % ++ homogeneous(d) specifies whether we allow only homogeneous algebraic ++ differential equations. This option is expressed in the form ++ \spad{homogeneous == d}.
maxLevel: Integer -> % ++ maxLevel(d) specifies the maximum number of recursion levels operators ++ guessProduct and guessSum will be applied. maxLevel(-1) specifies ++ that all levels are tried. This option is expressed in the form ++ \spad{maxLevel == d}.
maxDegree: Integer -> % ++ maxDegree(d) specifies the maximum degree of the coefficient ++ polynomials in an algebraic differential equation or a recursion with ++ polynomial coefficients. For rational functions with an exponential ++ term, \spad{maxDegree} bounds the degree of the denominator ++ polynomial. ++ maxDegree(-1) specifies that the maximum ++ degree can be arbitrary. This option is expressed in the form ++ \spad{maxDegree == d}.
allDegrees: Boolean -> % ++ allDegrees(d) specifies whether all possibilities of the degree vector ++ - taking into account maxDegree - should be tried. This is mainly ++ interesting for rational interpolation. This option is expressed in ++ the form \spad{allDegrees == d}.
safety: NonNegativeInteger -> % ++ safety(d) specifies the number of values reserved for testing any ++ solutions found. This option is expressed in the form \spad{safety == ++ d}.
one: Boolean -> % ++ one(d) specifies whether we are happy with one solution. This option ++ is expressed in the form \spad{one == d}.
debug: Boolean -> % ++ debug(d) specifies whether we want additional output on the ++ progress. This option is expressed in the form \spad{debug == d}.
functionName: Symbol -> % ++ functionName(d) specifies the name of the function given by the ++ algebraic differential equation or recurrence. This option is ++ expressed in the form \spad{functionName == d}.
variableName: Symbol -> % ++ variableName(d) specifies the variable used in by the algebraic ++ differential equation. This option is expressed in the form ++ \spad{variableName == d}.
indexName: Symbol -> % ++ indexName(d) specifies the index variable used for the formulas. This ++ option is expressed in the form \spad{indexName == d}.
displayAsGF: Boolean -> % ++ displayAsGF(d) specifies whether the result is a generating function ++ or a recurrence. This option should not be set by the user, but rather ++ by the HP-specification.
option : (List %, Symbol) -> Union(Any, "failed") ++ option() is not to be used at the top level; ++ option determines internally which drawing options are indicated in ++ a draw command.
option?: (List %, Symbol) -> Boolean ++ option?() is not to be used at the top level; ++ option? internally returns true for drawing options which are ++ indicated in a draw command, or false for those which are not.
checkOptions: List % -> Void ++ checkOptions checks whether an option is given twice
Implementation ==> add import AnyFunctions1(Boolean) import AnyFunctions1(Symbol) import AnyFunctions1(Integer) import AnyFunctions1(NonNegativeInteger)
Rep := Record(keyword: Symbol, value: Any)
maxLevel d == ["maxLevel"::Symbol, d::Any] maxDerivative d == ["maxDerivative"::Symbol, d::Any] maxShift d == maxDerivative d maxDegree d == ["maxDegree"::Symbol, d::Any] allDegrees d == ["allDegrees"::Symbol, d::Any] maxPower d == ["maxPower"::Symbol, d::Any] safety d == ["safety"::Symbol, d::Any] homogeneous d == ["homogeneous"::Symbol, d::Any] debug d == ["debug"::Symbol, d::Any] one d == ["one"::Symbol, d::Any] functionName d == ["functionName"::Symbol, d::Any] variableName d == ["variableName"::Symbol, d::Any] indexName d == ["indexName"::Symbol, d::Any] displayAsGF d == ["displayAsGF"::Symbol, d::Any]
coerce(x:%):OutputForm == x.keyword::OutputForm = x.value::OutputForm x:% = y:% == x.keyword = y.keyword and x.value = y.value
option?(l, s) == for x in l repeat x.keyword = s => return true false
option(l, s) == for x in l repeat x.keyword = s => return(x.value) "failed"
checkOptions l == if not empty? l then if find((first l).keyword = #1.keyword, rest l) case "failed" then checkOptions rest l else error "GuessOption: Option specified twice"
)abbrev package GOPT0 GuessOptionFunctions0 ++ Author: Martin Rubey ++ Description: GuessOptionFunctions0 provides operations that extract the ++ values of options for \spadtype{Guess}. GuessOptionFunctions0(): Exports == Implementation where
LGOPT ==> List GuessOption
Exports == SetCategory with
maxLevel: LGOPT -> Integer ++ maxLevel returns the specified maxLevel or -1 as default.
maxPower: LGOPT -> Integer ++ maxPower returns the specified maxPower or -1 as default.
maxDerivative: LGOPT -> Integer ++ maxDerivative returns the specified maxDerivative or -1 as default.
maxShift: LGOPT -> Integer ++ maxShift returns the specified maxShift or -1 as default.
maxDegree: LGOPT -> Integer ++ maxDegree returns the specified maxDegree or -1 as default.
allDegrees: LGOPT -> Boolean ++ allDegrees returns whether all possibilities of the degree vector ++ should be tried, the default being false.
safety: LGOPT -> NonNegativeInteger ++ safety returns the specified safety or 1 as default.
one: LGOPT -> Boolean ++ one returns whether we need only one solution, default being true.
homogeneous: LGOPT -> Boolean ++ homogeneous returns whether we allow only homogeneous algebraic ++ differential equations, default being false
functionName: LGOPT -> Symbol ++ functionName returns the name of the function given by the algebraic ++ differential equation, default being f
variableName: LGOPT -> Symbol ++ variableName returns the name of the variable used in by the ++ algebraic differential equation, default being x
indexName: LGOPT -> Symbol ++ indexName returns the name of the index variable used for the ++ formulas, default being n
displayAsGF: LGOPT -> Boolean ++ displayAsGF specifies whether the result is a generating function ++ or a recurrence. This option should not be set by the user, but rather ++ by the HP-specification, therefore, there is no default.
debug: LGOPT -> Boolean ++ debug returns whether we want additional output on the progress, ++ default being false
Implementation == add
maxLevel l == if (opt := option(l, "maxLevel" :: Symbol)) case "failed" then -1 else retract(opt :: Any)$AnyFunctions1(Integer)
maxDerivative l == if (opt := option(l, "maxDerivative" :: Symbol)) case "failed" then -1 else retract(opt :: Any)$AnyFunctions1(Integer)
maxShift l == maxDerivative l
maxDegree l == if (opt := option(l, "maxDegree" :: Symbol)) case "failed" then -1 else retract(opt :: Any)$AnyFunctions1(Integer)
allDegrees l == if (opt := option(l, "allDegrees" :: Symbol)) case "failed" then false else retract(opt :: Any)$AnyFunctions1(Boolean)
maxPower l == if (opt := option(l, "maxPower" :: Symbol)) case "failed" then -1 else retract(opt :: Any)$AnyFunctions1(Integer)
safety l == if (opt := option(l, "safety" :: Symbol)) case "failed" then 1$NonNegativeInteger else retract(opt :: Any)$AnyFunctions1(Integer)::NonNegativeInteger
one l == if (opt := option(l, "one" :: Symbol)) case "failed" then true else retract(opt :: Any)$AnyFunctions1(Boolean)
debug l == if (opt := option(l, "debug" :: Symbol)) case "failed" then false else retract(opt :: Any)$AnyFunctions1(Boolean)
homogeneous l == if (opt := option(l, "homogeneous" :: Symbol)) case "failed" then false else retract(opt :: Any)$AnyFunctions1(Boolean)
variableName l == if (opt := option(l, "variableName" :: Symbol)) case "failed" then "x" :: Symbol else retract(opt :: Any)$AnyFunctions1(Symbol)
functionName l == if (opt := option(l, "functionName" :: Symbol)) case "failed" then "f" :: Symbol else retract(opt :: Any)$AnyFunctions1(Symbol)
indexName l == if (opt := option(l, "indexName" :: Symbol)) case "failed" then "n" :: Symbol else retract(opt :: Any)$AnyFunctions1(Symbol)
displayAsGF l == if (opt := option(l, "displayAsGF" :: Symbol)) case "failed" then error "GuessOption: displayAsGF not set" else retract(opt :: Any)$AnyFunctions1(Boolean)
spad
   Compiling FriCAS source code from file 
      /var/zope2/var/LatexWiki/6036338685494307948-25px002.spad using 
      old system compiler.
   UFPS abbreviates domain UnivariateFormalPowerSeries 
------------------------------------------------------------------------
   initializing NRLIB UFPS for UnivariateFormalPowerSeries 
   compiling into NRLIB UFPS 
****** Domain: Coef already in scope
augmenting Coef: (PartialDifferentialRing (Symbol))
augmenting Coef: (SIGNATURE Coef coerce (Coef (Symbol)))
augmenting Coef: (SIGNATURE Coef integrate (Coef Coef (Symbol)))
augmenting Coef: (SIGNATURE Coef variables ((List (Symbol)) Coef))
****** Domain: Coef already in scope
augmenting Coef: (Algebra (Fraction (Integer)))
augmenting $: (SIGNATURE $ integrate ($ $ (Variable (QUOTE x))))
****** Domain: Coef already in scope
augmenting Coef: (Algebra (Fraction (Integer)))
augmenting $: (SIGNATURE $ integrate ($ $ (Variable (QUOTE x))))
****** Domain: Coef already in scope
augmenting Coef: (CharacteristicNonZero)
****** Domain: Coef already in scope
augmenting Coef: (CommutativeRing)
****** Domain: Coef already in scope
augmenting Coef: (Field)
****** Domain: Coef already in scope
augmenting Coef: (IntegralDomain)
(time taken in buildFunctor:  21)
;;; *** |UnivariateFormalPowerSeries| REDEFINED
;;; *** |UnivariateFormalPowerSeries| REDEFINED Time: 0.41 SEC.
Cumulative Statistics for Constructor UnivariateFormalPowerSeries Time: 0.41 seconds
finalizing NRLIB UFPS Processing UnivariateFormalPowerSeries for Browser database: --->/usr/local/lib/axiom/target/x86_64-unknown-linux/../../src/algebra/UFPS.spad-->UnivariateFormalPowerSeries(): Missing Description ------------------------------------------------------------------------ UnivariateFormalPowerSeries is now explicitly exposed in frame initial UnivariateFormalPowerSeries will be automatically loaded when needed from /var/zope2/var/LatexWiki/UFPS.NRLIB/code
UFPS1 abbreviates package UnivariateFormalPowerSeriesFunctions processing macro definition UFPS ==> UnivariateFormalPowerSeries Coef ------------------------------------------------------------------------ initializing NRLIB UFPS1 for UnivariateFormalPowerSeriesFunctions compiling into NRLIB UFPS1 compiling exported hadamard : (UnivariateFormalPowerSeries Coef,UnivariateFormalPowerSeries Coef) -> UnivariateFormalPowerSeries Coef Time: 0.01 SEC.
(time taken in buildFunctor: 0)
;;; *** |UnivariateFormalPowerSeriesFunctions| REDEFINED
;;; *** |UnivariateFormalPowerSeriesFunctions| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor UnivariateFormalPowerSeriesFunctions Time: 0.01 seconds
finalizing NRLIB UFPS1 Processing UnivariateFormalPowerSeriesFunctions for Browser database: --->/usr/local/lib/axiom/target/x86_64-unknown-linux/../../src/algebra/UFPS1.spad-->UnivariateFormalPowerSeriesFunctions((hadamard (UFPS UFPS UFPS))): Not documented!!!! --->/usr/local/lib/axiom/target/x86_64-unknown-linux/../../src/algebra/UFPS1.spad-->UnivariateFormalPowerSeriesFunctions(constructor): Not documented!!!! --->/usr/local/lib/axiom/target/x86_64-unknown-linux/../../src/algebra/UFPS1.spad-->UnivariateFormalPowerSeriesFunctions(): Missing Description ------------------------------------------------------------------------ UnivariateFormalPowerSeriesFunctions is now explicitly exposed in frame initial UnivariateFormalPowerSeriesFunctions will be automatically loaded when needed from /var/zope2/var/LatexWiki/UFPS1.NRLIB/code
GOPT abbreviates domain GuessOption processing macro definition Implementation ==> -- the constructor capsule ------------------------------------------------------------------------ initializing NRLIB GOPT for GuessOption compiling into NRLIB GOPT importing AnyFunctions1 Boolean importing AnyFunctions1 Symbol importing AnyFunctions1 Integer importing AnyFunctions1 NonNegativeInteger compiling exported maxLevel : Integer -> $ Time: 0.03 SEC.
compiling exported maxDerivative : Integer -> $ Time: 0 SEC.
compiling exported maxShift : Integer -> $ Time: 0 SEC.
compiling exported maxDegree : Integer -> $ Time: 0.01 SEC.
compiling exported allDegrees : Boolean -> $ Time: 0 SEC.
compiling exported maxPower : Integer -> $ Time: 0 SEC.
compiling exported safety : NonNegativeInteger -> $ Time: 0.01 SEC.
compiling exported homogeneous : Boolean -> $ Time: 0 SEC.
compiling exported debug : Boolean -> $ Time: 0 SEC.
compiling exported one : Boolean -> $ Time: 0.01 SEC.
compiling exported functionName : Symbol -> $ Time: 0 SEC.
compiling exported variableName : Symbol -> $ Time: 0 SEC.
compiling exported indexName : Symbol -> $ Time: 0 SEC.
compiling exported displayAsGF : Boolean -> $ Time: 0 SEC.
compiling exported coerce : $ -> OutputForm Time: 0.01 SEC.
compiling exported = : ($,$) -> Boolean Time: 0.03 SEC.
compiling exported option? : (List $,Symbol) -> Boolean Time: 0.01 SEC.
compiling exported option : (List $,Symbol) -> Union(Any,failed) Time: 0.01 SEC.
compiling exported checkOptions : List $ -> Void Time: 0.12 SEC.
(time taken in buildFunctor: 0)
;;; *** |GuessOption| REDEFINED
;;; *** |GuessOption| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor GuessOption Time: 0.24 seconds
finalizing NRLIB GOPT Processing GuessOption for Browser database: --------(maxDerivative (% (Integer)))--------- --------(maxShift (% (Integer)))--------- --------(maxPower (% (Integer)))--------- --------(homogeneous (% (Boolean)))--------- --------(maxLevel (% (Integer)))--------- --------(maxDegree (% (Integer)))--------- --------(allDegrees (% (Boolean)))--------- --------(safety (% (NonNegativeInteger)))--------- --------(one (% (Boolean)))--------- --------(debug (% (Boolean)))--------- --------(functionName (% (Symbol)))--------- --------(variableName (% (Symbol)))--------- --------(indexName (% (Symbol)))--------- --------(displayAsGF (% (Boolean)))--------- --------(option ((Union (Any) failed) (List %) (Symbol)))--------- --------(option? ((Boolean) (List %) (Symbol)))--------- --------(checkOptions ((Void) (List %)))--------- --------constructor--------- ------------------------------------------------------------------------ GuessOption is now explicitly exposed in frame initial GuessOption will be automatically loaded when needed from /var/zope2/var/LatexWiki/GOPT.NRLIB/code
Illegal NRLIB GOPT0.NRLIB claims that its constructor name is the package GuessOptionFunctions0 but GuessOptionFunctions0 is already known to be the for domain GOPT0 . GOPT0 abbreviates package GuessOptionFunctions0 processing macro definition LGOPT ==> List GuessOption ------------------------------------------------------------------------ initializing NRLIB GOPT0 for GuessOptionFunctions0 compiling into NRLIB GOPT0 compiling exported maxLevel : List GuessOption -> Integer Time: 0.02 SEC.
compiling exported maxDerivative : List GuessOption -> Integer Time: 0.01 SEC.
compiling exported maxShift : List GuessOption -> Integer Time: 0.01 SEC.
compiling exported maxDegree : List GuessOption -> Integer Time: 0.01 SEC.
compiling exported allDegrees : List GuessOption -> Boolean Time: 0.01 SEC.
compiling exported maxPower : List GuessOption -> Integer Time: 0.02 SEC.
compiling exported safety : List GuessOption -> NonNegativeInteger Time: 0.01 SEC.
compiling exported one : List GuessOption -> Boolean Time: 0.01 SEC.
compiling exported debug : List GuessOption -> Boolean Time: 0.01 SEC.
compiling exported homogeneous : List GuessOption -> Boolean Time: 0.09 SEC.
compiling exported variableName : List GuessOption -> Symbol Time: 0.01 SEC.
compiling exported functionName : List GuessOption -> Symbol Time: 0 SEC.
compiling exported indexName : List GuessOption -> Symbol Time: 0.01 SEC.
compiling exported displayAsGF : List GuessOption -> Boolean Time: 0.01 SEC.
(time taken in buildFunctor: 0)
;;; *** |GuessOptionFunctions0| REDEFINED
;;; *** |GuessOptionFunctions0| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor GuessOptionFunctions0 Time: 0.23 seconds
finalizing NRLIB GOPT0 Processing GuessOptionFunctions0 for Browser database: --------(maxLevel ((Integer) LGOPT))--------- --------(maxPower ((Integer) LGOPT))--------- --------(maxDerivative ((Integer) LGOPT))--------- --------(maxShift ((Integer) LGOPT))--------- --------(maxDegree ((Integer) LGOPT))--------- --------(allDegrees ((Boolean) LGOPT))--------- --------(safety ((NonNegativeInteger) LGOPT))--------- --------(one ((Boolean) LGOPT))--------- --------(homogeneous ((Boolean) LGOPT))--------- --------(functionName ((Symbol) LGOPT))--------- --------(variableName ((Symbol) LGOPT))--------- --------(indexName ((Symbol) LGOPT))--------- --------(displayAsGF ((Boolean) LGOPT))--------- --------(debug ((Boolean) LGOPT))--------- --------constructor--------- ------------------------------------------------------------------------ GuessOptionFunctions0 is now explicitly exposed in frame initial GuessOptionFunctions0 will be automatically loaded when needed from /var/zope2/var/LatexWiki/GOPT0.NRLIB/code




subject:
  ( 7 subscribers )  
Please rate this page: