> For the complete documentation index, see [llms.txt](https://rede.gitbook.io/rede-language-design/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rede.gitbook.io/rede-language-design/annexes/annex-c/evaluation.md).

# Evaluation

## Control Flow

All control flow is accomplished through synchronous or asynchronous performance of [operations](/rede-language-design/annexes/annex-c/operations.md), which define their own internal control flow. Refer to the documentation on [contexts](/rede-language-design/annexes/annex-c/data-types/custom-types.md#context), [buckets](/rede-language-design/annexes/annex-c/data-types/built-in-types/context-collections/buckets.md), [compositions](/rede-language-design/annexes/annex-c/data-types/built-in-types/context-collections/compositions.md), and [operables](/rede-language-design/annexes/annex-c/data-types/built-in-types/context-collections/operables.md) for details on each type of data being manipulated.

### Asynchronous

```
`Initiate non-behavior operations depending on the context.`
run some context,
```

```
`Initiate non-behavior operations depending on the bucket.`
run some bucket,
```

```
`Initiate non-behavior operations matching the operable.`
run <some context, some bucket>,
```

```
`Initiate non-behavior operations for the undeclared context.`
run !: Context Name [A[1], B[""]];
```

```
`Initiate non-behavior operations matching the operable.`
run some operable,
```

```
`Initiate all operations matching the operable for the behaviors 
    that match the composition.`
run some operable for some composition,
```

```
`Conditionally initiate operations matching the second operable if there were 
    no operations that started for the first operable.`
run some operable or another operable,
```

```
`Conditionally initiate operations matching the second operable if there was 
    at least one operation that started for the first operable.`
run some operable and another operable.
```

```
`Initiate all currently scheduled reactive operations of the composition.`
run some composition,
```

### Synchronous

```
`Wait on all non-behavior operations depending on the context.`
await some context,
```

```
`Wait on all non-behavior operations depending on the bucket.`
await some bucket,
```

```
`Wait on non-behavior operations matching the operable.`
await <some context, some bucket>,
```

```
`Wait on non-behavior operations for the undeclared context.`
await !: Context Name [A[1], B[""]];
```

```
`Wait on non-behavior operations matching the operable.`
await some operable,
```

```
`Wait on all operations matching the operable for the behaviors 
    that match the composition.`
await some operable for some composition,
```

```
`Conditionally wait on operations matching the second operable if there were 
    no operations that completed for the first operable.`
await some operable or another operable,
```

```
`Conditionally wait on operations matching the second operable if there was 
    at least one operation that completed for the first operable.`
await some operable and another operable.
```

```
`Wait for all currently scheduled reactive operations of the composition complete.`
await some composition,
```

```
`Wait for all currently scheduled reactive operations across the 
    application to complete.`
continue,
```

## Registration Management

### Asynchronous

```
await some context as Registration,
```

```
await some context as Deregistration,
```

```
some registration: Registration [some composition];
await some registration,
```

```
await some registration as Deregistration,
```

```
await {context A, context B} as Deregistration,
```

```
await !: Context Name [A[1], B[""]]; as Registration,
```

```
await some context: Context Name [A[1], B[""]]; as Registration,
```

### Synchronous

```
run some context as Registration,
```

```
run some context as Deregistration,
```

```
some registration: Registration [some composition];
run some registration,
```

```
run some registration as Deregistration,
```

```
run {context A, context B} as Deregistration,
```

```
run !: Context Name [A[1], B[""]]; as Registration,
```

```
run some context: Context Name [A[1], B[""]]; as Registration,
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://rede.gitbook.io/rede-language-design/annexes/annex-c/evaluation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
