> For the complete documentation index, see [llms.txt](https://bo-yuan-huang.gitbook.io/ilang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bo-yuan-huang.gitbook.io/ilang/modeling.md).

# Modeling

This section covers how to construct the ILA formal model through ILAng's programming interface. You will learn how to define each component of the ILA model.&#x20;

{% hint style="info" %}
This guide only shows a selected list of features. The complete set of all supported API with detailed description can be found [here](https://bo-yuan-huang.github.io/ILAng-Doc/doxygen-output-html/index.html).&#x20;
{% endhint %}

## ILA formal model

As described in [TODAES18](https://bo-yuan-huang.github.io/ILAng-Doc/todaes18.pdf), the ILA formal model has several valuable attributes for modeling and verification. It is modular, with functionality expressed as **a set of instructions**. It enables meaningful abstraction through **architectural state** that is persistent across instructions. It provides for portability through a more durable interface with the interacting processors. It is **hierarchical**, providing for multiple levels of abstraction for modeling complex instructions as a software program through sub- and micro-instructions.&#x20;

### AES example

The below image shows the instruction set for the AES cryptographic accelerator from OpenCores.org. The design behavior can be represented using these 8 instructions, e.g., `RD/WR_ADDR`, `START_ENCRYPT`, `GET_STATUS`, etc. Instead of all micro-architectural states/registers, only the architectural states are included in the ILA model.&#x20;

![Left: AES instruction set. Right: AES ILA model (partial)](/files/-LYAjGyBSIjkyGxf7BZE)

The ILA model can be hierarchical, in that it can contains child-ILAs to represent complex operations. It is often easier to describe the architectural state update function as a sequence of steps, i.e., an algorithm. The below image shows the child-ILA of the AES design and also the child-program for the `START_ENCRYPT` instruction.

![Left: AES child-ILA model. Right: child program](/files/-LYAjHdGQ8MR8fOarVhj)


---

# 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://bo-yuan-huang.gitbook.io/ilang/modeling.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.
