1
2 root print: "Welcome to Ponder2".
3 string := "This string is stored in the domain structure".
4 root at: "string" put: string.
5 root print: root/string.
6 root print: "Some stars:".
7 5 do: [ :num | root print: "*" + ("*" * num)].
8 root print: "Objects in the root domain:".
9 root do: [ :name :object | root print: name].
10
11 template := root/factory/event create: #("colour" "intensity").
12 root/event at: "colourevent" put: template.
13 policy := root/factory/ecapolicy create.
14 policy event: root/event/colourevent;
15 condition: [ :intensity | intensity > 50 ];
16 action: [ :colour :intensity | root print: "Received event: colour=" + colour + " intensity=" + intensity];
17 active: true.