Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f501f82
setup: Separate pass runtime from pipeline and dump handling
Jozott00 Mar 31, 2026
01d2b32
setup: Replace `CfgTraverser` package and update usages
Jozott00 Mar 31, 2026
287923f
setup: Extract vadl core module
Jozott00 Mar 31, 2026
2db54eb
setup: Extract vadl-pass-api module from vadl main module
Jozott00 Mar 31, 2026
304ac46
setup: Extract vadl-frontend module and migrate relevant files & depe…
Jozott00 Mar 31, 2026
085196b
setup: Add vadl-vdt module and integrate InstructionWordOrderExtension
Jozott00 Mar 31, 2026
68cc6c8
setup: Move shared template runtime into vadl-pass-api
Jozott00 Mar 31, 2026
2cca589
setup: Move shared cpp codegen into vadl-pass-api
Jozott00 Mar 31, 2026
cfb9f04
setup: Move generic dump runtime into vadl-pass-api
Jozott00 Mar 31, 2026
f963ed0
setup: Move shared html dump into vadl-pass-api
Jozott00 Mar 31, 2026
5698cbc
setup: Extract vadl rtl module
Jozott00 Mar 31, 2026
42273f8
setup: Extract vadl iss module
Jozott00 Mar 31, 2026
6294044
refactor: Update Handler retention and simplify annotation checks in …
Jozott00 Mar 31, 2026
fe6b9c3
setup: Extract vadl lcb-gcb module
Jozott00 Mar 31, 2026
98d3e56
setup: Reduce vadl shell to pipeline orchestration
Jozott00 Mar 31, 2026
bad3be0
setup: Split pipeline builders by owning module
Jozott00 Mar 31, 2026
53e6da7
setup: Remove vadl shell pipeline
Jozott00 Mar 31, 2026
5d6dd5a
setup: Merge vadl tests into vadl-test module
Jozott00 Mar 31, 2026
c395cf7
style: Fix checkstyleAll
Jozott00 Mar 31, 2026
216a51d
test: Update frontend snapshots for vadl-test layout
Jozott00 Mar 31, 2026
92460ba
test: Update resource paths in vadl-test module
Jozott00 Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ It covers everything you need to install OpenVADL, write a specification, and us
simulator or compiler.

