aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java
blob: 5a304030ef4e06d6564f62534501ac5ca8d64432 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/>
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package tools.refinery.store.reasoning.interpretation;

import tools.refinery.logic.AbstractValue;
import tools.refinery.store.map.Cursor;
import tools.refinery.store.model.ModelStoreBuilder;
import tools.refinery.store.reasoning.ReasoningAdapter;
import tools.refinery.store.reasoning.literal.Concreteness;
import tools.refinery.store.reasoning.representation.PartialSymbol;
import tools.refinery.store.tuple.Tuple;

import java.util.Set;

public non-sealed interface PartialInterpretation<A extends AbstractValue<A, C>, C> extends AnyPartialInterpretation {
	@Override
	PartialSymbol<A, C> getPartialSymbol();

	A get(Tuple key);

	Cursor<Tuple, A> getAll();

	@FunctionalInterface
	interface Factory<A extends AbstractValue<A, C>, C> {
		PartialInterpretation<A, C> create(ReasoningAdapter adapter, Concreteness concreteness,
										   PartialSymbol<A, C> partialSymbol);

		default void configure(ModelStoreBuilder storeBuilder, Set<Concreteness> requiredInterpretations) {
			// Nothing to configure by default.
		}
	}
}