//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010, 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// This program and the accompanying materials are made available
// under the terms of the MIT License which is available at
// https://opensource.org/licenses/MIT
//
// SPDX-License-Identifier: MIT
//////////////////////////////////////////////////////////////////////////////

// Including common attributes to set for all documents within this directory.
include::_root_attributes.asciidoc[]

// Enable inclusion of custom content from '*-docinfo*.html' files.
:docinfo: private

// Enable custom stylesheet.
:stylesheet: assets/asciidoctor-escet-chi.css

// Use this for asciidoc documents containing a title.
:doctype: book

= Chi documentation
:author: Copyright (c) 2010, 2026 Contributors to the Eclipse Foundation
:favicon: favicon.png

Chi is a modeling language for describing and analyzing performance of discrete event systems by means of simulation.
It uses a process-based view, and uses synchronous point-to-point communication between processes.
A process is written as an imperative program, with a syntax much inspired by the well-known Python language.

Chi is one of the tools of the Eclipse ESCET(TM) project.
Visit the link:https://eclipse.dev/escet/{escet-deploy-folder-name}[project website] for downloads, installation instructions, source code, general tool usage information, information on how to contribute, and more.

ifdef::website-output[]
TIP: You can link:eclipse-escet-chi-manual.pdf[download this manual] as a PDF as well.
endif::website-output[]

Tutorial::
The <<tut-chapter-chi-tutorial>> teaches the Chi language, and its use in modeling and simulating systems to answer your performance questions.
+
Some interesting topics are:
+
* Basics (<<tut-chapter-data-types>>, <<tut-chapter-statements>>, <<tut-chapter-stochastic-behavior>>)
* Programming (<<tut-chapter-processes>>, <<tut-chapter-channels>>)
* Modeling (<<tut-chapter-buffers>>, <<tut-chapter-servers-with-time>>, <<tut-chapter-conveyors>>)

Reference manual::
The <<ref-chapter-reference-manual>> describes the Chi language in full detail, for example the top level language elements or all statements.
It also contains a list with all standard library functions and a list with all distribution functions.
+
Some interesting topics are:
+
* <<ref-chapter-global-definitions>> (Top level language elements)
* <<ref-chapter-standard-library>> (Standard library functions)
* <<ref-chapter-distributions>> (Available distributions)

Tool manual::
The <<tool-chapter-tool-manual,Tool manual>> describes the Chi simulator software.
Use of the software to create and simulate Chi programs is also explained.

Release notes::
The <<release-notes-chapter-index,Release notes>> provides information on all Chi releases.

Legal::
See <<legal-chapter-index,Legal>> for copyright and licensing information.

A screenshot showing a Chi model and simulation with visualization:

image::{imgsdir}/screenshot_ide.png[]

// Tutorial

include::tutorial/index.asciidoc[leveloffset=+2]

include::tutorial/introduction.asciidoc[leveloffset=+3]

// Tutorial - Basics

include::tutorial/datatypes.asciidoc[leveloffset=+3]

include::tutorial/statements.asciidoc[leveloffset=+3]

include::tutorial/functions.asciidoc[leveloffset=+3]

include::tutorial/input-output.asciidoc[leveloffset=+3]

// Tutorial - Programming

include::tutorial/stochastic-behavior.asciidoc[leveloffset=+3]

include::tutorial/processes.asciidoc[leveloffset=+3]

include::tutorial/channels.asciidoc[leveloffset=+3]

// Tutorial - Modeling

include::tutorial/buffers.asciidoc[leveloffset=+3]

include::tutorial/servers.asciidoc[leveloffset=+3]

include::tutorial/conveyors.asciidoc[leveloffset=+3]

include::tutorial/experiments.asciidoc[leveloffset=+3]

// Tutorial - Visualization

include::tutorial/svg-visualization.asciidoc[leveloffset=+3]

include::tutorial/svg-example.asciidoc[leveloffset=+3]

// Reference manual

include::reference-manual/index.asciidoc[leveloffset=+2]

include::reference-manual/globals.asciidoc[leveloffset=+3]

include::reference-manual/statements.asciidoc[leveloffset=+3]

include::reference-manual/expressions.asciidoc[leveloffset=+3]

include::reference-manual/stdlib.asciidoc[leveloffset=+3]

include::reference-manual/distributions.asciidoc[leveloffset=+3]

include::reference-manual/types.asciidoc[leveloffset=+3]

include::reference-manual/lexicals.asciidoc[leveloffset=+3]

include::reference-manual/migration.asciidoc[leveloffset=+3]

include::reference-manual/svg-visualization.asciidoc[leveloffset=+3]

// Tool manual

include::tool-manual/index.asciidoc[leveloffset=+2]

include::tool-manual/operation.asciidoc[leveloffset=+3]

include::tool-manual/command-line.asciidoc[leveloffset=+3]

// Release notes

include::release-notes.asciidoc[leveloffset=+2]

// Legal

include::documentation-legal.asciidoc[leveloffset=+2]

ifdef::pdf-output[]
[index]
== Index
endif::pdf-output[]