For working VADL specifications examples, check out
our [reference specifications](https://github.com/OpenVADL/openvadl/tree/master/vadl/test/resources/testSource/sys).
our [reference specifications](https://github.com/OpenVADL/openvadl/tree/master/vadl-test/resources/testSource/sys).
These are tested and kept up to date with the current OpenVADL version.

## Contribution
Expand Down Expand Up @@ -156,4 +156,3 @@ With this, IntelliJ uses the code style rules as specified in the Checkstyle con
Note that Checkstyle and code style are not 100% compatible,
so IntelliJ will eventually generate some invalid formatted code (such as Java docs
paragraph separation).

3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("conventions-idea")
alias(libs.plugins.git.versioning)
alias(libs.plugins.kotlin.jvm) apply false
}

group = "openvadl"
Expand All @@ -23,7 +24,7 @@ gitVersioning.apply {

tasks.register<Test>("test-common") {
dependsOn(
":vadl:test-others",
":vadl-test:test-others",
":vadl-cli:test",
":vadl-lsp:test",
":java-annotations:test",
Expand Down
4 changes: 2 additions & 2 deletions java-annotations/main/vadl/javaannotations/Handler.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText : © 2025 TU Wien <vadl@tuwien.ac.at>
// SPDX-FileCopyrightText : © 2025-2026 TU Wien <vadl@tuwien.ac.at>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -142,7 +142,7 @@
*
* @see DispatchFor
*/
@Retention(java.lang.annotation.RetentionPolicy.SOURCE)
@Retention(java.lang.annotation.RetentionPolicy.CLASS)
@Target(ElementType.METHOD)
public @interface Handler {
}
12 changes: 9 additions & 3 deletions java-annotations/main/vadl/javaannotations/HandlerProcessor.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText : © 2025 TU Wien <vadl@tuwien.ac.at>
// SPDX-FileCopyrightText : © 2025-2026 TU Wien <vadl@tuwien.ac.at>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -253,7 +253,7 @@ private void collectHandlerMethodsRecursive(
// Collect methods from the current class
for (Element elem : clazz.getEnclosedElements()) {
if (elem.getKind() == ElementKind.METHOD
&& elem.getAnnotation(Handler.class) != null) {
&& hasAnnotation(elem, Handler.class.getCanonicalName())) {

ExecutableElement method = (ExecutableElement) elem;
List<? extends VariableElement> parameters = method.getParameters();
Expand Down Expand Up @@ -323,6 +323,12 @@ private void collectHandlerMethodsRecursive(
}
}

private static boolean hasAnnotation(Element element, String annotationClassName) {
return element.getAnnotationMirrors().stream()
.anyMatch(annotation ->
annotation.getAnnotationType().toString().equals(annotationClassName));
}

private boolean isVoid(TypeMirror type) {
return type.getKind() == TypeKind.VOID
|| typeUtils.isSameType(type, elementUtils.getTypeElement("java.lang.Void").asType());
Expand Down Expand Up @@ -564,4 +570,4 @@ private int getInheritanceDepth(TypeMirror type) {
private String typeMirrorSimpleName(TypeMirror typeMirror) {
return typeMirror.toString().substring(typeMirror.toString().lastIndexOf('.') + 1);
}
}
}
8 changes: 7 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ plugins {

rootProject.name = "open-vadl"

include("vadl")
include("vadl-core")
include("vadl-pass-api")
include("vadl-frontend")
include("vadl-vdt")
include("vadl-rtl")
include("vadl-iss")
include("vadl-lcb-gcb")
include("java-annotations")
include("vadl-cli")
include("vadl-lsp")
Expand Down
8 changes: 7 additions & 1 deletion vadl-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ group = "vadl"
version = "unspecified"

dependencies {
implementation(project(":vadl"))
implementation(project(":vadl-core"))
implementation(project(":vadl-pass-api"))
implementation(project(":vadl-frontend"))
implementation(project(":vadl-vdt"))
implementation(project(":vadl-rtl"))
implementation(project(":vadl-iss"))
implementation(project(":vadl-lcb-gcb"))
implementation(project(":vadl-lsp"))
implementation(libs.picocli)
implementation(libs.commons.compress)
Expand Down
3 changes: 2 additions & 1 deletion vadl-cli/main/vadl/cli/BaseCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import vadl.configuration.DumpMode;
import vadl.configuration.GeneralConfiguration;
import vadl.dump.ArtifactTracker;
import vadl.dump.PassFailureDumpHandler;
import vadl.error.DeferredDiagnosticStore;
import vadl.error.Diagnostic;
import vadl.error.DiagnosticList;
Expand Down Expand Up @@ -347,7 +348,7 @@ public Integer call() {
final var totalStartTime = System.nanoTime();
var viam = parseToVIAM();
var passOrder = passOrder(getConfig());
var passManager = new PassManager();
var passManager = new PassManager(new PassFailureDumpHandler());
passManager.add(passOrder);
passManager.run(viam);
var result = passManager.getPassResults();
Expand Down
4 changes: 2 additions & 2 deletions vadl-cli/main/vadl/cli/CheckCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import picocli.CommandLine.Command;
import vadl.configuration.GeneralConfiguration;
import vadl.pass.PassOrder;
import vadl.pass.PassOrders;
import vadl.pipeline.VdtPassOrders;

/**
* The Command does provide the check subcommand.
Expand All @@ -34,6 +34,6 @@ public class CheckCommand extends BaseCommand implements Callable<Integer> {

@Override
PassOrder passOrder(GeneralConfiguration configuration) {
return PassOrders.check(configuration);
return VdtPassOrders.check(configuration);
}
}
4 changes: 2 additions & 2 deletions vadl-cli/main/vadl/cli/IssCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import vadl.configuration.GeneralConfiguration;
import vadl.configuration.IssConfiguration;
import vadl.pass.PassOrder;
import vadl.pass.PassOrders;
import vadl.pipeline.IssPassOrders;

/**
* The Command does provide the iss subcommand.
Expand Down Expand Up @@ -77,7 +77,7 @@ PassOrder passOrder(GeneralConfiguration configuration) throws IOException {
var issConfig = new IssConfiguration(configuration);
issConfig.setDryRun(dryRun);
issConfig.setOptsToSkip(skipOpts);
return PassOrders.iss(issConfig);
return IssPassOrders.iss(issConfig);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions vadl-cli/main/vadl/cli/LcbCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import vadl.configuration.LcbConfiguration;
import vadl.gcb.valuetypes.TargetName;
import vadl.pass.PassOrder;
import vadl.pass.PassOrders;
import vadl.pipeline.LcbGcbPassOrders;

/**
* The Command does provide the lcb subcommand.
Expand All @@ -51,7 +51,7 @@ public class LcbCommand extends BaseCommand {
@Override
PassOrder passOrder(GeneralConfiguration configuration) throws IOException {
var lcbConfig = new LcbConfiguration(configuration, targetName(), skipPatternGeneration);
return PassOrders.lcb(lcbConfig);
return LcbGcbPassOrders.lcb(lcbConfig);
}

@Nullable
Expand Down
4 changes: 2 additions & 2 deletions vadl-cli/main/vadl/cli/RtlCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import vadl.configuration.GeneralConfiguration;
import vadl.configuration.RtlConfiguration;
import vadl.pass.PassOrder;
import vadl.pass.PassOrders;
import vadl.pipeline.RtlPassOrders;

/**
* The Command does provide the rtl subcommand.
Expand Down Expand Up @@ -100,6 +100,6 @@ PassOrder passOrder(GeneralConfiguration configuration) throws IOException {
rtlConfig.setProjectName(projectName);
rtlConfig.setEmitRVFI(emitRVFI);
rtlConfig.setDryRun(dryRun);
return PassOrders.rtl(rtlConfig);
return RtlPassOrders.rtl(rtlConfig);
}
}
33 changes: 33 additions & 0 deletions vadl-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import java.util.Properties

plugins {
id("conventions-jvm")
}

dependencies {
annotationProcessor(project(":java-annotations"))
compileOnly(project(":java-annotations"))
implementation(libs.guava)
implementation(libs.commons.io)
implementation(libs.commons.lang3)
implementation(libs.commons.text)
}

val createProperties by tasks.registering {
val outputDir = layout.buildDirectory.dir("generated/resources")
val versionFile = outputDir.map { it.file("open-vadl.properties") }

outputs.file(versionFile)
doLast {
val properties = Properties()
properties["version"] = rootProject.version.toString()
versionFile.get().asFile.apply {
parentFile.mkdirs()
outputStream().use { properties.store(it, null) }
}
}
}

tasks.processResources {
from(createProperties)
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import javax.annotation.Nullable;
import org.jetbrains.annotations.Contract;
import org.slf4j.Logger;
import vadl.ast.AsmGrammarDefaultRules;
import vadl.utils.functionInterfaces.TriFunction;
import vadl.viam.Constant;
import vadl.viam.ViamError;
Expand Down Expand Up @@ -1142,7 +1141,6 @@ public class BuiltInTable {
/**
* Checks if the token kind at lookahead {@code n} in the AsmParser
* is any of the kinds passed as strings in {@code s}.
* To see all possible token kinds refer to the terminal rules in {@link AsmGrammarDefaultRules}.
*
* <p>{@code function LaKindIn(n: UInt<N>,s: String...) -> Bool}
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 40 additions & 0 deletions vadl-core/main/vadl/viam/InstructionWordOrderExtension.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// SPDX-FileCopyrightText : © 2025-2026 TU Wien <vadl@tuwien.ac.at>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

package vadl.viam;

import java.nio.ByteOrder;

/**
* Stores the byte order used to interpret an instruction word.
*/
public class InstructionWordOrderExtension extends DefinitionExtension<InstructionSetArchitecture> {

private final ByteOrder byteOrder;

public InstructionWordOrderExtension(ByteOrder byteOrder) {
this.byteOrder = byteOrder;
}

public ByteOrder byteOrder() {
return byteOrder;
}

@Override
public Class<? extends Definition> extendsDefClass() {
return InstructionSetArchitecture.class;
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText : © 2025 TU Wien <vadl@tuwien.ac.at>
// SPDX-FileCopyrightText : © 2025-2026 TU Wien <vadl@tuwien.ac.at>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
Expand All @@ -14,16 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

package vadl.gcb.annotations;
package vadl.viam.annotations;

import vadl.gcb.passes.InstructionPatternPruningPass;
import vadl.viam.Annotation;
import vadl.viam.CompilerInstruction;
import vadl.viam.Instruction;

/**
* This annotation defines that an {@link Instruction} should not be pruned in
* {@link InstructionPatternPruningPass}.
* This annotation marks compiler instructions that only support negative numbers.
*/
public class OnlyNegativeNumbersAnnotation extends Annotation<CompilerInstruction> {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText : © 2025 TU Wien <vadl@tuwien.ac.at>
// SPDX-FileCopyrightText : © 2025-2026 TU Wien <vadl@tuwien.ac.at>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
Expand All @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

package vadl.gcb.annotations;
package vadl.viam.annotations;

import vadl.viam.Annotation;
import vadl.viam.Relocation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText : © 2025 TU Wien <vadl@tuwien.ac.at>
// SPDX-FileCopyrightText : © 2025-2026 TU Wien <vadl@tuwien.ac.at>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
Expand All @@ -14,15 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

package vadl.gcb.annotations;
package vadl.viam.annotations;

import vadl.gcb.passes.InstructionPatternPruningPass;
import vadl.viam.Annotation;
import vadl.viam.Instruction;

/**
* This annotation defines that an {@link Instruction} should not be pruned in
* {@link InstructionPatternPruningPass}.
* This annotation marks instructions that should be retained during pruning.
*/
public class SkipPruningAnnotation extends Annotation<Instruction> {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText : © 2025 TU Wien <vadl@tuwien.ac.at>
// SPDX-FileCopyrightText : © 2025-2026 TU Wien <vadl@tuwien.ac.at>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
Expand All @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

package vadl.gcb.annotations;
package vadl.viam.annotations;

import vadl.viam.RegisterTensor;

Expand Down Expand Up @@ -52,4 +52,4 @@ public static class CarryStatusRegisterAnnotation extends StatusRegisterAnnotati
*/
public static class OverflowStatusRegisterAnnotation extends StatusRegisterAnnotation {
}
}
}
Loading
Loading