Templates in Dynamic Conditional Response (DCR) Graphs.

This project is a interpreter that can create and execute DCR graphs with templates. The main goal of this prototype is to validate the usability and the expressiveness of the templates in DCR graphs and to see how it can be used in various scenarios.

Usage.

To start the interpreter, run the following command in the terminal:

$ dune exec tmpl_dcr -- <filename.tdcr>

Where <filename> is the name of the file that contains the DCR graph with templates. You can see some examples in the examples directory of the project to see how to write a DCR graph with templates.

Note: The file extension must be .tdcr in order to be recognized by the program.

After running the command, you should see the following prompt.

> 

From this prompt, you can run the commands specified in the Commands section.

The interpreter accepts the following arguments:

Commands.

The interpreter accepts the following commands:

Implementation Details.

The interpreter is implemented in OCaml and uses the Dune build system. The entry module is Cli.

Module Structure.

The project is organized into the following modules:

Module

Description

Cli

Handles the command-line interface, including parsing arguments and commands.

Api

Provides the main API for interacting with DCR graphs, including initialization, execution, and viewing.

Ast

Defines the abstract syntax tree of a templated DCR Graph.

Typing

Implements the type-checking logic for events and expressions.

Repl

Implements the Read-Eval-Print Loop (REPL) for interactive usage.

Common

Contains utility functions and helpers used across the project.