Bill Page | 2 Oct 2008 18:19
Gravatar

Re: [open-axiom-devel] [open-axiom-patches] TRUE is not true

Gaby,

On Wed, Oct 1, 2008 at 11:38 PM, you wrote:
>
> Yes, 'TRUE is not Lisp Boolean.  Applied to mainline.
>

I like very much the changes you are making to open-axiom that seem to
improve and generalize the handling of BOOLEAN. Are you a ultimately
thinking about supporting alternate logic (e.g. a 3-valued logic) in
the algebra?

Regards,
Bill Page.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Bill Page | 4 Oct 2008 23:58
Gravatar

[open-axiom-devel] Fwd: [open-axiom-patches] a bit is not a Boolean

Gaby,

On Wed, Oct 1, 2008 at 4:40 PM, Gabriel Dos Reis wrote:
>
> Now that the compiler can assert function types at the generated
> Lisp level, we can see places where the coding is a bit sloppy.
> This patchlet fixes one place where we were pretending that a
> bit (e.g. an integer) is a Boolean.  That is just untrue.
>

In case our apparent disagreement about who was confused about what,
left you or anyone else with the wrong impression, I just wanted to
say here that I do think the changes you have made to assert function
types is a very valuable addition to open-axiom and that the resulting
changes to correct sloppy coding are a very good thing.

And I must add, thanks again for your continuing improvements to OpenAxom!

Regards,
Bill Page.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Bill Page | 5 Oct 2008 05:01
Gravatar

[open-axiom-devel] Irregular slot entry:%LET

Gaby,

When attempting to build open-axiom from trunk:

wspage <at> debian:~/open-axiom-build$ svn info ../open-axiom-src
Path: ../open-axiom-src
URL: https://open-axiom.svn.sourceforge.net/svnroot/open-axiom
Repository Root: https://open-axiom.svn.sourceforge.net/svnroot/open-axiom
Repository UUID: f499efd5-9937-0410-b36a-d3739c31ded8
Revision: 849
Node Kind: directory
Schedule: normal
Last Changed Author: dos-reis
Last Changed Rev: 849
Last Changed Date: 2008-10-04 17:41:59 -0400 (Sat, 04 Oct 2008)

on Debian 5.0 (Lenny) x86, I get the following error:

...
=====================================
=== algebra bootstrap complete ======
=====================================
../interp/interpsys -- --system="../../i686-pc-linux"
--sysalg="../../../open-axiom-src/trunk/src/share/algebra/"
--strap=strap --system-algebra --optimize=2 --compile AHYP.spad
GCL (GNU Common Lisp)  2.6.7 CLtL1    Sep  1 2008 14:01:57
Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
Binary License:  GPL due to GPL'ed components: (XGCL READLINE BFD UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter
(Continue reading)

Gabriel Dos Reis | 8 Oct 2008 18:40
Picon
Favicon

[open-axiom-devel] --optimize for OpenAxiom-1.3.0 and higher


The compiler in OpenAxiom-1.3.0 and higher now supports the command
line option 

    --optimize=n

where n is a natural number indicating a level of optimization.
Currently, we have
   n = 0 => no optimization
   n = 1 => inline simple functions
   n = 2 => fold references to exported functions defined 
             in the current domain

The algebra is built with --optimize=2.

If you invoke the compiler from the interpreter, you can specify the
optimization level as

     )optimize n

e.g.

    )co foobar.spad )optimize 2

Please test and report problems (or speedups :-)

More optimizations will be implemented as time permits.

-- Gaby

(Continue reading)

Francois Maltey | 9 Oct 2008 12:43
Picon
Favicon

Re: [open-axiom-devel] problem with anonymous functions

Hello,

The way (in mathematic or pure informatic) I prefer is

fct := x +-> (y +-> gcd (x, y))
fct 4   --- is an anonymous function
(fct 4) 6 -- or fct 4 6 with right priority should be 2.

This last hope for axiom is exactly what the functional language caml 
calls "currify".

The methods we must use in axiom_s mismatch == and +-> with various results.
I feel it's not a good exemple for students (in pure computational 
sciences).

So I'm sorry to remain axiom_s for algebra computation, and I don't 
expose axiom for theses functional examples.

François

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Ralf Hemmecke | 9 Oct 2008 13:41
Picon

Re: [open-axiom-devel] Re: problem with anonymous functions

Hi Francois,

