Today is...
Friday, December 19, 2014
Welcome to Control.com, the global online
community of automation professionals.
Advertisement
Featured Video...
Featured Video
A quick introduction to EtherCAT for motion control and I/O...
Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
procedural vs. non-procedural languages
is there a movement from procedural language to non-procedural languages in today's application context? ...

is there a movement from procedural language to non-procedural languages in today's application context? are procedural language still widely used as they are before? discuss :)

By James Ingraham on 21 January, 2003 - 1:38 pm

I'm not sure the question makes any sense. Do you count Relay Ladder Logic as procedural or non-procedural? I say non-procedural, but I make it do procedural work anyway. How about VisualBasic? It can be considered procedural, but it can also be looked at as event driven. Java is theoretically object-oriented (i.e. non-procedural), but I can write a Java program that is pretty damn procedural. C, which may seem obviously procedural, is often used to do a form of state-logic.

We also have to talk about context. HMI programming is almost never procedural. Discrete control programming is almost universally done in relay ladder logic. I don't know even know what DCS programming looks like, because everything I do in my end of the controls world is at the machine level. Embedded controllers are usually done in C.

You've asked the equivalent of, "Do people prefer hammers or wrenches?" Different jobs have different tools. But it's even worse because a hammer is a hammer, but a language may have both "procedural" and "non-procedural" aspects.

-James Ingraham
Save Automation, Inc.

By Anonymous on 18 May, 2003 - 3:31 pm

are procedural language widely used as before?is it more difficult than non procedural?

By Vladimir E. Zyubin on 22 January, 2003 - 7:10 pm

Hello,

procedural language <language> (Or "imperative language") A term used in contrast to declarative language to describe a language where the programmer specifies an explicit sequences of steps to follow to produce a result. Common procedural languages include Basic, Pascal, {C} and Modula-2.

declarative language A general term for a relational language or a functional language, as opposed to an imperative language. Imperative (or procedural) languages specify explicit sequences of steps to follow to produce a result, while declarative languages describe relationships between variables in terms of functions or inference rules and the language executor (interpreter or compiler) applies some fixed algorithm to these relations to produce a result. The most common examples of declarative languages are logic programming languages such as Prolog and functional languages like Haskell.

See also production system. (1994-11-23)

http://www.InstantWeb.com/D/dictionary/

Also, have a look at the terms "third generation language"/"fourth generation language".

There must be a movement to expediency only.

--
Best regards.
Vladimir E. Zyubin mailto:zyubin@iae.nsk.su
Monday, January 20, 2003, 8:16:00 PM

By James Ingraham on 23 January, 2003 - 2:51 pm

Vladimir, which of these would you put Relay Ladder Logic into? It certainly doesn't look like a declaritive language. And I still say it is not procedural, because ladder doesn't happen in "steps." Granted, there is an order that rungs are executed, but since every rung happens every scan the logic doesn't really "proceed."

-James Ingraham
Sage Automation, Inc.

By Vladimir E. Zyubin on 28 January, 2003 - 6:15 pm

Hello James,

Rather Relay Ladder Logic is a procedural landuage. The rungs in their "classic" form look like this:

Output = (InputA AND InputB) OR InputC... etc.

- i.e., it specifies sequences.
The fact of math. commutativity (A+B = B+A, a AND b = b AND a... etc.) and the fact of functional commutativity (disconnectedness of the rungs,
free order of the rungs) are not important. IMO.

But more strict definition is the following -

The LD is a low level language of fourth generation. IMO.

