Skip to content

Overall design

Matt Windsor edited this page Oct 30, 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 bottom to top:

  • utils: miscellaneous utilities shared by everything else;
  • lib: the actual compiler-testing framework;
  • the architecture-specific modules:
    • x86: Intel x86;
  • bin: the user-facing top-level and glue code.

utils

This contains various things that aren't necessarily act-specific, but haven't yet been generalised out of act: monads, monad transformers, extensions to Core, and so on.

lib

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

  • the abstraction layer (Abstract*), which gives an architecture-independent view of an assembly program;
  • the language frontend modules (LangFrontend), which contains generic parsing and lexing logic used by the language parsers;
  • the language interface (Language), which gives signatures and functors for building up interfaces between act and assembly languages;
  • the sanitiser (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;

Language-specific modules

These modules contain 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).

bin

bin contains the act top-level, as well as some glue code that connects the language-independent bits in lib with the language-specific bits in x86 etc. Most of this glue lives in LangSupport.

Clone this wiki locally