On 10/09/2008 12:43 PM, Francois Maltey wrote:
> Hello,
> 
> The way (in mathematic or pure informatic) I prefer is
> 
> fct := x +-> (y +-> gcd (x, y))
> fct 4   --- is an anonymous function
> (fct 4) 6 -- or fct 4 6 with right priority should be 2.

Oooops.

                  FriCAS (AXIOM fork) Computer Algebra System
                          Version: FriCAS 2008-05-28
                 Timestamp: Sunday August 3, 2008 at 12:47:11
-----------------------------------------------------------------------------
    Issue )copyright to view copyright notices.
    Issue )summary for a summary of useful system commands.
    Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

(1) ->
(1) -> fct := x +-> (y +-> gcd (x, y))
    (1)  x +-> y +-> gcd(x,y)
                          Type: AnonymousFunction
(2) -> fct 4

    (2)  y +-> gcd(G1403,y)
                          Type: AnonymousFunction
(Continue reading)

Francois Maltey | 9 Oct 2008 14:55
Picon
Favicon

Re: [open-axiom-devel] Re: problem with anonymous functions

Ralf Hemmecke wrote:
> (13) -> u(x:Integer): Integer->Integer==(y:Integer):Integer+->gcd(x,y)
>
> is unacceptable to you?

I dislike to be forced to use the two notions :
and == for the outside function and +-> for the inner one.

And I can neither use fct2 x == (fct3 y == gcd (x,y)) only with ==.

But this syntax seems less fine because this is a definition of fct2, 
and the résult of fct2 3 adds  a definition : "the name" fct3 of this 
function.
anonymousFunction is as near as possible from mathematic functions.

Mathematics have only one description of function.

Elementry use of axiom should also allow (before optimisation)
function inside function with +-> (only) or with == (only),
and doesn't force the user to use the two syntax.

Your example shows that axiom allows to "currify" 2 variables with this 
syntax, but how do you create a 3-variable function ?

fct := x +-> (y +-> (z +-> gcd (x,y,z)))

fct 4    is a 2-variable function.
fct 4 6 is a 1-variable function
fct 4 6 8 = 2

(Continue reading)

Bill Page | 9 Oct 2008 18:39
Gravatar

Re: [open-axiom-devel] Re: problem with anonymous functions

On Thu, Oct 9, 2008 at 8:55 AM, Francois Maltey wrote:
>
> Your example shows that axiom allows to "currify" 2 variables with
> this syntax, but how do you create a 3-variable function ?
>
> fct := x +-> (y +-> (z +-> gcd (x,y,z)))
>
> fct 4    is a 2-variable function.
> fct 4 6 is a 1-variable function
> fct 4 6 8 = 2
>

Perhaps it looks like it, but there are no Curry operations shown
above. Each of these is a function of only one variable. The
expression 'fct 4 6 8' is interpreted as ((fct(4))(6))(8).

Curry applies if I am given a function with several inputs, e.g.

(1) -> fct(x:Integer,y:Integer,z:Integer):Integer == gcd( [x,y,z] )
                                                        Type: Void

and create new higher-order function with fewer inputs which only
"partially evaluates" the original function, returning a function as
output.

(2) -> fct''(x:Integer,y:Integer):(Integer->Integer) == z +-> fct(x,y,z)
   Function declaration fct'' : (Integer,Integer) -> (Integer ->
      Integer) has been added to workspace.
                                                        Type: Void

(Continue reading)

Gabriel Dos Reis | 9 Oct 2008 19:29

Re: [open-axiom-devel] Re: problem with anonymous functions

On Thu, Oct 9, 2008 at 11:39 AM, Bill Page <bill.page@...> wrote:

> Axiom has some higher-order Curry operations in MappingPackage2 and
> MappingPackage3 but these are not quite as flexible as the notation
> above.

Agreed on all accounts.

Note however that the syntax is not just `syntactic sugar'.  It has a
fundamental
implication on function calling convention, type checking, value representation,
and efficiency.  It affects the runtime system in non-obvious ways.

There original problem is completely orthogonal to this currification stuff,
can and should be fixed -- it it just an oversight in the codes.

-- Gaby

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Martin Rubey | 9 Oct 2008 19:49
Picon
Picon
Favicon

Re: [open-axiom-devel] Re: problem with anonymous functions

"Gabriel Dos Reis" <gdr@...> writes:

> The original problem is completely orthogonal to this currification stuff,
> can and should be fixed -- it it just an oversight in the codes.

It would be wonderful if you could fix that.  I hope that my examples are
helpful...

Sorry for not cross posting to Open Axiom originally, that was an oversight - I
usually share compiler related problems, please excuse.

Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane