aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2023-09-14 19:29:36 +0200
committerLibravatar GitHub <noreply@github.com>2023-09-14 19:29:36 +0200
commit98ed3b6db5f4e51961a161050cc31c66015116e8 (patch)
tree8bfd6d9bc8d6ed23b9eb0f889dd40b6c24fe8f92 /subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java
parentMerge pull request #38 from nagilooh/design-space-exploration (diff)
parentMerge remote-tracking branch 'upstream/main' into partial-interpretation (diff)
downloadrefinery-98ed3b6db5f4e51961a161050cc31c66015116e8.tar.gz
refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.tar.zst
refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.zip
Merge pull request #39 from kris7t/partial-interpretation
Implement partial interpretation based model generation
Diffstat (limited to 'subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java')
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java111
1 files changed, 111 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java
new file mode 100644
index 00000000..96cc445f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java
@@ -0,0 +1,111 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.util;
11
12import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
13import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
14import tools.refinery.viatra.runtime.matchers.planning.IQueryPlannerStrategy;
15import tools.refinery.viatra.runtime.rete.construction.basiclinear.BasicLinearLayout;
16import tools.refinery.viatra.runtime.rete.construction.quasitree.QuasiTreeLayout;
17import tools.refinery.viatra.runtime.rete.network.communication.timely.TimelyCommunicationGroup;
18
19/**
20 * Feature switches.
21 * @author Gabor Bergmann
22 * @noreference
23 */
24public class Options {
25
26 public enum NodeSharingOption {
27 NEVER, // not recommended, patternmatcher leaks possible
28 INDEXER_AND_REMOTEPROXY, ALL
29 }
30
31 public static final NodeSharingOption nodeSharingOption = NodeSharingOption.ALL;
32 public static final boolean releaseOnetimeIndexers = true; // effective only
33 // with
34 // nodesharing
35 // ==NEVER
36
37 public enum InjectivityStrategy {
38 EAGER, LAZY
39 }
40
41 public static final InjectivityStrategy injectivityStrategy = InjectivityStrategy.EAGER;
42
43 public static final boolean enableInheritance = true;
44
45 // public final static boolean useComplementerMask = true;
46
47 public static final boolean employTrivialIndexers = true;
48
49 // public final static boolean synchronous = false;
50
51 public static final int numberOfLocalContainers = 1;
52 public static final int firstFreeContainer = 0; // 0 if head container is
53 // free to contain pattern
54 // bodies, 1 otherwise
55
56 /**
57 * Enable for internal debugging of Rete communication scheme;
58 * catches cases where the topological sort is violated by a message sent "backwards"
59 * @since 1.6
60 */
61 public static final boolean MONITOR_VIOLATION_OF_RETE_NODEGROUP_TOPOLOGICAL_SORTING = false;
62
63 /**
64 * Enable for internal debugging of message delivery in {@link TimelyCommunicationGroup}s;
65 * catches cases when there is a violation of increasing timestamps during message delivery within a group.
66 * @since 2.3
67 */
68 public static final boolean MONITOR_VIOLATION_OF_DIFFERENTIAL_DATAFLOW_TIMESTAMPS = false;
69
70 /**
71 *
72 * @author Gabor Bergmann
73 * @noreference
74 */
75 public enum BuilderMethod {
76 LEGACY, // ONLY with GTASM
77 PSYSTEM_BASIC_LINEAR, PSYSTEM_QUASITREE;
78 /**
79 * @since 1.5
80 */
81 public IQueryPlannerStrategy layoutStrategy(IQueryBackendContext bContext, IQueryBackendHintProvider hintProvider) {
82 switch (this) {
83 case PSYSTEM_BASIC_LINEAR:
84 return new BasicLinearLayout(bContext);
85 case PSYSTEM_QUASITREE:
86 return new QuasiTreeLayout(bContext, hintProvider);
87 default:
88 throw new UnsupportedOperationException();
89 }
90 }
91 }
92
93 public static final BuilderMethod builderMethod =
94 // BuilderMethod.PSYSTEM_BASIC_LINEAR;
95 BuilderMethod.PSYSTEM_QUASITREE;
96
97 public enum FunctionalDependencyOption {
98 OFF,
99 OPPORTUNISTIC
100 }
101 public static final FunctionalDependencyOption functionalDependencyOption =
102 FunctionalDependencyOption.OPPORTUNISTIC;
103
104 public enum PlanTrimOption {
105 OFF,
106 OPPORTUNISTIC
107 }
108 public static final PlanTrimOption planTrimOption =
109 PlanTrimOption.OPPORTUNISTIC;
110
111}