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

Edit detail for SandBoxKernel revision 3 of 6

1 2 3 4 5 6
Editor: Bill Page
Time: 2015/03/20 22:01:58 GMT+0
Note: equivalence relation

added:

)abbrev category PARTSET PartitionedSet
++ Sets whose elements are grouped into equivalence classes by a mapping
++ Author: Bill Page
++ Date Created: 20 March 2015
++ Description:
++   A partitioned set is a set whose elements have an integer as part
++   of their structure. This integer assigns each element to a "bin".
PartitionedSet : Category == SetCategory with
  position   : % -> NonNegativeInteger
    ++ position(x) returns the integer n associated to x.
  setPosition : (%, NonNegativeInteger) -> Void
    ++ setPosition(x, n) associates the integer n to x.

changed:
-  Exports ==> Join(CachableSet, OrderedSet, Patternable S) with
  Exports ==> Join(PartitionedSet, OrderedSet, Patternable S) with

removed:
-    import from SortedCache(%)

changed:
-
-    clearCache()
-
-    B2Z   : Boolean -> Integer
-    triage : (%, %)  -> Integer
    import from XHashTable(List N,Boolean)
    cache:XHashTable(List N,Boolean):=table()
    bin:N:=0


removed:
-    B2Z flag           == (flag => -1; 1)

