How szabta89/inca works
1. This repository is an MPS-based language workbench project for IncA, a DSL and runtime for incremental program analysis. The architecture splits into two big areas: code/ for the product itself and benchmark/ for performance experiments and sample analyses.
2. The heart of the system is under code/languages/. Each org.inca.* directory is an MPS language definition with the usual MPS layers: structure, editor, constraints, behavior, typesystem, and generator templates. These languages define the analysis DSL, its supporting expression/data abstractions, and auxiliary language features.
3. org.inca.core is the central language layer. It appears to define the core analysis model plus generator logic and editor/type system rules. It is the main conceptual boundary for the analysis DSL itself.
4. org.inca.data extends the core with data-flow and data-centric analysis constructs. Its presence of dataFlow.mps, actions.mps, intentions.mps, and migration support suggests it owns the abstractions for modeling analysis data and transformations over it.
5. org.inca.fun, org.inca.gp, org.inca.extensions, and org.inca.styles are additional DSL layers or feature modules. They likely add specialized analysis forms, extensibility hooks, graph-pattern-related constructs, and presentation/style support rather than being standalone applications.
6. Runtime and integration code lives under code/solutions/. These are MPS solutions that package generated code, plugins, and runtime libraries. Important runtime boundaries include org.inca.core.runtime, org.inca.data.runtime, org.inca.fun.runtime, and org.inca.gp.runtime, each corresponding to one or more language families.
7. org.inca.core.runtime is the main execution stack for incremental evaluation. Its bundled third-party JARs show the runtime depends heavily on Eclipse/EMF, Eclipse Collections, Xtext, and especially VIATRA query/transformation libraries. That tells you the execution model is graph-pattern-based and incremental rather than hand-rolled.
8. UI-facing integration is separate from the analysis engine. org.inca.ui and org.inca.analysis.ui are plugin-style solutions, and the benchmark side also has org.inca.benchmark.ui and org.inca.benchmark.itc, indicating the project exposes editor/UI hooks around analyses and measurements instead of only batch execution.
9. The benchmark workspace is its own MPS project under benchmark/. It contains benchmark-specific languages (org.inca.benchmark.ext) and benchmark solutions (org.inca.benchmark, org.inca.analyses, org.inca.benchmark.ui, org.inca.benchmark.itc) with demo models like interval and points-to examples. This is where example analyses and workloads are organized for evaluation.
10. Tests are also first-class MPS solutions under code/tests/. There are test languages, test models, and test suites for the core, data, fun, gp, meta-analysis, and interprocedural/static-analysis paths. The test tree includes both small DSL models and larger fixtures, showing the repository validates both language behavior and analysis semantics.
11. code/solutions/modelchecker and org.inca.meta.analysis suggest a secondary analysis layer used to analyze or validate analysis models themselves. That means the repo has a meta-level boundary: IncA not only defines analyses, but also contains tooling to reason about analysis definitions.
12. Build orchestration is handled by Gradle at the repository root. The build downloads MPS, generates the MPS project library configuration from libraries.properties, and prepares the code/ project for opening in MPS. The root also contains souffle/, which likely supports experiments or backend tooling, but the core architecture is still centered on MPS + generated runtime solutions + VIATRA-based incremental execution.
13. For an architecture diagram, the key data flow is: analysis language definitions in code/languages/ are authored in MPS, generators produce runnable artifacts into code/solutions/, those runtimes execute analyses incrementally over modeled programs, and benchmark/test solutions feed sample programs and measurement harnesses back into the runtime for validation and performance evaluation.
Main entry points: org.inca.core.runtime Core runtime · org.inca.core Core DSL · org.inca.benchmark Bench suite · build.gradle Gradle build
Components 27
Build
Repository-level build and tooling
- Gradle build · Root build that prepares the MPS projects and library config
build.gradle - Libraries · Shared library definitions used by the MPS projects
libraries.properties - Souffle · Supplementary backend or experiment tooling
souffle
Languages
MPS language definitions
- Core DSL · Central analysis model and generator boundary
code/languages/org.inca.core - Data DSL · Data-flow and data-centric analysis extensions
code/languages/org.inca.data - Fun DSL · Functional or specialized analysis layer
code/languages/org.inca.fun - GP DSL · Graph-pattern related analysis language layer
code/languages/org.inca.gp - Extensions · Extensibility hooks and shared language features
code/languages/org.inca.extensions - Styles · Presentation and styling support for language models
code/languages/org.inca.styles
Solutions
Generated runtimes, plugins, and integration packages
- Core runtime · Incremental execution stack with VIATRA and EMF dependencies
code/solutions/org.inca.core.runtime - Data runtime · Runtime support for data language features
code/solutions/org.inca.data.runtime - Fun runtime · Runtime support for the fun language layer
code/solutions/org.inca.fun.runtime - GP runtime · Runtime support for graph-pattern analysis features
code/solutions/org.inca.gp.runtime - UI plugins · User-facing Eclipse/MPS integration for analyses
code/solutions/org.inca.ui - Analysis UI · Analysis-specific UI integration and plugin packaging
code/solutions/org.inca.analysis.ui - Meta analysis · Tooling that reasons about analysis definitions
code/solutions/org.inca.meta.analysis - Model checker · Secondary analysis or validation tooling for models
code/solutions/modelchecker
Benchmark
Benchmark workspace, analyses, and sample workloads
- Bench ext · Benchmark-specific language extensions
benchmark/languages/org.inca.benchmark.ext - Bench suite · Benchmark workspace with demo workloads and analyses
benchmark/solutions/org.inca.benchmark - Bench analyses · Shared benchmark analysis models and demos
benchmark/solutions/org.inca.analyses - Bench UI · Benchmark UI integration package
benchmark/solutions/org.inca.benchmark.ui - ITC plugin · Benchmark integration plugin for interprocedural test flows
benchmark/solutions/org.inca.benchmark.itc
Tests
MPS test languages, models, and suites
- Data tests · Tests for data language behavior and semantics
code/tests/org.inca.data.test - Fun tests · Tests for fun language behavior
code/tests/org.inca.fun.test - GP tests · Tests for graph-pattern language behavior
code/tests/org.inca.gp.test - Meta tests · Tests for meta-analysis tooling
code/tests/org.inca.meta.analysis.test - SA tests · Interprocedural and static-analysis test harnesses
code/tests/org.inca.sa.test
Connections 27
- Gradle build → Libraries: reads · Build uses shared library definitions
- Gradle build → Souffle: orchestrates · Build includes auxiliary tooling
- Gradle build → Core DSL: prepares · Build sets up the main language project
- Core DSL → Data DSL: extends · Data language builds on core abstractions
- Core DSL → Fun DSL: extends · Fun language builds on core abstractions
- Core DSL → GP DSL: extends · GP language builds on core abstractions
- Core DSL → Extensions: supports · Extension language augments the core DSL
- Core DSL → Styles: formats · Styles language supports presentation concerns
- Core DSL → Core runtime: generates · Core language is compiled into its runtime
- Data DSL → Data runtime: generates · Data language is compiled into its runtime
- Fun DSL → Fun runtime: generates · Fun language is compiled into its runtime
- GP DSL → GP runtime: generates · GP language is compiled into its runtime
- Core runtime → UI plugins: exposes · Core runtime is surfaced through UI plugins
- Core runtime → Analysis UI: integrates · Analysis UI connects to the core execution stack
- Core runtime → Meta analysis: validated by · Meta-analysis inspects or validates analysis models
- Core runtime → Model checker: checked by · Model checker acts as a secondary validation layer
- Bench ext → Bench suite: drives · Benchmark language defines benchmark models and actions
- Bench suite → Bench analyses: uses · Benchmark solution references shared analysis models
- Bench suite → Bench UI: packages · Benchmark workspace includes UI integration
- Bench suite → ITC plugin: packages · Benchmark workspace includes interprocedural integration
- Bench suite → Core runtime: executes on · Benchmarks run against the core incremental runtime
- Bench analyses → Core runtime: exercises · Benchmark analyses feed the core runtime
- Data tests → Data runtime: tests · Data tests validate the data runtime and language
- Fun tests → Fun runtime: tests · Fun tests validate the fun runtime and language
- GP tests → GP runtime: tests · GP tests validate the GP runtime and language
- Meta tests → Meta analysis: tests · Meta tests validate meta-analysis behavior
- SA tests → Core runtime: tests · Static-analysis tests exercise the core execution stack