From 048fb80aef21726c2ee26180d8f4589a8b0ebd96 Mon Sep 17 00:00:00 2001 From: Christian Menard Date: Thu, 14 Nov 2024 16:07:13 +0100 Subject: [PATCH] Repaired export-dependency-graph property and dropped unsupported export-to-yaml property --- .../main/java/org/lflang/target/Target.java | 2 -- .../target/property/ExportToYamlProperty.java | 23 ------------------- .../cpp/CppStandaloneMainGenerator.kt | 4 +--- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 core/src/main/java/org/lflang/target/property/ExportToYamlProperty.java diff --git a/core/src/main/java/org/lflang/target/Target.java b/core/src/main/java/org/lflang/target/Target.java index 30048f5a58..c99ed4a0d3 100644 --- a/core/src/main/java/org/lflang/target/Target.java +++ b/core/src/main/java/org/lflang/target/Target.java @@ -40,7 +40,6 @@ import org.lflang.target.property.CoordinationProperty; import org.lflang.target.property.DockerProperty; import org.lflang.target.property.ExportDependencyGraphProperty; -import org.lflang.target.property.ExportToYamlProperty; import org.lflang.target.property.ExternalRuntimePathProperty; import org.lflang.target.property.FilesProperty; import org.lflang.target.property.KeepaliveProperty; @@ -612,7 +611,6 @@ public void initialize(TargetConfig config) { CompilerProperty.INSTANCE, DockerProperty.INSTANCE, ExportDependencyGraphProperty.INSTANCE, - ExportToYamlProperty.INSTANCE, ExternalRuntimePathProperty.INSTANCE, NoRuntimeValidationProperty.INSTANCE, PrintStatisticsProperty.INSTANCE, diff --git a/core/src/main/java/org/lflang/target/property/ExportToYamlProperty.java b/core/src/main/java/org/lflang/target/property/ExportToYamlProperty.java deleted file mode 100644 index e592c3d8ec..0000000000 --- a/core/src/main/java/org/lflang/target/property/ExportToYamlProperty.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.lflang.target.property; - -/** - * If true, the resulting binary will output a yaml file describing the whole reactor structure of - * the program. - * - *

This option is currently only used for C++. This export function is a valuable tool for - * debugging LF programs and performing external analysis. - */ -public final class ExportToYamlProperty extends BooleanProperty { - - /** Singleton target property instance. */ - public static final ExportToYamlProperty INSTANCE = new ExportToYamlProperty(); - - private ExportToYamlProperty() { - super(); - } - - @Override - public String name() { - return "export-to-yaml"; - } -} diff --git a/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneMainGenerator.kt b/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneMainGenerator.kt index 870f9ee267..782dada4b3 100644 --- a/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneMainGenerator.kt +++ b/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneMainGenerator.kt @@ -6,7 +6,6 @@ import org.lflang.inferredType import org.lflang.lf.Parameter import org.lflang.lf.Reactor import org.lflang.target.property.ExportDependencyGraphProperty -import org.lflang.target.property.ExportToYamlProperty import org.lflang.target.property.FastProperty import org.lflang.target.property.TimeOutProperty import org.lflang.target.property.WorkersProperty @@ -101,12 +100,11 @@ class CppStandaloneMainGenerator( | | // assemble reactor program | e.assemble(); - ${" |".. if (targetConfig.get(ExportDependencyGraphProperty.INSTANCE)) "e.export_dependency_graph(\"${main.name}.dot\");" else ""} - ${" |".. if (targetConfig.get(ExportToYamlProperty.INSTANCE)) "e.dump_to_yaml(\"${main.name}.yaml\");" else ""} | | // start execution | auto thread = e.startup(); | thread.join(); + ${" |".. if (targetConfig.get(ExportDependencyGraphProperty.INSTANCE)) "e.export_dependency_graph(\"${main.name}.dot\");" else ""} | return 0; |} """.trimMargin()