German

Apr 25, 01:42 PM


Wenn Sie noch einen Rechner nicht programmiert haben, koennen Sie vielleicht den folgenden ‘examples’ benutzen, um Programmierung zu lernen.

Wenn

Zuerst, mann kann ‘weil’ und ‘wenn’ wie immer benutzen.

x ist 2. Wenn x mal 3 weniger als 5 ist, schreib “Hallo” sonst schreib “Tschuess”!


com.aiaioo.VaklipiOutputFixture
program run()
x ist 2. Wenn x mal 3 groesser als 5 ist, schreib “Hallo” sonst schreib “Tschuess”! Hallo
x ist 2. Wenn x plus 3 kleiner als 4 ist, schreib “Hallo” sonst schreib “Tschuess”! Tschuess
fit.Summary

Run test

Waehrend

Und wenn einen ‘loop’ noetig ist, benutzt mann waehrend.

y ist gleich 0. x ist gleich 1. während x ist weniger als 5, y wird y plus x. Danach erhöhe x.


com.aiaioo.VaklipiVariableFixture
program variable run()
y ist gleich 0. x ist gleich 1. während x ist weniger als 5, y wird y plus x. Danach erhöhe x. y 10.0
y ist gleich 0. x ist gleich 1. während x ist weniger als 5, y wird y plus x und erhöhe x. y 10.0
fit.Summary

Run test

You can learn programming with Vaklipi in the following pages:

  1. Introduction: Learn about Vaklipi
  2. Output: Learn to write out messages in Vaklipi
  3. Declarations: Learn to set the value of a variable
  4. Operators: Learn to do addition, multiplication, division etc.
  5. Conditionals: Learn to take specify the conditions for performing certain steps.
  6. Looping: Learn to repeat steps till some condition is satisfied.
  7. Jumping: Learn to jump to some point in the code.
  8. Functions: Learn to issue an command.
  9. Constructors: Learn to create an object of a certain type.
  10. Selectors: Learn to refer to a real world object.

Cohan Sujay Carlos

User Guides, Vaklipi

Comment

---

French

Apr 25, 01:42 PM


Si vous n’avez jamais programmé un ordinateur, commencez avec l’introduction suivant (désolé, mais c’est en Anglais):

  1. Introduction: Learn about Vaklipi

Si

Si vous ne comprenez pas Anglais, voila quelques exemples de programacion en Francais.

D’abord, c’est comme ca que l’on exprime que qqch se fait seulement si qqch d’autre a lieu.

x égale 2. Si x multiplié par 3 est moins que 5, dis “Salut” sinon dis “Ciao”!


com.aiaioo.VaklipiOutputFixture
program run()
x égale 2. Si x multiplié par 3 est plus grand que 5, dis “Salut” sinon dis “Ciao”! Salut
x égale 2. Si x ajouté à 3 est inférieur à 4, dites “Salut” sinon dites “Ciao”! Ciao
fit.Summary

Run test

Tandis que

Et c’est comme ca qu’on peut décrire un ‘loop’.

y égale 0. x égale 1. Tandis que x est moins que 5, y est y plus x et increment x.


com.aiaioo.VaklipiVariableFixture
program variable run()
y égale 0. x égale 1. Tandis que x est moins que 5, y est y plus x et increment x. y 10.0
y égale 0. x égale 1. Tandis que x est moins que 5, y devient y plus x. Et puis increment x. y 10.0
fit.Summary

Run test

You can learn programming with Vaklipi in the following pages:

  1. Introduction: Learn about Vaklipi
  2. Output: Learn to write out messages in Vaklipi
  3. Declarations: Learn to set the value of a variable
  4. Operators: Learn to do addition, multiplication, division etc.
  5. Conditionals: Learn to take specify the conditions for performing certain steps.
  6. Looping: Learn to repeat steps till some condition is satisfied.
  7. Jumping: Learn to jump to some point in the code.
  8. Functions: Learn to issue an command.
  9. Constructors: Learn to create an object of a certain type.
  10. Selectors: Learn to refer to a real world object.

Cohan Sujay Carlos

User Guides, Vaklipi

Comment

---

Technology

Apr 25, 01:41 PM

We differ from previous attempts at natural language programming in our use of entity extraction in the front end of a programming language interpreter/compiler. This greatly simplifies the task of adding new languages.

We also simplify the separation of procedural language from deictic language by supporting an entity called a ‘selector’.

Examples of selectors include “the first column of the first row”, “the file ‘f’ in the directory ‘d’”, and “the name in the table x whose id is 90123”.

Vaklipi converts any human language into an interlingua: an intermediate representation that captures the semantics of human language. Our interlingua is called ‘Spanner’. The Spanner ‘language’ resembles human language very closely.

For example, one symbol ‘=’ serves both as an assignment command and as an equality operator, as is the case with most human languages (but not the case with most programming languages).

