Skip to content

Code Structure

knicos edited this page Apr 6, 2013 · 8 revisions

The Cadence-Embedded source code is organised into the following directory structure. The structure within the modules is generally a good template for developing modules and should be used as a standard.

libcadence-embedded

Non-executable part of Cadence to be used as a library by other C++ applications.

src

Source code files for the library. There may be some header files here which do not form a part of the API.

core

Source for the core virtual machine. This includes event and oid implementations as well as the main event router and scheduler. Definitions and their byte-code representation are also implemented here.

handlers

Built-in handlers for local in-memory graph storage and arithmetical operations. Agents are also implemented using an agent handler which receives and then forwards their events.

notations

The DASM parser. May eventually include other notations.

agents

Built-in agents, includes the module loading agent and the notation management agent.

library

Utility classes for using the VM. Includes dstring.

test

The test harness used by the automated tests. Not used in ordinary use of Cadence.

include/cadence-embedded

Public API header files which get installed.

core

Headers for the core virtual machine in Cadence.

test

Headers for the test framework.

loader

Source and scripts for generating a binary version of Cadence. Is a simple executable wrapper around the library version, with shell scripts for setting up the execution environment.

modules

Basic optional modules provided with Cadence.

basic_agents

Simple single side-effect upon condition agency.

xnet

Networking module to connect multiple Cadence instances together.

ui

A basic IDE for observing and modifying the Cadence environment.

tests

Unit and system tests.

Clone this wiki locally