# Application

An application in the Fair Math Computer consists of two main components:

1. **External Functions** — These are functions that take input and return output. Each function performs a specific sequence of instructions and serves as an entry point to the application. Importantly, these functions cannot directly call other functions within the same application.
2. **Global Variables** — These are variables available throughout the application's execution. They can have various types, such as integers, arrays, or ciphertexts.

By default, the application starts with the **main** function unless another function is explicitly specified. The main function acts as the primary entry point.

When an application is launched, a **process** is created. This process remains active until the application explicitly calls the **exit** function (or is terminated by the operating system). The process manages the application’s state, resources, and execution flow throughout its lifecycle.


---

# Agent Instructions: 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:

```
GET https://docs.fairmath.xyz/fhe-computer/operating-system/application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