(some of the terms are here - http://www.InstantWeb.com/D/dictionary/ )

--
Best regards.
Vladimir E. Zyubin mailto:zyubin@iae.nsk.su

James Ingraham:
> Vladimir, which of these would you put Relay Ladder Logic into? It
> certainly doesn't look like a declaritive language. And I still say
> it is not procedural, because ladder doesn't happen in "steps."

In conception, it is declarative. It expresses the state of each coil in terms of the various inputs and other coils.

In practice, the "solving order" is fixed, and people often take advantage of that, writing programs which are sensitive to rung order.

> Granted, there is an order that rungs are executed, but since every
> rung happens every scan the logic doesn't really "proceed."

Prolog has much the same thing - an order of execution - but it's still considered declarative. More modern variants such as Mercury eliminate this, so that order does not matter at all; I don't think there's been any widely used ladder variant that would do that, though.

Jiri
--
Jiri Baum <jiri@baum.com.au> http://www.csse.monash.edu.au/~jirib
MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools

By James Ingraham on 29 January, 2003 - 8:45 pm

Vladimir: "Rather Relay Ladder Logic is a procedural landuage."

Jiri: "In conception, it is declarative."

My original point: "...a language may have both 'procedural' and 'non-procedural' aspects."

It is very rare that something as complicated as a programming language can be put neatly in a category. Intro computer science students are taught these definitions, but they don't really mean a whole lot.

-James Ingraham
Sage Automation, Inc.

By Vladimir E. Zyubin on 1 February, 2003 - 11:40 am

Hello James,

I agree. The definitions are ambiguous. The terminology is bad /useless.

As far as I understand the terms were invented when the AI idea was very popular and... (no need to tell that sorrowful story ;-)

--
Best regards.
Vladimir E. Zyubin mailto:zyubin@iae.nsk.su
Friday, January 31, 2003, 11:10:00 AM

By Vladimir E. Zyubin on 15 February, 2003 - 12:07 pm

All real languages, - the languages that are used to describe algoritm for "slow-witted" computer, - are a bit procedural.

Would you like to point out concrete languages you keep in mind?

--
Best regards.
= Vladimir E. Zyubin mailto:zyubin@iae.nsk.su
= Friday, February 14, 2003, 12:03:37 PM =

The languages I have in mind are 'c' and java

which do you like better, procedural or non?

i have an project on diffrentiate moduler, procedural and un strcturel programming languages and also there compilers thats are avialiable in market.plese tell me in detail about that project if possible. i shall be very thankful to u.

By Brian E Boothe on 19 September, 2003 - 7:25 pm

Procedural Languages Compilers C/C++/Pascal (free) Programmers must in procedural languages declare how to do it. That means that such programs are structured lists of actions. Usually is easy to find paterns in source and target languages that matches each other.

At least one compiler of C, Fortran, Pascal or other procedural language is probably known to anyone who took part in software development. These languages belong to fixed procedural languges.

Fixed Procedural Languages Compilers When the language is completely known to compiler designers, they can write the compiler optimized for such language. Most of procedural language compilers are of such type. There are also compiler (or just parser) generators for them.

Non-procedural Language Compilers In non-procedural languages programmers specify relations within different data entities. These languages are ususlly more abstract than the procedural ones.

Computations are usually done on some special abstract machine. So the compilers are also build accordingly to this machine.

List Of Programming Languages As of 2002, there were more than 600 languages and major dialects of languages available to software practitioners.

can anybody tell me what is the non-procedural language??

thanks~

On September 30, 2003, Anonymous wrote:
> can anybody tell me what is the non-procedural language?? <

Those are languages where you specify what conditions the answer should satisfy, but not how to obtain it.

For instance, you might write the statement:
x + 3 = 7
where in a procedural language you'd have to write:
x := 7 - 3

This is a trivial example, of course, but this kind of approach can be very powerful if you can get your head around it.

Jiri
--
Jiri Baum <jiri@baum.com.au> http://www.csse.monash.edu.au/~jirib
MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools

adoula12001@yahoo.com

procedural language determines WHAT & HOW a process should be done, non-procedural language is concerned with the WHAT not the HOW; this is a + in cross platform development

thank you for letting me express myself-)

Yes, Procedural Programs are used widely, why did u get that doubt?