Universal Prokee Language

From prokee
Revision as of 01:16, 29 April 2019 by Andy (talk | contribs)
Jump to navigation Jump to search

The Universal Prokee Language (UPL) is a programming language based on natural languages and semantic nets.

The Chinese Influence

The main influence for UPL comes from classic Chinese grammar. The Chinese language works different compared to western languages. In written Chinese, Words (which f.e. represents categories of objects of the real wold) are represented by symbols. In classic Chinese every symbol represents a word and every word is written by a single symbol. This symbols can be combined to sentences by using symbols which can be seen like operators in a math formula. Chinese grammar is based on word order and rules of logic. And therefore Chinese is much more like programming languages. F.e. when writing code in BASIC, or mostly any other language, the syntax defines a fix order of words within valid sentences and the interpretation of operators follows some easy rules of logic. F.e. the '+' operator stands for an arithmetic operation and expects two operands in infix notation.

Semantic Nets

A semantic net is a representation of words (or objects, or classes of objects) and the relationships between those words.

Has-A Relationship

The has-a relationship between two objects (or words) describes ownership. F.e. a car has-a steering wheel.

The has-a relationship is the default relationship between consecutive words. The sentence "A car has a steering wheel." translates into UPL as shown below.

Car SteeringWheel

If we refer to the steering wheel, the statement above may also be interpreted as "the steering wheel of the car" or "a steering wheel of a car".

Is-A Relationship

The is-a relationship between two objects (or words) describes inheritance. F.e. a car is-a vehicle.

The default is-a operator is the colon ':'. The sentence "A car is a vehicle." translates into UPL a shown below.

Car:Vehicle

Multiple inheritance can be established by stating all superclasses concatenated by a comma ','.

F.e.

C:Letter,ProgrammingLanguage,RomanNumeral

would be interpreted as: 'C' is a letter, a programming language and a roman numeral.

Other Relationships

Other relationships can be established by a concatenation of has-a and is-a relationships.

Paths and Queries