Kodu Language

We describe the language of Kodu using a grammar based on the nota-tion for context-free grammars. This language speci cation should serve as areference for researchers and teachers who seek to learn or study Kodu as alanguage. To make these resources more accessible to a broader audience, wehave generated two di erent language descriptions. The rst is a basic languagedescription, which provides the general structure and syntax of a Kodu pro-gram. The second is an extension of the basic language that contains all theconstructs implemented in the Kodu language.

 

1 Basic Kodu Language
Kodu is a high-level, visual, and interpreted language. It is heavily inspiredby robotics, and as such, each character and object in Kodu is programmedindividually to interact with the world, much like intelligent agents.
1.1 About the Language
The Kodu language is entirely event driven, where each line of programming isin the form of a condition and an action, referred to as a rule (di erent from theproduction rules used in the language description). For example, a rule couldread, when see apple red, do move toward quickly, where when see apple red isthe conditional, and do move toward quickly is the action. Each word in the rule(omitting when and do), is represented as a tile in Kodu, and thus is a memberof the alphabet.This language description is represented by a series of production rules, wherethe left-hand side (LHS) shows a variable, also known as a non-terminal, andthe right-hand side (RHS) contains variables and terminals. Each terminal isan element on the alphabet of the Kodu language and all begin with a lower-caseletter. In the case of Kodu, the alphabet is composed of the entire set of tilesavailable during programming.As an example of how to read a grammar and production rules, we generatea grammar that can represent an example rule, when see apple do move towardquickly. This is shown in Figure 1.1 (recall that when and do are not part of thealphabet, and so they are not in the grammar). Here, the alphabet  =  = f see,apple, do, move, toward, quicklyg, the set of variables V = f Rule, Condition,Action, Sensor, Filter, Actuator, Selector, Modi erg, and the start variable 

  • S 2 V is Rule.
  • Rule ! Condition Action
  • Condition ! Sensor FilterSet
  • Action ! Actuator Modi er Selector
  • Sensor ! see
  • FilterSet ! Filter FilterSet j Filter
  • Filter ! apple j red
  • Actuator ! move
  • Selector ! toward
  • Modi er ! quickly

ipad 3 keyboard case| Sonnenbrände | Jogging Infos | Reise-feeds.de | Vipre AntivirCoupon | Free Erotik | Oral Jelly Kamagra | Lil Kim bei NYCkim.com | greyhound bus | Perfect Slim

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by 1A World Ltd