# Welcome

Welcome to the Varphi user documentation! Here you'll get an overview of all the amazing features Varphi offers to help you build, simulate, and debug Turing machines and finite automata.

### What is Varphi?

Varphi is a modern, domain-specific language designed for defining, simulating, and studying Turing machines and finite automata.

While Turing machines are the fundamental model of computation, defining them has historically been tedious, relying on verbose state tables or fragile graphical simulators. Varphi bridges the gap between theoretical computer science and modern software engineering, providing a concise syntax, a robust compiler, and high-quality developer tooling.

### Why Varphi?

Varphi treats Turing Machines as code, not diagrams. It introduces modern language features to the theoretical domain:

* **Concise Syntax:** Define complex state transitions using pattern matching and variables instead of listing every single symbol combination.
* **Native Multi-Tape Support:** Write algorithms for $$k$$-tape machines as easily as single-tape ones. The compiler handles the complexity.
* **First-Class Tooling:** Debug your machines with a dedicated [VS Code Extension](https://docs.varphi-lang.com/vs-code-extension), complete with syntax highlighting, live error reporting, and a step-by-step debugger (DAP).

### Jump right in

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-arrow-down-to-line">:arrow-down-to-line:</i></h4></td><td><strong>Installation</strong></td><td>Install Varphi on your machine</td><td></td><td></td><td><a href="installation">installation</a></td></tr><tr><td><h4><i class="fa-code">:code:</i></h4></td><td><strong>The Varphi Language Reference</strong></td><td>Learn about Varphi's syntax</td><td></td><td></td><td><a href="the-varphi-language-reference">the-varphi-language-reference</a></td></tr><tr><td><h4><i class="fa-lightbulb">:lightbulb:</i></h4></td><td><strong>Examples</strong></td><td>See some of what you can do with Varphi</td><td></td><td></td><td><a href="examples">examples</a></td></tr></tbody></table>


---

# 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.varphi-lang.com/readme.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.
