Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#753 properties of translated functions

closed
nobody
2
2010-03-12
2005-06-13
Barton Willis
No

After translating a function, the properties of the
function
are messed up. Consider

(%i1) f(x) := x;
(%o1) f(x):=x

This is OK:
(%i2) properties(f);
(%o2) [FUNCTION]
(%i3) translate(f)$

Three questions: (1) Why is transfun listed five times?
(2) Why doesn't f have the function property anymore?
(3) Why the upper case?

(%i4) properties(f);
(%o4) [TRANSFUN,TRANSFUN,TRANSFUN,TRANSFUN,TRANSFUN]

(%i5) build_info();
Maxima version: 5.9.1
Maxima build date: 7:34 9/24/2004
host type: i686-pc-mingw32
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL 2.6.5

Barton

Discussion

  • Robert Dodier
    Robert Dodier
    2006-01-21

    Logged In: YES
    user_id=501686

    Modify title to narrow topic.

     
  • Robert Dodier
    Robert Dodier
    2006-01-21

    • summary: properties --> properties of translated functions
     
  • Raymond Toy
    Raymond Toy
    2006-01-23

    Logged In: YES
    user_id=28849

    2) Don't know.
    3) It doesn't seem to be uppercase anymore

    1) I think this is caused by this bit in properties in
    outmis.lisp:

      \(\(and \(or \(get \(car y\) 'mfexpr\*\) \(fboundp x\)\)
        \(not \(memq '|&SYSTEM FUNCTION| l\)\)\)
       \(nconc l
          \(list \(cond \(\(get x 'translated\) '$transfun\)
                  \(\(mgetl x '\($rule ruleof\)\) '$rule\)
                  \(t '|&SYSTEM FUNCTION|\)\)\)\)\)
    

    After translation x if fboundp, so this always succeeds so
    transfun gets appended for every single property. Don't
    know what the right thing would be here.

     
  • Robert Dodier
    Robert Dodier
    2006-04-10

    • labels: 460522 --> Lisp Core - Translator
     
  • Dieter Kaiser
    Dieter Kaiser
    2010-03-12

    Fixed in outmis.lisp 1.22. Now we get:

    (%i1) f(x):=x^2;
    (%o1) f(x):=x^2

    (%i2) properties(f);
    (%o2) [function]

    (%i3) translate(f);
    (%o3) [f]

    (%i4) properties(f);
    (%o4) [transfun,function]

    Closing this bug report as fixed.
    Dieter Kaiser

     
  • Dieter Kaiser
    Dieter Kaiser
    2010-03-12

    • status: open --> closed