Another interesting case is the overloaded use of the conjunction symbol ‘&’ for sequencing actions and as the conjunction operator.

Both & and = are disambiguated in the Vaklipi Spanner representation based on context.

Another interesting feature of Vaklipi Spanner is the precedence of operators. In many Indian languages, it is possible to say ‘or of ands’ but not ‘and of ors’.

For example you can say ‘x and y or m and n’ but not ‘x or y and m or n’.

This limitation is captured in the default Vaklipi Spanner precedence rules for boolean operators.

Since we use an interlingua as an intermediate representation, Vaklipi can do something most other programming language interpreters and compilers can’t. It can translate the programs that you feed it, from one language to another!

We’ve built a very simple translation system just to demonstrate this feature.

Cohan Sujay Carlos

Vaklipi,

Comment

---

History

Apr 25, 01:41 PM

The 1970s

There is an excellent article by Edsger W. Dijkstra written in 1979 titled On the foolishness of natural language programming that is worth a read.

Dijkstra argues that natural language programming is pointless because symbolic representations make mathematical reasoning easier. We wish to make two counter-arguments:

a) Firstly, symbolic representations are not always succinct enough or ambiguous enough for human needs. A case in point is “Yes I can”. In formal logic, you’d have to unnecessarily choose between “There exists x, such that I can x,” and “For all things x, I can x.” Taking the temporal dimension into account, the choices get even richer.

b) Secondly, programmers need the precision of symbolism, not users. The developers who build complex computer products need special languages (to deal with complex math and logic). However, business users may not need to deal with complex math when using the product. For example, a database ought to be written in C++ or Java. However, a user of a database should not have to learn either language to get a list of names out of it.

Related Work from 2000 Onward

Related work: Mihalcea et al have a paper titled “NLP (Natural Language Processing) for NLP (Natural Language Programming)” [2006] where they describe their attempts to generate programming skeletons given a programming problem.

Related work: There is a natural language programming tool called System English produced by the University of Southampton (system-english.com) [2001].

Cohan Sujay Carlos

,

Comment

---

Looping

Mar 25, 09:46 AM


If you’re a beginner to programming, start at one of the following:

  1. Introduction: Learn about Vaklipi
  2. Output: Learn to write out messages in Vaklipi


Some things in life are repetitive. You know, you get milk every morning. You go to work every day, but not on Sunday or on holidays.

You can model that with instructions for repeating a set of statements, until something happens.

Take a good look at this.

Let y be 0. Let x be 1. While x is less than 5, set y to y plus x and increment x.


com.aiaioo.VaklipiVariableFixture
program variable run()
y is 0. x is 1. While x is less than 5, set y to y plus x and increment x. y 10.0
fit.Summary

Run test

Did you get what that program does?

You can say the same thing another way:

Let y be 0. Let x be 1. While x is less than 5, increment y by x and increment x.

Is it clearer now?


com.aiaioo.VaklipiVariableFixture
program variable run()
Let y be 0. Let x be 1. While x is less than 5, increment y by x and increment x. y 10.0
Let y be 0. Let x be 1. While x is less than or equal to 4, increment y by x and increment x. y 10.0
fit.Summary

Run test

What you’re doing is adding up all natural numbers less than 5.

The problem in mathematics is called ‘adding a list of integers in arithmetic progression’ but isn’t as complicated as it sounds.

In fact, you don’t even need to use a loop to do it.

You can get the same answer if you just computed x * x / 2 + x / 2.

Try it out for yourself!


com.aiaioo.VaklipiOutputFixture
program run()
Let x be 4. What is x * x / 2 plus x / 2 ? 10.0
fit.Summary

Run test

Now, if you were talking Hindi, you would say something like:

रा का मान ० है. ला का मान १ है. जब तक ला का मान ५ से कम है, तब तक रा में ला जोड़ दो और ला में १ जोड़ दो.


com.aiaioo.VaklipiVariableFixture
program variable run()
रा का मान ० है. ला का मान १ है. जब तक ला का मान ५ से कम है, तब तक रा में ला जोड़ दो और ला में १ जोड़ दो. रा 10.0
fit.Summary


Learn


You can learn programming with Vaklipi in the following pages:

  1. Introduction: Learn about Vaklipi
  2. Output: Learn to write out messages in Vaklipi
  3. Declarations: Learn to set the value of a variable
  4. Operators: Learn to do addition, multiplication, division etc.
  5. Conditionals: Learn to take specify the conditions for performing certain steps.
  6. Looping: Learn to repeat steps till some condition is satisfied.
  7. Jumping: Learn to jump to some point in the code.
  8. Functions: Learn to issue an command.
  9. Constructors: Learn to create an object of a certain type.
  10. Selectors: Learn to refer to a real world object.

Cohan Sujay Carlos

Vaklipi,

Comment [2]

---

« Older Newer »