[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [DynamicFunctionDomains]

From: Bill Page
Subject: [Axiom-developer] [DynamicFunctionDomains]
Date: Thu, 13 Jan 2005 14:54:32 -0600

Compiling g is still a problem in Axiom due to
signature limitation. At least this way, inlining
a complicated function is almost like a function call.

The idea is: Since in creating domains (or any other
types of constructors), we are in effect creating a
function(the domain constructor PPF is a function of
sort, or functor) and the compiler can take dependent
types in its signature,structurally::

  PPF(n:PositiveInteger)==PrimeField(n) with foo

so it should be able to compile something like g by
lifting it to the package level.

So here is another way using package.

)abbrev package FOO Foo
Foo(n:PositiveInteger, k:PositiveInteger):T==C where
  T == with
  C == add

After compiling, we can use::


in any computation in compiler code (and in interpreter). Still
can't call this bar(n,k) unless you use a macro expansion:

bar ==>point()$Foo

Can someone give an example where the *signature* of bar::

  bar: (n: PositiveInteger, k: PositiveInteger) -> PrimeField(n)

is actually needed?

forwarded from

reply via email to

[Prev in Thread] Current Thread [Next in Thread]