The language rely on a set of Roles to identify the participants in the choreography.

Rule ::= rule { [ Functions ] on { RuleCondition } do { Program } }

RuleCondition ::= 
  RuleVariable ConditionOperator Expression
  [ BooleanOperator RuleCondition ]

RuleVariable ::= 
  N.Variable | E.Variable | Variable
Choreography ::= [ Functions ] Preamble Aioc

Functions ::=
  include FunctionList from STRING [ with STRING ]

FunctionList ::=
  STRING [ , FunctionList ]

Preamble ::= 
  preamble { 
    starter: Role 
    [ Location ] 
  }

Location ::= 
  location@Role: STRING [ Location ]

Choreographies and rules can include external functions. Functions are implemented by external services reachable at the location defined by the keyword from. The optional keyword with is used to define the serialisation protocol used by the service, in case the keyword is omitted, SODEP is the default protocol. In the Preamble of a choreography the developer defines the role that works as starter of the choreography, i.e., the role that ensures the participation of the other roles, in order to start the choreography.

Location is an optional rule used to specify the location (address and port) of a specific role. e.g., location@user1: "socket://localhost:8001"

Aioc ::= 
  aioc { Program }

Program ::=
 Program ; Program | Program | Program | Skip              |
 Interaction       | LocalCode         | IfThenElse        |
 While             | Scope             | { Program }

Operators ; and | specify the composition of the statements of the choreography, respectively sequential and parallel.

The Skip rule represents the no-op instruction.

Interaction ::= 
  OperationName: Role( Variable ) -> Role( Variable )

IfThenElse ::=
  if ( Condition )@Role {
    Program
  } [ else { Program }]

While ::= 
  while ( Condition )@Role { Program }

Scope ::= 
  scope @Role { Program }
  [ prop { Properties } ]
  [ roles { Roles } ]

Properties ::= 
  N.Variable = Expression [ , Properties ]

Roles ::= 
  Role [ , Role ]

Condition ::= 
  Expression ConditionOperator Expression 
  [ BooleanOperator Condition ]

ConditionOperator ::= 
  < | > | == | !=

BooleanOperator ::=
 and | or

LocalCode ::=
  Variable@Role = getInput( Expression ) |
  Variable@Role = show( Expression )     |
  Variable@Role = Expression             |
  Variable@Role = Function

getInput( Expression ) displays the content of the associated Expression and assigns the input of the user to the Variable.

show( Expression ) displays the content of the associated Expression. The correspondent Variable contains the result of the visualisation.

Function ::=
  FunctionName ( FunctionParameters )

FunctionParameters ::=
  Expression [ , FunctionParameters ]
  
Expression ::=
  Expression + Expression | Expression - Expression |
  Variable                | Constant                | 
  ( Expression )

Constant ::= 
  INT | STRING | true | false