PDA

View Full Version : anyone ever heard of symbolic programming



Unregistered
02-18-2002, 12:08 AM
ive been brousing computer science classes and heres the descripiton of one I found:

Refer to computer science service course restrictions.
Fourteen hours of laboratory/lecture/discussion per week
for eight weeks. Prerequisites: High school algebra.
Introduction to computer programming, emphasizing
symbolic computation and functional programming style.
Students will write a project of at least 200 lines of code,
using the Scheme programming language.

Ive had High school algebra but anyone have any clue as to what "Introduction to computer programming, emphasizing
symbolic computation and functional programming style." means. I know almost all of the C++ language and I've also learned a bit of windows api, MFC, IO(a very little bit), direct X, and allegro for more information about the course go to summer.berkeley.edu the course is called intro to Symbolic programming.

taylorguitarman
02-18-2002, 12:50 AM
I took a class in LISP and it was rather interesting. (Scheme is a dialect of LISP) It's a totally different way of thinking than with C++ but has a lot of cool features to it. It's kind of confusing at first because it uses a lot of (). It's commonly used for AI programming and such. Makes some things that are very difficult in C++ very easy. It's actually been around for a long time.

These might be useful
A programming guide-
http://www.scheme.com/tspl2d/

The website-
http://www.scheme.com/

samGwilliam
02-18-2002, 12:04 PM
LISP is rather good. A totally different paradigm to C. No loop construct. Heavy reliance on recursion. 'list' being the only data type. I also like PROLOG.

Shiro
02-18-2002, 12:30 PM
Symbolic programming is in many cases doing math with a computer using symbols. In a computer algebra program like Maple, you can perform mathematical calculations by using symbols. In non-symbolic programming you use variables which represent values, in symbolic programming a variable doesn't need to represent a value.

If you, in symbolic programming, for example have a simple equation like:

eq := a x^2 + b x + c = 0;

Then doing something like:

solve (eq, x);

Would lead to:

x1 = (-b + sqrt (b^2 - 4 a c)) / 2 a
x2 = (-b - sqrt (b^2 - 4 a c)) / 2 a

So using a symbolic programming language to do math, is just the same as you would do math on paper.

BTW, Lisp is, as far as I know, not symbolic programming. It is functional programming. Just like Haskell. Functional programming means programming with functions, in C we use variables which we pass to functions. For example Fibonacci in Haskell:



fib 0 = 0
fib 1 = 1
fib (n+2) = fib n + fib (n+1)


Or a function to compute which variable of two is smallest:



smaller :: (Integer, Integer) -> Integer
smaller (x,y) = if x <= y then x else y


So determining which of two Fibonacci nummer is smallest would be:



small_fib = (Integer, Integer) -> Integer
small_fib = smaller (fib (x), fib (y))