# Synthesis Results

Once the synthesis process finishes successfully, all partially defined AST expressions (synthesis primitives) will be replaced by a concrete normal AST expression.

### Export the synthesis result

The synthesis result can be exported and archived into a machine-readable format. To export the whole model:

```python
m.exportAll('file_name.txt')
```

To export only the state update function of one single state:

```python
m.exportOne(m.get_next('state_var_name'), 'file_name.txt')
```

{% hint style="warning" %}
When exported, the state update function (expression) is the conjunction of the state update functions under all provided instructions.&#x20;
{% endhint %}

### Import the synthesis result

To import the whole model from a file:

```python
m = ila.Abstraction('placholder_name')
m.importAll('file_name.txt')
```

You can also import a single state update function (or any expression):

```python
some_expression = m.importOne('file_name.txt')
```

### Synthesis result in ILAng

To utilize the synthesis result (from Python environment) in your C++ project using ILAng, an ILA model can be automatically constructed from the exported result:

```cpp
#include <ilang/synth-interface/synth_engine_interface.h>
auto m = ilang::ImportSynthAbsFromFile("result.txt", "ila_name");
```


---

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