Search the web
Sign In
New User? Sign Up
frink
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
New symbolic capabilities   Message List  
Reply | Forward Message #241 of 257 |

The latest release of Frink has significant new functionality,
especially for symbolic algebra.

The compiler now tries to perform more symbolic simplification and
optimization of symbolic expressions as they are constructed or
evaluated. For example, the following transformations are now applied:

* Gathering of additive terms:
x + 2x is transformed into 3x.
3x + 4y + 10x is transformed into 13x+4y

* Gathering of multiplicative terms:
5x * 3x^2 is transformed into 15 x^3.
8 x y * 3 x z is transformed into 24 x^2 y z
x / x is transformed into 1.

This allows purely symbolic conversions to be performed. For example:

pack = 10 dog
tribe = 10 pack
tribe / dog

results in:
100

Hint: to avoid "undefined symbol" warnings, call symbolicMode[true]
which suppresses warnings about undefined variables and changes some
behavior when encountering undefined symbols from fail-fast to a more
tolerant deferred evaluation.

Note that at all times, dog is an undefined variable that is
manipulated purely symbolically. Also note that prefix, suffix, and
plural checking is not performed on local variable names, so you can't
write dog or dogs interchangeably like you can if you define a concrete
unit.

In addition, I've been working on facilities that help Frink perform
more general symbolic transformations. Transformation rules can now
contain conditions which must be met before the rule is applied, which
adds a lot of power. For example, the new solvingTransformations.frink
file demonstrates how Frink can be taught to solve many simple algebraic
equations using only a small number of rules:

http://futureboy.us/fsp/colorize.fsp?fileName=solvingTransformations.frink

or

http://tinyurl.com/npw2w7

This is another step toward automatic solution of systems of equations.

As these changes affect almost all programs, please let me know as
soon as possible if you see unexpected results in any program, or if
this affects your algorithms in a negative (or positive!) way.

--
Alan Eliasen
eliasen@...
http://futureboy.us/



Mon Jul 20, 2009 10:18 pm

aeliasen
Online Now Online Now
Send Email Send Email

Forward
Message #241 of 257 |
Expand Messages Author Sort by Date

The latest release of Frink has significant new functionality, especially for symbolic algebra. The compiler now tries to perform more symbolic simplification...
Alan Eliasen
aeliasen
Online Now Send Email
Jul 20, 2009
10:18 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help