-
Notifications
You must be signed in to change notification settings - Fork 1
Overall design
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.
act
consists of the following modules, from bottom to top:
-
utils
: miscellaneous utilities shared by everything else; -
lib
: the actual compiler-testing framework; -
abstract
: the abstract program model; -
litmus
: support for the litmus tests format; - the architecture-specific modules:
-
x86
: Intel x86; -
c
: C (which technically isn't an architecture, but shares a lot of the same infrastructure);
-
-
bin
: the user-facing top-level and glue code.
This contains various things that aren't necessarily act
-specific, but haven't yet been generalised out of act
.
This module contains the following well-defined pieces of functionality (and some other bits that need to be organised):
- the language frontend module (
Frontend
), 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 betweenact
and assembly languages;
- the sanitiser (
Sanitiser*
), which lowers assembly programs into a Litmus-ready format; - the explainer (
Explainer
), which dumps out the basic analysis for an assembly program, and thus tells the user howact
is making its various sanitisation decisions; - the assembly job runner (
Asm_job
), which adds a layer on top ofSanitiser
andExplainer
that handles general file I/O and bookkeeping;
- the compiler interface (
Compiler*
), which gives signatures and functors for building up interfaces betweenact
and compilers, as well as defining and parsing compiler specs; - the compiler tester (
Tester
), which implements most of theact test
command;
- various modules that implement the configuration system (
Config
,Spec
, and parts ofCompiler
andMachine
). - various utility modules (like
Src_dst
andOutput
) that aren't necessarily coherent groups ofact
functionality, but are tooact
-specific to move toutils
.
See the main page.
See the main page.
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, x86 and C).
Generally, they follow the same layout as the parts of lib
they implement: for example, language frontends will usually appear in the Frontend
module, language analysis in the Language
module, and so on.
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.
Key modules include:
-
Main
: the entry point and command handler for theact
top-level; - A module for each of the subcommands, named after the command;
-
Common
: glue code shared by various subcommands, but not forming a coherent-enough module to separate out; -
Language_support
: most of the aforementioned glue code (more apt name ideas welcomed); -
Standard_args
: boilerplate for parsing the standard flags (and other common-but-not-standard flags).