Skip to content

Overall design

Matt Windsor edited this page Oct 9, 2018 · 7 revisions

This page details the overall structural design of act at time of writing.

NOTE: act is still in its infancy, and this design is subject to heavy change.

Module structure

act consists of the following modules, from top to bottom:

  • bin: the user-facing top-level;
  • lib: the actual compiler-testing framework;
  • lang: parsers and basic analysers for the languages act understands;
  • utils: miscellaneous utilities shared by everything else.

lib

This module contains the following well-defined pieces of functionality (and some other bits that need to be organised):

  • the sanitiser, which lowers programs in one of the lang languages into a Litmus-ready format using both;
  • the explainer, which dumps out the basic analysis for one of the lang languages, and thus tells the user how act is making its various sanitisation decisions;
  • the language specifics, which tell the sanitiser, litmus emitter, etc. specific things about the language that we can't abstract over in lang (for example, how to lower specific instructions that don't exist in other architectures).

lang

This module contains the language frontends (lexers and parsers), as well as very basic semantic analysis, for the various languages act understands (at time of writing, only x86).

The main outward-facing module is Language, which contains a series of abstract assembly types (operands, locations, instructions, etc), as well as a module interface for extracting these types from a language-specific AST.

Clone this wiki locally