AFC - Abacus Formula Compiler for Java

Package Dependencies

AFC’s build enforces package dependency rules over and above the ones governed by the public keyword. This is done using the definitions src/scripts/components.yaml, a YAML file. From it, we produce checking rules for Macker and this

What follows is a subsystem and package breakdown generated from components.yaml.

Core

AFC’s functional model to byte code compiler and runtime. The spreadsheet compiler sits on top of this and first transforms a spreadsheet into a functional model.

Runtime (formulacompiler-runtime)

All the components needed to run compiled engines.

Api.event

org.formulacompiler.runtime.event

Api.spreadsheet

org.formulacompiler.runtime.spreadsheet

API

org.formulacompiler.runtime

Core

org.formulacompiler.runtime.internal

Spreadsheet

org.formulacompiler.runtime.internal.spreadsheet

JVM

org.formulacompiler.runtime.internal.bytecode

Compiler (formulacompiler-compiler)

Functional model to byte code compiler. Does not have a fully sufficient public API yet. In particular, the functional model itself is not yet exposed.

API

org.formulacompiler.compiler

Logging

org.formulacompiler.compiler.internal.logging

Core

org.formulacompiler.compiler.internal

Expressions

org.formulacompiler.compiler.internal.expressions

Expressions.parser

org.formulacompiler.compiler.internal.expressions.parser

Templates

Template native Java implementations of low-level functions. Used directly by the generated expression interpreters and as templates for the generated bytecode compilers.

org.formulacompiler.compiler.internal.templates

Model

org.formulacompiler.compiler.internal.model

Compiler

Abstract two-stage compiler – delegates both an initial model transform and then transformed model to bytecode compilation.

org.formulacompiler.compiler.internal.engine

Interpreter

Interprets expressions at compile-time to do constant-folding.

org.formulacompiler.compiler.internal.model.interpreter

Analysis

Performs data type analysis.

org.formulacompiler.compiler.internal.model.analysis

Rewriting

Rewrites higher-level expressions in terms of lower-level constructs.

org.formulacompiler.compiler.internal.model.rewriting

Optimizer

Performs constant-folding.

org.formulacompiler.compiler.internal.model.optimizer
org.formulacompiler.compiler.internal.model.optimizer.consteval

Transformer

Implements the first stage of the abstract two-stage compiler.

org.formulacompiler.compiler.internal.model.transformer

JVM

Compiles a transformed model to byte code.

org.formulacompiler.compiler.internal.bytecode

Decompiler (formulacompiler-decompiler)

Byte code engine decompiler.

API

org.formulacompiler.decompiler

JVM

org.formulacompiler.decompiler.internal.bytecode

Spreadsheet

AFC’s spreadsheet to functional model and – in the end – bytecode engine compiler.

Compiler (formulacompiler-spreadsheet)

The core compiler which does everything except load and save spreadsheets in the different supported file formats.

API

org.formulacompiler.spreadsheet

Model

Implements the abstract internal model of a spreadsheet.

org.formulacompiler.spreadsheet.internal

Binding

Defines a binding of spreadsheet model elements to the user’s own Java classes.

org.formulacompiler.spreadsheet.internal.binding

Binder

Used to create a spreadsheet binding.

org.formulacompiler.spreadsheet.internal.binder

Builder

Used to create internal spreadsheet models from scratch.

org.formulacompiler.spreadsheet.internal.builder

Compiler

Compiles a spreadsheet model to a bytecode engine by way of first compiling to a functional model and then using AFC’s functional model compiler on that.

org.formulacompiler.spreadsheet.internal.compiler

Util

Convenience classes implementing simplified API for AFC.

org.formulacompiler.spreadsheet.internal.util

Parser

Base for the spreadsheet function parsers following Excel and OpenFormula specification.

org.formulacompiler.spreadsheet.internal.parser

Load

Spreadsheet loader implementation that dispatches to actual specific loader implementations by file extension.

org.formulacompiler.spreadsheet.internal.loader

Save

Spreadsheet saver implementation that dispatches to actual specific saver implementations by file extension.

org.formulacompiler.spreadsheet.internal.saver

Excel.xls (formulacompiler-spreadsheet-excel-xls)

Excel .xls file format handlers.

Load

org.formulacompiler.spreadsheet.internal.loader.excel.xls

Save

org.formulacompiler.spreadsheet.internal.saver.excel.xls

Openoffice.ods (formulacompiler-spreadsheet-opendocument)

OpenOffice .ods (OpenDocument) file format handlers.

Load

org.formulacompiler.spreadsheet.internal.loader.odf
org.formulacompiler.spreadsheet.internal.loader.odf.parser