Natural language programming
Natural language programming - NLP - is a software writing method that uses natural language, i.e. English, French, Spanish, German, Portugese, Japanese, Chinese, or some other spoken language to write programs that translate into machine code on a digital computer. An existing example of natural language programming is sEnglish - system English - that is a controlled natural language.
Natural language program is mainly written in an imperative programming language that can also state declarative and functional sentences. The smallest unit of statement in NLP is a sentence. Sentences are stated using concepts and objects as in object oriented programming. In an NLP text every sentence unumbiguosly compiles into some associated high level programming language such as MATLAB,Octave,SciLab,Phyton, etc.
An example text from an English language NLP program is as follows:
If U_ is 'smc01-control', then do the following. Define surface weights Alpha as "[0.5, 0.5]". Initialise matrix Phi as a 'unit matrix'. Define J as the 'inertia matrix' of Spc01. Compute matrix J2 as the inverse of J . Compute position velocity error Ve and angular velocity error Oe from dynamical state X, guidance reference Xnow . Define the joint sliding surface G2 from the position velocity error Ve and angular velocity error Oe using the surface weights Alpha. Compute the smoothed sign function SG2 from the joint sliding surface G2 with sign threshold 0.01. Compute special dynamical force F from dynamical state X and surface weights Alpha. Compute control torque T and control force U from matrix J2, surface weights Alpha, special dynamical force F , smoothed sign function SG2. Finish conditional actions.
that defines a feedback control scheme using sliding mode control method.
This entry describes NLP in its general form, without being specific to any partiuclar natrual language. The following are discussed:
- why do professionals write natural language programs?
- what is the methodology - software paradigm - of NLP ?
- what is the publication value of an NLP program and document?