changed:
-    kerEqual(k1 : %, k2 : %, f : (%, %) -> Boolean) : Boolean ==
-        height(k1)   ~= height(k2)   => false
-        operator(k1) ~= operator(k2) => false
-        (n1 := #(argument k1)) ~= (n2 := #(argument k2)) => false
-        f(k1, k2)
-
-    kernelEnterInCache(k : %) : % ==
-        if (f0 := property(operator k, SPECIALEQUAL)) case None then
-            f1 := (f0::None)  pretend ((%, %) -> Boolean)
-            (res := linearSearch(k, y +-> kerEqual(k, y, f1))) case % =>
-                return res::%
-        enterInCache(k, triage)
    kerEqual(k1:%,k2:%):Boolean ==
      height(k1)   ~= height(k2)   => false
      operator(k1) ~= operator(k2) => false
      (n1 := #(argument k1)) ~= (n2 := #(argument k2)) => false
      ((func := property(operator k1, SPECIALEQUAL)) case None) =>
        (((func::None) pretend ((%, %) -> Boolean)) (k1, k2))
      for x1 in argument(k1) for x2 in argument(k2) repeat
        x1 ~= x2 => false
      true

changed:
-      if position(k1) = 0 then k1 := kernelEnterInCache(k1)
-      if position(k2) = 0 then k2 := kernelEnterInCache(k2)
-      position(k1) = position(k2)
      p1:=position(k1); p2:=position(k2)
      p1=p2 => true
      if p1<p2 then
        eq:=search([p1,p2],cache)
        if eq case "failed" then
          eq:=kerEqual(k1,k2)
          if (cache([p1,p2]):=eq::Boolean) then setPosition(k2,p1)
      else
        eq:=search([p2,p1],cache)
        if eq case "failed" then
          eq:=kerEqual(k2,k1)
          if (cache([p2,p1]):=eq::Boolean) then setPosition(k1,p2)
      eq::Boolean

changed:
-      if position(k1) = 0 then k1 := kernelEnterInCache(k1)
-      if position(k2) = 0 then k2 := kernelEnterInCache(k2)
-      position(k1) < position(k2)
      -- We have to do this the hard way
      height(k1)   ~= height(k2)   => height(k1)   < height(k2)
      operator(k1) ~= operator(k2) => operator(k1) < operator(k2)
      (n1 := #(argument k1)) ~= (n2 := #(argument k2)) => n1 < n2
      ((func := property(operator k1, SPECIALEQUAL)) case None) and
        (((func::None) pretend ((%, %) -> Boolean)) (k1, k2)) => false
      for x1 in argument(k1) for x2 in argument(k2) repeat
        x1 ~= x2 => return smaller?(x1, x2)
      false

changed:
-      kernelEnterInCache(mkKer(fn, x, n))
      k:=mkKer(fn, x, n)
      setPosition(k,bin:=bin+1)
      k

removed:
-    triage(k1, k2) ==
-      height(k1)   ~= height(k2)   => B2Z(height(k1)   < height(k2))
-      operator(k1) ~= operator(k2) => B2Z(operator(k1) < operator(k2))
-      (n1 := #(argument k1)) ~= (n2 := #(argument k2)) => B2Z(n1 < n2)
-      -- Handled by linear search earlier
-      -- ((func := property(operator k1, SPECIALEQUAL)) case None) and
-      --  (((func::None) pretend ((%, %) -> Boolean)) (k1, k2)) => 0
-      for x1 in argument(k1) for x2 in argument(k2) repeat
-        x1 ~= x2 => return B2Z(smaller?(x1, x2))
-      0
-

added:

\begin{axiom}
kernel(operator 'test,[x1,x2],2)$Kernel(EXPR INT)
\end{axiom}

spad
)abbrev category CACHSET CachableSet
++ Sets whose elements can cache an integer
++ Author: Manuel Bronstein
++ Date Created: 31 Oct 1988
++ Date Last Updated: 14 May 1991
++ Description:
++   A cachable set is a set whose elements keep an integer as part
++   of their structure.
CachableSet : Category == SetCategory with
  position   : % -> NonNegativeInteger
    ++ position(x) returns the integer n associated to x.
  setPosition : (%, NonNegativeInteger) -> Void
    ++ setPosition(x, n) associates the integer n to x.
)abbrev package SCACHE SortedCache ++ Cache of elements in a set ++ Author: Manuel Bronstein ++ Date Created: 31 Oct 1988 ++ Date Last Updated: 14 May 1991 ++ A sorted cache of a cachable set S is a dynamic structure that ++ keeps the elements of S sorted and assigns an integer to each ++ element of S once it is in the cache. This way, equality and ordering ++ on S are tested directly on the integers associated with the elements ++ of S, once they have been entered in the cache. SortedCache(S : CachableSet) : Exports == Implementation where N ==> NonNegativeInteger DIFF ==> 1024
Exports ==> with clearCache : () -> Void ++ clearCache() empties the cache. enterInCache : (S, S -> Boolean) -> S ++ enterInCache(x, f) enters x in the cache, calling \spad{f(y)} to ++ determine whether x is equal to y. It returns x with an integer ++ associated with it. linearSearch : (S, S -> Boolean) -> Union(S, "failed") ++ linearSearch(x, f) searches x in the cache, calling \spad{f(y)} ++ to determine whether x is equal to y. It returns y from cache ++ such that f(y) or failed is no such y exists. enterInCache : (S, (S, S) -> Integer) -> S ++ enterInCache(x, f) enters x in the cache, calling \spad{f(x, y)} to ++ determine whether \spad{x < y (f(x, y) < 0), x = y (f(x, y) = 0)}, or ++ \spad{x > y (f(x, y) > 0)}. ++ It returns x with an integer associated with it.
Implementation ==> add shiftCache : (N, N) -> Void insertInCache : (N, S, N) -> S expandCache : (S) -> Void insertBefore : (N, S) -> Void
cache : PrimitiveArray S := empty()$(PrimitiveArray S) cache_size : N := 0 cache_use : N := 0
expandCache(x) == if cache_size = cache_use then ocache := cache cache_size := 2*cache_size + 10 cache := new(cache_size, x)$(PrimitiveArray S) for k in 0..(cache_use - 1) repeat cache(k) := ocache(k) void
insertBefore(l, x) == k : Integer expandCache(x) vscan := cache for k in 0..(cache_use - l - 1) repeat vscan(cache_use - k) := vscan(cache_use - k - 1) vscan(l) := x cache_use := cache_use + 1 void
shiftCache(l, n) == k : Integer vscan := cache for k in l..(cache_use - 1) repeat x := vscan(k) setPosition(x, n + position x) void
clearCache() == k : Integer vscan := cache for k in 0..(cache_use - 1) repeat x := vscan(k) setPosition(x, 0) cache := empty()$(PrimitiveArray S) cache_size := 0 cache_use := 0 void
insertAtEnd(x : S) : Void == expandCache(x) cache(cache_use) := x cache_use := cache_use + 1 void
linearSearch(x : S, equal? : S -> Boolean) == k : Integer := 0 -- Can not use for loop because equal? can insert new elements -- and change cache_use while k < cache_use repeat vscan := cache y := vscan(k) equal?(y) => setPosition(x, position y) return y vscan := cache -- skip over elements possibly inserted by equal? while not(EQ(y, vscan(k))$Lisp) repeat k := k + 1 k := k + 1 return "failed"
enterInCache(x : S, equal? : S -> Boolean) == (res := linearSearch(x, equal?)) case S => res::S setPosition(x, 1 + cache_use) insertAtEnd(x) x
enterInCache(x : S, triage : (S, S) -> Integer) == vscan := cache l : Integer := -1 m : Integer := cache_use m0 := m zero?(cache_use) => setPosition(x, DIFF) insertAtEnd(x) return x while (l + 1) < m repeat vl : S vm : S m0 := cache_use if not(l < 0) then vl := qelt(vscan, l) has_vm := false if m < m0 then vm := qelt(vscan, m) has_vm := true i := shift(l + m, -1) cp := triage(x, y := qelt(vscan, i)) zero?(cp) => setPosition(x, position y) return y vscan := cache if not(l < 0) then if not(EQ(vl, qelt(vscan, l))$Lisp) then l0 := l while not(EQ(vl, qelt(vscan, l))$Lisp) repeat l := l + 1 i := i + l - l0 m := m + l - l0 if not(EQ(y, qelt(vscan, i))$Lisp) then i0 := i while not(EQ(y, qelt(vscan, i))$Lisp) repeat i := i + 1 m := m + i - i0 if has_vm then if not(EQ(vm, qelt(vscan, m))$Lisp) then while not(EQ(vm, qelt(vscan, m))$Lisp) repeat m := m + 1 if cp < 0 then m := i else l := i m = cache_use => setPosition(x, (position qelt(vscan, m - 1)) + DIFF) insertAtEnd(x) return x pos : N := l < 0 => 0 position qelt(vscan, l) insertInCache((l+1)::N, x, pos)
insertInCache(before, x, pos) == y := cache(before) if ((pos+1) = position y) then shiftCache(before, DIFF) setPosition(x, pos + (((position y) - pos)::N quo 2)) insertBefore(before, x) x
)abbrev domain MKCHSET MakeCachableSet ++ Make a cachable set from any set ++ Author: Manuel Bronstein ++ Date Created: ??? ++ Date Last Updated: 14 May 1991 ++ Description: ++ MakeCachableSet(S) returns a cachable set which is equal to S as a set. MakeCachableSet(S : SetCategory) : Exports == Implementation where Exports ==> Join(CachableSet, CoercibleTo S) with coerce : S -> % ++ coerce(s) returns s viewed as an element of %.
Implementation ==> add import from SortedCache(%)
Rep := Record(setpart : S, pos : NonNegativeInteger)
clearCache()
position x == x.pos setPosition(x, n) == (x.pos := n; void) coerce(x : %) : S == x.setpart coerce(x : %) : OutputForm == x::S::OutputForm coerce(s : S) : % == enterInCache([s, 0]$Rep, (x1 +-> (s = x1::S))@(% -> Boolean))
-- x < y == -- if position(x) = 0 then enterInCache(x, x1+->(x::S = x1::S)) -- if position(y) = 0 then enterInCache(y, x1+->(y::S = x1::S)) -- position(x) < position(y)
x = y == if position(x) = 0 then enterInCache(x, (x1 +-> (x::S = x1::S))@(% -> Boolean)) if position(y) = 0 then enterInCache(y, (x1 +-> (y::S = x1::S))@(% -> Boolean)) position(x) = position(y)
)abbrev category PARTSET PartitionedSet ++ Sets whose elements are grouped into equivalence classes by a mapping ++ Author: Bill Page ++ Date Created: 20 March 2015 ++ Description: ++ A partitioned set is a set whose elements have an integer as part ++ of their structure. This integer assigns each element to a "bin". PartitionedSet : Category == SetCategory with position : % -> NonNegativeInteger ++ position(x) returns the integer n associated to x. setPosition : (%, NonNegativeInteger) -> Void ++ setPosition(x, n) associates the integer n to x.
)abbrev domain KERNEL Kernel ++ Operators applied to elements of a set ++ Author: Manuel Bronstein ++ Date Created: 22 March 1988 ++ Date Last Updated: 10 August 1994 ++ Description: ++ A kernel over a set S is an operator applied to a given list ++ of arguments from S. Kernel(S : Comparable) : Exports == Implementation where O ==> OutputForm N ==> NonNegativeInteger OP ==> BasicOperator
Exports ==> Join(PartitionedSet, OrderedSet, Patternable S) with name : % -> Symbol ++ name(op(a1, ..., an)) returns the name of op. operator : % -> OP ++ operator(op(a1, ..., an)) returns the operator op. argument : % -> List S ++ argument(op(a1, ..., an)) returns \spad{[a1, ..., an]}. height : % -> N ++ height(k) returns the nesting level of k. kernel : (OP, List S, N) -> % ++ kernel(op, [a1, ..., an], m) returns the kernel \spad{op(a1, ..., an)} ++ of nesting level m. ++ Error: if op is k-ary for some k not equal to n. kernel : Symbol -> % ++ kernel(x) returns x viewed as a kernel. symbolIfCan : % -> Union(Symbol, "failed") ++ symbolIfCan(k) returns k viewed as a symbol if k is a symbol, and ++ "failed" otherwise. is? : (%, OP) -> Boolean ++ is?(op(a1, ..., an), f) tests if op = f. is? : (%, Symbol) -> Boolean ++ is?(op(a1, ..., an), s) tests if the name of op is s. if S has ConvertibleTo InputForm then ConvertibleTo InputForm
Implementation ==> add
operator(k : %) : OP == SPAD_-KERNEL_-OP(k)$Lisp argument(k : %) : List S == SPAD_-KERNEL_-ARG(k)$Lisp height(k) == SPAD_-KERNEL_-NEST(k)$Lisp position(k : %) : N == SPAD_-KERNEL_-POSIT(k)$Lisp setPosition(k, n) == SET_-SPAD_-KERNEL_-POSIT(k, n)$Lisp mkKer(o : OP, a : List S, n : N) : % == makeSpadKernel(o, a, n)$Lisp
SYMBOL := '%symbol PMPRED := '%pmpredicate PMOPT := '%pmoptional PMMULT := '%pmmultiple PMCONST := '%pmconstant SPECIALDISP := '%specialDisp SPECIALEQUAL := '%specialEqual SPECIALINPUT := '%specialInput
import from XHashTable(List N,Boolean) cache:XHashTable(List N,Boolean):=table() bin:N:=0
preds : OP -> List Any
is?(k : %, s : Symbol) == is?(operator k, s) is?(k : %, o : OP) == (operator k) = o name k == name operator k kernel s == kernel(assert(operator(s, 0), SYMBOL), nil(), 1)
preds o == (u := property(o, PMPRED)) case "failed" => nil() (u::None) pretend List(Any)
symbolIfCan k == has?(operator k, SYMBOL) => name operator k "failed"
kerEqual(k1:%,k2:%):Boolean == height(k1) ~= height(k2) => false operator(k1) ~= operator(k2) => false (n1 := #(argument k1)) ~= (n2 := #(argument k2)) => false ((func := property(operator k1, SPECIALEQUAL)) case None) => (((func::None) pretend ((%, %) -> Boolean)) (k1, k2)) for x1 in argument(k1) for x2 in argument(k2) repeat x1 ~= x2 => false true
k1 = k2 == p1:=position(k1); p2:=position(k2) p1=p2 => true if p1<p2 then eq:=search([p1,p2],cache) if eq case "failed" then eq:=kerEqual(k1,k2) if (cache([p1,p2]):=eq::Boolean) then setPosition(k2,p1) else eq:=search([p2,p1],cache) if eq case "failed" then eq:=kerEqual(k2,k1) if (cache([p2,p1]):=eq::Boolean) then setPosition(k1,p2) eq::Boolean
k1 < k2 == -- We have to do this the hard way height(k1) ~= height(k2) => height(k1) < height(k2) operator(k1) ~= operator(k2) => operator(k1) < operator(k2) (n1 := #(argument k1)) ~= (n2 := #(argument k2)) => n1 < n2 ((func := property(operator k1, SPECIALEQUAL)) case None) and (((func::None) pretend ((%, %) -> Boolean)) (k1, k2)) => false for x1 in argument(k1) for x2 in argument(k2) repeat x1 ~= x2 => return smaller?(x1, x2) false
kernel(fn, x, n) == ((u := arity fn) case N) and (#x ~= u::N) => error "Wrong number of arguments" k:=mkKer(fn, x, n) setPosition(k,bin:=bin+1) k
-- SPECIALDISP contains a map List S -> OutputForm -- it is used when the converting the arguments first is not good, -- for instance with formal derivatives. coerce(k : %) : OutputForm == (v := symbolIfCan k) case Symbol => v::Symbol::OutputForm (f := property(o := operator k, SPECIALDISP)) case None => ((f::None) pretend (List S -> OutputForm)) (argument k) l := [x::OutputForm for x in argument k]$List(OutputForm) (u := display o) case "failed" => prefix(name(o)::OutputForm, l) (u::(List OutputForm -> OutputForm)) l
if S has ConvertibleTo InputForm then convert(k : %) : InputForm == (v := symbolIfCan k) case Symbol => convert(v::Symbol)@InputForm (f := property(o := operator k, SPECIALINPUT)) case None => ((f::None) pretend (List S -> InputForm)) (argument k) l := [convert x for x in argument k]$List(InputForm) (u := input operator k) case "failed" => convert concat(convert name operator k, l) (u::(List InputForm -> InputForm)) l
if S has ConvertibleTo Pattern Integer then convert(k : %) : Pattern(Integer) == o := operator k (v := symbolIfCan k) case Symbol => s := patternVariable(v::Symbol, has?(o, PMCONST), has?(o, PMOPT), has?(o, PMMULT)) empty?(l := preds o) => s setPredicates(s, l) o [convert x for x in argument(k)]$List(Pattern Integer)
if S has ConvertibleTo Pattern Float then convert(k : %) : Pattern(Float) == o := operator k (v := symbolIfCan k) case Symbol => s := patternVariable(v::Symbol, has?(o, PMCONST), has?(o, PMOPT), has?(o, PMMULT)) empty?(l := preds o) => s setPredicates(s, l) o [convert x for x in argument(k)]$List(Pattern Float)
)abbrev package KERNEL2 KernelFunctions2 ++ Description: ++ This package exports some auxiliary functions on kernels KernelFunctions2(R : Comparable, S : Comparable) : with constantKernel : R -> Kernel S ++ constantKernel(r) \undocumented constantIfCan : Kernel S -> Union(R, "failed") ++ constantIfCan(k) \undocumented
== add import from BasicOperatorFunctions1(R)
constantKernel r == kernel(constantOperator r, nil(), 1) constantIfCan k == constantOpIfCan operator k
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --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.
-- SPAD files for the functional world should be compiled in the -- following order: -- -- op KL expr function
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/6970269522029584696-25px001.spad
      using old system compiler.
   CACHSET abbreviates category CachableSet 
------------------------------------------------------------------------
   initializing NRLIB CACHSET for CachableSet 
   compiling into NRLIB CACHSET 
;;; *** |CachableSet| REDEFINED Time: 0 SEC.
finalizing NRLIB CACHSET Processing CachableSet for Browser database: --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- ; compiling file "/var/aw/var/LatexWiki/CACHSET.NRLIB/CACHSET.lsp" (written 20 MAR 2015 10:01:56 PM):
; /var/aw/var/LatexWiki/CACHSET.NRLIB/CACHSET.fasl written ; compilation finished in 0:00:00.005 ------------------------------------------------------------------------ CachableSet is now explicitly exposed in frame initial CachableSet will be automatically loaded when needed from /var/aw/var/LatexWiki/CACHSET.NRLIB/CACHSET
SCACHE abbreviates package SortedCache ------------------------------------------------------------------------ initializing NRLIB SCACHE for SortedCache compiling into NRLIB SCACHE compiling local expandCache : S -> Void Time: 0.01 SEC.
compiling local insertBefore : (NonNegativeInteger,S) -> Void Time: 0 SEC.
compiling local shiftCache : (NonNegativeInteger,NonNegativeInteger) -> Void Time: 0.01 SEC.
compiling exported clearCache : () -> Void Time: 0 SEC.
compiling local insertAtEnd : S -> Void Time: 0 SEC.
compiling exported linearSearch : (S,S -> Boolean) -> Union(S,failed) Time: 0 SEC.
compiling exported enterInCache : (S,S -> Boolean) -> S Time: 0 SEC.
compiling exported enterInCache : (S,(S,S) -> Integer) -> S Time: 0.01 SEC.
compiling local insertInCache : (NonNegativeInteger,S,NonNegativeInteger) -> S Time: 0 SEC.
(time taken in buildFunctor: 0)
;;; *** |SortedCache| REDEFINED
;;; *** |SortedCache| REDEFINED Time: 0 SEC.
Warnings: [1] enterInCache: vl has no value [2] enterInCache: m has no value [3] enterInCache: vm has no value [4] enterInCache: l has no value
Cumulative Statistics for Constructor SortedCache Time: 0.03 seconds
finalizing NRLIB SCACHE Processing SortedCache for Browser database: --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --------constructor--------- --------(clearCache ((Void)))--------- --------(enterInCache (S S (Mapping (Boolean) S)))--------- --------(linearSearch ((Union S failed) S (Mapping (Boolean) S)))--------- --------(enterInCache (S S (Mapping (Integer) S S)))--------- --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/SCACHE.spad-->SortedCache(): Spurious comments: \indented{1}{Cache of elements in a set} Author: Manuel Bronstein Date Created: 31 Oct 1988 Date Last Updated: 14 May 1991 \indented{2}{A sorted cache of a cachable set \spad{S} is a dynamic structure that} \indented{2}{keeps the elements of \spad{S} sorted and assigns an integer to each} \indented{2}{element of \spad{S} once it is in the cache. This way,{} equality and ordering} \indented{2}{on \spad{S} are tested directly on the integers associated with the elements} \indented{2}{of \spad{S},{} once they have been entered in the cache.} ; compiling file "/var/aw/var/LatexWiki/SCACHE.NRLIB/SCACHE.lsp" (written 20 MAR 2015 10:01:56 PM):
; /var/aw/var/LatexWiki/SCACHE.NRLIB/SCACHE.fasl written ; compilation finished in 0:00:00.110 ------------------------------------------------------------------------ SortedCache is now explicitly exposed in frame initial SortedCache will be automatically loaded when needed from /var/aw/var/LatexWiki/SCACHE.NRLIB/SCACHE
MKCHSET abbreviates domain MakeCachableSet ------------------------------------------------------------------------ initializing NRLIB MKCHSET for MakeCachableSet compiling into NRLIB MKCHSET importing SortedCache $ compiling exported position : $ -> NonNegativeInteger MKCHSET;position;$Nni;1 is replaced by QCDR Time: 0 SEC.
compiling exported setPosition : ($,NonNegativeInteger) -> Void Time: 0 SEC.
compiling exported coerce : $ -> S MKCHSET;coerce;$S;3 is replaced by QCAR Time: 0 SEC.
compiling exported coerce : $ -> OutputForm Time: 0 SEC.
compiling exported coerce : S -> $ Time: 0 SEC.
compiling exported = : ($,$) -> Boolean Time: 0 SEC.
(time taken in buildFunctor: 0)
;;; *** |MakeCachableSet| REDEFINED
;;; *** |MakeCachableSet| REDEFINED Time: 0.01 SEC.
Warnings: [1] position: pos has no value [2] setPosition: pos has no value [3] coerce: setpart has no value
Cumulative Statistics for Constructor MakeCachableSet Time: 0.01 seconds
finalizing NRLIB MKCHSET Processing MakeCachableSet for Browser database: --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --------constructor--------- --------(clearCache ((Void)))--------- --------(enterInCache (S S (Mapping (Boolean) S)))--------- --------(linearSearch ((Union S failed) S (Mapping (Boolean) S)))--------- --------(enterInCache (S S (Mapping (Integer) S S)))--------- --------constructor--------- --------(coerce (% S))--------- --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/MKCHSET.spad-->MakeCachableSet(): Spurious comments: \indented{1}{Cache of elements in a set} Author: Manuel Bronstein Date Created: 31 Oct 1988 Date Last Updated: 14 May 1991 \indented{2}{A sorted cache of a cachable set \spad{S} is a dynamic structure that} \indented{2}{keeps the elements of \spad{S} sorted and assigns an integer to each} \indented{2}{element of \spad{S} once it is in the cache. This way,{} equality and ordering} \indented{2}{on \spad{S} are tested directly on the integers associated with the elements} \indented{2}{of \spad{S},{} once they have been entered in the cache.} --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/MKCHSET.spad-->MakeCachableSet(): Spurious comments: MakeCachableSet(\spad{S}) returns a cachable set which is equal to \spad{S} as a set. ; compiling file "/var/aw/var/LatexWiki/MKCHSET.NRLIB/MKCHSET.lsp" (written 20 MAR 2015 10:01:56 PM):
; /var/aw/var/LatexWiki/MKCHSET.NRLIB/MKCHSET.fasl written ; compilation finished in 0:00:00.028 ------------------------------------------------------------------------ MakeCachableSet is now explicitly exposed in frame initial MakeCachableSet will be automatically loaded when needed from /var/aw/var/LatexWiki/MKCHSET.NRLIB/MKCHSET
PARTSET abbreviates category PartitionedSet ------------------------------------------------------------------------ initializing NRLIB PARTSET for PartitionedSet compiling into NRLIB PARTSET
;;; *** |PartitionedSet| REDEFINED Time: 0 SEC.
finalizing NRLIB PARTSET Processing PartitionedSet for Browser database: --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --------constructor--------- --------(clearCache ((Void)))--------- --------(enterInCache (S S (Mapping (Boolean) S)))--------- --------(linearSearch ((Union S failed) S (Mapping (Boolean) S)))--------- --------(enterInCache (S S (Mapping (Integer) S S)))--------- --------constructor--------- --------(coerce (% S))--------- --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --->-->PartitionedSet(): Spurious comments: \indented{1}{Cache of elements in a set} Author: Manuel Bronstein Date Created: 31 Oct 1988 Date Last Updated: 14 May 1991 \indented{2}{A sorted cache of a cachable set \spad{S} is a dynamic structure that} \indented{2}{keeps the elements of \spad{S} sorted and assigns an integer to each} \indented{2}{element of \spad{S} once it is in the cache. This way,{} equality and ordering} \indented{2}{on \spad{S} are tested directly on the integers associated with the elements} \indented{2}{of \spad{S},{} once they have been entered in the cache.} --->-->PartitionedSet(): Spurious comments: MakeCachableSet(\spad{S}) returns a cachable set which is equal to \spad{S} as a set. --->-->PartitionedSet(): Spurious comments: A partitioned set is a set whose elements have an integer as part of their structure. This integer assigns each element to a "bin". ; compiling file "/var/aw/var/LatexWiki/PARTSET.NRLIB/PARTSET.lsp" (written 20 MAR 2015 10:01:56 PM):
; /var/aw/var/LatexWiki/PARTSET.NRLIB/PARTSET.fasl written ; compilation finished in 0:00:00.003 ------------------------------------------------------------------------ PartitionedSet is now explicitly exposed in frame initial PartitionedSet will be automatically loaded when needed from /var/aw/var/LatexWiki/PARTSET.NRLIB/PARTSET
KERNEL abbreviates domain Kernel ------------------------------------------------------------------------ initializing NRLIB KERNEL for Kernel compiling into NRLIB KERNEL compiling exported operator : $ -> BasicOperator KERNEL;operator;$Bo;1 is replaced by SPAD-KERNEL-OP Time: 0 SEC.
compiling exported argument : $ -> List S KERNEL;argument;$L;2 is replaced by SPAD-KERNEL-ARG Time: 0.01 SEC.
compiling exported height : $ -> NonNegativeInteger KERNEL;height;$Nni;3 is replaced by SPAD-KERNEL-NEST Time: 0 SEC.
compiling exported position : $ -> NonNegativeInteger KERNEL;position;$Nni;4 is replaced by SPAD-KERNEL-POSIT Time: 0 SEC.
compiling exported setPosition : ($,NonNegativeInteger) -> Void KERNEL;setPosition;$NniV;5 is replaced by SET-SPAD-KERNEL-POSIT Time: 0 SEC.
compiling local mkKer : (BasicOperator,List S,NonNegativeInteger) -> $ KERNEL;mkKer is replaced by makeSpadKernel Time: 0 SEC.
importing XHashTable(List NonNegativeInteger,Boolean) Local variable cache type redefined: (XHashTable (List (NonNegativeInteger)) (Boolean)) to (PrimitiveArray S) compiling exported is? : ($,Symbol) -> Boolean Time: 0.01 SEC.
compiling exported is? : ($,BasicOperator) -> Boolean Time: 0 SEC.
compiling exported name : $ -> Symbol Time: 0 SEC.
compiling exported kernel : Symbol -> $ Time: 0 SEC.
compiling local preds : BasicOperator -> List Any Time: 0 SEC.
compiling exported symbolIfCan : $ -> Union(Symbol,failed) Time: 0 SEC.
compiling local kerEqual : ($,$) -> Boolean Time: 0.02 SEC.
compiling exported = : ($,$) -> Boolean Time: 0 SEC.
compiling exported < : ($,$) -> Boolean Time: 0.01 SEC.
compiling exported kernel : (BasicOperator,List S,NonNegativeInteger) -> $ Time: 0 SEC.
compiling exported coerce : $ -> OutputForm Time: 0.02 SEC.
****** Domain: S already in scope augmenting S: (ConvertibleTo (InputForm)) compiling exported convert : $ -> InputForm Time: 0.03 SEC.
****** Domain: S already in scope augmenting S: (ConvertibleTo (Pattern (Integer))) compiling exported convert : $ -> Pattern Integer Time: 0.02 SEC.
****** Domain: S already in scope augmenting S: (ConvertibleTo (Pattern (Float))) compiling exported convert : $ -> Pattern Float Time: 0.01 SEC.
****** Domain: S already in scope augmenting S: (ConvertibleTo (InputForm)) ****** Domain: S already in scope augmenting S: (ConvertibleTo (Pattern (Float))) ****** Domain: S already in scope augmenting S: (ConvertibleTo (Pattern (Integer))) (time taken in buildFunctor: 0)
;;; *** |Kernel| REDEFINED
;;; *** |Kernel| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor Kernel Time: 0.13 seconds
finalizing NRLIB KERNEL Processing Kernel for Browser database: --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --------constructor--------- --------(clearCache ((Void)))--------- --------(enterInCache (S S (Mapping (Boolean) S)))--------- --------(linearSearch ((Union S failed) S (Mapping (Boolean) S)))--------- --------(enterInCache (S S (Mapping (Integer) S S)))--------- --------constructor--------- --------(coerce (% S))--------- --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --------constructor--------- --------(name ((Symbol) %))--------- --------(operator ((BasicOperator) %))--------- --------(argument ((List S) %))--------- --------(height ((NonNegativeInteger) %))--------- --------(kernel (% (BasicOperator) (List S) (NonNegativeInteger)))--------- --------(kernel (% (Symbol)))--------- --------(symbolIfCan ((Union (Symbol) failed) %))--------- --------(is? ((Boolean) % (BasicOperator)))--------- --------(is? ((Boolean) % (Symbol)))--------- --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL.spad-->Kernel(): Spurious comments: \indented{1}{Cache of elements in a set} Author: Manuel Bronstein Date Created: 31 Oct 1988 Date Last Updated: 14 May 1991 \indented{2}{A sorted cache of a cachable set \spad{S} is a dynamic structure that} \indented{2}{keeps the elements of \spad{S} sorted and assigns an integer to each} \indented{2}{element of \spad{S} once it is in the cache. This way,{} equality and ordering} \indented{2}{on \spad{S} are tested directly on the integers associated with the elements} \indented{2}{of \spad{S},{} once they have been entered in the cache.} --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL.spad-->Kernel(): Spurious comments: MakeCachableSet(\spad{S}) returns a cachable set which is equal to \spad{S} as a set. --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL.spad-->Kernel(): Spurious comments: A partitioned set is a set whose elements have an integer as part of their structure. This integer assigns each element to a "bin". --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL.spad-->Kernel(): Spurious comments: A kernel over a set \spad{S} is an operator applied to a given list of arguments from \spad{S}. ; compiling file "/var/aw/var/LatexWiki/KERNEL.NRLIB/KERNEL.lsp" (written 20 MAR 2015 10:01:56 PM):
; /var/aw/var/LatexWiki/KERNEL.NRLIB/KERNEL.fasl written ; compilation finished in 0:00:00.117 ------------------------------------------------------------------------ Kernel is now explicitly exposed in frame initial Kernel will be automatically loaded when needed from /var/aw/var/LatexWiki/KERNEL.NRLIB/KERNEL
KERNEL2 abbreviates package KernelFunctions2 ------------------------------------------------------------------------ initializing NRLIB KERNEL2 for KernelFunctions2 compiling into NRLIB KERNEL2 importing BasicOperatorFunctions1 R compiling exported constantKernel : R -> Kernel S Time: 0 SEC.
compiling exported constantIfCan : Kernel S -> Union(R,failed) Time: 0 SEC.
(time taken in buildFunctor: 0)
;;; *** |KernelFunctions2| REDEFINED
;;; *** |KernelFunctions2| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor KernelFunctions2 Time: 0 seconds
finalizing NRLIB KERNEL2 Processing KernelFunctions2 for Browser database: --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --------constructor--------- --------(clearCache ((Void)))--------- --------(enterInCache (S S (Mapping (Boolean) S)))--------- --------(linearSearch ((Union S failed) S (Mapping (Boolean) S)))--------- --------(enterInCache (S S (Mapping (Integer) S S)))--------- --------constructor--------- --------(coerce (% S))--------- --------constructor--------- --------(position ((NonNegativeInteger) %))--------- --------(setPosition ((Void) % (NonNegativeInteger)))--------- --------constructor--------- --------(name ((Symbol) %))--------- --------(operator ((BasicOperator) %))--------- --------(argument ((List S) %))--------- --------(height ((NonNegativeInteger) %))--------- --------(kernel (% (BasicOperator) (List S) (NonNegativeInteger)))--------- --------(kernel (% (Symbol)))--------- --------(symbolIfCan ((Union (Symbol) failed) %))--------- --------(is? ((Boolean) % (BasicOperator)))--------- --------(is? ((Boolean) % (Symbol)))--------- --------constructor--------- --------(constantKernel ((Kernel S) R))--------- --------(constantIfCan ((Union R failed) (Kernel S)))--------- --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL2.spad-->KernelFunctions2(): Spurious comments: \indented{1}{Cache of elements in a set} Author: Manuel Bronstein Date Created: 31 Oct 1988 Date Last Updated: 14 May 1991 \indented{2}{A sorted cache of a cachable set \spad{S} is a dynamic structure that} \indented{2}{keeps the elements of \spad{S} sorted and assigns an integer to each} \indented{2}{element of \spad{S} once it is in the cache. This way,{} equality and ordering} \indented{2}{on \spad{S} are tested directly on the integers associated with the elements} \indented{2}{of \spad{S},{} once they have been entered in the cache.} --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL2.spad-->KernelFunctions2(): Spurious comments: MakeCachableSet(\spad{S}) returns a cachable set which is equal to \spad{S} as a set. --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL2.spad-->KernelFunctions2(): Spurious comments: A partitioned set is a set whose elements have an integer as part of their structure. This integer assigns each element to a "bin". --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL2.spad-->KernelFunctions2(): Spurious comments: A kernel over a set \spad{S} is an operator applied to a given list of arguments from \spad{S}. --->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/KERNEL2.spad-->KernelFunctions2(): Spurious comments: This package exports some auxiliary functions on kernels ; compiling file "/var/aw/var/LatexWiki/KERNEL2.NRLIB/KERNEL2.lsp" (written 20 MAR 2015 10:01:56 PM):
; /var/aw/var/LatexWiki/KERNEL2.NRLIB/KERNEL2.fasl written ; compilation finished in 0:00:00.013 ------------------------------------------------------------------------ KernelFunctions2 is now explicitly exposed in frame initial KernelFunctions2 will be automatically loaded when needed from /var/aw/var/LatexWiki/KERNEL2.NRLIB/KERNEL2

fricas
kernel(operator 'test,[x1,x2],2)$Kernel(EXPR INT)

\label{eq1}test \left({x 1, \: x 2}\right)(1)
Type: Kernel(Expression(Integer))