What language is used here? - find

Click here to see
It's my first time to see this language and I really wonder what language it is.
This language is being used in a PLC program which is called OMRON

In my opinion this code uses the Structured Text (ST) programming language.
The OMRON program supports all of the following languages:
Ladder diagram (LD)
Sequential Function Charts (SFC)
Function Block Diagram (FBD)
Structured Text (ST)
Instruction List (IL)
These are based on the IEC_61131-3 international standard for PLC programming.

Related

Trying to figure out what the base language is

Quick question (maybe).
I'm a process control engineer starting a new job with a company that uses Novatech software/hardware for SCADA and Operations. Novatech utilizes a programming language it calls SABL code. It looks very much like a hodge-podge between VB and Python. I'm trying to figure out if it's really just a base language adapted to their needs. What's throwing me off is it uses 'Else If' like VB but has mandatory indentation like Python. Is there a language that uses 'Else If' not 'elif' like Python or 'elsif' like Ruby but also has mandatory indentation?
If I can figure out the base language, I can put some study into the language and speed up my ability to use it proficiently. Otherwise, I'll end up in some class that's oriented on a lot of trifle information I don't need.
Any help would be appreciated.
Sequence And Batch Language (SABL®) is a proprietary language created by GSE Systems that was later purchased by Novatech. It is trademarked by Novatech and GSE. SABL® is based on (or conforms to) the ANSI/ISA-88 and ANSI/ISA-106 standards and is used in Novatech's D/3 Distributed Control System (DSP) software.
In other words, it does not have a base language and is much older than Python. It does conform to certain ISA standards but is solely used by one company who owns all rights and trademarks to it.

Writing library function in postgresql

I want to write library function in postgresql. Is it possible to write such function in .Net or I should use a special language like C to do this.
could you please show me a nice example or article about this?
thank you so much
According to the PostgreSQL procedural language matrix, there is no support for writing backend functions in .NET. But maybe one of the other languages listed there will suit you; it doesn't have to be C.

VHDL beta function

