Home > Software engineering >  what is the name of this language / algorithm?
what is the name of this language / algorithm?

Time:10-03

enter image description here

this doesn't look like java/python/c/..etc

its from a book about algorithm/data structures

after a few searches i felt like this is called functional programming, but still this ADD/ZERO/ISZERO/for_loop_syntax is different in it,

so, what is this thing?, what do i call this type of writings?

& where do i run it? [if its a programming language]

is it wrong, if i write ADD(x,y) as SUM(x,y)?

CodePudding user response:

The code is a formal definition of a Polynomial as computer data structure.

Source is the Book Fundamentals of Data Structures by Ellis Horowitz and Sartaj Sahni. The language being used is called SPARKS.

Introduction to the defintion from the book (page 47; Chapter 2: Arrays):
The first step is to consider how to define polynomials as a computer structure. For a mathematician a polynomial is a sum of terms where each term has the form ax^e; x is the variable, a is the coefficient and e is the exponent. However this is not an appropriate definition for our purposes. When defining a data object one must decide what functions will be available, what their input is, what their output is and exactly what it is that they do. A complete specification of the data structure polynomial is now given.

Related question.

  • Related