A friend of mine needs to implement some statistical calculations in hardware.
She wants it to be accomplished using VHDL.
(cross my heart, I haven't written a line of code in VHDL and know nothing about its subtleties)
In particular, she needs a direct analogue of MATLAB's betainc function.
Is there a good package around for doing this?
Any hints on the implementation are also highly appreciated.
If it's not a good idea at all, please tell me about it as well.
Thanks a lot!
There isn't a core available that performs an incomplete beta function in the Xilinx toolset. I can't speak for the other toolsets available, although I would doubt that there is such a thing.
What Xilinx does offer is a set of signal processing blocks, like multipliers, adders and RAM Blocks (amongst other things, filters, FFTs), that can be used together to implement various custom signal transforms.
In order for this to be done, there needs to be a complete understanding of the inner workings of the transform to be applied.
A good first step is to implement the function "manually" in matlab as a proof of concept:
Instead of using the built-in function in matlab, your friend can try to implement the function just using fundamental operators like multipliers and adders.
The results can be compared with those produced by the built-in function for verification.
The concept can then be moved to VHDL using the building blocks that are provided.
Doing this for the incomplete beta function isn't something for the faint-hearted, but it can be done.
As far as I know there is no tool which allow interface of VHDL and matlab.
But interface of VHDL and C is fairly easy, so if you can implement your code(MATLAB's betainc function) in C then it can be done easily with FLI(foreign language interface).
If you are using modelsim below link can be helpful.
link
First of all a word of warning, if you haven't done any VHDL/FPGA work before, this is probably not the best place to start. With VHDL (and other HDL languages) you are basically describing hardware, rather than a sequential line of commands to execute on a processor (as you are with C/C++, etc.). You thus need a completely different skill- and mind-set when doing FPGA-development. Just because something can be written in VHDL, it doesn't mean that it actually can work in an FPGA chip (that it is synthesizable).
With that said, Xilinx (one of the major manufacturers of FPGA chips and development tools) does provide the System Generator package, which interfaces with Matlab and can automatically generate code for FPGA chips from this. I haven't used it myself, so I'm not at all sure if it's usable in your friend's case - but it's probably a good place to start.
The System Generator User guide (link is on the previously linked page) also provides a short introduction to FPGA chips in general, and in the context of using it with Matlab.
You COULD write it yourself. However, the incomplete beta function is an integral. For many values of the parameters (as long as both are greater than 1) it is fairly well behaved. However, when either parameter is less than 1, a singularity arises at an endpoint, making the problem a bit nasty. The point is, don't write it yourself unless you have a solid background in numerical analysis.
Anyway, there are surely many versions in C available. Netlib must have something, or look in Numerical Recipes. Or compile it from MATLAB. Then link it in as nav_jan suggests.
As an alternative to VHDL, you could use MyHDL to write and test your beta function - that can produce synthesisable (ie. can go into an FPGA chip) VHDL (or Verilog as you wish) out of the back end.
MyHDL is an extra set of modules on top of Python which allow hardware to be modelled, verified and generated. Python will be a much more familiar environment to write validation code in than VHDL (which is missing many of the abstract data types you might take for granted in a programming language).
The code under test will still have to be written with a "hardware mindset", but that is usually a smaller piece of code than the test environment, so in some ways less hassle than figuring out how to work around the verification limitations of VHDL.

What's the language used in this demo?

I just read the document of eclipse xtext, and found the language it uses is similar to java, but with a few differences:
http://www.eclipse.org/Xtext/documentation/2_0_0/040-first-code-generator.php
For example, it has such a code snippet:
def compile(Entity e) '''
package «e.eContainer.fullyQualifiedName»;
public class «e.name» {
}
'''
What's the language?
The language you are referring to is called Xtend2 and is a Java-like programming language that has been tailored for code generation. It features some very useful concepts such as closures, dynamic dispatch, type inference and the rich strings you've already seen. Xtend2 code can be executed by the JVM since it's been translated to human-readable Java code each time you hit save. Sven Efftinge blogged about Xtend2's core ideas a while ago. There's a tutorial on the Xtext website (the page you mentioned in your question), too.
Also, Xtend2 shares most ideas of Xbase, a reusable foundation for programming languages built with Xtext.
It appears to be some sort of a notation for code generation (which of course one could surmise by reading the page title). And another "duhh!": They appear to call the overall package Xtext. However, I've not found anything that names the 2-3 different languages they use for grammar, semantics, etc.
Looks like Scala + some template with so called merge codes.
http://www.scala-lang.org/

Universal meta-language for "simple" programs

I realize that it is impossible to have one language that is best for everything.
But there is a class of simple programs, whose source code looks virtually identical in any language.
I am thinking not just "hello world", but also arithmetics, maybe string manipulation, basic stuff that you would typically see in utility classes.
I would like to keep my utilities in this meta-language and have it automatically translated to a bunch of popular languages. I do this by hand right now.
Again, I do not ask for translation of every single possible program. I am thinking a very limited, simple language, but superportable.
Do you know of anything like that? Is there a reason why it should not exist?
Check Haxe, and its Wikipedia page. It's open source and its main purpose is what you describe: generating code in many languages from only one source.
Just about any language that you choose is going to have some feature that doesn't map to another in a natural way. The closest thing I can think of is probably a useful subset of JavaScript. Of course, if you are the language author you can limit it as much as you want, providing only constructs that are common to just about any language (loops, conditionals, etc.)
For purposes of mutability, an XML representation would be best, but you wouldn't want to code in it.
If you find that there is no universal language, you can try a pragmatic model-driven development approach, using a template-based code generator.
On the template you keep the underlying concepts of an algorithm. Then, you would add code for this algorithm in one or more specific languages (C++,Java,JS,Python) when necessary. You would have to do it anyway, whatever the language or approach you choose. A configuration switch would pick the correct language for any template you apply.
AtomWeaver is a code generator that works with templates and employs ABSE as the modeling approach.
I did some looking and found this.
https://www.indiegogo.com/projects/universal-programming-language
looks interesting
A classic Pascal is very simple. Oberon is another similar option. Or you could invent your own derivative language similar to the pseudocode from the computer science textbooks. It's trivial to implement a translator from one of that languages into any decent modern imperative language.